@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,238 @@
|
|
|
1
|
+
import '../sprites.js';
|
|
2
|
+
import { hallDoors } from '../lobbyHalls.js';
|
|
3
|
+
import { relightHallDoors, syncHallDoors } from './towerHallDoors.js';
|
|
4
|
+
import { stampGroundEntrances, towerOfSpan } from '../groundEntrances.js';
|
|
5
|
+
import { towerCatalog } from '../../catalog/towerCatalog.js';
|
|
6
|
+
import { bridgeTileGfx, bridgeLookCells, NO_BRIDGE_LOOKS, bridgeCellKey } from './towerBridgeTiles.js';
|
|
7
|
+
import { lobbyVariant } from '../sprites/structure/lobby.js';
|
|
8
|
+
|
|
9
|
+
/** A record that matches no sim, so the next sync walks every unit. */
|
|
10
|
+
function emptyStructPass() {
|
|
11
|
+
return {
|
|
12
|
+
sim: null,
|
|
13
|
+
units: null,
|
|
14
|
+
revision: -1,
|
|
15
|
+
lit: false,
|
|
16
|
+
rooms: [],
|
|
17
|
+
lobbies: [],
|
|
18
|
+
entrances: [],
|
|
19
|
+
undersides: [],
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
/** Bring the floor and lobby cells of the structure TileMap up to date and
|
|
23
|
+
* return the tower's rooms (every unit but the tiles, in `tower.units`
|
|
24
|
+
* order). A layout, unit list or sim change walks every unit once: it paints
|
|
25
|
+
* each tile, keeps the rooms and the lobby cells, and clears the cells no
|
|
26
|
+
* tile holds any more. A lighting-only change repaints the kept lobby cells.
|
|
27
|
+
* Any other sync touches no cell and hands back the kept rooms, whose entries
|
|
28
|
+
* stay current because the view patches them in place until it rebuilds the
|
|
29
|
+
* unit list. */
|
|
30
|
+
function syncStructureTiles(engine) {
|
|
31
|
+
const tower = engine.sim.tower;
|
|
32
|
+
const pass = engine.structPass;
|
|
33
|
+
const units = tower.units;
|
|
34
|
+
const layoutStale = pass.sim !== engine.sim ||
|
|
35
|
+
pass.units !== units ||
|
|
36
|
+
pass.revision !== tower.revision;
|
|
37
|
+
if (!layoutStale) {
|
|
38
|
+
if (pass.lit !== engine.litState) {
|
|
39
|
+
// The entrance map still matches this layout: it was built by the full
|
|
40
|
+
// pass that kept these lobby cells.
|
|
41
|
+
for (const [cell, u, story, height, look] of pass.lobbies)
|
|
42
|
+
paintCell(cell, lobbyTileGfx(engine, u, story, height, look));
|
|
43
|
+
for (const [cell, look] of pass.undersides)
|
|
44
|
+
paintCell(cell, bridgeTileGfx(look, engine.litState, "under"));
|
|
45
|
+
relightHallDoors(engine);
|
|
46
|
+
pass.lit = engine.litState;
|
|
47
|
+
}
|
|
48
|
+
return pass.rooms;
|
|
49
|
+
}
|
|
50
|
+
const topFloor = engine.structTopFloor;
|
|
51
|
+
const rooms = [];
|
|
52
|
+
const lobbies = [];
|
|
53
|
+
// Read once per full pass (#308): a tall lobby's cells cover the stories
|
|
54
|
+
// above its floor too.
|
|
55
|
+
const tall = tower.tallLobbies();
|
|
56
|
+
// The lobby columns of each floor that holds a tall hall, for the walls
|
|
57
|
+
// between halls of different heights (#2068).
|
|
58
|
+
const hallFloors = new Map();
|
|
59
|
+
for (const r of tall.runs)
|
|
60
|
+
hallFloors.set(r.floor, new Set());
|
|
61
|
+
// The floor-1 lobby columns, and, when each tower on the lot has its own
|
|
62
|
+
// front door, every column a ground-floor unit covers (the towers' extents).
|
|
63
|
+
const groundLobby = [];
|
|
64
|
+
const rules = towerCatalog(engine.sim).rules;
|
|
65
|
+
const buildings = rules.frontDoorPerTower ? [] : null;
|
|
66
|
+
// The sky bridge tiles in a drawn look (Modern), read once per full pass.
|
|
67
|
+
// Classic has no bridges (no skyBridge rule), so it skips the engine read.
|
|
68
|
+
const bridgeLooks = rules.skyBridge
|
|
69
|
+
? bridgeLookCells(tower.skyBridges?.() ?? [], rules.skyBridge.looks)
|
|
70
|
+
: NO_BRIDGE_LOOKS;
|
|
71
|
+
const seenS = new Set();
|
|
72
|
+
const undersides = [];
|
|
73
|
+
for (const u of units) {
|
|
74
|
+
if (u.kind !== "floor" && u.kind !== "lobby") {
|
|
75
|
+
rooms.push(u);
|
|
76
|
+
if (buildings && u.floor === 1)
|
|
77
|
+
for (let dx = 0; dx < u.width; dx++)
|
|
78
|
+
buildings.push(u.x + dx);
|
|
79
|
+
continue;
|
|
80
|
+
}
|
|
81
|
+
if (u.floor === 1) {
|
|
82
|
+
// Tiles are one wide in the sim; reading the width costs nothing.
|
|
83
|
+
for (let dx = 0; dx < u.width; dx++) {
|
|
84
|
+
if (u.kind === "lobby")
|
|
85
|
+
groundLobby.push(u.x + dx);
|
|
86
|
+
buildings?.push(u.x + dx);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
if (u.kind === "lobby")
|
|
90
|
+
hallFloors.get(u.floor)?.add(u.x);
|
|
91
|
+
// Floor/lobby units are one tile wide, so a unit maps to one cell.
|
|
92
|
+
const cell = engine.structTileMap.getTile(u.x, topFloor - u.floor);
|
|
93
|
+
if (!cell)
|
|
94
|
+
continue; // outside the grid; the engine never places there
|
|
95
|
+
seenS.add(cell);
|
|
96
|
+
engine.structTiles.add(cell);
|
|
97
|
+
if (u.kind !== "lobby") {
|
|
98
|
+
paintCell(cell, engine.floorGfx);
|
|
99
|
+
continue;
|
|
100
|
+
}
|
|
101
|
+
const height = tall.heightAt(u.floor, u.x);
|
|
102
|
+
const look = bridgeLooks.get(bridgeCellKey(u.floor, u.x));
|
|
103
|
+
lobbies.push([cell, u, 0, height, look]);
|
|
104
|
+
// A bridge tile has no story under it, so its underside takes the open
|
|
105
|
+
// air there.
|
|
106
|
+
const below = look && engine.structTileMap.getTile(u.x, topFloor - u.floor + 1);
|
|
107
|
+
if (look && below && !seenS.has(below)) {
|
|
108
|
+
seenS.add(below);
|
|
109
|
+
engine.structTiles.add(below);
|
|
110
|
+
undersides.push([below, look]);
|
|
111
|
+
}
|
|
112
|
+
for (let story = 1; story < height; story++) {
|
|
113
|
+
const up = engine.structTileMap.getTile(u.x, topFloor - u.floor - story);
|
|
114
|
+
if (!up)
|
|
115
|
+
continue;
|
|
116
|
+
seenS.add(up);
|
|
117
|
+
engine.structTiles.add(up);
|
|
118
|
+
lobbies.push([up, u, story, height]);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
// The floor-1 entrance map comes from this pass's own lobby list, and the
|
|
122
|
+
// lobby cells are painted after it, so a newly placed leftmost tile takes
|
|
123
|
+
// the grand entrance graphic on the same sync it is added.
|
|
124
|
+
groundLobby.sort((a, b) => a - b);
|
|
125
|
+
stampGroundEntrances(engine.floor1EntranceMap, groundLobby, buildings, engine.groundTowers);
|
|
126
|
+
const entrances = [];
|
|
127
|
+
syncHallDoors(engine, hallDoors(tall, (floor, x) => hallFloors.get(floor)?.has(x) ?? false));
|
|
128
|
+
for (const lc of lobbies) {
|
|
129
|
+
const [cell, u, story, height, look] = lc;
|
|
130
|
+
paintCell(cell, lobbyTileGfx(engine, u, story, height, look));
|
|
131
|
+
if (u.floor === 1 && isGrand(floor1EntranceKind(engine, u.x)))
|
|
132
|
+
entrances.push(lc);
|
|
133
|
+
}
|
|
134
|
+
for (const [cell, look] of undersides)
|
|
135
|
+
paintCell(cell, bridgeTileGfx(look, engine.litState, "under"));
|
|
136
|
+
for (const cell of engine.structTiles) {
|
|
137
|
+
if (seenS.has(cell))
|
|
138
|
+
continue;
|
|
139
|
+
cell.clearGraphics();
|
|
140
|
+
engine.structTiles.delete(cell);
|
|
141
|
+
}
|
|
142
|
+
// Written only once every cell is painted, so a pass that throws walks again.
|
|
143
|
+
engine.structPass = {
|
|
144
|
+
sim: engine.sim,
|
|
145
|
+
units,
|
|
146
|
+
revision: tower.revision,
|
|
147
|
+
lit: engine.litState,
|
|
148
|
+
rooms,
|
|
149
|
+
lobbies,
|
|
150
|
+
entrances,
|
|
151
|
+
undersides,
|
|
152
|
+
};
|
|
153
|
+
return rooms;
|
|
154
|
+
}
|
|
155
|
+
/** Show `gfx` on a structure cell. Lobby tiles swap their shared graphic when
|
|
156
|
+
* the evening lights come on (chandeliers/sconces glow), and a lobby built
|
|
157
|
+
* over bare floor takes the cell over. Guarded: clearing and re-adding a cell
|
|
158
|
+
* graphic dirties the TileMap's cached geometry, so a cell that already shows
|
|
159
|
+
* the right canvas is left alone. */
|
|
160
|
+
function paintCell(cell, gfx) {
|
|
161
|
+
if (cell.getGraphics()[0] === gfx)
|
|
162
|
+
return;
|
|
163
|
+
cell.clearGraphics();
|
|
164
|
+
cell.addGraphic(gfx);
|
|
165
|
+
}
|
|
166
|
+
/** The shared lobby tile graphic for this unit's lighting, style and slot.
|
|
167
|
+
* For floor-1 lobby tiles the frontage-edge predicate can override the
|
|
168
|
+
* variant to a wide-storefront grand slice, a compact grand fallback, or
|
|
169
|
+
* a service entrance; see {@link floor1EntranceKind}. A sky bridge tile in a
|
|
170
|
+
* drawn look (`look`) shows that look. */
|
|
171
|
+
function lobbyTileGfx(engine, u, story = 0, height = 1, look) {
|
|
172
|
+
if (look !== undefined)
|
|
173
|
+
return bridgeTileGfx(look, engine.litState);
|
|
174
|
+
const lit = engine.litState ? 1 : 0;
|
|
175
|
+
if (height > 1) {
|
|
176
|
+
// A tall lobby (#308): one slice of the whole open hall per story. The
|
|
177
|
+
// entrance's storefront (and its doorman) stands on the bottom story,
|
|
178
|
+
// with the hall's wall carried up over it in place of its own cornice.
|
|
179
|
+
const kind = u.floor === 1 ? floor1EntranceKind(engine, u.x) : "none";
|
|
180
|
+
const slot = kind === "none" ? lobbyVariant(u.x) : kind;
|
|
181
|
+
// Only a grand entrance has staff to send home; every other slice is
|
|
182
|
+
// drawn the same whoever is in.
|
|
183
|
+
const staffed = !isGrand(kind) || entranceStaffed(engine, u.x);
|
|
184
|
+
return engine.tallLobbyGfx(lit === 1, u.floor === 1, height, story, slot, staffed);
|
|
185
|
+
}
|
|
186
|
+
if (u.floor === 1) {
|
|
187
|
+
const kind = floor1EntranceKind(engine, u.x);
|
|
188
|
+
if (kind === "service")
|
|
189
|
+
return engine.entranceServiceGfx[lit];
|
|
190
|
+
if (kind !== "none")
|
|
191
|
+
return entranceStaffed(engine, u.x)
|
|
192
|
+
? grandGfx(engine, kind, lit)
|
|
193
|
+
: engine.entranceEmptyGfx[kind][lit];
|
|
194
|
+
return engine.lobbyGfx[lit][1][lobbyVariant(u.x)];
|
|
195
|
+
}
|
|
196
|
+
return engine.lobbyGfx[lit][0][lobbyVariant(u.x)];
|
|
197
|
+
}
|
|
198
|
+
/** The staffed one-story grand entrance graphic of `kind` for this lighting. */
|
|
199
|
+
function grandGfx(engine, kind, lit) {
|
|
200
|
+
switch (kind) {
|
|
201
|
+
case "grand-left":
|
|
202
|
+
return engine.entranceGrandLeftGfx[lit];
|
|
203
|
+
case "grand-right":
|
|
204
|
+
return engine.entranceGrandRightGfx[lit];
|
|
205
|
+
case "grand-solo":
|
|
206
|
+
return engine.entranceGrandSoloGfx[lit];
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
/** Whether `kind` is a slice of a grand entrance, which carries the doorman
|
|
210
|
+
* or the reception attendant. */
|
|
211
|
+
function isGrand(kind) {
|
|
212
|
+
return (kind === "grand-left" || kind === "grand-right" || kind === "grand-solo");
|
|
213
|
+
}
|
|
214
|
+
/** Whether the tower whose ground floor holds column `x` has anyone in it
|
|
215
|
+
* right now, so its entrance shows its staff (#552, per tower since #2384).
|
|
216
|
+
* Unknown until the scene sync's room walk answers it, which repaints the
|
|
217
|
+
* entrances in the same sync ({@link repaintEntrances}). */
|
|
218
|
+
function entranceStaffed(engine, x) {
|
|
219
|
+
return engine.towerStaffed[towerOfSpan(engine.groundTowers, x, 1)] === true;
|
|
220
|
+
}
|
|
221
|
+
/** Repaint the grand entrance cells for each tower's current staffing
|
|
222
|
+
* (`engine.towerStaffed`). The scene sync calls it after its room walk; a
|
|
223
|
+
* cell already showing the right graphic is left alone. A handful of cells. */
|
|
224
|
+
function repaintEntrances(engine) {
|
|
225
|
+
for (const [cell, u, story, height, look] of engine.structPass.entrances)
|
|
226
|
+
paintCell(cell, lobbyTileGfx(engine, u, story, height, look));
|
|
227
|
+
}
|
|
228
|
+
/** Which entrance (if any) the floor-1 lobby tile at grid `x` should render
|
|
229
|
+
* as. A plain lookup in the per-tile map computed by
|
|
230
|
+
* `stampGroundEntrances` (`../groundEntrances`) on each full tile pass of syncScene,
|
|
231
|
+
* and read by that pass and by a lighting-only lobby repaint (the only
|
|
232
|
+
* syncs that read it). */
|
|
233
|
+
function floor1EntranceKind(engine, x) {
|
|
234
|
+
return engine.floor1EntranceMap.get(x) ?? "none";
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
export { emptyStructPass, repaintEntrances, syncStructureTiles };
|
|
238
|
+
//# sourceMappingURL=towerStructTiles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"towerStructTiles.js","sources":["../../../src/render/excalibur/towerStructTiles.ts"],"sourcesContent":["import type * as ex from \"excalibur\";\nimport type { RenderSim } from \"../renderSim\";\nimport type { UnitView } from \"../../simport/view\";\nimport { lobbyVariant } from \"../sprites\";\nimport type { TowerEngine } from \"./TowerEngine\";\nimport type { EntranceKind } from \"../sprites/structure/lobby\";\nimport { hallDoors } from \"../lobbyHalls\";\nimport { relightHallDoors, syncHallDoors } from \"./towerHallDoors\";\nimport { stampGroundEntrances, towerOfSpan } from \"../groundEntrances\";\nimport { towerCatalog } from \"../../catalog/towerCatalog\";\nimport {\n bridgeCellKey,\n bridgeLookCells,\n bridgeTileGfx,\n NO_BRIDGE_LOOKS,\n type BridgeCell,\n} from \"./towerBridgeTiles\";\n\n/** The slices of a grand entrance, which carry its staff. */\ntype GrandKind = Exclude<EntranceKind, \"service\">;\n\n/**\n * The scene sync's structure pass: the floor and lobby cells of the structure\n * TileMap, and the floor-1 entrance map the lobby cells read. Split out of\n * `towerReconcile.ts`, which calls {@link syncStructureTiles} once per sync.\n */\n\n/** What the tile pass last drew from, and what it kept for the syncs that\n * skip the tiles: the rooms (every unit but the tiles, in `tower.units`\n * order) and the lobby cells with their units. */\nexport interface StructPass {\n sim: RenderSim | null;\n units: readonly UnitView[] | null;\n revision: number;\n lit: boolean;\n rooms: readonly UnitView[];\n lobbies: readonly LobbyCell[];\n /** The lobby cells that show a grand entrance, whose doorman and attendant\n * come and go with their tower's tenants ({@link repaintEntrances}). */\n entrances: readonly LobbyCell[];\n /** The open-air cells under the sky bridge tiles drawn in a look, which\n * show the bridge's underside. */\n undersides: readonly UndersideCell[];\n}\n\n/** The open-air cell under a bridge tile, and that tile's place on its\n * bridge. */\ntype UndersideCell = readonly [ex.Tile, BridgeCell];\n\n/** A lobby cell: the tile, its lobby unit, which story of the lobby it shows\n * (0 is the lobby's own floor), the lobby's height in stories (#308) and, on\n * a sky bridge in a drawn look, its look and place on the bridge. */\nexport type LobbyCell = readonly [\n ex.Tile,\n UnitView,\n number,\n number,\n BridgeCell?,\n];\n\n/** A record that matches no sim, so the next sync walks every unit. */\nexport function emptyStructPass(): StructPass {\n return {\n sim: null,\n units: null,\n revision: -1,\n lit: false,\n rooms: [],\n lobbies: [],\n entrances: [],\n undersides: [],\n };\n}\n\n/** Bring the floor and lobby cells of the structure TileMap up to date and\n * return the tower's rooms (every unit but the tiles, in `tower.units`\n * order). A layout, unit list or sim change walks every unit once: it paints\n * each tile, keeps the rooms and the lobby cells, and clears the cells no\n * tile holds any more. A lighting-only change repaints the kept lobby cells.\n * Any other sync touches no cell and hands back the kept rooms, whose entries\n * stay current because the view patches them in place until it rebuilds the\n * unit list. */\nexport function syncStructureTiles(engine: TowerEngine): readonly UnitView[] {\n const tower = engine.sim.tower;\n const pass = engine.structPass;\n const units = tower.units;\n const layoutStale =\n pass.sim !== engine.sim ||\n pass.units !== units ||\n pass.revision !== tower.revision;\n if (!layoutStale) {\n if (pass.lit !== engine.litState) {\n // The entrance map still matches this layout: it was built by the full\n // pass that kept these lobby cells.\n for (const [cell, u, story, height, look] of pass.lobbies)\n paintCell(cell, lobbyTileGfx(engine, u, story, height, look));\n for (const [cell, look] of pass.undersides)\n paintCell(cell, bridgeTileGfx(look, engine.litState, \"under\"));\n relightHallDoors(engine);\n pass.lit = engine.litState;\n }\n return pass.rooms;\n }\n const topFloor = engine.structTopFloor;\n const rooms: UnitView[] = [];\n const lobbies: LobbyCell[] = [];\n // Read once per full pass (#308): a tall lobby's cells cover the stories\n // above its floor too.\n const tall = tower.tallLobbies();\n // The lobby columns of each floor that holds a tall hall, for the walls\n // between halls of different heights (#2068).\n const hallFloors = new Map<number, Set<number>>();\n for (const r of tall.runs) hallFloors.set(r.floor, new Set());\n // The floor-1 lobby columns, and, when each tower on the lot has its own\n // front door, every column a ground-floor unit covers (the towers' extents).\n const groundLobby: number[] = [];\n const rules = towerCatalog(engine.sim).rules;\n const buildings: number[] | null = rules.frontDoorPerTower ? [] : null;\n // The sky bridge tiles in a drawn look (Modern), read once per full pass.\n // Classic has no bridges (no skyBridge rule), so it skips the engine read.\n const bridgeLooks = rules.skyBridge\n ? bridgeLookCells(tower.skyBridges?.() ?? [], rules.skyBridge.looks)\n : NO_BRIDGE_LOOKS;\n const seenS = new Set<ex.Tile>();\n const undersides: UndersideCell[] = [];\n for (const u of units) {\n if (u.kind !== \"floor\" && u.kind !== \"lobby\") {\n rooms.push(u);\n if (buildings && u.floor === 1)\n for (let dx = 0; dx < u.width; dx++) buildings.push(u.x + dx);\n continue;\n }\n if (u.floor === 1) {\n // Tiles are one wide in the sim; reading the width costs nothing.\n for (let dx = 0; dx < u.width; dx++) {\n if (u.kind === \"lobby\") groundLobby.push(u.x + dx);\n buildings?.push(u.x + dx);\n }\n }\n if (u.kind === \"lobby\") hallFloors.get(u.floor)?.add(u.x);\n // Floor/lobby units are one tile wide, so a unit maps to one cell.\n const cell = engine.structTileMap.getTile(u.x, topFloor - u.floor);\n if (!cell) continue; // outside the grid; the engine never places there\n seenS.add(cell);\n engine.structTiles.add(cell);\n if (u.kind !== \"lobby\") {\n paintCell(cell, engine.floorGfx);\n continue;\n }\n const height = tall.heightAt(u.floor, u.x);\n const look = bridgeLooks.get(bridgeCellKey(u.floor, u.x));\n lobbies.push([cell, u, 0, height, look]);\n // A bridge tile has no story under it, so its underside takes the open\n // air there.\n const below =\n look && engine.structTileMap.getTile(u.x, topFloor - u.floor + 1);\n if (look && below && !seenS.has(below)) {\n seenS.add(below);\n engine.structTiles.add(below);\n undersides.push([below, look]);\n }\n for (let story = 1; story < height; story++) {\n const up = engine.structTileMap.getTile(u.x, topFloor - u.floor - story);\n if (!up) continue;\n seenS.add(up);\n engine.structTiles.add(up);\n lobbies.push([up, u, story, height]);\n }\n }\n // The floor-1 entrance map comes from this pass's own lobby list, and the\n // lobby cells are painted after it, so a newly placed leftmost tile takes\n // the grand entrance graphic on the same sync it is added.\n groundLobby.sort((a, b) => a - b);\n stampGroundEntrances(\n engine.floor1EntranceMap,\n groundLobby,\n buildings,\n engine.groundTowers,\n );\n const entrances: LobbyCell[] = [];\n syncHallDoors(\n engine,\n hallDoors(tall, (floor, x) => hallFloors.get(floor)?.has(x) ?? false),\n );\n for (const lc of lobbies) {\n const [cell, u, story, height, look] = lc;\n paintCell(cell, lobbyTileGfx(engine, u, story, height, look));\n if (u.floor === 1 && isGrand(floor1EntranceKind(engine, u.x)))\n entrances.push(lc);\n }\n for (const [cell, look] of undersides)\n paintCell(cell, bridgeTileGfx(look, engine.litState, \"under\"));\n for (const cell of engine.structTiles) {\n if (seenS.has(cell)) continue;\n cell.clearGraphics();\n engine.structTiles.delete(cell);\n }\n // Written only once every cell is painted, so a pass that throws walks again.\n engine.structPass = {\n sim: engine.sim,\n units,\n revision: tower.revision,\n lit: engine.litState,\n rooms,\n lobbies,\n entrances,\n undersides,\n };\n return rooms;\n}\n\n/** Show `gfx` on a structure cell. Lobby tiles swap their shared graphic when\n * the evening lights come on (chandeliers/sconces glow), and a lobby built\n * over bare floor takes the cell over. Guarded: clearing and re-adding a cell\n * graphic dirties the TileMap's cached geometry, so a cell that already shows\n * the right canvas is left alone. */\nfunction paintCell(cell: ex.Tile, gfx: ex.Graphic): void {\n if (cell.getGraphics()[0] === gfx) return;\n cell.clearGraphics();\n cell.addGraphic(gfx);\n}\n\n/** The shared lobby tile graphic for this unit's lighting, style and slot.\n * For floor-1 lobby tiles the frontage-edge predicate can override the\n * variant to a wide-storefront grand slice, a compact grand fallback, or\n * a service entrance; see {@link floor1EntranceKind}. A sky bridge tile in a\n * drawn look (`look`) shows that look. */\nfunction lobbyTileGfx(\n engine: TowerEngine,\n u: UnitView,\n story = 0,\n height = 1,\n look?: BridgeCell,\n): ex.Canvas {\n if (look !== undefined) return bridgeTileGfx(look, engine.litState);\n const lit = engine.litState ? 1 : 0;\n if (height > 1) {\n // A tall lobby (#308): one slice of the whole open hall per story. The\n // entrance's storefront (and its doorman) stands on the bottom story,\n // with the hall's wall carried up over it in place of its own cornice.\n const kind = u.floor === 1 ? floor1EntranceKind(engine, u.x) : \"none\";\n const slot = kind === \"none\" ? lobbyVariant(u.x) : kind;\n // Only a grand entrance has staff to send home; every other slice is\n // drawn the same whoever is in.\n const staffed = !isGrand(kind) || entranceStaffed(engine, u.x);\n return engine.tallLobbyGfx(\n lit === 1,\n u.floor === 1,\n height,\n story,\n slot,\n staffed,\n );\n }\n if (u.floor === 1) {\n const kind = floor1EntranceKind(engine, u.x);\n if (kind === \"service\") return engine.entranceServiceGfx[lit];\n if (kind !== \"none\")\n return entranceStaffed(engine, u.x)\n ? grandGfx(engine, kind, lit)\n : engine.entranceEmptyGfx[kind][lit];\n return engine.lobbyGfx[lit][1][lobbyVariant(u.x)];\n }\n return engine.lobbyGfx[lit][0][lobbyVariant(u.x)];\n}\n\n/** The staffed one-story grand entrance graphic of `kind` for this lighting. */\nfunction grandGfx(\n engine: TowerEngine,\n kind: GrandKind,\n lit: number,\n): ex.Canvas {\n switch (kind) {\n case \"grand-left\":\n return engine.entranceGrandLeftGfx[lit];\n case \"grand-right\":\n return engine.entranceGrandRightGfx[lit];\n case \"grand-solo\":\n return engine.entranceGrandSoloGfx[lit];\n }\n}\n\n/** Whether `kind` is a slice of a grand entrance, which carries the doorman\n * or the reception attendant. */\nfunction isGrand(kind: EntranceKind | \"none\"): kind is GrandKind {\n return (\n kind === \"grand-left\" || kind === \"grand-right\" || kind === \"grand-solo\"\n );\n}\n\n/** Whether the tower whose ground floor holds column `x` has anyone in it\n * right now, so its entrance shows its staff (#552, per tower since #2384).\n * Unknown until the scene sync's room walk answers it, which repaints the\n * entrances in the same sync ({@link repaintEntrances}). */\nfunction entranceStaffed(engine: TowerEngine, x: number): boolean {\n return engine.towerStaffed[towerOfSpan(engine.groundTowers, x, 1)] === true;\n}\n\n/** Repaint the grand entrance cells for each tower's current staffing\n * (`engine.towerStaffed`). The scene sync calls it after its room walk; a\n * cell already showing the right graphic is left alone. A handful of cells. */\nexport function repaintEntrances(engine: TowerEngine): void {\n for (const [cell, u, story, height, look] of engine.structPass.entrances)\n paintCell(cell, lobbyTileGfx(engine, u, story, height, look));\n}\n\n/** Which entrance (if any) the floor-1 lobby tile at grid `x` should render\n * as. A plain lookup in the per-tile map computed by\n * `stampGroundEntrances` (`../groundEntrances`) on each full tile pass of syncScene,\n * and read by that pass and by a lighting-only lobby repaint (the only\n * syncs that read it). */\nfunction floor1EntranceKind(\n engine: TowerEngine,\n x: number,\n): \"grand-left\" | \"grand-right\" | \"grand-solo\" | \"service\" | \"none\" {\n return engine.floor1EntranceMap.get(x) ?? \"none\";\n}\n"],"names":[],"mappings":";;;;;;;;AA4DA;SACgB,eAAe,GAAA;IAC7B,OAAO;AACL,QAAA,GAAG,EAAE,IAAI;AACT,QAAA,KAAK,EAAE,IAAI;QACX,QAAQ,EAAE,CAAC,CAAC;AACZ,QAAA,GAAG,EAAE,KAAK;AACV,QAAA,KAAK,EAAE,EAAE;AACT,QAAA,OAAO,EAAE,EAAE;AACX,QAAA,SAAS,EAAE,EAAE;AACb,QAAA,UAAU,EAAE,EAAE;KACf;AACH;AAEA;;;;;;;AAOiB;AACX,SAAU,kBAAkB,CAAC,MAAmB,EAAA;AACpD,IAAA,MAAM,KAAK,GAAG,MAAM,CAAC,GAAG,CAAC,K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ene-sync scheduling for {@link TowerEngine.tick} (CAP-3 of the mobile
|
|
4
|
+
* render-perf spec, `_bmad-output/specs/spec-render-perf-mobile-zoom/`). The
|
|
5
|
+
* goal: the engine's `onHour` scans (satisfaction, traffic income) and the
|
|
6
|
+
* render's full `syncScene` reconcile never share a frame. They used to meet
|
|
7
|
+
* two ways: the meal-overlay trigger ran the full reconcile walk in the very
|
|
8
|
+
* frame whose onUpdate crossed an hour (top-speed meal windows bump it every
|
|
9
|
+
* sim minute), and the hour-triggered reconcile landed in the frame right
|
|
10
|
+
* after the scans, back to back under throttle. Now hour-driven repaints (the
|
|
11
|
+
* hour bucket and the hour-derived lighting flip) defer one frame and drain
|
|
12
|
+
* at the START of the next, before its sim advance, and meal repaints dodge
|
|
13
|
+
* hour-crossing frames the same way. A pending deferral always drains on the
|
|
14
|
+
* very next frame, so no reconcile is ever skipped, and the sync repaints
|
|
15
|
+
* from live state, so the one-frame-later pass renders the same pixels. The
|
|
16
|
+
* residual: when EVERY frame crosses an hour (deep catch-up), scans run every
|
|
17
|
+
* frame and the drain halves the sync cadence instead of separating them;
|
|
18
|
+
* separating those needs the engine-side onHour amortization, a recorded
|
|
19
|
+
* spec non-goal.
|
|
20
|
+
*
|
|
21
|
+
* Meal-overlay bumps are coalesced too (#1747): the engine bumps the meal
|
|
22
|
+
* overlay revision on each meal return or venue exit, which during a busy
|
|
23
|
+
* lunch at top speed is most frames, and each sync walks every room. A bump
|
|
24
|
+
* alone syncs at most once per {@link MEAL_SYNC_MS} of real time; one that
|
|
25
|
+
* arrives sooner waits (the revision stays unadopted, so the trigger holds)
|
|
26
|
+
* and the next due frame repaints from live state.
|
|
27
|
+
*/
|
|
28
|
+
/** The least real time, in milliseconds, between a scene sync and one that a
|
|
29
|
+
* meal-overlay bump alone asks for: at most five such room walks a second
|
|
30
|
+
* instead of one per frame. At top speed (50 game minutes a second) a meal
|
|
31
|
+
* look then trails the sim by up to 10 game minutes. */
|
|
32
|
+
export declare const MEAL_SYNC_MS = 200;
|
|
33
|
+
/** The display-lighting flag, shared by tick() and the boot bake in start()
|
|
34
|
+
* so the two derivations can never drift (a drift shows one wrong-lighting
|
|
35
|
+
* frame at boot now that the hour resync defers). */
|
|
36
|
+
export declare function displayLit(clock: {
|
|
37
|
+
isNight(): boolean;
|
|
38
|
+
isEvening(): boolean;
|
|
39
|
+
}): boolean;
|
|
40
|
+
export interface SyncTriggers {
|
|
41
|
+
/** Tower layout changed (revision moved): rebuild rooms AND motion actors. */
|
|
42
|
+
structural: boolean;
|
|
43
|
+
/** Meal-overlay repaint requested by the sim (mid-hour occupancy dips). */
|
|
44
|
+
mealOverlay: boolean;
|
|
45
|
+
/** At least {@link MEAL_SYNC_MS} have passed since the last scene sync, so
|
|
46
|
+
* a meal-overlay bump may sync. */
|
|
47
|
+
mealDue: boolean;
|
|
48
|
+
/** The evening/night lighting flag flipped (hour-derived). */
|
|
49
|
+
litChanged: boolean;
|
|
50
|
+
/** The displayed hour bucket changed (shutters, asleep looks, live bits). */
|
|
51
|
+
hourChanged: boolean;
|
|
52
|
+
/** A deferral from the previous frame is waiting to drain. */
|
|
53
|
+
pending: boolean;
|
|
54
|
+
/** The live sim clock crossed an hour inside THIS frame's onUpdate (its
|
|
55
|
+
* onHour scans just ran; the displayed hour still lags the live clock). */
|
|
56
|
+
simCrossedHour: boolean;
|
|
57
|
+
}
|
|
58
|
+
/** Pure one-step scheduler: decides whether this frame syncs and whether a
|
|
59
|
+
* deferral carries to the next. Structural changes and a pending deferral
|
|
60
|
+
* sync now and absorb any other trigger arriving in the same frame, because
|
|
61
|
+
* the sync reads live state and covers everything at once. A meal-overlay
|
|
62
|
+
* bump that is due syncs now too, UNLESS this frame's sim advance crossed an
|
|
63
|
+
* hour: the hourly scans just ran, so the repaint books for the next frame's
|
|
64
|
+
* drain instead of stacking with them. A bump that is not due yet does
|
|
65
|
+
* nothing this frame; it stays a trigger until a sync adopts it. Hour-driven
|
|
66
|
+
* triggers alone always book. */
|
|
67
|
+
export declare function planSceneSync(t: SyncTriggers): {
|
|
68
|
+
syncNow: boolean;
|
|
69
|
+
nextPending: boolean;
|
|
70
|
+
};
|
|
71
|
+
/** Frame-start drain, called from tick() BEFORE the controller advances the
|
|
72
|
+
* sim (onUpdate). A deferral booked last frame must repaint before this
|
|
73
|
+
* frame's sim advance: a throttled catch-up frame can cross the NEXT hour
|
|
74
|
+
* inside onUpdate, and draining afterward would re-stack the deferred
|
|
75
|
+
* reconcile with that hour's engine scans, the exact pileup the deferral
|
|
76
|
+
* exists to prevent. */
|
|
77
|
+
export declare function drainSceneSync(engine: TowerEngine, nowMs?: number): void;
|
|
78
|
+
/** Post-update sync step, called from tick() after the sim advanced:
|
|
79
|
+
* evaluates the triggers, applies the plan, and keeps the engine's sync
|
|
80
|
+
* bookkeeping (litState, lastSyncHour, builtRev, mealOverlayRev) exactly
|
|
81
|
+
* where the old inline block kept it. The pending branch normally never
|
|
82
|
+
* fires here (drainSceneSync ran at frame start); it stays so a drain that
|
|
83
|
+
* could not run, whatever the reason, still syncs rather than skips. */
|
|
84
|
+
export declare function runSceneSync(engine: TowerEngine, nowMs?: number): void;
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import { syncScene, syncFacade } from './towerReconcile.js';
|
|
2
|
+
import { syncMotion } from './towerCrowd.js';
|
|
3
|
+
import { drainAllRegions } from './towerRegions.js';
|
|
4
|
+
import { awaitsInitialBake } from './sceneBake.js';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Scene-sync scheduling for {@link TowerEngine.tick} (CAP-3 of the mobile
|
|
8
|
+
* render-perf spec, `_bmad-output/specs/spec-render-perf-mobile-zoom/`). The
|
|
9
|
+
* goal: the engine's `onHour` scans (satisfaction, traffic income) and the
|
|
10
|
+
* render's full `syncScene` reconcile never share a frame. They used to meet
|
|
11
|
+
* two ways: the meal-overlay trigger ran the full reconcile walk in the very
|
|
12
|
+
* frame whose onUpdate crossed an hour (top-speed meal windows bump it every
|
|
13
|
+
* sim minute), and the hour-triggered reconcile landed in the frame right
|
|
14
|
+
* after the scans, back to back under throttle. Now hour-driven repaints (the
|
|
15
|
+
* hour bucket and the hour-derived lighting flip) defer one frame and drain
|
|
16
|
+
* at the START of the next, before its sim advance, and meal repaints dodge
|
|
17
|
+
* hour-crossing frames the same way. A pending deferral always drains on the
|
|
18
|
+
* very next frame, so no reconcile is ever skipped, and the sync repaints
|
|
19
|
+
* from live state, so the one-frame-later pass renders the same pixels. The
|
|
20
|
+
* residual: when EVERY frame crosses an hour (deep catch-up), scans run every
|
|
21
|
+
* frame and the drain halves the sync cadence instead of separating them;
|
|
22
|
+
* separating those needs the engine-side onHour amortization, a recorded
|
|
23
|
+
* spec non-goal.
|
|
24
|
+
*
|
|
25
|
+
* Meal-overlay bumps are coalesced too (#1747): the engine bumps the meal
|
|
26
|
+
* overlay revision on each meal return or venue exit, which during a busy
|
|
27
|
+
* lunch at top speed is most frames, and each sync walks every room. A bump
|
|
28
|
+
* alone syncs at most once per {@link MEAL_SYNC_MS} of real time; one that
|
|
29
|
+
* arrives sooner waits (the revision stays unadopted, so the trigger holds)
|
|
30
|
+
* and the next due frame repaints from live state.
|
|
31
|
+
*/
|
|
32
|
+
/** The least real time, in milliseconds, between a scene sync and one that a
|
|
33
|
+
* meal-overlay bump alone asks for: at most five such room walks a second
|
|
34
|
+
* instead of one per frame. At top speed (50 game minutes a second) a meal
|
|
35
|
+
* look then trails the sim by up to 10 game minutes. */
|
|
36
|
+
const MEAL_SYNC_MS = 200;
|
|
37
|
+
/** The display-lighting flag, shared by tick() and the boot bake in start()
|
|
38
|
+
* so the two derivations can never drift (a drift shows one wrong-lighting
|
|
39
|
+
* frame at boot now that the hour resync defers). */
|
|
40
|
+
function displayLit(clock) {
|
|
41
|
+
return clock.isNight() || clock.isEvening();
|
|
42
|
+
}
|
|
43
|
+
/** Pure one-step scheduler: decides whether this frame syncs and whether a
|
|
44
|
+
* deferral carries to the next. Structural changes and a pending deferral
|
|
45
|
+
* sync now and absorb any other trigger arriving in the same frame, because
|
|
46
|
+
* the sync reads live state and covers everything at once. A meal-overlay
|
|
47
|
+
* bump that is due syncs now too, UNLESS this frame's sim advance crossed an
|
|
48
|
+
* hour: the hourly scans just ran, so the repaint books for the next frame's
|
|
49
|
+
* drain instead of stacking with them. A bump that is not due yet does
|
|
50
|
+
* nothing this frame; it stays a trigger until a sync adopts it. Hour-driven
|
|
51
|
+
* triggers alone always book. */
|
|
52
|
+
function planSceneSync(t) {
|
|
53
|
+
const meal = t.mealOverlay && t.mealDue;
|
|
54
|
+
if (t.structural || t.pending || (meal && !t.simCrossedHour)) {
|
|
55
|
+
return { syncNow: true, nextPending: false };
|
|
56
|
+
}
|
|
57
|
+
if (t.litChanged || t.hourChanged || meal)
|
|
58
|
+
return { syncNow: false, nextPending: true };
|
|
59
|
+
return { syncNow: false, nextPending: false };
|
|
60
|
+
}
|
|
61
|
+
/** The sync itself plus the bookkeeping that marks it done, shared by the
|
|
62
|
+
* frame-start drain and the post-update evaluation. */
|
|
63
|
+
function applySceneSync(engine, nowMs) {
|
|
64
|
+
engine.lastSceneSyncAt = nowMs;
|
|
65
|
+
// The crane's cached canvas draws d.lit live but re-rasterizes only when
|
|
66
|
+
// flagged. Flag it here, exactly when the adopted lighting changes, so the
|
|
67
|
+
// cab window flips once and in the same frame as the room repaint, even
|
|
68
|
+
// when the decorative animation clock is frozen (pause / reduced motion).
|
|
69
|
+
if (engine.craneGfx && engine.litState !== engine.d.lit)
|
|
70
|
+
engine.craneGfx.flagDirty();
|
|
71
|
+
engine.litState = engine.d.lit;
|
|
72
|
+
engine.lastSyncHour = engine.d.hour;
|
|
73
|
+
syncScene(engine);
|
|
74
|
+
engine.mealOverlayRev = engine.sim.tower.mealOverlayRevision;
|
|
75
|
+
}
|
|
76
|
+
/** Frame-start drain, called from tick() BEFORE the controller advances the
|
|
77
|
+
* sim (onUpdate). A deferral booked last frame must repaint before this
|
|
78
|
+
* frame's sim advance: a throttled catch-up frame can cross the NEXT hour
|
|
79
|
+
* inside onUpdate, and draining afterward would re-stack the deferred
|
|
80
|
+
* reconcile with that hour's engine scans, the exact pileup the deferral
|
|
81
|
+
* exists to prevent. */
|
|
82
|
+
function drainSceneSync(engine, nowMs = performance.now()) {
|
|
83
|
+
if (!engine.hourSyncPending)
|
|
84
|
+
return;
|
|
85
|
+
// A structural change is already waiting (a tower swap reset builtRev, or
|
|
86
|
+
// an edit landed since last frame): leave the deferral booked and let this
|
|
87
|
+
// frame's structural sync adopt the hour and lighting bits along with it,
|
|
88
|
+
// instead of running the full reconcile walk twice in one frame.
|
|
89
|
+
if (engine.sim.tower.revision !== engine.builtRev)
|
|
90
|
+
return;
|
|
91
|
+
engine.hourSyncPending = false;
|
|
92
|
+
applySceneSync(engine, nowMs);
|
|
93
|
+
}
|
|
94
|
+
/** Post-update sync step, called from tick() after the sim advanced:
|
|
95
|
+
* evaluates the triggers, applies the plan, and keeps the engine's sync
|
|
96
|
+
* bookkeeping (litState, lastSyncHour, builtRev, mealOverlayRev) exactly
|
|
97
|
+
* where the old inline block kept it. The pending branch normally never
|
|
98
|
+
* fires here (drainSceneSync ran at frame start); it stays so a drain that
|
|
99
|
+
* could not run, whatever the reason, still syncs rather than skips. */
|
|
100
|
+
function runSceneSync(engine, nowMs = performance.now()) {
|
|
101
|
+
const structural = engine.sim.tower.revision !== engine.builtRev;
|
|
102
|
+
// The scene has not baked the tower it holds (a new engine or a setSim; see
|
|
103
|
+
// sceneBake): the sync below materializes every region fresh, and fresh
|
|
104
|
+
// canvases raster on their first draw anyway, so the dirty marks it queues
|
|
105
|
+
// are pure waste.
|
|
106
|
+
const initialBake = awaitsInitialBake(engine);
|
|
107
|
+
const plan = planSceneSync({
|
|
108
|
+
structural,
|
|
109
|
+
mealOverlay: engine.sim.tower.mealOverlayRevision !== engine.mealOverlayRev,
|
|
110
|
+
mealDue: nowMs - engine.lastSceneSyncAt >= MEAL_SYNC_MS,
|
|
111
|
+
litChanged: engine.d.lit !== engine.litState,
|
|
112
|
+
hourChanged: engine.d.hour !== engine.lastSyncHour,
|
|
113
|
+
pending: engine.hourSyncPending,
|
|
114
|
+
// d.hour was sampled before onUpdate advanced the sim, so a mismatch with
|
|
115
|
+
// the live clock means the hourly scans ran inside THIS frame.
|
|
116
|
+
simCrossedHour: engine.sim.clock.hour !== engine.d.hour,
|
|
117
|
+
});
|
|
118
|
+
engine.hourSyncPending = plan.nextPending;
|
|
119
|
+
if (plan.syncNow)
|
|
120
|
+
applySceneSync(engine, nowMs);
|
|
121
|
+
// Clear the queue the initial bake just filled (the load-path exception to
|
|
122
|
+
// the budgeted drain): flagDirty on a never-rastered canvas costs nothing,
|
|
123
|
+
// and without this the first ~20 frames re-upload already-correct regions.
|
|
124
|
+
if (initialBake && plan.syncNow)
|
|
125
|
+
drainAllRegions(engine);
|
|
126
|
+
// Motion actors and the exterior facade (escape stairs, roof crane) only
|
|
127
|
+
// need reconciling when the layout itself changes, and never defer: the
|
|
128
|
+
// player just placed or demolished something.
|
|
129
|
+
if (structural) {
|
|
130
|
+
syncMotion(engine);
|
|
131
|
+
syncFacade(engine);
|
|
132
|
+
engine.builtRev = engine.sim.tower.revision;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
export { MEAL_SYNC_MS, displayLit, drainSceneSync, planSceneSync, runSceneSync };
|
|
137
|
+
//# sourceMappingURL=towerSyncSchedule.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"towerSyncSchedule.js","sources":["../../../src/render/excalibur/towerSyncSchedule.ts"],"sourcesContent":["import { syncScene, syncFacade } from \"./towerReconcile\";\nimport { syncMotion } from \"./towerCrowd\";\nimport { drainAllRegions } from \"./towerRegions\";\nimport { awaitsInitialBake } from \"./sceneBake\";\nimport type { TowerEngine } from \"./TowerEngine\";\n\n/**\n * Scene-sync scheduling for {@link TowerEngine.tick} (CAP-3 of the mobile\n * render-perf spec, `_bmad-output/specs/spec-render-perf-mobile-zoom/`). The\n * goal: the engine's `onHour` scans (satisfaction, traffic income) and the\n * render's full `syncScene` reconcile never share a frame. They used to meet\n * two ways: the meal-overlay trigger ran the full reconcile walk in the very\n * frame whose onUpdate crossed an hour (top-speed meal windows bump it every\n * sim minute), and the hour-triggered reconcile landed in the frame right\n * after the scans, back to back under throttle. Now hour-driven repaints (the\n * hour bucket and the hour-derived lighting flip) defer one frame and drain\n * at the START of the next, before its sim advance, and meal repaints dodge\n * hour-crossing frames the same way. A pending deferral always drains on the\n * very next frame, so no reconcile is ever skipped, and the sync repaints\n * from live state, so the one-frame-later pass renders the same pixels. The\n * residual: when EVERY frame crosses an hour (deep catch-up), scans run every\n * frame and the drain halves the sync cadence instead of separating them;\n * separating those needs the engine-side onHour amortization, a recorded\n * spec non-goal.\n *\n * Meal-overlay bumps are coalesced too (#1747): the engine bumps the meal\n * overlay revision on each meal return or venue exit, which during a busy\n * lunch at top speed is most frames, and each sync walks every room. A bump\n * alone syncs at most once per {@link MEAL_SYNC_MS} of real time; one that\n * arrives sooner waits (the revision stays unadopted, so the trigger holds)\n * and the next due frame repaints from live state.\n */\n\n/** The least real time, in milliseconds, between a scene sync and one that a\n * meal-overlay bump alone asks for: at most five such room walks a second\n * instead of one per frame. At top speed (50 game minutes a second) a meal\n * look then trails the sim by up to 10 game minutes. */\nexport const MEAL_SYNC_MS = 200;\n\n/** The display-lighting flag, shared by tick() and the boot bake in start()\n * so the two derivations can never drift (a drift shows one wrong-lighting\n * frame at boot now that the hour resync defers). */\nexport function displayLit(clock: { isNight(): boolean; isEvening(): boolean }): boolean {\n return clock.isNight() || clock.isEvening();\n}\n\nexport interface SyncTriggers {\n /** Tower layout changed (revision moved): rebuild rooms AND motion actors. */\n structural: boolean;\n /** Meal-overlay repaint requested by the sim (mid-hour occupancy dips). */\n mealOverlay: boolean;\n /** At least {@link MEAL_SYNC_MS} have passed since the last scene sync, so\n * a meal-overlay bump may sync. */\n mealDue: boolean;\n /** The evening/night lighting flag flipped (hour-derived). */\n litChanged: boolean;\n /** The displayed hour bucket changed (shutters, asleep looks, live bits). */\n hourChanged: boolean;\n /** A deferral from the previous frame is waiting to drain. */\n pending: boolean;\n /** The live sim clock crossed an hour inside THIS frame's onUpdate (its\n * onHour scans just ran; the displayed hour still lags the live clock). */\n simCrossedHour: boolean;\n}\n\n/** Pure one-step scheduler: decides whether this frame syncs and whether a\n * deferral carries to the next. Structural changes and a pending deferral\n * sync now and absorb any other trigger arriving in the same frame, because\n * the sync reads live state and covers everything at once. A meal-overlay\n * bump that is due syncs now too, UNLESS this frame's sim advance crossed an\n * hour: the hourly scans just ran, so the repaint books for the next frame's\n * drain instead of stacking with them. A bump that is not due yet does\n * nothing this frame; it stays a trigger until a sync adopts it. Hour-driven\n * triggers alone always book. */\nexport function planSceneSync(t: SyncTriggers): { syncNow: boolean; nextPending: boolean } {\n const meal = t.mealOverlay && t.mealDue;\n if (t.structural || t.pending || (meal && !t.simCrossedHour)) {\n return { syncNow: true, nextPending: false };\n }\n if (t.litChanged || t.hourChanged || meal) return { syncNow: false, nextPending: true };\n return { syncNow: false, nextPending: false };\n}\n\n/** The sync itself plus the bookkeeping that marks it done, shared by the\n * frame-start drain and the post-update evaluation. */\nfunction applySceneSync(engine: TowerEngine, nowMs: number): void {\n engine.lastSceneSyncAt = nowMs;\n // The crane's cached canvas draws d.lit live but re-rasterizes only when\n // flagged. Flag it here, exactly when the adopted lighting changes, so the\n // cab window flips once and in the same frame as the room repaint, even\n // when the decorative animation clock is frozen (pause / reduced motion).\n if (engine.craneGfx && engine.litState !== engine.d.lit) engine.craneGfx.flagDirty();\n engine.litState = engine.d.lit;\n engine.lastSyncHour = engine.d.hour;\n syncScene(engine);\n engine.mealOverlayRev = engine.sim.tower.mealOverlayRevision;\n}\n\n/** Frame-start drain, called from tick() BEFORE the controller advances the\n * sim (onUpdate). A deferral booked last frame must repaint before this\n * frame's sim advance: a throttled catch-up frame can cross the NEXT hour\n * inside onUpdate, and draining afterward would re-stack the deferred\n * reconcile with that hour's engine scans, the exact pileup the deferral\n * exists to prevent. */\nexport function drainSceneSync(engine: TowerEngine, nowMs = performance.now()): void {\n if (!engine.hourSyncPending) return;\n // A structural change is already waiting (a tower swap reset builtRev, or\n // an edit landed since last frame): leave the deferral booked and let this\n // frame's structural sync adopt the hour and lighting bits along with it,\n // instead of running the full reconcile walk twice in one frame.\n if (engine.sim.tower.revision !== engine.builtRev) return;\n engine.hourSyncPending = false;\n applySceneSync(engine, nowMs);\n}\n\n/** Post-update sync step, called from tick() after the sim advanced:\n * evaluates the triggers, applies the plan, and keeps the engine's sync\n * bookkeeping (litState, lastSyncHour, builtRev, mealOverlayRev) exactly\n * where the old inline block kept it. The pending branch normally never\n * fires here (drainSceneSync ran at frame start); it stays so a drain that\n * could not run, whatever the reason, still syncs rather than skips. */\nexport function runSceneSync(engine: TowerEngine, nowMs = performance.now()): void {\n const structural = engine.sim.tower.revision !== engine.builtRev;\n // The scene has not baked the tower it holds (a new engine or a setSim; see\n // sceneBake): the sync below materializes every region fresh, and fresh\n // canvases raster on their first draw anyway, so the dirty marks it queues\n // are pure waste.\n const initialBake = awaitsInitialBake(engine);\n const plan = planSceneSync({\n structural,\n mealOverlay: engine.sim.tower.mealOverlayRevision !== engine.mealOverlayRev,\n mealDue: nowMs - engine.lastSceneSyncAt >= MEAL_SYNC_MS,\n litChanged: engine.d.lit !== engine.litState,\n hourChanged: engine.d.hour !== engine.lastSyncHour,\n pending: engine.hourSyncPending,\n // d.hour was sampled before onUpdate advanced the sim, so a mismatch with\n // the live clock means the hourly scans ran inside THIS frame.\n simCrossedHour: engine.sim.clock.hour !== engine.d.hour,\n });\n engine.hourSyncPending = plan.nextPending;\n if (plan.syncNow) applySceneSync(engine, nowMs);\n // Clear the queue the initial bake just filled (the load-path exception to\n // the budgeted drain): flagDirty on a never-rastered canvas costs nothing,\n // and without this the first ~20 frames re-upload already-correct regions.\n if (initialBake && plan.syncNow) drainAllRegions(engine);\n // Motion actors and the exterior facade (escape stairs, roof crane) only\n // need reconciling when the layout itself changes, and never defer: the\n // player just placed or demolished something.\n if (structural) {\n syncMotion(engine);\n syncFacade(engine);\n engine.builtRev = engine.sim.tower.revision;\n }\n}\n"],"names":[],"mappings":";;;;;AAMA;;;;;;;;;;;;;;;;;;;;;;;;;AAyBG;AAEH;;;AAGyD;AAClD,MAAM,YAAY,GAAG;AAE5B;;AAEsD;AAChD,SAAU,UAAU,CAAC,KAAmD,EAAA;IAC5E,OAAO,KAAK,CAAC,OAAO,EAAE,IAAI,KAAK,CAAC,SAAS,EAAE;AAC7C;AAqBA;;;;;;;;AAQkC;AAC5B,SAAU,aAAa,CAAC,CAAe,EAAA;IAC3C,MAAM,IAAI,GAAG,CAAC,CAAC,WAAW,IAAI,CAAC,CAAC,OAAO;AACvC,IAAA,IAAI,CAAC,CAAC,UAAU,IAAI,CAAC,CAAC,OAAO,KAAK,IAAI,IAAI,CAAC,CAAC,CAAC,cAAc,CAAC,EAAE;QAC5D,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE;IAC9C;IACA,IAAI,CAAC,CAAC,UAAU,IAAI,CAAC,CAAC,WAAW,IAAI,IAAI;QAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE;IACvF,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE;AAC/C;AAEA;AACwD;AACxD,SAAS,cAAc,CAAC,MAAmB,EAAE,KAAa,EAAA;AACxD,IAAA,MAAM,CAAC,eAAe,GAAG,KAAK;;;;;AAK9B,IAAA,IAAI,MAAM,CAAC,QAAQ,IAAI,MAAM,CAAC,QAAQ,KAAK,MAAM,CAAC,CAAC,CAAC,GAAG;AAAE,QAAA,MAAM,CAAC,QAAQ,CAAC,SAAS,EAAE;IACpF,MAAM,CAAC,QAAQ,GAAG,MAAM,CAAC,CAAC,CAAC,GAAG;IAC9B,MAAM,CAAC,YAAY,GAAG,MAAM,CAAC,CAAC,CAAC,IAAI;IACnC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Ae,GAAG,IAAI,CAAC,WAAW;IACzC,IAAI,IAAI,CAAC,OAAO;AAAE,QAAA,cAAc,CAAC,MAAM,EAAE,KAAK,CAAC;;;;AAI/C,IAAA,IAAI,WAAW,IAAI,IAAI,CAAC,OAAO;QAAE,eAAe,CAAC,MAAM,CAAC;;;;IAIxD,IAAI,UAAU,EAAE;QACd,UAAU,CAAC,MAAM,CAAC;QAClB,UAAU,CAAC,MAAM,CAAC;QAClB,MAAM,CAAC,QAAQ,GAAG,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,QAAQ;IAC7C;AACF;;"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { TowerEngine } from "./TowerEngine";
|
|
2
|
+
/**
|
|
3
|
+
* Construction of the decorative passers-by: figures that loiter in a short
|
|
4
|
+
* stretch of corridor for life, but are not people the engine knows about.
|
|
5
|
+
* Split out of `towerCrowd.ts` so the per-frame motion path and this
|
|
6
|
+
* build-once path stay separately readable.
|
|
7
|
+
*
|
|
8
|
+
* What they may do is set by #2091, after a player said they hid the traffic:
|
|
9
|
+
* - A Classic tower builds none, because SimTower had none. The catalog says
|
|
10
|
+
* so (`rules.decorativePassersBy`), and nothing is built and then hidden.
|
|
11
|
+
* - A Modern tower builds them only in corridors, never in a lobby or on a
|
|
12
|
+
* stair or escalator, and never on a lot where a player reads traffic
|
|
13
|
+
* (an elevator landing, a flight's landing, a shop's front; see
|
|
14
|
+
* `trafficLots`). There are half as many as the old corridor rule.
|
|
15
|
+
* - `updateMotion` next door shows a floor's figures only while that floor has
|
|
16
|
+
* live occupants, and hides them all when the Settings switch is off or
|
|
17
|
+
* reduced motion is on.
|
|
18
|
+
*
|
|
19
|
+
* This runs once per rebuild, not per frame: it reads the tower's layout and
|
|
20
|
+
* gives each figure a cast look; the frame loop picks its walk frame.
|
|
21
|
+
* Baking none of its own means it runs under happy-dom, so it is unit-tested in
|
|
22
|
+
* `towerWalkerBuild.test.ts`.
|
|
23
|
+
*/
|
|
24
|
+
/** The most figures one corridor run gets, and how many per tile of run. Half
|
|
25
|
+
* of the old 8 and 0.14 (#2091). */
|
|
26
|
+
export declare const PASSERS_PER_RUN_CAP = 4;
|
|
27
|
+
export declare const PASSERS_PER_TILE = 0.07;
|
|
28
|
+
/** The most figures a whole tower gets. */
|
|
29
|
+
export declare const PASSERS_BUDGET = 200;
|
|
30
|
+
export declare function buildWalkers(engine: TowerEngine): void;
|