Removing Typescript on maps container

Typescript is almost not used on this container (and causing a bunch of startup errors that are not important but worrying first time users). Removing it completely.
This commit is contained in:
David Négrier
2022-04-11 22:35:58 +02:00
parent 28778b8de4
commit a689756d85
6 changed files with 21 additions and 1285 deletions
+18
View File
@@ -0,0 +1,18 @@
/// <reference path="../node_modules/@workadventure/iframe-api-typings/iframe_api.d.ts" />
let currentPopup = undefined;
const today = new Date();
const time = today.getHours() + ":" + today.getMinutes();
WA.room.onEnterZone('clock', () => {
currentPopup = WA.ui.openPopup("clockPopup","It's " + time,[]);
})
WA.room.onLeaveZone('clock', closePopUp)
function closePopUp(){
if (currentPopup !== undefined) {
currentPopup.close();
currentPopup = undefined;
}
}