collisionGrid now updates on showing / hiding layers
This commit is contained in:
parent
31f3b2b48e
commit
b32a2970e4
6 changed files with 210 additions and 3 deletions
26
maps/tests/DoorTest/script.php
Normal file
26
maps/tests/DoorTest/script.php
Normal file
|
@ -0,0 +1,26 @@
|
|||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<script src="<?php echo $_SERVER["FRONT_URL"] ?>/iframe_api.js"></script>
|
||||
<script>
|
||||
let closed = true;
|
||||
window.addEventListener('load', () => {
|
||||
//@ts-ignore
|
||||
WA.onInit().then(() => {
|
||||
console.log('After WA init');
|
||||
const toogleDoorButton = document.getElementById('toogleDoorButton');
|
||||
|
||||
toogleDoorButton.addEventListener('click', async () => {
|
||||
closed ? WA.room.hideLayer('closedPath') : WA.room.showLayer('closedPath');
|
||||
closed = !closed;
|
||||
});
|
||||
});
|
||||
})
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<button id="toogleDoorButton">Toggle Door</button>
|
||||
|
||||
</body>
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue