@verticopolis/components 0.0.0-stage → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ASSETS-LICENSE.md +49 -0
- package/LICENSE +21 -0
- package/README.md +121 -2
- package/lib/audio/Audio.d.ts +110 -0
- package/lib/audio/Audio.js +199 -0
- package/lib/audio/Audio.js.map +1 -0
- package/lib/audio/ToneAudioEngine.d.ts +125 -0
- package/lib/audio/ToneAudioEngine.js +452 -0
- package/lib/audio/ToneAudioEngine.js.map +1 -0
- package/lib/audio/audioAssets.d.ts +25 -0
- package/lib/audio/audioAssets.js +28 -0
- package/lib/audio/audioAssets.js.map +1 -0
- package/lib/audio/awayWatch.d.ts +17 -0
- package/lib/audio/awayWatch.js +33 -0
- package/lib/audio/awayWatch.js.map +1 -0
- package/lib/audio/firstCueLatch.d.ts +18 -0
- package/lib/audio/firstCueLatch.js +34 -0
- package/lib/audio/firstCueLatch.js.map +1 -0
- package/lib/audio/lightEnvelope.d.ts +64 -0
- package/lib/audio/lightEnvelope.js +124 -0
- package/lib/audio/lightEnvelope.js.map +1 -0
- package/lib/audio/lightSynth.d.ts +125 -0
- package/lib/audio/lightSynth.js +203 -0
- package/lib/audio/lightSynth.js.map +1 -0
- package/lib/audio/toneContext.d.ts +30 -0
- package/lib/audio/toneContext.js +79 -0
- package/lib/audio/toneContext.js.map +1 -0
- package/lib/audio/toneCrowd.d.ts +62 -0
- package/lib/audio/toneCrowd.js +429 -0
- package/lib/audio/toneCrowd.js.map +1 -0
- package/lib/audio/toneCrowdData.d.ts +144 -0
- package/lib/audio/toneCrowdData.js +317 -0
- package/lib/audio/toneCrowdData.js.map +1 -0
- package/lib/audio/toneCrowdPrograms.d.ts +71 -0
- package/lib/audio/toneCrowdPrograms.js +273 -0
- package/lib/audio/toneCrowdPrograms.js.map +1 -0
- package/lib/audio/toneCrowdVoices.d.ts +49 -0
- package/lib/audio/toneCrowdVoices.js +212 -0
- package/lib/audio/toneCrowdVoices.js.map +1 -0
- package/lib/audio/toneMusicVoices.d.ts +11 -0
- package/lib/audio/toneMusicVoices.js +31 -0
- package/lib/audio/toneMusicVoices.js.map +1 -0
- package/lib/audio/tonePercussion.d.ts +45 -0
- package/lib/audio/tonePercussion.js +97 -0
- package/lib/audio/tonePercussion.js.map +1 -0
- package/lib/audio/toneRain.d.ts +23 -0
- package/lib/audio/toneRain.js +39 -0
- package/lib/audio/toneRain.js.map +1 -0
- package/lib/audio/toneRecordingMock.d.ts +89 -0
- package/lib/audio/toneRecordingMock.js +145 -0
- package/lib/audio/toneRecordingMock.js.map +1 -0
- package/lib/audio/toneRoomTone.d.ts +11 -0
- package/lib/audio/toneRoomTone.js +27 -0
- package/lib/audio/toneRoomTone.js.map +1 -0
- package/lib/audio/toneScenes.d.ts +57 -0
- package/lib/audio/toneScenes.js +208 -0
- package/lib/audio/toneScenes.js.map +1 -0
- package/lib/audio/toneTracks.d.ts +50 -0
- package/lib/audio/toneTracks.js +356 -0
- package/lib/audio/toneTracks.js.map +1 -0
- package/lib/audio/toneVoices.d.ts +57 -0
- package/lib/audio/toneVoices.js +208 -0
- package/lib/audio/toneVoices.js.map +1 -0
- package/lib/catalog/catalogTypes.d.ts +428 -0
- package/lib/catalog/catalogTypes.js +102 -0
- package/lib/catalog/catalogTypes.js.map +1 -0
- package/lib/catalog/skyBridgeTypes.d.ts +25 -0
- package/lib/catalog/skyBridgeTypes.js +7 -0
- package/lib/catalog/skyBridgeTypes.js.map +1 -0
- package/lib/catalog/starDutyTypes.d.ts +22 -0
- package/lib/catalog/starDutyTypes.js +7 -0
- package/lib/catalog/starDutyTypes.js.map +1 -0
- package/lib/catalog/towerCatalog.d.ts +32 -0
- package/lib/catalog/towerCatalog.js +44 -0
- package/lib/catalog/towerCatalog.js.map +1 -0
- package/lib/engineBinding/binding.d.ts +36 -0
- package/lib/engineBinding/binding.js +90 -0
- package/lib/engineBinding/binding.js.map +1 -0
- package/lib/engineBinding/catalog.d.ts +24 -0
- package/lib/engineBinding/catalog.js +267 -0
- package/lib/engineBinding/catalog.js.map +1 -0
- package/lib/engineBinding/engine.d.ts +866 -0
- package/lib/engineBinding/exportTiers.d.ts +289 -0
- package/lib/engineBinding/exportTiers.js +283 -0
- package/lib/engineBinding/exportTiers.js.map +1 -0
- package/lib/engineBinding/toolingMethods.d.ts +12 -0
- package/lib/engineBinding/toolingMethods.js +20 -0
- package/lib/engineBinding/toolingMethods.js.map +1 -0
- package/lib/events/gameplayCatalog.d.ts +57 -0
- package/lib/events/gameplayCatalog.js +214 -0
- package/lib/events/gameplayCatalog.js.map +1 -0
- package/lib/events/gameplayEventRules.d.ts +4 -0
- package/lib/events/gameplayEventRules.js +32 -0
- package/lib/events/gameplayEventRules.js.map +1 -0
- package/lib/events/gameplayEvents.d.ts +284 -0
- package/lib/presentation/clockText.d.ts +28 -0
- package/lib/presentation/clockText.js +38 -0
- package/lib/presentation/clockText.js.map +1 -0
- package/lib/presentation/facilityPresentation.d.ts +20 -0
- package/lib/presentation/facilityPresentation.js +164 -0
- package/lib/presentation/facilityPresentation.js.map +1 -0
- package/lib/presentation/statsCopy.d.ts +20 -0
- package/lib/presentation/statsCopy.js +37 -0
- package/lib/presentation/statsCopy.js.map +1 -0
- package/lib/presentation/traffic.d.ts +75 -0
- package/lib/presentation/traffic.js +79 -0
- package/lib/presentation/traffic.js.map +1 -0
- package/lib/presentation/viewKinds.d.ts +33 -0
- package/lib/presentation/viewKinds.js +88 -0
- package/lib/presentation/viewKinds.js.map +1 -0
- package/lib/presentation/viewWorld.d.ts +29 -0
- package/lib/presentation/viewWorld.js +31 -0
- package/lib/presentation/viewWorld.js.map +1 -0
- package/lib/render/atlas/archive.d.ts +78 -0
- package/lib/render/atlas/archive.js +427 -0
- package/lib/render/atlas/archive.js.map +1 -0
- package/lib/render/atlas/bake.d.ts +132 -0
- package/lib/render/atlas/bake.js +331 -0
- package/lib/render/atlas/bake.js.map +1 -0
- package/lib/render/atlas/bakeAdditions.d.ts +24 -0
- package/lib/render/atlas/bakeAdditions.js +46 -0
- package/lib/render/atlas/bakeAdditions.js.map +1 -0
- package/lib/render/atlas/browserEntry.d.ts +12 -0
- package/lib/render/atlas/browserEntry.js +222 -0
- package/lib/render/atlas/browserEntry.js.map +1 -0
- package/lib/render/atlas/catalog.d.ts +118 -0
- package/lib/render/atlas/catalog.js +253 -0
- package/lib/render/atlas/catalog.js.map +1 -0
- package/lib/render/atlas/catalogExtras.d.ts +45 -0
- package/lib/render/atlas/catalogExtras.js +217 -0
- package/lib/render/atlas/catalogExtras.js.map +1 -0
- package/lib/render/atlas/compose.d.ts +30 -0
- package/lib/render/atlas/compose.js +125 -0
- package/lib/render/atlas/compose.js.map +1 -0
- package/lib/render/atlas/cycles.d.ts +25 -0
- package/lib/render/atlas/cycles.js +41 -0
- package/lib/render/atlas/cycles.js.map +1 -0
- package/lib/render/atlas/lookup.d.ts +65 -0
- package/lib/render/atlas/lookup.js +83 -0
- package/lib/render/atlas/lookup.js.map +1 -0
- package/lib/render/atlas/pack.d.ts +23 -0
- package/lib/render/atlas/pack.js +50 -0
- package/lib/render/atlas/pack.js.map +1 -0
- package/lib/render/atlas/paint.d.ts +120 -0
- package/lib/render/atlas/paint.js +154 -0
- package/lib/render/atlas/paint.js.map +1 -0
- package/lib/render/atlas/pixels.d.ts +46 -0
- package/lib/render/atlas/pixels.js +158 -0
- package/lib/render/atlas/pixels.js.map +1 -0
- package/lib/render/atlas/png.d.ts +3 -0
- package/lib/render/atlas/png.js +102 -0
- package/lib/render/atlas/png.js.map +1 -0
- package/lib/render/atlas/raster.d.ts +34 -0
- package/lib/render/atlas/raster.js +114 -0
- package/lib/render/atlas/raster.js.map +1 -0
- package/lib/render/atlas/recyclingFill.d.ts +5 -0
- package/lib/render/atlas/recyclingFill.js +65 -0
- package/lib/render/atlas/recyclingFill.js.map +1 -0
- package/lib/render/atlas/samples.d.ts +24 -0
- package/lib/render/atlas/samples.js +75 -0
- package/lib/render/atlas/samples.js.map +1 -0
- package/lib/render/atlas/scenery.d.ts +230 -0
- package/lib/render/atlas/scenery.js +242 -0
- package/lib/render/atlas/scenery.js.map +1 -0
- package/lib/render/atlas/schema.d.ts +189 -0
- package/lib/render/atlas/schema.js +31 -0
- package/lib/render/atlas/schema.js.map +1 -0
- package/lib/render/atlas/shellMarks.d.ts +16 -0
- package/lib/render/atlas/shellMarks.js +72 -0
- package/lib/render/atlas/shellMarks.js.map +1 -0
- package/lib/render/atlas/store.d.ts +75 -0
- package/lib/render/atlas/store.js +127 -0
- package/lib/render/atlas/store.js.map +1 -0
- package/lib/render/atlas/verify.d.ts +43 -0
- package/lib/render/atlas/verify.js +87 -0
- package/lib/render/atlas/verify.js.map +1 -0
- package/lib/render/atlas/verifyExtras.d.ts +19 -0
- package/lib/render/atlas/verifyExtras.js +310 -0
- package/lib/render/atlas/verifyExtras.js.map +1 -0
- package/lib/render/cameraBounds.d.ts +71 -0
- package/lib/render/cameraBounds.js +107 -0
- package/lib/render/cameraBounds.js.map +1 -0
- package/lib/render/carIndicator.d.ts +41 -0
- package/lib/render/carIndicator.js +45 -0
- package/lib/render/carIndicator.js.map +1 -0
- package/lib/render/carMotion.d.ts +33 -0
- package/lib/render/carMotion.js +42 -0
- package/lib/render/carMotion.js.map +1 -0
- package/lib/render/catalogScale.d.ts +40 -0
- package/lib/render/catalogScale.js +33 -0
- package/lib/render/catalogScale.js.map +1 -0
- package/lib/render/climbPath.d.ts +59 -0
- package/lib/render/climbPath.js +115 -0
- package/lib/render/climbPath.js.map +1 -0
- package/lib/render/depthPlanes.d.ts +55 -0
- package/lib/render/depthPlanes.js +58 -0
- package/lib/render/depthPlanes.js.map +1 -0
- package/lib/render/excalibur/TowerEngine.d.ts +348 -0
- package/lib/render/excalibur/TowerEngine.js +415 -0
- package/lib/render/excalibur/TowerEngine.js.map +1 -0
- package/lib/render/excalibur/cabGraphics.d.ts +75 -0
- package/lib/render/excalibur/cabGraphics.js +108 -0
- package/lib/render/excalibur/cabGraphics.js.map +1 -0
- package/lib/render/excalibur/cabParts.d.ts +32 -0
- package/lib/render/excalibur/cabParts.js +79 -0
- package/lib/render/excalibur/cabParts.js.map +1 -0
- package/lib/render/excalibur/cabRiders.d.ts +72 -0
- package/lib/render/excalibur/cabRiders.js +176 -0
- package/lib/render/excalibur/cabRiders.js.map +1 -0
- package/lib/render/excalibur/crowdCull.d.ts +34 -0
- package/lib/render/excalibur/crowdCull.js +72 -0
- package/lib/render/excalibur/crowdCull.js.map +1 -0
- package/lib/render/excalibur/crowdFigure.d.ts +42 -0
- package/lib/render/excalibur/crowdFigure.js +99 -0
- package/lib/render/excalibur/crowdFigure.js.map +1 -0
- package/lib/render/excalibur/crowdLook.d.ts +137 -0
- package/lib/render/excalibur/crowdLook.js +186 -0
- package/lib/render/excalibur/crowdLook.js.map +1 -0
- package/lib/render/excalibur/frameHold.d.ts +23 -0
- package/lib/render/excalibur/frameHold.js +30 -0
- package/lib/render/excalibur/frameHold.js.map +1 -0
- package/lib/render/excalibur/guardPosition.d.ts +17 -0
- package/lib/render/excalibur/guardPosition.js +37 -0
- package/lib/render/excalibur/guardPosition.js.map +1 -0
- package/lib/render/excalibur/keyboardHost.d.ts +15 -0
- package/lib/render/excalibur/keyboardHost.js +22 -0
- package/lib/render/excalibur/keyboardHost.js.map +1 -0
- package/lib/render/excalibur/longPress.d.ts +16 -0
- package/lib/render/excalibur/longPress.js +71 -0
- package/lib/render/excalibur/longPress.js.map +1 -0
- package/lib/render/excalibur/peopleGfx.d.ts +16 -0
- package/lib/render/excalibur/peopleGfx.js +46 -0
- package/lib/render/excalibur/peopleGfx.js.map +1 -0
- package/lib/render/excalibur/peopleWindow.d.ts +35 -0
- package/lib/render/excalibur/peopleWindow.js +38 -0
- package/lib/render/excalibur/peopleWindow.js.map +1 -0
- package/lib/render/excalibur/personFocus.d.ts +36 -0
- package/lib/render/excalibur/personFocus.js +169 -0
- package/lib/render/excalibur/personFocus.js.map +1 -0
- package/lib/render/excalibur/pointerButtonGuard.d.ts +35 -0
- package/lib/render/excalibur/pointerButtonGuard.js +86 -0
- package/lib/render/excalibur/pointerButtonGuard.js.map +1 -0
- package/lib/render/excalibur/pressLifecycle.d.ts +26 -0
- package/lib/render/excalibur/pressLifecycle.js +66 -0
- package/lib/render/excalibur/pressLifecycle.js.map +1 -0
- package/lib/render/excalibur/rainShelter.d.ts +16 -0
- package/lib/render/excalibur/rainShelter.js +94 -0
- package/lib/render/excalibur/rainShelter.js.map +1 -0
- package/lib/render/excalibur/roomSignature.d.ts +30 -0
- package/lib/render/excalibur/roomSignature.js +49 -0
- package/lib/render/excalibur/roomSignature.js.map +1 -0
- package/lib/render/excalibur/sceneBake.d.ts +9 -0
- package/lib/render/excalibur/sceneBake.js +12 -0
- package/lib/render/excalibur/sceneBake.js.map +1 -0
- package/lib/render/excalibur/thiefSpan.d.ts +18 -0
- package/lib/render/excalibur/thiefSpan.js +51 -0
- package/lib/render/excalibur/thiefSpan.js.map +1 -0
- package/lib/render/excalibur/towerBridgeTiles.d.ts +30 -0
- package/lib/render/excalibur/towerBridgeTiles.js +43 -0
- package/lib/render/excalibur/towerBridgeTiles.js.map +1 -0
- package/lib/render/excalibur/towerCrowd.d.ts +73 -0
- package/lib/render/excalibur/towerCrowd.js +464 -0
- package/lib/render/excalibur/towerCrowd.js.map +1 -0
- package/lib/render/excalibur/towerCrowdLayout.d.ts +40 -0
- package/lib/render/excalibur/towerCrowdLayout.js +77 -0
- package/lib/render/excalibur/towerCrowdLayout.js.map +1 -0
- package/lib/render/excalibur/towerFireResponse.d.ts +25 -0
- package/lib/render/excalibur/towerFireResponse.js +89 -0
- package/lib/render/excalibur/towerFireResponse.js.map +1 -0
- package/lib/render/excalibur/towerFrame.d.ts +8 -0
- package/lib/render/excalibur/towerFrame.js +57 -0
- package/lib/render/excalibur/towerFrame.js.map +1 -0
- package/lib/render/excalibur/towerGhostLabel.d.ts +9 -0
- package/lib/render/excalibur/towerGhostLabel.js +37 -0
- package/lib/render/excalibur/towerGhostLabel.js.map +1 -0
- package/lib/render/excalibur/towerHallDoors.d.ts +42 -0
- package/lib/render/excalibur/towerHallDoors.js +129 -0
- package/lib/render/excalibur/towerHallDoors.js.map +1 -0
- package/lib/render/excalibur/towerHaloRings.d.ts +34 -0
- package/lib/render/excalibur/towerHaloRings.js +45 -0
- package/lib/render/excalibur/towerHaloRings.js.map +1 -0
- package/lib/render/excalibur/towerInputCamera.d.ts +90 -0
- package/lib/render/excalibur/towerInputCamera.js +480 -0
- package/lib/render/excalibur/towerInputCamera.js.map +1 -0
- package/lib/render/excalibur/towerMetro.d.ts +31 -0
- package/lib/render/excalibur/towerMetro.js +115 -0
- package/lib/render/excalibur/towerMetro.js.map +1 -0
- package/lib/render/excalibur/towerNoiseReach.d.ts +32 -0
- package/lib/render/excalibur/towerNoiseReach.js +75 -0
- package/lib/render/excalibur/towerNoiseReach.js.map +1 -0
- package/lib/render/excalibur/towerOverlay.d.ts +59 -0
- package/lib/render/excalibur/towerOverlay.js +453 -0
- package/lib/render/excalibur/towerOverlay.js.map +1 -0
- package/lib/render/excalibur/towerReconcile.d.ts +17 -0
- package/lib/render/excalibur/towerReconcile.js +404 -0
- package/lib/render/excalibur/towerReconcile.js.map +1 -0
- package/lib/render/excalibur/towerRegions.d.ts +61 -0
- package/lib/render/excalibur/towerRegions.js +193 -0
- package/lib/render/excalibur/towerRegions.js.map +1 -0
- package/lib/render/excalibur/towerScene.d.ts +66 -0
- package/lib/render/excalibur/towerScene.js +443 -0
- package/lib/render/excalibur/towerScene.js.map +1 -0
- package/lib/render/excalibur/towerScenery.d.ts +12 -0
- package/lib/render/excalibur/towerScenery.js +299 -0
- package/lib/render/excalibur/towerScenery.js.map +1 -0
- package/lib/render/excalibur/towerSceneryDraw.d.ts +86 -0
- package/lib/render/excalibur/towerSceneryDraw.js +288 -0
- package/lib/render/excalibur/towerSceneryDraw.js.map +1 -0
- package/lib/render/excalibur/towerShaftNumbers.d.ts +23 -0
- package/lib/render/excalibur/towerShaftNumbers.js +90 -0
- package/lib/render/excalibur/towerShaftNumbers.js.map +1 -0
- package/lib/render/excalibur/towerStructTiles.d.ts +56 -0
- package/lib/render/excalibur/towerStructTiles.js +238 -0
- package/lib/render/excalibur/towerStructTiles.js.map +1 -0
- package/lib/render/excalibur/towerSyncSchedule.d.ts +84 -0
- package/lib/render/excalibur/towerSyncSchedule.js +137 -0
- package/lib/render/excalibur/towerSyncSchedule.js.map +1 -0
- package/lib/render/excalibur/towerWalkerBuild.d.ts +30 -0
- package/lib/render/excalibur/towerWalkerBuild.js +126 -0
- package/lib/render/excalibur/towerWalkerBuild.js.map +1 -0
- package/lib/render/excalibur/trafficSpotlight.d.ts +29 -0
- package/lib/render/excalibur/trafficSpotlight.js +64 -0
- package/lib/render/excalibur/trafficSpotlight.js.map +1 -0
- package/lib/render/facadeGeometry.d.ts +50 -0
- package/lib/render/facadeGeometry.js +79 -0
- package/lib/render/facadeGeometry.js.map +1 -0
- package/lib/render/groundEntrances.d.ts +44 -0
- package/lib/render/groundEntrances.js +118 -0
- package/lib/render/groundEntrances.js.map +1 -0
- package/lib/render/lateNight.d.ts +14 -0
- package/lib/render/lateNight.js +18 -0
- package/lib/render/lateNight.js.map +1 -0
- package/lib/render/lobbyHalls.d.ts +44 -0
- package/lib/render/lobbyHalls.js +63 -0
- package/lib/render/lobbyHalls.js.map +1 -0
- package/lib/render/metroTrainSchedule.d.ts +20 -0
- package/lib/render/metroTrainSchedule.js +65 -0
- package/lib/render/metroTrainSchedule.js.map +1 -0
- package/lib/render/overviewMap/drawList.d.ts +67 -0
- package/lib/render/overviewMap/drawList.js +103 -0
- package/lib/render/overviewMap/drawList.js.map +1 -0
- package/lib/render/overviewMap/extent.d.ts +70 -0
- package/lib/render/overviewMap/extent.js +155 -0
- package/lib/render/overviewMap/extent.js.map +1 -0
- package/lib/render/overviewMap/floorSpans.d.ts +27 -0
- package/lib/render/overviewMap/floorSpans.js +32 -0
- package/lib/render/overviewMap/floorSpans.js.map +1 -0
- package/lib/render/overviewMap/gaps.d.ts +48 -0
- package/lib/render/overviewMap/gaps.js +148 -0
- package/lib/render/overviewMap/gaps.js.map +1 -0
- package/lib/render/overviewMap/geometry.d.ts +139 -0
- package/lib/render/overviewMap/geometry.js +245 -0
- package/lib/render/overviewMap/geometry.js.map +1 -0
- package/lib/render/overviewMap/heatView.d.ts +91 -0
- package/lib/render/overviewMap/heatView.js +143 -0
- package/lib/render/overviewMap/heatView.js.map +1 -0
- package/lib/render/overviewMap/hotelView.d.ts +82 -0
- package/lib/render/overviewMap/hotelView.js +136 -0
- package/lib/render/overviewMap/hotelView.js.map +1 -0
- package/lib/render/overviewMap/model.d.ts +97 -0
- package/lib/render/overviewMap/model.js +116 -0
- package/lib/render/overviewMap/model.js.map +1 -0
- package/lib/render/overviewMap/paint.d.ts +63 -0
- package/lib/render/overviewMap/paint.js +168 -0
- package/lib/render/overviewMap/paint.js.map +1 -0
- package/lib/render/overviewMap/style.d.ts +46 -0
- package/lib/render/overviewMap/style.js +117 -0
- package/lib/render/overviewMap/style.js.map +1 -0
- package/lib/render/overviewMap/tierView.d.ts +103 -0
- package/lib/render/overviewMap/tierView.js +209 -0
- package/lib/render/overviewMap/tierView.js.map +1 -0
- package/lib/render/overviewMap/viewMark.d.ts +69 -0
- package/lib/render/overviewMap/viewMark.js +103 -0
- package/lib/render/overviewMap/viewMark.js.map +1 -0
- package/lib/render/overviewMap/views.d.ts +24 -0
- package/lib/render/overviewMap/views.js +29 -0
- package/lib/render/overviewMap/views.js.map +1 -0
- package/lib/render/pinchTracker.d.ts +91 -0
- package/lib/render/pinchTracker.js +145 -0
- package/lib/render/pinchTracker.js.map +1 -0
- package/lib/render/pixelSprites/amusements.d.ts +32 -0
- package/lib/render/pixelSprites/amusements.js +243 -0
- package/lib/render/pixelSprites/amusements.js.map +1 -0
- package/lib/render/pixelSprites/artScale.d.ts +97 -0
- package/lib/render/pixelSprites/artScale.js +151 -0
- package/lib/render/pixelSprites/artScale.js.map +1 -0
- package/lib/render/pixelSprites/boutique.d.ts +30 -0
- package/lib/render/pixelSprites/boutique.js +244 -0
- package/lib/render/pixelSprites/boutique.js.map +1 -0
- package/lib/render/pixelSprites/clinic.d.ts +30 -0
- package/lib/render/pixelSprites/clinic.js +184 -0
- package/lib/render/pixelSprites/clinic.js.map +1 -0
- package/lib/render/pixelSprites/common.d.ts +185 -0
- package/lib/render/pixelSprites/common.js +449 -0
- package/lib/render/pixelSprites/common.js.map +1 -0
- package/lib/render/pixelSprites/daycare.d.ts +3 -0
- package/lib/render/pixelSprites/daycare.js +99 -0
- package/lib/render/pixelSprites/daycare.js.map +1 -0
- package/lib/render/pixelSprites/dollhouse.d.ts +45 -0
- package/lib/render/pixelSprites/dollhouse.js +110 -0
- package/lib/render/pixelSprites/dollhouse.js.map +1 -0
- package/lib/render/pixelSprites/fitness.d.ts +30 -0
- package/lib/render/pixelSprites/fitness.js +176 -0
- package/lib/render/pixelSprites/fitness.js.map +1 -0
- package/lib/render/pixelSprites/food.d.ts +27 -0
- package/lib/render/pixelSprites/food.interiors.d.ts +38 -0
- package/lib/render/pixelSprites/food.interiors.js +516 -0
- package/lib/render/pixelSprites/food.interiors.js.map +1 -0
- package/lib/render/pixelSprites/food.js +36 -0
- package/lib/render/pixelSprites/food.js.map +1 -0
- package/lib/render/pixelSprites/food.kit.d.ts +50 -0
- package/lib/render/pixelSprites/food.kit.js +140 -0
- package/lib/render/pixelSprites/food.kit.js.map +1 -0
- package/lib/render/pixelSprites/food.looks.d.ts +45 -0
- package/lib/render/pixelSprites/food.looks.js +56 -0
- package/lib/render/pixelSprites/food.looks.js.map +1 -0
- package/lib/render/pixelSprites/layers.d.ts +49 -0
- package/lib/render/pixelSprites/layers.js +61 -0
- package/lib/render/pixelSprites/layers.js.map +1 -0
- package/lib/render/pixelSprites/nightclub.d.ts +3 -0
- package/lib/render/pixelSprites/nightclub.js +108 -0
- package/lib/render/pixelSprites/nightclub.js.map +1 -0
- package/lib/render/pixelSprites/people.d.ts +168 -0
- package/lib/render/pixelSprites/people.js +431 -0
- package/lib/render/pixelSprites/people.js.map +1 -0
- package/lib/render/pixelSprites/residential.d.ts +5 -0
- package/lib/render/pixelSprites/residential.js +506 -0
- package/lib/render/pixelSprites/residential.js.map +1 -0
- package/lib/render/pixelSprites/residential.looks.d.ts +40 -0
- package/lib/render/pixelSprites/residential.looks.js +43 -0
- package/lib/render/pixelSprites/residential.looks.js.map +1 -0
- package/lib/render/pixelSprites/residential.roaches.d.ts +38 -0
- package/lib/render/pixelSprites/residential.roaches.js +88 -0
- package/lib/render/pixelSprites/residential.roaches.js.map +1 -0
- package/lib/render/pixelSprites/residentialRentalSprites.d.ts +11 -0
- package/lib/render/pixelSprites/residentialRentalSprites.js +19 -0
- package/lib/render/pixelSprites/residentialRentalSprites.js.map +1 -0
- package/lib/render/pixelSprites/shop.d.ts +14 -0
- package/lib/render/pixelSprites/shop.interiors.d.ts +50 -0
- package/lib/render/pixelSprites/shop.interiors.js +382 -0
- package/lib/render/pixelSprites/shop.interiors.js.map +1 -0
- package/lib/render/pixelSprites/shop.js +72 -0
- package/lib/render/pixelSprites/shop.js.map +1 -0
- package/lib/render/pixelSprites/shop.looks.d.ts +17 -0
- package/lib/render/pixelSprites/shop.looks.js +24 -0
- package/lib/render/pixelSprites/shop.looks.js.map +1 -0
- package/lib/render/pixelSprites/skyBar.d.ts +11 -0
- package/lib/render/pixelSprites/skyBar.js +125 -0
- package/lib/render/pixelSprites/skyBar.js.map +1 -0
- package/lib/render/pixelSprites/spa.d.ts +3 -0
- package/lib/render/pixelSprites/spa.js +88 -0
- package/lib/render/pixelSprites/spa.js.map +1 -0
- package/lib/render/pixelSprites.d.ts +33 -0
- package/lib/render/pixelSprites.js +167 -0
- package/lib/render/pixelSprites.js.map +1 -0
- package/lib/render/regionGrid.d.ts +49 -0
- package/lib/render/regionGrid.js +82 -0
- package/lib/render/regionGrid.js.map +1 -0
- package/lib/render/regionPaint.d.ts +15 -0
- package/lib/render/regionPaint.js +33 -0
- package/lib/render/regionPaint.js.map +1 -0
- package/lib/render/renderSim.d.ts +104 -0
- package/lib/render/renderSim.js +2 -0
- package/lib/render/renderSim.js.map +1 -0
- package/lib/render/roomPortrait.d.ts +35 -0
- package/lib/render/roomPortrait.js +142 -0
- package/lib/render/roomPortrait.js.map +1 -0
- package/lib/render/roomShading.d.ts +29 -0
- package/lib/render/roomShading.js +43 -0
- package/lib/render/roomShading.js.map +1 -0
- package/lib/render/scale.d.ts +31 -0
- package/lib/render/scale.js +34 -0
- package/lib/render/scale.js.map +1 -0
- package/lib/render/sceneryLayout.d.ts +234 -0
- package/lib/render/sceneryLayout.js +199 -0
- package/lib/render/sceneryLayout.js.map +1 -0
- package/lib/render/sprites/common.d.ts +41 -0
- package/lib/render/sprites/common.js +46 -0
- package/lib/render/sprites/common.js.map +1 -0
- package/lib/render/sprites/escalator.d.ts +27 -0
- package/lib/render/sprites/escalator.js +156 -0
- package/lib/render/sprites/escalator.js.map +1 -0
- package/lib/render/sprites/events.d.ts +56 -0
- package/lib/render/sprites/events.js +280 -0
- package/lib/render/sprites/events.js.map +1 -0
- package/lib/render/sprites/facilities/garage.d.ts +23 -0
- package/lib/render/sprites/facilities/garage.js +230 -0
- package/lib/render/sprites/facilities/garage.js.map +1 -0
- package/lib/render/sprites/facilities/recycling.d.ts +3 -0
- package/lib/render/sprites/facilities/recycling.js +210 -0
- package/lib/render/sprites/facilities/recycling.js.map +1 -0
- package/lib/render/sprites/facilities/recyclingLook.d.ts +49 -0
- package/lib/render/sprites/facilities/recyclingLook.js +52 -0
- package/lib/render/sprites/facilities/recyclingLook.js.map +1 -0
- package/lib/render/sprites/facilities/service.d.ts +14 -0
- package/lib/render/sprites/facilities/service.js +437 -0
- package/lib/render/sprites/facilities/service.js.map +1 -0
- package/lib/render/sprites/facilities/serviceKit.d.ts +61 -0
- package/lib/render/sprites/facilities/serviceKit.js +113 -0
- package/lib/render/sprites/facilities/serviceKit.js.map +1 -0
- package/lib/render/sprites/facilities/vehicles.d.ts +38 -0
- package/lib/render/sprites/facilities/vehicles.js +276 -0
- package/lib/render/sprites/facilities/vehicles.js.map +1 -0
- package/lib/render/sprites/facilities/venue.d.ts +28 -0
- package/lib/render/sprites/facilities/venue.js +211 -0
- package/lib/render/sprites/facilities/venue.js.map +1 -0
- package/lib/render/sprites/facilities/weddingHall.d.ts +9 -0
- package/lib/render/sprites/facilities/weddingHall.js +410 -0
- package/lib/render/sprites/facilities/weddingHall.js.map +1 -0
- package/lib/render/sprites/facilities.d.ts +22 -0
- package/lib/render/sprites/facilities.js +24 -0
- package/lib/render/sprites/facilities.js.map +1 -0
- package/lib/render/sprites/helicopter.d.ts +11 -0
- package/lib/render/sprites/helicopter.js +60 -0
- package/lib/render/sprites/helicopter.js.map +1 -0
- package/lib/render/sprites/sky.d.ts +67 -0
- package/lib/render/sprites/sky.js +85 -0
- package/lib/render/sprites/sky.js.map +1 -0
- package/lib/render/sprites/spiralStair.d.ts +19 -0
- package/lib/render/sprites/spiralStair.js +111 -0
- package/lib/render/sprites/spiralStair.js.map +1 -0
- package/lib/render/sprites/structure/entrance.d.ts +35 -0
- package/lib/render/sprites/structure/entrance.js +347 -0
- package/lib/render/sprites/structure/entrance.js.map +1 -0
- package/lib/render/sprites/structure/lobby.d.ts +88 -0
- package/lib/render/sprites/structure/lobby.js +350 -0
- package/lib/render/sprites/structure/lobby.js.map +1 -0
- package/lib/render/sprites/structure/revolvingDoor.d.ts +53 -0
- package/lib/render/sprites/structure/revolvingDoor.js +184 -0
- package/lib/render/sprites/structure/revolvingDoor.js.map +1 -0
- package/lib/render/sprites/structure/rooftop.d.ts +93 -0
- package/lib/render/sprites/structure/rooftop.js +302 -0
- package/lib/render/sprites/structure/rooftop.js.map +1 -0
- package/lib/render/sprites/structure/shell.d.ts +19 -0
- package/lib/render/sprites/structure/shell.js +142 -0
- package/lib/render/sprites/structure/shell.js.map +1 -0
- package/lib/render/sprites/structure/skyBridge.d.ts +28 -0
- package/lib/render/sprites/structure/skyBridge.js +259 -0
- package/lib/render/sprites/structure/skyBridge.js.map +1 -0
- package/lib/render/sprites/structure/tallLobby.d.ts +8 -0
- package/lib/render/sprites/structure/tallLobby.js +166 -0
- package/lib/render/sprites/structure/tallLobby.js.map +1 -0
- package/lib/render/sprites/structure/tallLobbyPieces.d.ts +18 -0
- package/lib/render/sprites/structure/tallLobbyPieces.js +82 -0
- package/lib/render/sprites/structure/tallLobbyPieces.js.map +1 -0
- package/lib/render/sprites/structure.d.ts +15 -0
- package/lib/render/sprites/structure.js +16 -0
- package/lib/render/sprites/structure.js.map +1 -0
- package/lib/render/sprites/transport.d.ts +30 -0
- package/lib/render/sprites/transport.js +376 -0
- package/lib/render/sprites/transport.js.map +1 -0
- package/lib/render/sprites.d.ts +16 -0
- package/lib/render/sprites.js +108 -0
- package/lib/render/sprites.js.map +1 -0
- package/lib/render/venueFlights.d.ts +61 -0
- package/lib/render/venueFlights.js +50 -0
- package/lib/render/venueFlights.js.map +1 -0
- package/lib/shared/engineTypes.d.ts +256 -0
- package/lib/shared/engineTypes.js +8 -0
- package/lib/shared/engineTypes.js.map +1 -0
- package/lib/shared/floorRuns.d.ts +22 -0
- package/lib/shared/floorRuns.js +39 -0
- package/lib/shared/floorRuns.js.map +1 -0
- package/lib/shared/inputEvents.d.ts +18 -0
- package/lib/shared/inputEvents.js +23 -0
- package/lib/shared/inputEvents.js.map +1 -0
- package/lib/shared/serializedGame.d.ts +142 -0
- package/lib/shared/serializedGame.js +2 -0
- package/lib/shared/serializedGame.js.map +1 -0
- package/lib/shared/types.d.ts +298 -0
- package/lib/shared/types.js +47 -0
- package/lib/shared/types.js.map +1 -0
- package/lib/shared/unitState.d.ts +36 -0
- package/lib/shared/unitState.js +42 -0
- package/lib/shared/unitState.js.map +1 -0
- package/lib/shared/vacateReasonText.d.ts +20 -0
- package/lib/shared/vacateReasonText.js +23 -0
- package/lib/shared/vacateReasonText.js.map +1 -0
- package/lib/shared/viewZoom.d.ts +14 -0
- package/lib/shared/viewZoom.js +17 -0
- package/lib/shared/viewZoom.js.map +1 -0
- package/lib/shared/wellFormed.d.ts +14 -0
- package/lib/shared/wellFormed.js +19 -0
- package/lib/shared/wellFormed.js.map +1 -0
- package/lib/simport/cards.d.ts +26 -0
- package/lib/simport/cards.js +138 -0
- package/lib/simport/cards.js.map +1 -0
- package/lib/simport/clockView.d.ts +24 -0
- package/lib/simport/clockView.js +43 -0
- package/lib/simport/clockView.js.map +1 -0
- package/lib/simport/commands.d.ts +215 -0
- package/lib/simport/commands.js +2 -0
- package/lib/simport/commands.js.map +1 -0
- package/lib/simport/emergencyReads.d.ts +19 -0
- package/lib/simport/emergencyReads.js +47 -0
- package/lib/simport/emergencyReads.js.map +1 -0
- package/lib/simport/enginePort.d.ts +433 -0
- package/lib/simport/enginePort.js +11 -0
- package/lib/simport/enginePort.js.map +1 -0
- package/lib/simport/fixtures/catalog.classic.json +2137 -0
- package/lib/simport/fixtures/catalog.modern.json +2515 -0
- package/lib/simport/fixtures/viewLayout.json +927 -0
- package/lib/simport/headerClock.d.ts +31 -0
- package/lib/simport/headerClock.js +29 -0
- package/lib/simport/headerClock.js.map +1 -0
- package/lib/simport/panels.d.ts +243 -0
- package/lib/simport/panels.js +2 -0
- package/lib/simport/panels.js.map +1 -0
- package/lib/simport/personCards.d.ts +63 -0
- package/lib/simport/personCards.js +55 -0
- package/lib/simport/personCards.js.map +1 -0
- package/lib/simport/portCodes.d.ts +41 -0
- package/lib/simport/portCodes.js +49 -0
- package/lib/simport/portCodes.js.map +1 -0
- package/lib/simport/portEvents.d.ts +39 -0
- package/lib/simport/portEvents.js +43 -0
- package/lib/simport/portEvents.js.map +1 -0
- package/lib/simport/portRenderSim.d.ts +70 -0
- package/lib/simport/portRenderSim.js +129 -0
- package/lib/simport/portRenderSim.js.map +1 -0
- package/lib/simport/queries.d.ts +64 -0
- package/lib/simport/queries.js +30 -0
- package/lib/simport/queries.js.map +1 -0
- package/lib/simport/recyclingPort.d.ts +13 -0
- package/lib/simport/recyclingPort.js +2 -0
- package/lib/simport/recyclingPort.js.map +1 -0
- package/lib/simport/request.d.ts +44 -0
- package/lib/simport/request.js +214 -0
- package/lib/simport/request.js.map +1 -0
- package/lib/simport/roomTiers.d.ts +102 -0
- package/lib/simport/roomTiers.js +122 -0
- package/lib/simport/roomTiers.js.map +1 -0
- package/lib/simport/scheduleSlots.d.ts +19 -0
- package/lib/simport/scheduleSlots.js +87 -0
- package/lib/simport/scheduleSlots.js.map +1 -0
- package/lib/simport/skyBridgePort.d.ts +20 -0
- package/lib/simport/skyBridgePort.js +2 -0
- package/lib/simport/skyBridgePort.js.map +1 -0
- package/lib/simport/skyBridgeView.d.ts +15 -0
- package/lib/simport/skyBridgeView.js +42 -0
- package/lib/simport/skyBridgeView.js.map +1 -0
- package/lib/simport/statsSheet.d.ts +15 -0
- package/lib/simport/statsSheet.js +101 -0
- package/lib/simport/statsSheet.js.map +1 -0
- package/lib/simport/tdtRecords.d.ts +9 -0
- package/lib/simport/tdtRecords.js +112 -0
- package/lib/simport/tdtRecords.js.map +1 -0
- package/lib/simport/tdtReportFacts.d.ts +110 -0
- package/lib/simport/tdtReportFacts.js +8 -0
- package/lib/simport/tdtReportFacts.js.map +1 -0
- package/lib/simport/trafficPort.d.ts +22 -0
- package/lib/simport/trafficPort.js +2 -0
- package/lib/simport/trafficPort.js.map +1 -0
- package/lib/simport/view.d.ts +275 -0
- package/lib/simport/view.js +2 -0
- package/lib/simport/view.js.map +1 -0
- package/lib/simport/viewReader.d.ts +89 -0
- package/lib/simport/viewReader.js +426 -0
- package/lib/simport/viewReader.js.map +1 -0
- package/lib/styles/game/appearance.css +108 -0
- package/lib/styles/game/base.css +68 -0
- package/lib/styles/game/components.css +69 -0
- package/lib/styles/game/desk-title.css +183 -0
- package/lib/styles/game/desk.css +487 -0
- package/lib/styles/game/dialogs.css +360 -0
- package/lib/styles/game/editor-sidebar.css +116 -0
- package/lib/styles/game/elevator-schedule.css +217 -0
- package/lib/styles/game/file-dialog.css +470 -0
- package/lib/styles/game/help.css +141 -0
- package/lib/styles/game/launch-fireworks.css +17 -0
- package/lib/styles/game/media-landscape.css +333 -0
- package/lib/styles/game/media-phone.css +303 -0
- package/lib/styles/game/media-tablet-touch.css +177 -0
- package/lib/styles/game/menubar.css +158 -0
- package/lib/styles/game/new-tower.css +219 -0
- package/lib/styles/game/onboarding.css +32 -0
- package/lib/styles/game/screen-saver.css +85 -0
- package/lib/styles/game/splash.css +413 -0
- package/lib/styles/game/stats-saves.css +106 -0
- package/lib/styles/game/tools-stage.css +340 -0
- package/lib/styles/game/topbar.css +191 -0
- package/lib/styles/menu-bar.css +108 -0
- package/lib/styles/not-found.css +335 -0
- package/lib/styles/overview-map-views.css +88 -0
- package/lib/styles/overview-map.css +195 -0
- package/lib/styles/retro-components.css +179 -0
- package/lib/styles/retro-page.css +254 -0
- package/lib/styles/retro-tokens.css +122 -0
- package/lib/styles/schemes/high-contrast.css +173 -0
- package/lib/styles/schemes/skyline.css +134 -0
- package/lib/styles.css +66 -0
- package/lib/ui/desk/deskGeometry.d.ts +59 -0
- package/lib/ui/desk/deskGeometry.js +106 -0
- package/lib/ui/desk/deskGeometry.js.map +1 -0
- package/lib/ui/desk/deskWindow.d.ts +90 -0
- package/lib/ui/desk/deskWindow.js +253 -0
- package/lib/ui/desk/deskWindow.js.map +1 -0
- package/lib/ui/desk/deskWindowMenu.d.ts +55 -0
- package/lib/ui/desk/deskWindowMenu.js +143 -0
- package/lib/ui/desk/deskWindowMenu.js.map +1 -0
- package/lib/ui/escape.d.ts +1 -0
- package/lib/ui/escape.js +14 -0
- package/lib/ui/escape.js.map +1 -0
- package/lib/ui/format.d.ts +14 -0
- package/lib/ui/format.js +36 -0
- package/lib/ui/format.js.map +1 -0
- package/lib/ui/iconPaths.generated.d.ts +4 -0
- package/lib/ui/iconPaths.generated.js +68 -0
- package/lib/ui/iconPaths.generated.js.map +1 -0
- package/lib/ui/icons.d.ts +83 -0
- package/lib/ui/icons.js +156 -0
- package/lib/ui/icons.js.map +1 -0
- package/lib/ui/menuBar.d.ts +94 -0
- package/lib/ui/menuBar.js +361 -0
- package/lib/ui/menuBar.js.map +1 -0
- package/lib/ui/modalPrecedence.d.ts +108 -0
- package/lib/ui/modalPrecedence.js +165 -0
- package/lib/ui/modalPrecedence.js.map +1 -0
- package/lib/ui/movableWindow.d.ts +124 -0
- package/lib/ui/movableWindow.js +247 -0
- package/lib/ui/movableWindow.js.map +1 -0
- package/lib/ui/overviewMapInput.d.ts +109 -0
- package/lib/ui/overviewMapInput.js +135 -0
- package/lib/ui/overviewMapInput.js.map +1 -0
- package/lib/ui/uiModal.d.ts +38 -0
- package/lib/ui/uiModal.js +70 -0
- package/lib/ui/uiModal.js.map +1 -0
- package/lib/wasmhost/buildSection.d.ts +54 -0
- package/lib/wasmhost/buildSection.js +143 -0
- package/lib/wasmhost/buildSection.js.map +1 -0
- package/lib/wasmhost/catalogCheck.d.ts +11 -0
- package/lib/wasmhost/catalogCheck.js +43 -0
- package/lib/wasmhost/catalogCheck.js.map +1 -0
- package/lib/wasmhost/engineAssets.d.ts +57 -0
- package/lib/wasmhost/engineAssets.js +63 -0
- package/lib/wasmhost/engineAssets.js.map +1 -0
- package/lib/wasmhost/engineBoot.d.ts +165 -0
- package/lib/wasmhost/engineBoot.js +254 -0
- package/lib/wasmhost/engineBoot.js.map +1 -0
- package/lib/wasmhost/engineChoice.d.ts +6 -0
- package/lib/wasmhost/engineChoice.js +2 -0
- package/lib/wasmhost/engineChoice.js.map +1 -0
- package/lib/wasmhost/engineDiagnostics.d.ts +66 -0
- package/lib/wasmhost/engineDiagnostics.js +189 -0
- package/lib/wasmhost/engineDiagnostics.js.map +1 -0
- package/lib/wasmhost/engineDiagnosticsLive.d.ts +15 -0
- package/lib/wasmhost/engineDiagnosticsLive.js +31 -0
- package/lib/wasmhost/engineDiagnosticsLive.js.map +1 -0
- package/lib/wasmhost/engineIdentity.d.ts +30 -0
- package/lib/wasmhost/engineIdentity.js +59 -0
- package/lib/wasmhost/engineIdentity.js.map +1 -0
- package/lib/wasmhost/engineLabel.d.ts +40 -0
- package/lib/wasmhost/engineLabel.js +50 -0
- package/lib/wasmhost/engineLabel.js.map +1 -0
- package/lib/wasmhost/engineLoad.d.ts +48 -0
- package/lib/wasmhost/engineLoad.js +53 -0
- package/lib/wasmhost/engineLoad.js.map +1 -0
- package/lib/wasmhost/enginePackageCheck.d.ts +77 -0
- package/lib/wasmhost/enginePackageCheck.js +274 -0
- package/lib/wasmhost/enginePackageCheck.js.map +1 -0
- package/lib/wasmhost/enginePackageNames.d.ts +25 -0
- package/lib/wasmhost/enginePackageNames.js +28 -0
- package/lib/wasmhost/enginePackageNames.js.map +1 -0
- package/lib/wasmhost/enginePackageRecord.d.ts +78 -0
- package/lib/wasmhost/enginePackageRecord.js +108 -0
- package/lib/wasmhost/enginePackageRecord.js.map +1 -0
- package/lib/wasmhost/engineRepair.d.ts +55 -0
- package/lib/wasmhost/engineRepair.js +183 -0
- package/lib/wasmhost/engineRepair.js.map +1 -0
- package/lib/wasmhost/frameView.d.ts +87 -0
- package/lib/wasmhost/frameView.js +133 -0
- package/lib/wasmhost/frameView.js.map +1 -0
- package/lib/wasmhost/hostFault.d.ts +40 -0
- package/lib/wasmhost/hostFault.js +94 -0
- package/lib/wasmhost/hostFault.js.map +1 -0
- package/lib/wasmhost/loadEngineModule.d.ts +79 -0
- package/lib/wasmhost/loadEngineModule.js +66 -0
- package/lib/wasmhost/loadEngineModule.js.map +1 -0
- package/lib/wasmhost/packageHash.d.ts +48 -0
- package/lib/wasmhost/packageHash.js +436 -0
- package/lib/wasmhost/packageHash.js.map +1 -0
- package/lib/wasmhost/rustEngine.d.ts +49 -0
- package/lib/wasmhost/rustEngine.js +63 -0
- package/lib/wasmhost/rustEngine.js.map +1 -0
- package/lib/wasmhost/slotPopulation.d.ts +19 -0
- package/lib/wasmhost/slotPopulation.js +69 -0
- package/lib/wasmhost/slotPopulation.js.map +1 -0
- package/lib/wasmhost/telemetry.d.ts +31 -0
- package/lib/wasmhost/telemetry.js +13 -0
- package/lib/wasmhost/telemetry.js.map +1 -0
- package/package.json +80 -4
|
@@ -0,0 +1,443 @@
|
|
|
1
|
+
import * as ex from 'excalibur';
|
|
2
|
+
import { drawTallLobbyEntrance, drawTallLobbyTile } from '../sprites/structure/tallLobby.js';
|
|
3
|
+
import { Z } from '../depthPlanes.js';
|
|
4
|
+
import { GROUND, groundBelowFloors } from '../sceneryLayout.js';
|
|
5
|
+
import { bindViewWorld, viewWorld } from '../../presentation/viewWorld.js';
|
|
6
|
+
import { bindViewKinds } from '../../presentation/viewKinds.js';
|
|
7
|
+
import { drawUnit } from '../sprites.js';
|
|
8
|
+
import { drawSanta } from '../sprites/events.js';
|
|
9
|
+
import { cloudFill, CLOUD_COUNT, cloudSeed, cloudMotion, CLOUD_DRIFT, drawCloud, cloudRadius, SUN_ARC, drawSunDisc } from '../sprites/sky.js';
|
|
10
|
+
export { skyColor } from '../sprites/sky.js';
|
|
11
|
+
import { disposeRegions } from './towerRegions.js';
|
|
12
|
+
import { emptyStructPass } from './towerStructTiles.js';
|
|
13
|
+
import { emptyFlightPass } from '../venueFlights.js';
|
|
14
|
+
import { clearLongPress } from './longPress.js';
|
|
15
|
+
import { NOT_BAKED } from './sceneBake.js';
|
|
16
|
+
import { bakePeople } from './peopleGfx.js';
|
|
17
|
+
import { TILE, FLOOR } from '../scale.js';
|
|
18
|
+
import { drawOverlay, SANTA_FLIGHT_SECONDS, dropStrandedFx } from './towerOverlay.js';
|
|
19
|
+
import { clearMotion, clearCrowd } from './towerCrowd.js';
|
|
20
|
+
import { clearHallDoors } from './towerHallDoors.js';
|
|
21
|
+
import { towerCatalog } from '../../catalog/towerCatalog.js';
|
|
22
|
+
import { LOBBY_VARIANTS, drawLobbyEntrance } from '../sprites/structure/lobby.js';
|
|
23
|
+
import { drawEscapeStairs, ESCAPE_W, drawAwning, AWNING_W } from '../sprites/structure/rooftop.js';
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Static scene construction, shared-graphics baking, the sky-layer painters
|
|
27
|
+
* (sun/moon, clouds, Santa) and the engine lifecycle (sim-swap, teardown,
|
|
28
|
+
* dispose) for {@link TowerEngine}. Friend functions taking the engine
|
|
29
|
+
* instance. Extracted from `TowerEngine.ts`; the class keeps thin delegations.
|
|
30
|
+
* Retained-scene reconciliation lives in `towerReconcile`; the 2D overlay
|
|
31
|
+
* painters in `towerOverlay`. Pure code move: no drawing or teardown logic
|
|
32
|
+
* changed.
|
|
33
|
+
*/
|
|
34
|
+
// ---- Static scene elements ----------------------------------------------
|
|
35
|
+
/** Bind the view's world from the tower's catalog: the tile maps, region grid,
|
|
36
|
+
* scenery and cursor clamps are all sized from it (#921). The engine binds it
|
|
37
|
+
* when it is built, before any input can read it. A swapped-in tower must
|
|
38
|
+
* state the same lot width and basement; its top floor may differ, and
|
|
39
|
+
* {@link setSim} then resizes the structure map to it (#1985). */
|
|
40
|
+
function bindSceneWorld(sim) {
|
|
41
|
+
const catalog = towerCatalog(sim);
|
|
42
|
+
bindViewWorld(catalog.world);
|
|
43
|
+
bindViewKinds(catalog);
|
|
44
|
+
}
|
|
45
|
+
function makeGround(engine) {
|
|
46
|
+
const total = viewWorld().lotWidth * TILE * GROUND.lots;
|
|
47
|
+
const centerX = (viewWorld().lotWidth / 2) * TILE;
|
|
48
|
+
const depth = groundBelowFloors() * FLOOR;
|
|
49
|
+
const leftEdge = centerX - total / 2;
|
|
50
|
+
// One rectangle this wide (~11k px) would rasterize to a bitmap past the GPU
|
|
51
|
+
// texture limit (4096 on mobile) and render as a black band. It needs the
|
|
52
|
+
// full width to cover the dirt when zoomed out at the camera's edge, so tile
|
|
53
|
+
// it into texture-safe segments instead (seamless, same solid color).
|
|
54
|
+
// Keep each segment under 2048px, the lowest MAX_TEXTURE_SIZE on older
|
|
55
|
+
// mobile GPUs (the transport-shaft cap stays under this too).
|
|
56
|
+
const MAX_SEG = 2000;
|
|
57
|
+
const segments = Math.ceil(total / MAX_SEG);
|
|
58
|
+
const segW = total / segments;
|
|
59
|
+
for (let i = 0; i < segments; i++) {
|
|
60
|
+
const segCx = leftEdge + segW * (i + 0.5);
|
|
61
|
+
const dirt = new ex.Actor({
|
|
62
|
+
pos: ex.vec(segCx, 0),
|
|
63
|
+
width: segW + 1, // overlap neighbors by 1px to hide any seam
|
|
64
|
+
height: depth,
|
|
65
|
+
anchor: ex.vec(0.5, 0),
|
|
66
|
+
z: Z.dirt,
|
|
67
|
+
color: ex.Color.fromHex(GROUND.dirt),
|
|
68
|
+
});
|
|
69
|
+
engine.engine.add(dirt);
|
|
70
|
+
engine.engine.add(new ex.Actor({
|
|
71
|
+
pos: ex.vec(segCx, 0),
|
|
72
|
+
width: segW + 1,
|
|
73
|
+
height: GROUND.lineH,
|
|
74
|
+
anchor: ex.vec(0.5, 0.5),
|
|
75
|
+
z: Z.groundLine,
|
|
76
|
+
color: ex.Color.fromHex(GROUND.line),
|
|
77
|
+
}));
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Sun/moon on a screen-space layer placed *below* the world ground and tower
|
|
82
|
+
* (a z under the dirt). They hang in the open sky, and as you pan, the dirt
|
|
83
|
+
* and the building slide over them and hide them at the horizon, so it pans
|
|
84
|
+
* correctly with no manual clipping.
|
|
85
|
+
*/
|
|
86
|
+
function makeSky(engine) {
|
|
87
|
+
// cache:false is deliberate (like the overlay below): this is a full-viewport
|
|
88
|
+
// screen layer whose pixels change every frame, the sun/moon arc and clouds
|
|
89
|
+
// drift on the decorative clock. A cached canvas would have to flagDirty()
|
|
90
|
+
// every frame, which re-rasterizes AND re-uploads the whole texture anyway
|
|
91
|
+
// (see the RoomRec cache note), no reuse to gain, just extra plumbing.
|
|
92
|
+
engine.skyCanvas = new ex.Canvas({
|
|
93
|
+
width: engine.viewWidth,
|
|
94
|
+
height: engine.viewHeight,
|
|
95
|
+
cache: false,
|
|
96
|
+
draw: (ctx) => drawSky(engine, ctx),
|
|
97
|
+
});
|
|
98
|
+
engine.sky = new ex.ScreenElement({ x: 0, y: 0, z: Z.sky });
|
|
99
|
+
engine.sky.graphics.use(engine.skyCanvas);
|
|
100
|
+
engine.engine.add(engine.sky);
|
|
101
|
+
}
|
|
102
|
+
function makeOverlay(engine) {
|
|
103
|
+
// cache:false is deliberate: this full-viewport screen layer changes every
|
|
104
|
+
// frame, the ruler always draws, the build-preview ghost tracks the cursor,
|
|
105
|
+
// rain animates, and the event visuals follow the camera (their screen
|
|
106
|
+
// coords come from worldToScreen). Nothing here is stable across frames,
|
|
107
|
+
// so a cached canvas would need a per-frame flagDirty() that re-rasterizes
|
|
108
|
+
// and re-uploads the whole texture regardless, equal cost to cache:false,
|
|
109
|
+
// plus extra plumbing and a staleness-bug risk.
|
|
110
|
+
engine.overlayCanvas = new ex.Canvas({
|
|
111
|
+
width: engine.viewWidth,
|
|
112
|
+
height: engine.viewHeight,
|
|
113
|
+
cache: false,
|
|
114
|
+
draw: (ctx) => drawOverlay(engine, ctx),
|
|
115
|
+
});
|
|
116
|
+
engine.overlay = new ex.ScreenElement({ x: 0, y: 0, z: Z.overlay });
|
|
117
|
+
engine.overlay.graphics.use(engine.overlayCanvas);
|
|
118
|
+
engine.engine.add(engine.overlay);
|
|
119
|
+
}
|
|
120
|
+
/** One TileMap entity carries every static floor/lobby tile (see the
|
|
121
|
+
* structTiles field note). Sized to the whole buildable grid so cell
|
|
122
|
+
* lookups are plain coordinate math; row 0 is the TOP floor because the
|
|
123
|
+
* map's origin is its top-left corner in world space. A map built before
|
|
124
|
+
* (a swap to a tower with another top floor) leaves the scene first. */
|
|
125
|
+
function makeStructTileMap(engine) {
|
|
126
|
+
const world = viewWorld();
|
|
127
|
+
if (engine.structTileMap)
|
|
128
|
+
engine.engine.remove(engine.structTileMap);
|
|
129
|
+
engine.structTileMap = new ex.TileMap({
|
|
130
|
+
pos: ex.vec(0, engine.worldYTop(world.maxFloor)),
|
|
131
|
+
tileWidth: TILE,
|
|
132
|
+
tileHeight: FLOOR,
|
|
133
|
+
columns: world.lotWidth,
|
|
134
|
+
rows: world.maxFloor - world.minFloor + 1,
|
|
135
|
+
});
|
|
136
|
+
engine.structTopFloor = world.maxFloor;
|
|
137
|
+
engine.structTileMap.z = Z.structure; // behind rooms (0) and transports (1), like the old actors
|
|
138
|
+
engine.engine.add(engine.structTileMap);
|
|
139
|
+
}
|
|
140
|
+
// ---- Shared graphics ----------------------------------------------------
|
|
141
|
+
function bakeSharedGraphics(engine) {
|
|
142
|
+
// Structural tiles bake from a FIXED DrawCtx (not the live this.d): these
|
|
143
|
+
// canvases cache on first render, so baking from live state would freeze
|
|
144
|
+
// whatever lighting happened to be on screen at that moment into the tile.
|
|
145
|
+
const bake = (u, lit) => new ex.Canvas({
|
|
146
|
+
width: TILE,
|
|
147
|
+
height: FLOOR,
|
|
148
|
+
cache: true,
|
|
149
|
+
draw: (ctx) => drawUnit({ ctx, lit, anim: 0, hour: lit ? 20 : 12 }, u, 0, 0, TILE, FLOOR),
|
|
150
|
+
});
|
|
151
|
+
engine.floorGfx = bake(fakeStruct("floor"), false);
|
|
152
|
+
// Lobby variants: [lit 0/1][ground 0/1][variant]. The fake unit's floor
|
|
153
|
+
// selects the grand ground style (1) vs the sky-lobby style; x the variant.
|
|
154
|
+
engine.lobbyGfx = [false, true].map((lit) => [false, true].map((ground) => Array.from({ length: LOBBY_VARIANTS }, (_, v) => bake(fakeStruct("lobby", ground ? 1 : 2, v), lit))));
|
|
155
|
+
// Grand-entrance tiles need the ANIMATED path (cache: false) so the
|
|
156
|
+
// doorman's two-frame sway advances on the decorative clock without extra
|
|
157
|
+
// plumbing. The bake reads `this.d.anim` at draw time; `this.d.lit` is
|
|
158
|
+
// fixed per canvas so the lit and unlit versions don't get swapped on the
|
|
159
|
+
// evening flip (that path re-issues use() to swap between them). Service
|
|
160
|
+
// tiles are static so they use the same cache-true bake as normal variants.
|
|
161
|
+
const bakeGrand = (kind) => (lit) => new ex.Canvas({
|
|
162
|
+
width: TILE,
|
|
163
|
+
height: FLOOR,
|
|
164
|
+
cache: false,
|
|
165
|
+
// The staffed slice: a tower nobody is in shows its empty slice instead
|
|
166
|
+
// (`entranceEmptyGfx`), which the structure cells swap to per tower.
|
|
167
|
+
draw: (ctx) => drawLobbyEntrance({ ctx, lit, anim: engine.d.anim, hour: lit ? 20 : 12, staffed: true }, kind, 0, 0, TILE, FLOOR),
|
|
168
|
+
});
|
|
169
|
+
// No doorman or attendant, so nothing moves: a static bake.
|
|
170
|
+
const bakeEmpty = (kind) => (lit) => new ex.Canvas({
|
|
171
|
+
width: TILE,
|
|
172
|
+
height: FLOOR,
|
|
173
|
+
cache: true,
|
|
174
|
+
draw: (ctx) => drawLobbyEntrance({ ctx, lit, anim: 0, hour: lit ? 20 : 12, staffed: false }, kind, 0, 0, TILE, FLOOR),
|
|
175
|
+
});
|
|
176
|
+
const bakeService = (lit) => new ex.Canvas({
|
|
177
|
+
width: TILE,
|
|
178
|
+
height: FLOOR,
|
|
179
|
+
cache: true,
|
|
180
|
+
draw: (ctx) => drawLobbyEntrance({ ctx, lit, anim: 0, hour: lit ? 20 : 12 }, "service", 0, 0, TILE, FLOOR),
|
|
181
|
+
});
|
|
182
|
+
engine.entranceGrandLeftGfx = [bakeGrand("grand-left")(false), bakeGrand("grand-left")(true)];
|
|
183
|
+
engine.entranceGrandRightGfx = [bakeGrand("grand-right")(false), bakeGrand("grand-right")(true)];
|
|
184
|
+
engine.entranceGrandSoloGfx = [bakeGrand("grand-solo")(false), bakeGrand("grand-solo")(true)];
|
|
185
|
+
engine.entranceServiceGfx = [bakeService(false), bakeService(true)];
|
|
186
|
+
engine.entranceEmptyGfx = {
|
|
187
|
+
"grand-left": [bakeEmpty("grand-left")(false), bakeEmpty("grand-left")(true)],
|
|
188
|
+
"grand-right": [bakeEmpty("grand-right")(false), bakeEmpty("grand-right")(true)],
|
|
189
|
+
"grand-solo": [bakeEmpty("grand-solo")(false), bakeEmpty("grand-solo")(true)],
|
|
190
|
+
};
|
|
191
|
+
// Tall lobby stories (#308): each cell draws the whole hall shifted up so
|
|
192
|
+
// only its own story lands on the canvas, so the slices line up into one
|
|
193
|
+
// hall. Baked on first use: a tower holds at most a few tall lobbies.
|
|
194
|
+
const tall = new Map();
|
|
195
|
+
engine.tallLobbyGfx = (lit, ground, height, story, slot, staffed) => {
|
|
196
|
+
// The grand doors' story carries the swaying doorman of a staffed tower,
|
|
197
|
+
// so it takes the animated path like the one-story grand entrance; an
|
|
198
|
+
// empty tower's doors story is static. Staffing keys only that story.
|
|
199
|
+
const grandDoors = story === 0 && typeof slot === "string" && slot !== "service";
|
|
200
|
+
const doorman = grandDoors && staffed;
|
|
201
|
+
const staffing = staffed ? "staffed" : "empty";
|
|
202
|
+
const key = `${lit ? 1 : 0}|${ground ? 1 : 0}|${height}|${story}|${slot}|${grandDoors ? staffing : ""}`;
|
|
203
|
+
let gfx = tall.get(key);
|
|
204
|
+
if (!gfx) {
|
|
205
|
+
const y = -(height - 1 - story) * FLOOR;
|
|
206
|
+
gfx = new ex.Canvas({
|
|
207
|
+
width: TILE,
|
|
208
|
+
height: FLOOR,
|
|
209
|
+
cache: !doorman,
|
|
210
|
+
draw: (ctx) => {
|
|
211
|
+
const d = doorman
|
|
212
|
+
? { ctx, lit, anim: engine.d.anim, hour: lit ? 20 : 12, staffed: true }
|
|
213
|
+
: { ctx, lit, anim: 0, hour: lit ? 20 : 12, staffed: !grandDoors };
|
|
214
|
+
if (typeof slot === "string")
|
|
215
|
+
drawTallLobbyEntrance(d, slot, 0, y, TILE, height * FLOOR, height);
|
|
216
|
+
else
|
|
217
|
+
drawTallLobbyTile(d, 0, y, TILE, height * FLOOR, slot, ground, height);
|
|
218
|
+
},
|
|
219
|
+
});
|
|
220
|
+
tall.set(key, gfx);
|
|
221
|
+
}
|
|
222
|
+
return gfx;
|
|
223
|
+
};
|
|
224
|
+
const bakeEsc = (side) => [0, 1].map((p) => new ex.Canvas({
|
|
225
|
+
width: ESCAPE_W,
|
|
226
|
+
height: FLOOR,
|
|
227
|
+
cache: true,
|
|
228
|
+
draw: (ctx) => drawEscapeStairs(ctx, side, p, FLOOR),
|
|
229
|
+
}));
|
|
230
|
+
engine.escGfx = { left: bakeEsc("left"), right: bakeEsc("right") };
|
|
231
|
+
const bakeAwning = (side) => new ex.Canvas({
|
|
232
|
+
width: AWNING_W,
|
|
233
|
+
height: FLOOR,
|
|
234
|
+
cache: true,
|
|
235
|
+
draw: (ctx) => drawAwning(ctx, side, FLOOR),
|
|
236
|
+
});
|
|
237
|
+
engine.awningGfx = { left: bakeAwning("left"), right: bakeAwning("right") };
|
|
238
|
+
// The moving people (#2097): the cast drawn by `people.ts`, baked lazily per
|
|
239
|
+
// look, pose, walk frame, mood and facing (`peopleGfx.ts`), so a frame only
|
|
240
|
+
// looks a figure up. The routed crowd and the passers-by share it.
|
|
241
|
+
engine.people = bakePeople();
|
|
242
|
+
}
|
|
243
|
+
function fakeStruct(kind, floor = 1, x = 0) {
|
|
244
|
+
return {
|
|
245
|
+
id: -1,
|
|
246
|
+
kind,
|
|
247
|
+
floor,
|
|
248
|
+
x,
|
|
249
|
+
width: 1,
|
|
250
|
+
state: "occupied",
|
|
251
|
+
occupants: 0,
|
|
252
|
+
label: "",
|
|
253
|
+
};
|
|
254
|
+
}
|
|
255
|
+
// ---- Sky layer painters -------------------------------------------------
|
|
256
|
+
function drawSky(engine, ctx) {
|
|
257
|
+
if (engine.skyCanvas.width !== engine.viewWidth || engine.skyCanvas.height !== engine.viewHeight) {
|
|
258
|
+
engine.skyCanvas.width = engine.viewWidth;
|
|
259
|
+
engine.skyCanvas.height = engine.viewHeight;
|
|
260
|
+
}
|
|
261
|
+
ctx.clearRect(0, 0, engine.viewWidth, engine.viewHeight);
|
|
262
|
+
drawSun(engine, ctx);
|
|
263
|
+
drawClouds(engine, ctx);
|
|
264
|
+
renderSanta(engine, ctx);
|
|
265
|
+
}
|
|
266
|
+
/** Santa's sleigh crossing the sky during a holiday cameo (see syncEventFx). */
|
|
267
|
+
function renderSanta(engine, ctx) {
|
|
268
|
+
if (engine.santaStart === null)
|
|
269
|
+
return;
|
|
270
|
+
const p = (engine.d.anim - engine.santaStart) / SANTA_FLIGHT_SECONDS;
|
|
271
|
+
if (p < 0 || p > 1)
|
|
272
|
+
return;
|
|
273
|
+
// Slide fully across, offscreen to offscreen, with a gentle bob.
|
|
274
|
+
const x = -160 + p * (engine.viewWidth + 320);
|
|
275
|
+
const y = engine.viewHeight * 0.15 + Math.sin(p * Math.PI * 3) * 12;
|
|
276
|
+
drawSanta(ctx, x, y, 1.15);
|
|
277
|
+
}
|
|
278
|
+
/** Clouds drift across the sky on overcast and rainy days (sky layer). */
|
|
279
|
+
function drawClouds(engine, ctx) {
|
|
280
|
+
const w = engine.sim.weather;
|
|
281
|
+
if (w === "clear")
|
|
282
|
+
return;
|
|
283
|
+
const W = engine.viewWidth;
|
|
284
|
+
const H = engine.viewHeight;
|
|
285
|
+
const t = engine.d.anim;
|
|
286
|
+
ctx.fillStyle = cloudFill(w);
|
|
287
|
+
for (let i = 0; i < CLOUD_COUNT; i++) {
|
|
288
|
+
const seed = cloudSeed(i);
|
|
289
|
+
const { speed, row, offset } = cloudMotion(seed);
|
|
290
|
+
const { pad, top, band } = CLOUD_DRIFT;
|
|
291
|
+
const y = H * top + row * H * band;
|
|
292
|
+
const x = ((offset % (W + pad)) + t * speed) % (W + pad) - pad / 2;
|
|
293
|
+
drawCloud(ctx, x, y, cloudRadius(seed));
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
function drawSun(engine, ctx) {
|
|
297
|
+
const hour = engine.sim.clock.hour + engine.sim.clock.minute / 60;
|
|
298
|
+
// The sun arcs across 06:00→18:00; the moon takes the same arc 18:00→06:00,
|
|
299
|
+
// so both rise in the east, climb, and set in the west.
|
|
300
|
+
const { rise, set, baseY, lift } = SUN_ARC;
|
|
301
|
+
const day = hour >= rise && hour < set;
|
|
302
|
+
const arc = day ? ((hour - rise) / (set - rise)) * Math.PI : (((hour - set + 24) % 24) / (24 - (set - rise))) * Math.PI;
|
|
303
|
+
const cx = (arc / Math.PI) * engine.viewWidth;
|
|
304
|
+
const cy = engine.viewHeight * baseY - Math.sin(arc) * engine.viewHeight * lift;
|
|
305
|
+
drawSunDisc(ctx, cx, cy, day);
|
|
306
|
+
}
|
|
307
|
+
// ---- Engine lifecycle ---------------------------------------------------
|
|
308
|
+
function disposeScene(engine) {
|
|
309
|
+
for (const cell of engine.structTiles)
|
|
310
|
+
cell.clearGraphics();
|
|
311
|
+
// Region canvases, their membership, the dirty queue and the dead-parking
|
|
312
|
+
// set all clear together, so no queued repaint can survive into (and paint
|
|
313
|
+
// against) a swapped-in tower.
|
|
314
|
+
disposeRegions(engine);
|
|
315
|
+
for (const a of engine.animatedRooms.values())
|
|
316
|
+
a.kill();
|
|
317
|
+
for (const a of engine.transportActors.values())
|
|
318
|
+
a.kill();
|
|
319
|
+
for (const rec of engine.escapeActors.values()) {
|
|
320
|
+
rec.l.kill();
|
|
321
|
+
rec.r.kill();
|
|
322
|
+
}
|
|
323
|
+
engine.escapeActors.clear();
|
|
324
|
+
if (engine.craneActor) {
|
|
325
|
+
engine.craneActor.kill();
|
|
326
|
+
engine.craneActor = null;
|
|
327
|
+
engine.craneGfx = null;
|
|
328
|
+
}
|
|
329
|
+
engine.structTiles.clear();
|
|
330
|
+
// The cells were just emptied, so the next sync must walk the tiles again
|
|
331
|
+
// (and the old view's unit list, rooms and lobby cells are not kept alive).
|
|
332
|
+
engine.structPass = emptyStructPass();
|
|
333
|
+
engine.flightPass = emptyFlightPass();
|
|
334
|
+
engine.animatedRooms.clear();
|
|
335
|
+
engine.roomSig.clear();
|
|
336
|
+
engine.transportActors.clear();
|
|
337
|
+
engine.transportSig.clear();
|
|
338
|
+
clearMotion(engine);
|
|
339
|
+
}
|
|
340
|
+
/** Full input reset: a tower swap (new game / load) or an undo step must not
|
|
341
|
+
* inherit a half-finished gesture, and dropping any tracked contacts here is
|
|
342
|
+
* the recovery path if a browser ever swallows a pointer's up/cancel. */
|
|
343
|
+
function resetInput(engine) {
|
|
344
|
+
engine.tracker.reset();
|
|
345
|
+
engine.gesture = null;
|
|
346
|
+
engine.arrowDrag = null;
|
|
347
|
+
// The long-press peek resets with the rest of the input state: a hold armed
|
|
348
|
+
// on the old tower must not fire its captured pick against the new sim, and
|
|
349
|
+
// a fired peek's latch must not outlive the contact the reset just dropped
|
|
350
|
+
// (a stale latch suppresses every pointerMove until the next press).
|
|
351
|
+
clearLongPress(engine);
|
|
352
|
+
engine.longPressFired = false;
|
|
353
|
+
// The placement ghost and the shaft preview were judged against the tower
|
|
354
|
+
// as it was; the next pointer move, or the app's keyboard cursor refresh,
|
|
355
|
+
// draws them again against this one.
|
|
356
|
+
engine.preview = null;
|
|
357
|
+
engine.transportPreview = null;
|
|
358
|
+
}
|
|
359
|
+
/**
|
|
360
|
+
* Follow an undo or redo step the engine took on the tower this scene draws.
|
|
361
|
+
* The step is an edit of that tower, and it moved the tower's revision, so the
|
|
362
|
+
* scene is kept: the tiles, the room, shaft and crowd actors, the camera and
|
|
363
|
+
* any effect in flight. The next sync brings the scene up to the changed tower
|
|
364
|
+
* by its own keys (the revision and unit list for the tiles, each room's and
|
|
365
|
+
* shaft's signature, each person's id), as it does after a build or a
|
|
366
|
+
* bulldoze. A swap to another tower goes through {@link setSim} instead. The
|
|
367
|
+
* input resets, because the engine committed any gesture under way before it
|
|
368
|
+
* took the step, and an effect drawn on a spot the step emptied ends.
|
|
369
|
+
*/
|
|
370
|
+
function followStep(engine) {
|
|
371
|
+
resetInput(engine);
|
|
372
|
+
dropStrandedFx(engine);
|
|
373
|
+
}
|
|
374
|
+
function setSim(engine, sim, opts) {
|
|
375
|
+
// The scene keeps its lot width and basement, so the swapped-in tower must
|
|
376
|
+
// state the same ones. Bind first: a refused world throws before anything
|
|
377
|
+
// is torn down.
|
|
378
|
+
bindSceneWorld(sim);
|
|
379
|
+
disposeScene(engine);
|
|
380
|
+
// A tower with another top floor (a taller lot, #1985) gets a structure map
|
|
381
|
+
// of its own height. The cells were just cleared, so nothing drawn is lost.
|
|
382
|
+
if (engine.structTileMap && viewWorld().maxFloor !== engine.structTopFloor)
|
|
383
|
+
makeStructTileMap(engine);
|
|
384
|
+
clearCrowd(engine);
|
|
385
|
+
clearHallDoors(engine);
|
|
386
|
+
resetInput(engine);
|
|
387
|
+
// Drop any in-flight event visuals and adopt the new sim's fx baselines, so
|
|
388
|
+
// a tower swap neither leaves Santa mid-sky nor re-fires a stale flash.
|
|
389
|
+
engine.santaStart = null;
|
|
390
|
+
engine.explosions = [];
|
|
391
|
+
engine.thiefStart = null;
|
|
392
|
+
engine.thiefCaught = false;
|
|
393
|
+
engine.thiefFloor = 1;
|
|
394
|
+
engine.treasures = [];
|
|
395
|
+
engine.vipStart = null;
|
|
396
|
+
engine.lastSantaSeq = sim.santaFxSeq;
|
|
397
|
+
engine.lastExplosionSeq = sim.explosionFx.seq;
|
|
398
|
+
engine.lastThiefSeq = sim.thiefFx.seq;
|
|
399
|
+
engine.lastTreasureSeq = sim.treasureFx.seq;
|
|
400
|
+
engine.lastVipSeq = sim.vipFxSeq;
|
|
401
|
+
engine.sim = sim;
|
|
402
|
+
engine.builtRev = NOT_BAKED;
|
|
403
|
+
engine.mealOverlayRev = -1;
|
|
404
|
+
// Invalidate the per-floor occupancy cache so a swapped-in tower (new game /
|
|
405
|
+
// load) can't briefly gate walkers on the previous sim's occupancy even if
|
|
406
|
+
// its hour and revision happen to match the cached keys.
|
|
407
|
+
engine.floorLiveHour = -1;
|
|
408
|
+
engine.floorLiveRev = -1;
|
|
409
|
+
engine.floorLive.clear();
|
|
410
|
+
engine.adoptCamera(sim.view, opts?.keepCamera);
|
|
411
|
+
}
|
|
412
|
+
/** True when the engine draws through WebGL. Excalibur's constructor
|
|
413
|
+
* silently falls back to a Canvas2D context when `webgl2` creation fails
|
|
414
|
+
* (GPU still wedged after a loss), and that fallback never receives the
|
|
415
|
+
* context-loss handlers, so a "recovered" 2D engine would run degraded
|
|
416
|
+
* with the whole crash pipeline dead. The rebuild path checks this and
|
|
417
|
+
* treats the fallback as a failed recovery. */
|
|
418
|
+
function rendersWithWebGL(engine) {
|
|
419
|
+
return engine.engine.graphicsContext instanceof ex.ExcaliburGraphicsContextWebGL;
|
|
420
|
+
}
|
|
421
|
+
/** Full teardown, used by in-place context-loss recovery before a rebuild:
|
|
422
|
+
* Excalibur's dispose stops the loop, force-collects GPU resources,
|
|
423
|
+
* disables input, and releases the engine singleton slot so a fresh
|
|
424
|
+
* TowerEngine can be constructed cleanly. Safe on a lost context (GL calls
|
|
425
|
+
* on one are no-ops per spec). */
|
|
426
|
+
function dispose(engine) {
|
|
427
|
+
// Engine.dispose()'s internal stop() is guarded by clock.isRunning,
|
|
428
|
+
// and on the recovery path the context-loss handler has already stopped
|
|
429
|
+
// the clock, so that stop() would skip the texture GC and the browser
|
|
430
|
+
// teardown: the GC's requestIdleCallback loop would respawn forever and
|
|
431
|
+
// the per-engine window/document listeners (resize, visibilitychange)
|
|
432
|
+
// would keep the dead engine graph reachable for the page's life. Run
|
|
433
|
+
// both explicitly; each is idempotent, so the path where dispose()'s own
|
|
434
|
+
// stop() also runs them stays correct. The GC handle is private (still
|
|
435
|
+
// in Excalibur 1.0), hence the cast; if a future version renames it the
|
|
436
|
+
// optional chain degrades to the old leak instead of a crash.
|
|
437
|
+
engine.engine._garbageCollector?.stop();
|
|
438
|
+
engine.engine.browser.clear();
|
|
439
|
+
engine.engine.dispose();
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
export { bakeSharedGraphics, bindSceneWorld, dispose, disposeScene, fakeStruct, followStep, makeGround, makeOverlay, makeSky, makeStructTileMap, rendersWithWebGL, setSim };
|
|
443
|
+
//# sourceMappingURL=towerScene.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"towerScene.js","sources":["../../../src/render/excalibur/towerScene.ts"],"sourcesContent":["import * as ex from \"excalibur\";\nimport { drawTallLobbyEntrance, drawTallLobbyTile } from \"../sprites/structure/tallLobby\";\nimport { Z } from \"../depthPlanes\";\nimport { GROUND, groundBelowFloors } from \"../sceneryLayout\";\nimport type { RenderSim } from \"../renderSim\";\nimport { bindViewWorld, viewWorld } from \"../../presentation/viewWorld\";\nimport { bindViewKinds } from \"../../presentation/viewKinds\";\nimport type { UnitView } from \"../../simport/view\";\nimport {\n AWNING_W,\n drawAwning,\n drawEscapeStairs,\n drawLobbyEntrance,\n drawUnit,\n ESCAPE_W,\n LOBBY_VARIANTS,\n} from \"../sprites\";\nimport { drawSanta } from \"../sprites/events\";\nimport { CLOUD_COUNT, CLOUD_DRIFT, SUN_ARC, cloudFill, cloudMotion, cloudRadius, cloudSeed, drawCloud, drawSunDisc, skyColor } from \"../sprites/sky\";\nimport { disposeRegions } from \"./towerRegions\";\nimport { emptyStructPass } from \"./towerStructTiles\";\nimport { emptyFlightPass } from \"../venueFlights\";\nimport { clearLongPress } from \"./longPress\";\nimport { NOT_BAKED } from \"./sceneBake\";\nimport { bakePeople } from \"./peopleGfx\";\nimport { FLOOR, TILE } from \"../scale\";\nimport * as overlayFx from \"./towerOverlay\";\nimport * as crowd from \"./towerCrowd\";\nimport { clearHallDoors } from \"./towerHallDoors\";\nimport type { TowerEngine } from \"./TowerEngine\";\nimport { towerCatalog } from \"../../catalog/towerCatalog\";\n\n/**\n * Static scene construction, shared-graphics baking, the sky-layer painters\n * (sun/moon, clouds, Santa) and the engine lifecycle (sim-swap, teardown,\n * dispose) for {@link TowerEngine}. Friend functions taking the engine\n * instance. Extracted from `TowerEngine.ts`; the class keeps thin delegations.\n * Retained-scene reconciliation lives in `towerReconcile`; the 2D overlay\n * painters in `towerOverlay`. Pure code move: no drawing or teardown logic\n * changed.\n */\n\n// ---- Static scene elements ----------------------------------------------\n\n/** Bind the view's world from the tower's catalog: the tile maps, region grid,\n * scenery and cursor clamps are all sized from it (#921). The engine binds it\n * when it is built, before any input can read it. A swapped-in tower must\n * state the same lot width and basement; its top floor may differ, and\n * {@link setSim} then resizes the structure map to it (#1985). */\nexport function bindSceneWorld(sim: RenderSim): void {\n const catalog = towerCatalog(sim);\n bindViewWorld(catalog.world);\n bindViewKinds(catalog);\n}\n\nexport function makeGround(engine: TowerEngine): void {\n const total = viewWorld().lotWidth * TILE * GROUND.lots;\n const centerX = (viewWorld().lotWidth / 2) * TILE;\n const depth = groundBelowFloors() * FLOOR;\n const leftEdge = centerX - total / 2;\n // One rectangle this wide (~11k px) would rasterize to a bitmap past the GPU\n // texture limit (4096 on mobile) and render as a black band. It needs the\n // full width to cover the dirt when zoomed out at the camera's edge, so tile\n // it into texture-safe segments instead (seamless, same solid color).\n // Keep each segment under 2048px, the lowest MAX_TEXTURE_SIZE on older\n // mobile GPUs (the transport-shaft cap stays under this too).\n const MAX_SEG = 2000;\n const segments = Math.ceil(total / MAX_SEG);\n const segW = total / segments;\n for (let i = 0; i < segments; i++) {\n const segCx = leftEdge + segW * (i + 0.5);\n const dirt = new ex.Actor({\n pos: ex.vec(segCx, 0),\n width: segW + 1, // overlap neighbors by 1px to hide any seam\n height: depth,\n anchor: ex.vec(0.5, 0),\n z: Z.dirt,\n color: ex.Color.fromHex(GROUND.dirt),\n });\n engine.engine.add(dirt);\n engine.engine.add(\n new ex.Actor({\n pos: ex.vec(segCx, 0),\n width: segW + 1,\n height: GROUND.lineH,\n anchor: ex.vec(0.5, 0.5),\n z: Z.groundLine,\n color: ex.Color.fromHex(GROUND.line),\n }),\n );\n }\n}\n\n/**\n * Sun/moon on a screen-space layer placed *below* the world ground and tower\n * (a z under the dirt). They hang in the open sky, and as you pan, the dirt\n * and the building slide over them and hide them at the horizon, so it pans\n * correctly with no manual clipping.\n */\nexport function makeSky(engine: TowerEngine): void {\n // cache:false is deliberate (like the overlay below): this is a full-viewport\n // screen layer whose pixels change every frame, the sun/moon arc and clouds\n // drift on the decorative clock. A cached canvas would have to flagDirty()\n // every frame, which re-rasterizes AND re-uploads the whole texture anyway\n // (see the RoomRec cache note), no reuse to gain, just extra plumbing.\n engine.skyCanvas = new ex.Canvas({\n width: engine.viewWidth,\n height: engine.viewHeight,\n cache: false,\n draw: (ctx) => drawSky(engine, ctx),\n });\n engine.sky = new ex.ScreenElement({ x: 0, y: 0, z: Z.sky });\n engine.sky.graphics.use(engine.skyCanvas);\n engine.engine.add(engine.sky);\n}\n\nexport function makeOverlay(engine: TowerEngine): void {\n // cache:false is deliberate: this full-viewport screen layer changes every\n // frame, the ruler always draws, the build-preview ghost tracks the cursor,\n // rain animates, and the event visuals follow the camera (their screen\n // coords come from worldToScreen). Nothing here is stable across frames,\n // so a cached canvas would need a per-frame flagDirty() that re-rasterizes\n // and re-uploads the whole texture regardless, equal cost to cache:false,\n // plus extra plumbing and a staleness-bug risk.\n engine.overlayCanvas = new ex.Canvas({\n width: engine.viewWidth,\n height: engine.viewHeight,\n cache: false,\n draw: (ctx) => overlayFx.drawOverlay(engine, ctx),\n });\n engine.overlay = new ex.ScreenElement({ x: 0, y: 0, z: Z.overlay });\n engine.overlay.graphics.use(engine.overlayCanvas);\n engine.engine.add(engine.overlay);\n}\n\n/** One TileMap entity carries every static floor/lobby tile (see the\n * structTiles field note). Sized to the whole buildable grid so cell\n * lookups are plain coordinate math; row 0 is the TOP floor because the\n * map's origin is its top-left corner in world space. A map built before\n * (a swap to a tower with another top floor) leaves the scene first. */\nexport function makeStructTileMap(engine: TowerEngine): void {\n const world = viewWorld();\n if (engine.structTileMap) engine.engine.remove(engine.structTileMap);\n engine.structTileMap = new ex.TileMap({\n pos: ex.vec(0, engine.worldYTop(world.maxFloor)),\n tileWidth: TILE,\n tileHeight: FLOOR,\n columns: world.lotWidth,\n rows: world.maxFloor - world.minFloor + 1,\n });\n engine.structTopFloor = world.maxFloor;\n engine.structTileMap.z = Z.structure; // behind rooms (0) and transports (1), like the old actors\n engine.engine.add(engine.structTileMap);\n}\n\n// ---- Shared graphics ----------------------------------------------------\n\nexport function bakeSharedGraphics(engine: TowerEngine): void {\n // Structural tiles bake from a FIXED DrawCtx (not the live this.d): these\n // canvases cache on first render, so baking from live state would freeze\n // whatever lighting happened to be on screen at that moment into the tile.\n const bake = (u: UnitView, lit: boolean) =>\n new ex.Canvas({\n width: TILE,\n height: FLOOR,\n cache: true,\n draw: (ctx) => drawUnit({ ctx, lit, anim: 0, hour: lit ? 20 : 12 }, u, 0, 0, TILE, FLOOR),\n });\n engine.floorGfx = bake(fakeStruct(\"floor\"), false);\n // Lobby variants: [lit 0/1][ground 0/1][variant]. The fake unit's floor\n // selects the grand ground style (1) vs the sky-lobby style; x the variant.\n engine.lobbyGfx = [false, true].map((lit) =>\n [false, true].map((ground) =>\n Array.from({ length: LOBBY_VARIANTS }, (_, v) => bake(fakeStruct(\"lobby\", ground ? 1 : 2, v), lit)),\n ),\n );\n // Grand-entrance tiles need the ANIMATED path (cache: false) so the\n // doorman's two-frame sway advances on the decorative clock without extra\n // plumbing. The bake reads `this.d.anim` at draw time; `this.d.lit` is\n // fixed per canvas so the lit and unlit versions don't get swapped on the\n // evening flip (that path re-issues use() to swap between them). Service\n // tiles are static so they use the same cache-true bake as normal variants.\n const bakeGrand = (kind: \"grand-left\" | \"grand-right\" | \"grand-solo\") => (lit: boolean): ex.Canvas =>\n new ex.Canvas({\n width: TILE,\n height: FLOOR,\n cache: false,\n // The staffed slice: a tower nobody is in shows its empty slice instead\n // (`entranceEmptyGfx`), which the structure cells swap to per tower.\n draw: (ctx) =>\n drawLobbyEntrance({ ctx, lit, anim: engine.d.anim, hour: lit ? 20 : 12, staffed: true }, kind, 0, 0, TILE, FLOOR),\n });\n // No doorman or attendant, so nothing moves: a static bake.\n const bakeEmpty = (kind: \"grand-left\" | \"grand-right\" | \"grand-solo\") => (lit: boolean): ex.Canvas =>\n new ex.Canvas({\n width: TILE,\n height: FLOOR,\n cache: true,\n draw: (ctx) => drawLobbyEntrance({ ctx, lit, anim: 0, hour: lit ? 20 : 12, staffed: false }, kind, 0, 0, TILE, FLOOR),\n });\n const bakeService = (lit: boolean): ex.Canvas =>\n new ex.Canvas({\n width: TILE,\n height: FLOOR,\n cache: true,\n draw: (ctx) => drawLobbyEntrance({ ctx, lit, anim: 0, hour: lit ? 20 : 12 }, \"service\", 0, 0, TILE, FLOOR),\n });\n engine.entranceGrandLeftGfx = [bakeGrand(\"grand-left\")(false), bakeGrand(\"grand-left\")(true)];\n engine.entranceGrandRightGfx = [bakeGrand(\"grand-right\")(false), bakeGrand(\"grand-right\")(true)];\n engine.entranceGrandSoloGfx = [bakeGrand(\"grand-solo\")(false), bakeGrand(\"grand-solo\")(true)];\n engine.entranceServiceGfx = [bakeService(false), bakeService(true)];\n engine.entranceEmptyGfx = {\n \"grand-left\": [bakeEmpty(\"grand-left\")(false), bakeEmpty(\"grand-left\")(true)],\n \"grand-right\": [bakeEmpty(\"grand-right\")(false), bakeEmpty(\"grand-right\")(true)],\n \"grand-solo\": [bakeEmpty(\"grand-solo\")(false), bakeEmpty(\"grand-solo\")(true)],\n };\n // Tall lobby stories (#308): each cell draws the whole hall shifted up so\n // only its own story lands on the canvas, so the slices line up into one\n // hall. Baked on first use: a tower holds at most a few tall lobbies.\n const tall = new Map<string, ex.Canvas>();\n engine.tallLobbyGfx = (lit, ground, height, story, slot, staffed) => {\n // The grand doors' story carries the swaying doorman of a staffed tower,\n // so it takes the animated path like the one-story grand entrance; an\n // empty tower's doors story is static. Staffing keys only that story.\n const grandDoors = story === 0 && typeof slot === \"string\" && slot !== \"service\";\n const doorman = grandDoors && staffed;\n const staffing = staffed ? \"staffed\" : \"empty\";\n const key = `${lit ? 1 : 0}|${ground ? 1 : 0}|${height}|${story}|${slot}|${grandDoors ? staffing : \"\"}`;\n let gfx = tall.get(key);\n if (!gfx) {\n const y = -(height - 1 - story) * FLOOR;\n gfx = new ex.Canvas({\n width: TILE,\n height: FLOOR,\n cache: !doorman,\n draw: (ctx) => {\n const d = doorman\n ? { ctx, lit, anim: engine.d.anim, hour: lit ? 20 : 12, staffed: true }\n : { ctx, lit, anim: 0, hour: lit ? 20 : 12, staffed: !grandDoors };\n if (typeof slot === \"string\") drawTallLobbyEntrance(d, slot, 0, y, TILE, height * FLOOR, height);\n else drawTallLobbyTile(d, 0, y, TILE, height * FLOOR, slot, ground, height);\n },\n });\n tall.set(key, gfx);\n }\n return gfx;\n };\n const bakeEsc = (side: \"left\" | \"right\") =>\n [0, 1].map(\n (p) =>\n new ex.Canvas({\n width: ESCAPE_W,\n height: FLOOR,\n cache: true,\n draw: (ctx) => drawEscapeStairs(ctx, side, p as 0 | 1, FLOOR),\n }),\n );\n engine.escGfx = { left: bakeEsc(\"left\"), right: bakeEsc(\"right\") };\n const bakeAwning = (side: \"left\" | \"right\") =>\n new ex.Canvas({\n width: AWNING_W,\n height: FLOOR,\n cache: true,\n draw: (ctx) => drawAwning(ctx, side, FLOOR),\n });\n engine.awningGfx = { left: bakeAwning(\"left\"), right: bakeAwning(\"right\") };\n\n // The moving people (#2097): the cast drawn by `people.ts`, baked lazily per\n // look, pose, walk frame, mood and facing (`peopleGfx.ts`), so a frame only\n // looks a figure up. The routed crowd and the passers-by share it.\n engine.people = bakePeople();\n}\n\nexport function fakeStruct(kind: \"floor\" | \"lobby\", floor = 1, x = 0): UnitView {\n return {\n id: -1,\n kind,\n floor,\n x,\n width: 1,\n state: \"occupied\",\n occupants: 0,\n label: \"\",\n };\n}\n\n// ---- Sky layer painters -------------------------------------------------\n\nfunction drawSky(engine: TowerEngine, ctx: CanvasRenderingContext2D): void {\n if (engine.skyCanvas.width !== engine.viewWidth || engine.skyCanvas.height !== engine.viewHeight) {\n engine.skyCanvas.width = engine.viewWidth;\n engine.skyCanvas.height = engine.viewHeight;\n }\n ctx.clearRect(0, 0, engine.viewWidth, engine.viewHeight);\n drawSun(engine, ctx);\n drawClouds(engine, ctx);\n renderSanta(engine, ctx);\n}\n\n/** Santa's sleigh crossing the sky during a holiday cameo (see syncEventFx). */\nfunction renderSanta(engine: TowerEngine, ctx: CanvasRenderingContext2D): void {\n if (engine.santaStart === null) return;\n const p = (engine.d.anim - engine.santaStart) / overlayFx.SANTA_FLIGHT_SECONDS;\n if (p < 0 || p > 1) return;\n // Slide fully across, offscreen to offscreen, with a gentle bob.\n const x = -160 + p * (engine.viewWidth + 320);\n const y = engine.viewHeight * 0.15 + Math.sin(p * Math.PI * 3) * 12;\n drawSanta(ctx, x, y, 1.15);\n}\n\n/** Clouds drift across the sky on overcast and rainy days (sky layer). */\nfunction drawClouds(engine: TowerEngine, ctx: CanvasRenderingContext2D): void {\n const w = engine.sim.weather;\n if (w === \"clear\") return;\n const W = engine.viewWidth;\n const H = engine.viewHeight;\n const t = engine.d.anim;\n ctx.fillStyle = cloudFill(w);\n for (let i = 0; i < CLOUD_COUNT; i++) {\n const seed = cloudSeed(i);\n const { speed, row, offset } = cloudMotion(seed);\n const { pad, top, band } = CLOUD_DRIFT;\n const y = H * top + row * H * band;\n const x = ((offset % (W + pad)) + t * speed) % (W + pad) - pad / 2;\n drawCloud(ctx, x, y, cloudRadius(seed));\n }\n}\n\nfunction drawSun(engine: TowerEngine, ctx: CanvasRenderingContext2D): void {\n const hour = engine.sim.clock.hour + engine.sim.clock.minute / 60;\n // The sun arcs across 06:00→18:00; the moon takes the same arc 18:00→06:00,\n // so both rise in the east, climb, and set in the west.\n const { rise, set, baseY, lift } = SUN_ARC;\n const day = hour >= rise && hour < set;\n const arc = day ? ((hour - rise) / (set - rise)) * Math.PI : (((hour - set + 24) % 24) / (24 - (set - rise))) * Math.PI;\n const cx = (arc / Math.PI) * engine.viewWidth;\n const cy = engine.viewHeight * baseY - Math.sin(arc) * engine.viewHeight * lift;\n drawSunDisc(ctx, cx, cy, day);\n}\n\nexport { skyColor };\n\n// ---- Engine lifecycle ---------------------------------------------------\n\nexport function disposeScene(engine: TowerEngine): void {\n for (const cell of engine.structTiles) cell.clearGraphics();\n // Region canvases, their membership, the dirty queue and the dead-parking\n // set all clear together, so no queued repaint can survive into (and paint\n // against) a swapped-in tower.\n disposeRegions(engine);\n for (const a of engine.animatedRooms.values()) a.kill();\n for (const a of engine.transportActors.values()) a.kill();\n for (const rec of engine.escapeActors.values()) {\n rec.l.kill();\n rec.r.kill();\n }\n engine.escapeActors.clear();\n if (engine.craneActor) {\n engine.craneActor.kill();\n engine.craneActor = null;\n engine.craneGfx = null;\n }\n engine.structTiles.clear();\n // The cells were just emptied, so the next sync must walk the tiles again\n // (and the old view's unit list, rooms and lobby cells are not kept alive).\n engine.structPass = emptyStructPass();\n engine.flightPass = emptyFlightPass();\n engine.animatedRooms.clear();\n engine.roomSig.clear();\n engine.transportActors.clear();\n engine.transportSig.clear();\n crowd.clearMotion(engine);\n}\n\n/** Full input reset: a tower swap (new game / load) or an undo step must not\n * inherit a half-finished gesture, and dropping any tracked contacts here is\n * the recovery path if a browser ever swallows a pointer's up/cancel. */\nfunction resetInput(engine: TowerEngine): void {\n engine.tracker.reset();\n engine.gesture = null;\n engine.arrowDrag = null;\n // The long-press peek resets with the rest of the input state: a hold armed\n // on the old tower must not fire its captured pick against the new sim, and\n // a fired peek's latch must not outlive the contact the reset just dropped\n // (a stale latch suppresses every pointerMove until the next press).\n clearLongPress(engine);\n engine.longPressFired = false;\n // The placement ghost and the shaft preview were judged against the tower\n // as it was; the next pointer move, or the app's keyboard cursor refresh,\n // draws them again against this one.\n engine.preview = null;\n engine.transportPreview = null;\n}\n\n/**\n * Follow an undo or redo step the engine took on the tower this scene draws.\n * The step is an edit of that tower, and it moved the tower's revision, so the\n * scene is kept: the tiles, the room, shaft and crowd actors, the camera and\n * any effect in flight. The next sync brings the scene up to the changed tower\n * by its own keys (the revision and unit list for the tiles, each room's and\n * shaft's signature, each person's id), as it does after a build or a\n * bulldoze. A swap to another tower goes through {@link setSim} instead. The\n * input resets, because the engine committed any gesture under way before it\n * took the step, and an effect drawn on a spot the step emptied ends.\n */\nexport function followStep(engine: TowerEngine): void {\n resetInput(engine);\n overlayFx.dropStrandedFx(engine);\n}\n\nexport function setSim(engine: TowerEngine, sim: RenderSim, opts?: { keepCamera?: boolean }): void {\n // The scene keeps its lot width and basement, so the swapped-in tower must\n // state the same ones. Bind first: a refused world throws before anything\n // is torn down.\n bindSceneWorld(sim);\n disposeScene(engine);\n // A tower with another top floor (a taller lot, #1985) gets a structure map\n // of its own height. The cells were just cleared, so nothing drawn is lost.\n if (engine.structTileMap && viewWorld().maxFloor !== engine.structTopFloor) makeStructTileMap(engine);\n crowd.clearCrowd(engine);\n clearHallDoors(engine);\n resetInput(engine);\n // Drop any in-flight event visuals and adopt the new sim's fx baselines, so\n // a tower swap neither leaves Santa mid-sky nor re-fires a stale flash.\n engine.santaStart = null;\n engine.explosions = [];\n engine.thiefStart = null;\n engine.thiefCaught = false;\n engine.thiefFloor = 1;\n engine.treasures = [];\n engine.vipStart = null;\n engine.lastSantaSeq = sim.santaFxSeq;\n engine.lastExplosionSeq = sim.explosionFx.seq;\n engine.lastThiefSeq = sim.thiefFx.seq;\n engine.lastTreasureSeq = sim.treasureFx.seq;\n engine.lastVipSeq = sim.vipFxSeq;\n engine.sim = sim;\n engine.builtRev = NOT_BAKED;\n engine.mealOverlayRev = -1;\n // Invalidate the per-floor occupancy cache so a swapped-in tower (new game /\n // load) can't briefly gate walkers on the previous sim's occupancy even if\n // its hour and revision happen to match the cached keys.\n engine.floorLiveHour = -1;\n engine.floorLiveRev = -1;\n engine.floorLive.clear();\n engine.adoptCamera(sim.view, opts?.keepCamera);\n}\n\n/** True when the engine draws through WebGL. Excalibur's constructor\n * silently falls back to a Canvas2D context when `webgl2` creation fails\n * (GPU still wedged after a loss), and that fallback never receives the\n * context-loss handlers, so a \"recovered\" 2D engine would run degraded\n * with the whole crash pipeline dead. The rebuild path checks this and\n * treats the fallback as a failed recovery. */\nexport function rendersWithWebGL(engine: TowerEngine): boolean {\n return engine.engine.graphicsContext instanceof ex.ExcaliburGraphicsContextWebGL;\n}\n\n/** Full teardown, used by in-place context-loss recovery before a rebuild:\n * Excalibur's dispose stops the loop, force-collects GPU resources,\n * disables input, and releases the engine singleton slot so a fresh\n * TowerEngine can be constructed cleanly. Safe on a lost context (GL calls\n * on one are no-ops per spec). */\nexport function dispose(engine: TowerEngine): void {\n // Engine.dispose()'s internal stop() is guarded by clock.isRunning,\n // and on the recovery path the context-loss handler has already stopped\n // the clock, so that stop() would skip the texture GC and the browser\n // teardown: the GC's requestIdleCallback loop would respawn forever and\n // the per-engine window/document listeners (resize, visibilitychange)\n // would keep the dead engine graph reachable for the page's life. Run\n // both explicitly; each is idempotent, so the path where dispose()'s own\n // stop() also runs them stays correct. The GC handle is private (still\n // in Excalibur 1.0), hence the cast; if a future version renames it the\n // optional chain degrades to the old leak instead of a crash.\n (engine.engine as unknown as { _garbageCollector?: { stop(): void } })._garbageCollector?.stop();\n engine.engine.browser.clear();\n engine.engine.dispose();\n}\n"],"names":["overlayFx.drawOverlay","overlayFx.SANTA_FLIGHT_SECONDS","crowd.clearMotion","overlayFx.dropStrandedFx","crowd.clearCrowd"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAgCA;;;;;;;;AAQG;AAEH;AAEA;;;;AAImE;AAC7D,SAAU,cAAc,CAAC,GAAc,EAAA;AAC3C,IAAA,MAAM,OAAO,GAAG,YAAY,CAAC,GAAG,CAAC;AACjC,IAAA,aAAa,CAAC,OAAO,CAAC,KAAK,CAAC;IAC5B,aAAa,CAAC,OAAO,CAAC;AACxB;AAEM,SAAU,UAAU,CAAC,MAAmB,EAAA;AAC5C,IAAA,MAAM,KAAK,GAAG,SAAS,EAAE,CAAC,QAAQ,GAAG,IAAI,GAAG,MAAM,CAAC,IAAI;AACvD,IAAA,MAAM,OAAO,GAAG,CAAC,SAAS,EAAE,CAAC,QAAQ,GAAG,CAAC,IAAI,IAAI;AACjD,IAAA,MAAM,KAAK,GAAG,iBAAiB,EAAE,GAAG,KAAK;AACzC,IAAA,MAAM,QAAQ,GAAG,OAAO,GAAG,KAAK,GAAG,CAAC;;;;;;;IAOpC,MAAM,OAAO,GAAG,IAAI;IACpB,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC;AAC3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O,CAAC,GAAG;IACrC,MAAM,CAAC,eAAe,GAAG,GAAG,CAAC,UAAU,CAAC,GAAG;AAC3C,IAAA,MAAM,CAAC,UAAU,GAAG,GAAG,CAAC,QAAQ;AAChC,IAAA,MAAM,CAAC,GAAG,GAAG,GAAG;AAChB,IAAA,MAAM,CAAC,QAAQ,GAAG,SAAS;AAC3B,IAAA,MAAM,CAAC,cAAc,GAAG,CAAC,CAAC;;;;AAI1B,IAAA,MAAM,CAAC,aAAa,GAAG,CAAC,CAAC;AACzB,IAAA,MAAM,CAAC,YAAY,GAAG,CAAC,CAAC;AACxB,IAAA,MAAM,CAAC,SAAS,CAAC,KAAK,EAAE;IACxB,MAAM,CAAC,WAAW,CAAC,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,UAAU,CAAC;AAChD;AAEA;;;;;AAKgD;AAC1C,SAAU,gBAAgB,CAAC,MAAmB,EAAA;IAClD,OAAO,MAAM,CAAC,MAAM,CAAC,eAAe,YAAY,EAAE,CAAC,6BAA6B;AAClF;AAEA;;;;AAImC;AAC7B,SAAU,OAAO,CAAC,MAAmB,EAAA;;;;;;;;;;;AAWxC,IAAA,MAAM,CAAC,MAA8D,CAAC,iBAAiB,EAAE,IAAI,EAAE;AAChG,IAAA,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,EAAE;AAC7B,IAAA,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE;AACzB;;"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { TowerEngine } from "./TowerEngine";
|
|
2
|
+
/** Longest strip canvas in world px, under the 2048 mobile texture cap. Strips
|
|
3
|
+
* past this split into `ceil(total / STRIP_MAX_SEG)` segments, so the SEGMENT
|
|
4
|
+
* COUNT moves with `TILE`: a smaller tile shortens every strip and can drop a
|
|
5
|
+
* segment. Exported so tests derive that count rather than hardcode one that
|
|
6
|
+
* quietly rots the next time the world scale changes. */
|
|
7
|
+
export declare const STRIP_MAX_SEG = 1800;
|
|
8
|
+
/** Re-derive everything the built tower or the sim identity changes: the
|
|
9
|
+
* seed-derived skyline and plants (on a founding-seed change), the apron
|
|
10
|
+
* split, and which plants are still standing. Cheap; rides every scene sync,
|
|
11
|
+
* and the first call builds the static world (see the lifecycle note above). */
|
|
12
|
+
export declare function syncScenery(engine: TowerEngine): void;
|