| | |
| | | Tool.setThemeMode(themeMode); |
| | | Http.setNotify(notify); |
| | | Http.setMapContainer(player.mapContainer); |
| | | // websocket = new WebSocketClient('/ws/map/websocket'); |
| | | websocket = new WebSocketClient('/ws/map/websocket'); |
| | | |
| | | await Http.fetchMapData(); |
| | | websocket.connect(); |
| | | websocket.onMessage = (data) => { |
| | | console.log("ws", data); |
| | | |
| | | // Tool.updateMapStatusInRealTime(data, () => curFloorRef.current, setCurSPrite); |
| | | } |
| | | |
| | | setTimeout(() => { |
| | | player.adaptScreen(); |
| | | notify.info(translate('page.map.welcome')); |
| | | }, 200) |
| | | |
| | | // websocket.connect(); |
| | | // websocket.onMessage = (data) => { |
| | | // Tool.updateMapStatusInRealTime(data, () => curFloorRef.current, setCurSPrite); |
| | | // } |
| | | |
| | | } |
| | | initialize(); |
| | | |