()
| 56 | } |
| 57 | |
| 58 | async initialize(): Promise<void> { |
| 59 | const [worldTime, worldInfo] = await Promise.all([ |
| 60 | apiClient.getWorldTime(), |
| 61 | apiClient.getWorldInfo(), |
| 62 | ]); |
| 63 | this.currentTime = worldTime; |
| 64 | this.sceneConfig = worldInfo.sceneConfig; |
| 65 | if (worldInfo.currentWorldId && worldInfo.currentTimelineId) { |
| 66 | this.liveContext = { |
| 67 | worldId: worldInfo.currentWorldId, |
| 68 | timelineId: worldInfo.currentTimelineId, |
| 69 | }; |
| 70 | } |
| 71 | this.globalEventBus.emit("time_update", { ...this.currentTime }); |
| 72 | this.globalEventBus.emit("simulation_status", { status: "idle" }); |
| 73 | this.emitPlaybackState(); |
| 74 | } |
| 75 | |
| 76 | getCurrentTime(): WorldTimeInfo { |
| 77 | return { ...this.currentTime }; |
no test coverage detected