Adding maps for test metadata
Documentation of metadata functions/methods
This commit is contained in:
parent
ce0a72c6ce
commit
96545c618a
16 changed files with 1571 additions and 59 deletions
40
maps/tests/Metadata/getGameState2.html
Normal file
40
maps/tests/Metadata/getGameState2.html
Normal file
|
@ -0,0 +1,40 @@
|
|||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<script src="http://play.workadventure.localhost/iframe_api.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<button id="getStartLayer">StartLayer</button>
|
||||
<div id="startLayer"></div>
|
||||
|
||||
<button id="getMapUrl">MapUrl</button>
|
||||
<div id="mapUrl"></div>
|
||||
|
||||
<button id="getMap">MAP</button>
|
||||
<div id="map"></div>
|
||||
|
||||
<script>
|
||||
document.getElementById('getStartLayer').onclick = () => {
|
||||
WA.getStartLayerName().then((res) => {
|
||||
const startLayerDiv = document.createElement('p');
|
||||
startLayerDiv.innerText = res;
|
||||
document.getElementById('startLayer').append(startLayerDiv);
|
||||
});
|
||||
}
|
||||
|
||||
document.getElementById('getMapUrl').onclick = () => {
|
||||
WA.getMapUrl().then((res) => {
|
||||
const mapUrlDiv = document.createElement('p');
|
||||
mapUrlDiv.innerText = res;
|
||||
document.getElementById('mapUrl').append(mapUrlDiv);
|
||||
});
|
||||
}
|
||||
|
||||
document.getElementById('getMap').onclick = () => {
|
||||
WA.getMap().then((res) => {
|
||||
console.log(res);
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue