@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,288 @@
|
|
|
1
|
+
import { TILE } from '../scale.js';
|
|
2
|
+
import { hash01, STRIP_ABOVE, STRIP_BELOW } from '../sceneryLayout.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Pure canvas painters for the outside-world scenery: the plaza's roundabout,
|
|
6
|
+
* fountain, and lamps, the right-edge street lamp and planter, the lot's trees
|
|
7
|
+
* and bushes, and the ground pieces (sidewalk, road, forecourt and the lot's
|
|
8
|
+
* grass or cement strip). Split from towerScenery.ts (the actor/lifecycle
|
|
9
|
+
* half) at the file-size ceiling; everything here draws into a plain 2D
|
|
10
|
+
* context and holds no state, so the scenery tests drive each painter with a
|
|
11
|
+
* recording spy context, and the sprite atlas bakes the same painters.
|
|
12
|
+
*/
|
|
13
|
+
function drawRoundabout(ctx, w) {
|
|
14
|
+
const cx = w / 2;
|
|
15
|
+
const cy = 26;
|
|
16
|
+
// Cement shelf under the whole plaza so no dirt peeks through.
|
|
17
|
+
ctx.fillStyle = "#b0b0a8";
|
|
18
|
+
ctx.fillRect(0, 18, w, 30);
|
|
19
|
+
// Road stub blending the left road into the ring at road height.
|
|
20
|
+
ctx.fillStyle = "#34343c";
|
|
21
|
+
ctx.fillRect(0, 28, 24, 14);
|
|
22
|
+
// The drive: a flattened asphalt ellipse with curbs.
|
|
23
|
+
ctx.fillStyle = "#34343c";
|
|
24
|
+
ctx.beginPath();
|
|
25
|
+
ctx.ellipse(cx, cy, cx - 3, 19, 0, 0, Math.PI * 2);
|
|
26
|
+
ctx.fill();
|
|
27
|
+
// Grass center island.
|
|
28
|
+
ctx.fillStyle = "#5b8a3c";
|
|
29
|
+
ctx.beginPath();
|
|
30
|
+
ctx.ellipse(cx, cy, cx * 0.52, 10, 0, 0, Math.PI * 2);
|
|
31
|
+
ctx.fill();
|
|
32
|
+
ctx.strokeStyle = "#d8d8d0";
|
|
33
|
+
ctx.lineWidth = 1;
|
|
34
|
+
ctx.beginPath();
|
|
35
|
+
ctx.ellipse(cx, cy, cx - 3, 19, 0, 0, Math.PI * 2);
|
|
36
|
+
ctx.stroke();
|
|
37
|
+
ctx.beginPath();
|
|
38
|
+
ctx.ellipse(cx, cy, cx * 0.52, 10, 0, 0, Math.PI * 2);
|
|
39
|
+
ctx.stroke();
|
|
40
|
+
}
|
|
41
|
+
function drawFountain(ctx, w, h, t) {
|
|
42
|
+
ctx.clearRect(0, 0, w, h);
|
|
43
|
+
const cx = w / 2;
|
|
44
|
+
const WATER = "#3fa8e0";
|
|
45
|
+
const WATER_HI = "#9adcf6";
|
|
46
|
+
const STONE = "#a8a8a0";
|
|
47
|
+
const STONE_D = "#82827a";
|
|
48
|
+
// Center jet, pulsing gently, with spray arcs blooming outward on a loop.
|
|
49
|
+
const pulse = Math.sin(t * 2.6) * 3;
|
|
50
|
+
ctx.fillStyle = WATER_HI;
|
|
51
|
+
ctx.fillRect(cx - 2, 6 - pulse, 4, 32 + pulse);
|
|
52
|
+
ctx.lineWidth = 2;
|
|
53
|
+
const cycle = (t * 0.9) % 1;
|
|
54
|
+
for (const k of [0, 0.5]) {
|
|
55
|
+
const ph = (cycle + k) % 1;
|
|
56
|
+
ctx.strokeStyle = "rgba(154, 220, 246, " + (0.9 - ph * 0.8).toFixed(2) + ")";
|
|
57
|
+
ctx.beginPath();
|
|
58
|
+
ctx.ellipse(cx, 38, 8 + ph * 14, 6 + ph * 8, 0, Math.PI, 0);
|
|
59
|
+
ctx.stroke();
|
|
60
|
+
}
|
|
61
|
+
// Upper bowl.
|
|
62
|
+
ctx.fillStyle = STONE;
|
|
63
|
+
ctx.beginPath();
|
|
64
|
+
ctx.ellipse(cx, 42, 18, 6, 0, 0, Math.PI * 2);
|
|
65
|
+
ctx.fill();
|
|
66
|
+
ctx.fillStyle = WATER;
|
|
67
|
+
ctx.beginPath();
|
|
68
|
+
ctx.ellipse(cx, 41, 14, 4, 0, 0, Math.PI * 2);
|
|
69
|
+
ctx.fill();
|
|
70
|
+
// Spill from the upper bowl into the basin, shimmering as it falls.
|
|
71
|
+
const drop = (t * 46) % 8;
|
|
72
|
+
ctx.fillStyle = WATER_HI;
|
|
73
|
+
for (const sx of [cx - 16, cx + 13]) {
|
|
74
|
+
ctx.fillRect(sx, 44, 3, 40);
|
|
75
|
+
ctx.fillStyle = "rgba(255, 255, 255, 0.7)";
|
|
76
|
+
ctx.fillRect(sx, 44 + drop, 3, 3);
|
|
77
|
+
ctx.fillRect(sx, 44 + ((drop + 4) % 8) + 16, 3, 3);
|
|
78
|
+
ctx.fillStyle = WATER_HI;
|
|
79
|
+
}
|
|
80
|
+
// Pedestal.
|
|
81
|
+
ctx.fillStyle = STONE_D;
|
|
82
|
+
ctx.fillRect(cx - 5, 44, 10, 44);
|
|
83
|
+
// Basin: a proud stone rim standing off the island, bright water inside.
|
|
84
|
+
ctx.fillStyle = STONE;
|
|
85
|
+
ctx.beginPath();
|
|
86
|
+
ctx.ellipse(cx, h - 20, 44, 14, 0, 0, Math.PI * 2);
|
|
87
|
+
ctx.fill();
|
|
88
|
+
ctx.fillStyle = WATER;
|
|
89
|
+
ctx.beginPath();
|
|
90
|
+
ctx.ellipse(cx, h - 22, 38, 10, 0, 0, Math.PI * 2);
|
|
91
|
+
ctx.fill();
|
|
92
|
+
// Sparkle: light dashes drifting across the water, clipped to the basin.
|
|
93
|
+
ctx.fillStyle = WATER_HI;
|
|
94
|
+
const slide = (t * 9) % 22;
|
|
95
|
+
for (let i = -4; i <= 3; i++) {
|
|
96
|
+
const sx = cx - 8 + i * 11 + slide - 11;
|
|
97
|
+
if (sx < cx - 33 || sx + 5 > cx + 33)
|
|
98
|
+
continue;
|
|
99
|
+
ctx.fillRect(sx, h - 24 + ((i + 4) % 3), 5, 2);
|
|
100
|
+
}
|
|
101
|
+
// Rim front face.
|
|
102
|
+
ctx.fillStyle = STONE_D;
|
|
103
|
+
ctx.beginPath();
|
|
104
|
+
ctx.ellipse(cx, h - 12, 44, 9, 0, Math.PI, 0, true);
|
|
105
|
+
ctx.fill();
|
|
106
|
+
}
|
|
107
|
+
/** 0 by day, 1 by night, ramping through dusk (18:00-20:00) and dawn
|
|
108
|
+
* (5:00-7:00). Fed from the sim clock's fractional hour. */
|
|
109
|
+
function lampAlpha(hour) {
|
|
110
|
+
if (hour >= 20 || hour < 5)
|
|
111
|
+
return 1;
|
|
112
|
+
if (hour >= 18)
|
|
113
|
+
return (hour - 18) / 2;
|
|
114
|
+
if (hour < 7)
|
|
115
|
+
return 1 - (hour - 5) / 2;
|
|
116
|
+
return 0;
|
|
117
|
+
}
|
|
118
|
+
function drawPlazaLamp(ctx, w, h, a) {
|
|
119
|
+
ctx.clearRect(0, 0, w, h);
|
|
120
|
+
const cx = Math.round(w / 2);
|
|
121
|
+
const poleH = h - 14;
|
|
122
|
+
if (a > 0) {
|
|
123
|
+
// Pool of light on the pavement, then the halo around the head.
|
|
124
|
+
ctx.fillStyle = "rgba(255, 214, 140, " + (0.16 * a).toFixed(3) + ")";
|
|
125
|
+
ctx.beginPath();
|
|
126
|
+
ctx.ellipse(cx, h - 7, 38, 7, 0, 0, Math.PI * 2);
|
|
127
|
+
ctx.fill();
|
|
128
|
+
ctx.fillStyle = "rgba(255, 214, 140, " + (0.35 * a).toFixed(3) + ")";
|
|
129
|
+
ctx.beginPath();
|
|
130
|
+
ctx.ellipse(cx, 9, 11, 9, 0, 0, Math.PI * 2);
|
|
131
|
+
ctx.fill();
|
|
132
|
+
}
|
|
133
|
+
// Pole on a small base.
|
|
134
|
+
ctx.fillStyle = "#3a3a42";
|
|
135
|
+
ctx.fillRect(cx - 1, 10, 2, poleH - 16);
|
|
136
|
+
ctx.fillRect(cx - 4, poleH - 6, 8, 6);
|
|
137
|
+
// The head: warm when lit, a dark fixture by day.
|
|
138
|
+
ctx.fillStyle = a > 0 ? "#ffd890" : "#55555e";
|
|
139
|
+
ctx.fillRect(cx - 3, 4, 6, 8);
|
|
140
|
+
ctx.fillStyle = "#3a3a42";
|
|
141
|
+
ctx.fillRect(cx - 4, 2, 8, 2);
|
|
142
|
+
}
|
|
143
|
+
function drawStreetLamp(ctx, w, h, a) {
|
|
144
|
+
ctx.clearRect(0, 0, w, h);
|
|
145
|
+
const poleX = Math.round(w * 0.4);
|
|
146
|
+
if (a > 0) {
|
|
147
|
+
ctx.fillStyle = "rgba(255, 214, 140, " + (0.3 * a).toFixed(3) + ")";
|
|
148
|
+
ctx.beginPath();
|
|
149
|
+
ctx.ellipse(poleX + Math.round(TILE * 1.5) + 3, 6, 10, 6, 0, 0, Math.PI * 2);
|
|
150
|
+
ctx.fill();
|
|
151
|
+
}
|
|
152
|
+
ctx.fillStyle = "#3a3a42";
|
|
153
|
+
ctx.fillRect(poleX, 0, 2, h);
|
|
154
|
+
ctx.fillRect(poleX, 0, Math.round(TILE * 1.8), 3);
|
|
155
|
+
ctx.fillStyle = a > 0 ? "#ffd890" : "#55555e";
|
|
156
|
+
ctx.fillRect(poleX + Math.round(TILE * 1.5), 3, 6, 4);
|
|
157
|
+
// The street-name sign: the lot is 375 tiles wide, and the road knows it.
|
|
158
|
+
const sw = Math.round(TILE * 3.4);
|
|
159
|
+
const sh = 10;
|
|
160
|
+
const sy = Math.round(h * 0.42);
|
|
161
|
+
const sx = Math.round(poleX + 1 - sw / 2); // whole-pixel plate, crisp fills
|
|
162
|
+
ctx.fillStyle = "#1e6e3c";
|
|
163
|
+
ctx.fillRect(sx, sy, sw, sh);
|
|
164
|
+
ctx.strokeStyle = "#e8e8e0";
|
|
165
|
+
ctx.lineWidth = 1;
|
|
166
|
+
ctx.strokeRect(sx + 0.5, sy + 0.5, sw - 1, sh - 1);
|
|
167
|
+
ctx.fillStyle = "#f0f0e8";
|
|
168
|
+
ctx.font = "bold 7px monospace";
|
|
169
|
+
ctx.textAlign = "center";
|
|
170
|
+
ctx.fillText("375 ST", poleX + 1, sy + 8);
|
|
171
|
+
ctx.textAlign = "left";
|
|
172
|
+
}
|
|
173
|
+
function drawPlanter(ctx, w, h) {
|
|
174
|
+
ctx.fillStyle = "#6a6a62";
|
|
175
|
+
ctx.fillRect(0, h - 6, w, 6);
|
|
176
|
+
ctx.fillStyle = "#4a7c36";
|
|
177
|
+
ctx.fillRect(1, h - 12, w - 2, 6);
|
|
178
|
+
ctx.fillStyle = "#568c3e";
|
|
179
|
+
ctx.fillRect(Math.round(w * 0.2), h - 16, Math.round(w * 0.6), 5);
|
|
180
|
+
}
|
|
181
|
+
/** The tree and bush paint, as a table the atlas publishes (docs/atlas.md,
|
|
182
|
+
* "Seeded by the tower") so a frontend can paint a plant at its own size. */
|
|
183
|
+
const PLANT_PAINT = {
|
|
184
|
+
tree: {
|
|
185
|
+
trunk: { color: "#6d4c2a", w: 0.12, minW: 2, h: 0.3 },
|
|
186
|
+
canopy: [
|
|
187
|
+
{ w: 1.0, y: 0.32, color: "#3e6b2e" },
|
|
188
|
+
{ w: 0.78, y: 0.52, color: "#4a7c36" },
|
|
189
|
+
{ w: 0.5, y: 0.72, color: "#568c3e" },
|
|
190
|
+
],
|
|
191
|
+
canopyH: 0.26,
|
|
192
|
+
jitterKey: 97,
|
|
193
|
+
},
|
|
194
|
+
bush: {
|
|
195
|
+
base: { color: "#4a7c36", y: 0.4, h: 0.6 },
|
|
196
|
+
top: { color: "#568c3e", x: 0.16, w: 0.68, h: 0.5 },
|
|
197
|
+
},
|
|
198
|
+
};
|
|
199
|
+
function drawTree(ctx, w, h, seed) {
|
|
200
|
+
const T = PLANT_PAINT.tree;
|
|
201
|
+
const trunkW = Math.max(T.trunk.minW, Math.round(w * T.trunk.w));
|
|
202
|
+
const trunkH = Math.round(h * T.trunk.h);
|
|
203
|
+
ctx.fillStyle = T.trunk.color;
|
|
204
|
+
ctx.fillRect(Math.round(w / 2 - trunkW / 2), h - trunkH, trunkW, trunkH);
|
|
205
|
+
T.canopy.forEach(({ w: lw, y: ly, color }, li) => {
|
|
206
|
+
// Integer hash key (hash01 truncates): the layer index, not the fractional
|
|
207
|
+
// layer offset, carries the per-layer variation.
|
|
208
|
+
const jitter = Math.round((hash01(seed + li * T.jitterKey) - 0.5) * 2);
|
|
209
|
+
ctx.fillStyle = color;
|
|
210
|
+
ctx.fillRect(Math.round(w * (1 - lw) / 2) + jitter, Math.round(h - trunkH - h * ly), Math.round(w * lw), Math.round(h * T.canopyH));
|
|
211
|
+
});
|
|
212
|
+
}
|
|
213
|
+
function drawBush(ctx, w, h) {
|
|
214
|
+
const { base, top } = PLANT_PAINT.bush;
|
|
215
|
+
ctx.fillStyle = base.color;
|
|
216
|
+
ctx.fillRect(0, Math.round(h * base.y), w, Math.ceil(h * base.h));
|
|
217
|
+
ctx.fillStyle = top.color;
|
|
218
|
+
ctx.fillRect(Math.round(w * top.x), 0, Math.round(w * top.w), Math.round(h * top.h));
|
|
219
|
+
}
|
|
220
|
+
/** Cement paving and its joint lines (the forecourt and the tower's apron). */
|
|
221
|
+
const PAVE = "#b0b0a8";
|
|
222
|
+
const PAVE_JOINT = "#8a8a82";
|
|
223
|
+
/** A sidewalk run `w` px wide (11 px tall) with an expansion joint every tile. */
|
|
224
|
+
function drawSidewalk(ctx, w) {
|
|
225
|
+
ctx.fillStyle = "#b4b4aa";
|
|
226
|
+
ctx.fillRect(0, 0, w, 11);
|
|
227
|
+
ctx.fillStyle = "#8e8e86";
|
|
228
|
+
for (let x = 0; x < w; x += TILE)
|
|
229
|
+
ctx.fillRect(x, 0, 1, 7);
|
|
230
|
+
}
|
|
231
|
+
/** A road run `w` px wide (14 px tall) with lane dashes every four tiles,
|
|
232
|
+
* the first starting `phase` px in (a dash may start off the left edge). */
|
|
233
|
+
function drawRoad(ctx, w, phase) {
|
|
234
|
+
const period = TILE * 4;
|
|
235
|
+
ctx.fillStyle = "#34343c";
|
|
236
|
+
ctx.fillRect(0, 0, w, 14);
|
|
237
|
+
ctx.fillStyle = "#c8b040";
|
|
238
|
+
for (let x = phase - period; x < w; x += period)
|
|
239
|
+
ctx.fillRect(x, 6, TILE, 2);
|
|
240
|
+
}
|
|
241
|
+
/** The forecourt's cement run `w` px wide (10 px tall), a joint every two tiles. */
|
|
242
|
+
function drawForecourt(ctx, w) {
|
|
243
|
+
ctx.fillStyle = PAVE;
|
|
244
|
+
ctx.fillRect(0, 0, w, 10);
|
|
245
|
+
ctx.fillStyle = PAVE_JOINT;
|
|
246
|
+
for (let x = 0; x < w; x += TILE * 2)
|
|
247
|
+
ctx.fillRect(x, 0, 1, 6);
|
|
248
|
+
}
|
|
249
|
+
/** The lot's three grass shades. */
|
|
250
|
+
const GRASS_SHADES = ["#446c2e", "#4e7a34", "#5b8a3c"];
|
|
251
|
+
/** A lot tile's grass: its shade (an index into {@link GRASS_SHADES}) and
|
|
252
|
+
* whether its blades stand one pixel taller (a tuft), both from the tile. */
|
|
253
|
+
function grassLook(tile) {
|
|
254
|
+
const h = hash01(tile * 17);
|
|
255
|
+
let shade = 0;
|
|
256
|
+
if (h < 0.33)
|
|
257
|
+
shade = 1;
|
|
258
|
+
else if (h < 0.66)
|
|
259
|
+
shade = 2;
|
|
260
|
+
return { shade, tuft: hash01(tile * 29) < 0.2 };
|
|
261
|
+
}
|
|
262
|
+
/** Paving joints fall on every lot tile whose index is a multiple of this. */
|
|
263
|
+
const PAVE_JOINT_EVERY = 4;
|
|
264
|
+
/** One tile of the lot's ground strip at `px`: cement (with a joint on every
|
|
265
|
+
* fourth lot tile) where the tower has paved it, else grass whose shade and
|
|
266
|
+
* tuft come from the lot tile index. Fills one column past the tile; the
|
|
267
|
+
* next tile, drawn after it, paints over the rows it covers. */
|
|
268
|
+
function drawStripTile(ctx, px, tile, paved) {
|
|
269
|
+
if (paved) {
|
|
270
|
+
ctx.fillStyle = PAVE;
|
|
271
|
+
ctx.fillRect(px, STRIP_ABOVE - 5, TILE + 1, 5 + STRIP_BELOW);
|
|
272
|
+
if (tile % PAVE_JOINT_EVERY === 0) {
|
|
273
|
+
ctx.fillStyle = PAVE_JOINT;
|
|
274
|
+
ctx.fillRect(px, STRIP_ABOVE - 5, 1, 5);
|
|
275
|
+
}
|
|
276
|
+
return;
|
|
277
|
+
}
|
|
278
|
+
const gh = 4; // grass blade height
|
|
279
|
+
const look = grassLook(tile);
|
|
280
|
+
ctx.fillStyle = GRASS_SHADES[look.shade];
|
|
281
|
+
const wob = look.tuft ? 1 : 0;
|
|
282
|
+
ctx.fillRect(px, STRIP_ABOVE - gh - wob, TILE + 1, gh + wob + STRIP_BELOW);
|
|
283
|
+
ctx.fillStyle = "#3c5c28";
|
|
284
|
+
ctx.fillRect(px, STRIP_ABOVE, TILE + 1, STRIP_BELOW);
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
export { GRASS_SHADES, PAVE, PAVE_JOINT, PAVE_JOINT_EVERY, PLANT_PAINT, STRIP_ABOVE, STRIP_BELOW, drawBush, drawForecourt, drawFountain, drawPlanter, drawPlazaLamp, drawRoad, drawRoundabout, drawSidewalk, drawStreetLamp, drawStripTile, drawTree, grassLook, lampAlpha };
|
|
288
|
+
//# sourceMappingURL=towerSceneryDraw.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"towerSceneryDraw.js","sources":["../../../src/render/excalibur/towerSceneryDraw.ts"],"sourcesContent":["import { TILE } from \"../scale\";\nimport { STRIP_ABOVE, STRIP_BELOW, hash01 } from \"../sceneryLayout\";\n\n/**\n * Pure canvas painters for the outside-world scenery: the plaza's roundabout,\n * fountain, and lamps, the right-edge street lamp and planter, the lot's trees\n * and bushes, and the ground pieces (sidewalk, road, forecourt and the lot's\n * grass or cement strip). Split from towerScenery.ts (the actor/lifecycle\n * half) at the file-size ceiling; everything here draws into a plain 2D\n * context and holds no state, so the scenery tests drive each painter with a\n * recording spy context, and the sprite atlas bakes the same painters.\n */\n\nexport function drawRoundabout(ctx: CanvasRenderingContext2D, w: number): void {\n const cx = w / 2;\n const cy = 26;\n // Cement shelf under the whole plaza so no dirt peeks through.\n ctx.fillStyle = \"#b0b0a8\";\n ctx.fillRect(0, 18, w, 30);\n // Road stub blending the left road into the ring at road height.\n ctx.fillStyle = \"#34343c\";\n ctx.fillRect(0, 28, 24, 14);\n // The drive: a flattened asphalt ellipse with curbs.\n ctx.fillStyle = \"#34343c\";\n ctx.beginPath();\n ctx.ellipse(cx, cy, cx - 3, 19, 0, 0, Math.PI * 2);\n ctx.fill();\n // Grass center island.\n ctx.fillStyle = \"#5b8a3c\";\n ctx.beginPath();\n ctx.ellipse(cx, cy, cx * 0.52, 10, 0, 0, Math.PI * 2);\n ctx.fill();\n ctx.strokeStyle = \"#d8d8d0\";\n ctx.lineWidth = 1;\n ctx.beginPath();\n ctx.ellipse(cx, cy, cx - 3, 19, 0, 0, Math.PI * 2);\n ctx.stroke();\n ctx.beginPath();\n ctx.ellipse(cx, cy, cx * 0.52, 10, 0, 0, Math.PI * 2);\n ctx.stroke();\n}\n\nexport function drawFountain(ctx: CanvasRenderingContext2D, w: number, h: number, t: number): void {\n ctx.clearRect(0, 0, w, h);\n const cx = w / 2;\n const WATER = \"#3fa8e0\";\n const WATER_HI = \"#9adcf6\";\n const STONE = \"#a8a8a0\";\n const STONE_D = \"#82827a\";\n // Center jet, pulsing gently, with spray arcs blooming outward on a loop.\n const pulse = Math.sin(t * 2.6) * 3;\n ctx.fillStyle = WATER_HI;\n ctx.fillRect(cx - 2, 6 - pulse, 4, 32 + pulse);\n ctx.lineWidth = 2;\n const cycle = (t * 0.9) % 1;\n for (const k of [0, 0.5]) {\n const ph = (cycle + k) % 1;\n ctx.strokeStyle = \"rgba(154, 220, 246, \" + (0.9 - ph * 0.8).toFixed(2) + \")\";\n ctx.beginPath();\n ctx.ellipse(cx, 38, 8 + ph * 14, 6 + ph * 8, 0, Math.PI, 0);\n ctx.stroke();\n }\n // Upper bowl.\n ctx.fillStyle = STONE;\n ctx.beginPath();\n ctx.ellipse(cx, 42, 18, 6, 0, 0, Math.PI * 2);\n ctx.fill();\n ctx.fillStyle = WATER;\n ctx.beginPath();\n ctx.ellipse(cx, 41, 14, 4, 0, 0, Math.PI * 2);\n ctx.fill();\n // Spill from the upper bowl into the basin, shimmering as it falls.\n const drop = (t * 46) % 8;\n ctx.fillStyle = WATER_HI;\n for (const sx of [cx - 16, cx + 13]) {\n ctx.fillRect(sx, 44, 3, 40);\n ctx.fillStyle = \"rgba(255, 255, 255, 0.7)\";\n ctx.fillRect(sx, 44 + drop, 3, 3);\n ctx.fillRect(sx, 44 + ((drop + 4) % 8) + 16, 3, 3);\n ctx.fillStyle = WATER_HI;\n }\n // Pedestal.\n ctx.fillStyle = STONE_D;\n ctx.fillRect(cx - 5, 44, 10, 44);\n // Basin: a proud stone rim standing off the island, bright water inside.\n ctx.fillStyle = STONE;\n ctx.beginPath();\n ctx.ellipse(cx, h - 20, 44, 14, 0, 0, Math.PI * 2);\n ctx.fill();\n ctx.fillStyle = WATER;\n ctx.beginPath();\n ctx.ellipse(cx, h - 22, 38, 10, 0, 0, Math.PI * 2);\n ctx.fill();\n // Sparkle: light dashes drifting across the water, clipped to the basin.\n ctx.fillStyle = WATER_HI;\n const slide = (t * 9) % 22;\n for (let i = -4; i <= 3; i++) {\n const sx = cx - 8 + i * 11 + slide - 11;\n if (sx < cx - 33 || sx + 5 > cx + 33) continue;\n ctx.fillRect(sx, h - 24 + ((i + 4) % 3), 5, 2);\n }\n // Rim front face.\n ctx.fillStyle = STONE_D;\n ctx.beginPath();\n ctx.ellipse(cx, h - 12, 44, 9, 0, Math.PI, 0, true);\n ctx.fill();\n}\n\n/** 0 by day, 1 by night, ramping through dusk (18:00-20:00) and dawn\n * (5:00-7:00). Fed from the sim clock's fractional hour. */\nexport function lampAlpha(hour: number): number {\n if (hour >= 20 || hour < 5) return 1;\n if (hour >= 18) return (hour - 18) / 2;\n if (hour < 7) return 1 - (hour - 5) / 2;\n return 0;\n}\n\nexport function drawPlazaLamp(ctx: CanvasRenderingContext2D, w: number, h: number, a: number): void {\n ctx.clearRect(0, 0, w, h);\n const cx = Math.round(w / 2);\n const poleH = h - 14;\n if (a > 0) {\n // Pool of light on the pavement, then the halo around the head.\n ctx.fillStyle = \"rgba(255, 214, 140, \" + (0.16 * a).toFixed(3) + \")\";\n ctx.beginPath();\n ctx.ellipse(cx, h - 7, 38, 7, 0, 0, Math.PI * 2);\n ctx.fill();\n ctx.fillStyle = \"rgba(255, 214, 140, \" + (0.35 * a).toFixed(3) + \")\";\n ctx.beginPath();\n ctx.ellipse(cx, 9, 11, 9, 0, 0, Math.PI * 2);\n ctx.fill();\n }\n // Pole on a small base.\n ctx.fillStyle = \"#3a3a42\";\n ctx.fillRect(cx - 1, 10, 2, poleH - 16);\n ctx.fillRect(cx - 4, poleH - 6, 8, 6);\n // The head: warm when lit, a dark fixture by day.\n ctx.fillStyle = a > 0 ? \"#ffd890\" : \"#55555e\";\n ctx.fillRect(cx - 3, 4, 6, 8);\n ctx.fillStyle = \"#3a3a42\";\n ctx.fillRect(cx - 4, 2, 8, 2);\n}\n\nexport function drawStreetLamp(ctx: CanvasRenderingContext2D, w: number, h: number, a: number): void {\n ctx.clearRect(0, 0, w, h);\n const poleX = Math.round(w * 0.4);\n if (a > 0) {\n ctx.fillStyle = \"rgba(255, 214, 140, \" + (0.3 * a).toFixed(3) + \")\";\n ctx.beginPath();\n ctx.ellipse(poleX + Math.round(TILE * 1.5) + 3, 6, 10, 6, 0, 0, Math.PI * 2);\n ctx.fill();\n }\n ctx.fillStyle = \"#3a3a42\";\n ctx.fillRect(poleX, 0, 2, h);\n ctx.fillRect(poleX, 0, Math.round(TILE * 1.8), 3);\n ctx.fillStyle = a > 0 ? \"#ffd890\" : \"#55555e\";\n ctx.fillRect(poleX + Math.round(TILE * 1.5), 3, 6, 4);\n // The street-name sign: the lot is 375 tiles wide, and the road knows it.\n const sw = Math.round(TILE * 3.4);\n const sh = 10;\n const sy = Math.round(h * 0.42);\n const sx = Math.round(poleX + 1 - sw / 2); // whole-pixel plate, crisp fills\n ctx.fillStyle = \"#1e6e3c\";\n ctx.fillRect(sx, sy, sw, sh);\n ctx.strokeStyle = \"#e8e8e0\";\n ctx.lineWidth = 1;\n ctx.strokeRect(sx + 0.5, sy + 0.5, sw - 1, sh - 1);\n ctx.fillStyle = \"#f0f0e8\";\n ctx.font = \"bold 7px monospace\";\n ctx.textAlign = \"center\";\n ctx.fillText(\"375 ST\", poleX + 1, sy + 8);\n ctx.textAlign = \"left\";\n}\n\nexport function drawPlanter(ctx: CanvasRenderingContext2D, w: number, h: number): void {\n ctx.fillStyle = \"#6a6a62\";\n ctx.fillRect(0, h - 6, w, 6);\n ctx.fillStyle = \"#4a7c36\";\n ctx.fillRect(1, h - 12, w - 2, 6);\n ctx.fillStyle = \"#568c3e\";\n ctx.fillRect(Math.round(w * 0.2), h - 16, Math.round(w * 0.6), 5);\n}\n\n/** The tree and bush paint, as a table the atlas publishes (docs/atlas.md,\n * \"Seeded by the tower\") so a frontend can paint a plant at its own size. */\nexport const PLANT_PAINT = {\n tree: {\n trunk: { color: \"#6d4c2a\", w: 0.12, minW: 2, h: 0.3 },\n canopy: [\n { w: 1.0, y: 0.32, color: \"#3e6b2e\" },\n { w: 0.78, y: 0.52, color: \"#4a7c36\" },\n { w: 0.5, y: 0.72, color: \"#568c3e\" },\n ],\n canopyH: 0.26,\n jitterKey: 97,\n },\n bush: {\n base: { color: \"#4a7c36\", y: 0.4, h: 0.6 },\n top: { color: \"#568c3e\", x: 0.16, w: 0.68, h: 0.5 },\n },\n} as const;\n\nexport function drawTree(ctx: CanvasRenderingContext2D, w: number, h: number, seed: number): void {\n const T = PLANT_PAINT.tree;\n const trunkW = Math.max(T.trunk.minW, Math.round(w * T.trunk.w));\n const trunkH = Math.round(h * T.trunk.h);\n ctx.fillStyle = T.trunk.color;\n ctx.fillRect(Math.round(w / 2 - trunkW / 2), h - trunkH, trunkW, trunkH);\n T.canopy.forEach(({ w: lw, y: ly, color }, li) => {\n // Integer hash key (hash01 truncates): the layer index, not the fractional\n // layer offset, carries the per-layer variation.\n const jitter = Math.round((hash01(seed + li * T.jitterKey) - 0.5) * 2);\n ctx.fillStyle = color;\n ctx.fillRect(Math.round(w * (1 - lw) / 2) + jitter, Math.round(h - trunkH - h * ly), Math.round(w * lw), Math.round(h * T.canopyH));\n });\n}\n\nexport function drawBush(ctx: CanvasRenderingContext2D, w: number, h: number): void {\n const { base, top } = PLANT_PAINT.bush;\n ctx.fillStyle = base.color;\n ctx.fillRect(0, Math.round(h * base.y), w, Math.ceil(h * base.h));\n ctx.fillStyle = top.color;\n ctx.fillRect(Math.round(w * top.x), 0, Math.round(w * top.w), Math.round(h * top.h));\n}\n\n/** Cement paving and its joint lines (the forecourt and the tower's apron). */\nexport const PAVE = \"#b0b0a8\";\nexport const PAVE_JOINT = \"#8a8a82\";\n\n/** A sidewalk run `w` px wide (11 px tall) with an expansion joint every tile. */\nexport function drawSidewalk(ctx: CanvasRenderingContext2D, w: number): void {\n ctx.fillStyle = \"#b4b4aa\";\n ctx.fillRect(0, 0, w, 11);\n ctx.fillStyle = \"#8e8e86\";\n for (let x = 0; x < w; x += TILE) ctx.fillRect(x, 0, 1, 7);\n}\n\n/** A road run `w` px wide (14 px tall) with lane dashes every four tiles,\n * the first starting `phase` px in (a dash may start off the left edge). */\nexport function drawRoad(ctx: CanvasRenderingContext2D, w: number, phase: number): void {\n const period = TILE * 4;\n ctx.fillStyle = \"#34343c\";\n ctx.fillRect(0, 0, w, 14);\n ctx.fillStyle = \"#c8b040\";\n for (let x = phase - period; x < w; x += period) ctx.fillRect(x, 6, TILE, 2);\n}\n\n/** The forecourt's cement run `w` px wide (10 px tall), a joint every two tiles. */\nexport function drawForecourt(ctx: CanvasRenderingContext2D, w: number): void {\n ctx.fillStyle = PAVE;\n ctx.fillRect(0, 0, w, 10);\n ctx.fillStyle = PAVE_JOINT;\n for (let x = 0; x < w; x += TILE * 2) ctx.fillRect(x, 0, 1, 6);\n}\n\nexport { STRIP_ABOVE, STRIP_BELOW };\n\n/** The lot's three grass shades. */\nexport const GRASS_SHADES = [\"#446c2e\", \"#4e7a34\", \"#5b8a3c\"] as const;\n\n/** A lot tile's grass: its shade (an index into {@link GRASS_SHADES}) and\n * whether its blades stand one pixel taller (a tuft), both from the tile. */\nexport function grassLook(tile: number): { shade: 0 | 1 | 2; tuft: boolean } {\n const h = hash01(tile * 17);\n let shade: 0 | 1 | 2 = 0;\n if (h < 0.33) shade = 1;\n else if (h < 0.66) shade = 2;\n return { shade, tuft: hash01(tile * 29) < 0.2 };\n}\n\n/** Paving joints fall on every lot tile whose index is a multiple of this. */\nexport const PAVE_JOINT_EVERY = 4;\n\n/** One tile of the lot's ground strip at `px`: cement (with a joint on every\n * fourth lot tile) where the tower has paved it, else grass whose shade and\n * tuft come from the lot tile index. Fills one column past the tile; the\n * next tile, drawn after it, paints over the rows it covers. */\nexport function drawStripTile(ctx: CanvasRenderingContext2D, px: number, tile: number, paved: boolean): void {\n if (paved) {\n ctx.fillStyle = PAVE;\n ctx.fillRect(px, STRIP_ABOVE - 5, TILE + 1, 5 + STRIP_BELOW);\n if (tile % PAVE_JOINT_EVERY === 0) {\n ctx.fillStyle = PAVE_JOINT;\n ctx.fillRect(px, STRIP_ABOVE - 5, 1, 5);\n }\n return;\n }\n const gh = 4; // grass blade height\n const look = grassLook(tile);\n ctx.fillStyle = GRASS_SHADES[look.shade];\n const wob = look.tuft ? 1 : 0;\n ctx.fillRect(px, STRIP_ABOVE - gh - wob, TILE + 1, gh + wob + STRIP_BELOW);\n ctx.fillStyle = \"#3c5c28\";\n ctx.fillRect(px, STRIP_ABOVE, TILE + 1, STRIP_BELOW);\n}\n"],"names":[],"mappings":";;;AAGA;;;;;;;;AAQG;AAEG,SAAU,cAAc,CAAC,GAA6B,EAAE,CAAS,EAAA;AACrE,IAAA,MAAM,EAAE,GAAG,CAAC,GAAG,CAAC;IAChB,MAAM,EAAE,GAAG,EAAE;;AAEb,IAAA,GAAG,CAAC,SAAS,GAAG,SAAS;IACzB,GAAG,CAAC,QAAQ,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC;;AAE1B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G,CAAC,SAAS,GAAG,SAAS;AACzB,IAAA,GAAG,CAAC,QAAQ,CAAC,EAAE,EAAE,WAAW,EAAE,IAAI,GAAG,CAAC,EAAE,WAAW,CAAC;AACtD;;"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { TowerEngine } from "./TowerEngine";
|
|
2
|
+
/**
|
|
3
|
+
* Elevator floor numbers, drawn in SCREEN space at the display resolution by
|
|
4
|
+
* the {@link TowerEngine} overlay (see towerOverlay.drawOverlay).
|
|
5
|
+
*
|
|
6
|
+
* They used to be baked into the shaft sprite, but that bitmap is cached at
|
|
7
|
+
* logical size (quality 1 in towerReconcile) and upscaled nearest-neighbor (the
|
|
8
|
+
* engine runs pixelArt with antialiasing off), so on a fractional device-pixel
|
|
9
|
+
* ratio (2.625 on a Pixel 8a) the baked digits garbled: the outline separated
|
|
10
|
+
* from the glyph and read as a doubled number on some floors. Drawn here as a
|
|
11
|
+
* fresh fillText each frame, every digit is rasterized once at the final display
|
|
12
|
+
* size, so it stays crisp at any zoom and DPR. The cost is per-frame work bounded
|
|
13
|
+
* by the two culls below (readable-zoom gate, then visible floor band per shaft).
|
|
14
|
+
*
|
|
15
|
+
* The font scales with the floor band (like the baked labels did) rather than
|
|
16
|
+
* being clamped to a fixed size: a fixed size grew relative to a shrinking band
|
|
17
|
+
* as you zoomed out and read as giant digits. Below a band height that can hold a
|
|
18
|
+
* readable digit without it dominating the floor, the numbers hide entirely and
|
|
19
|
+
* the left-edge ruler carries the floor reference. Numbers are NOT hidden behind
|
|
20
|
+
* a passing cab: doing so blinked them on and off as cars crossed floors (worse
|
|
21
|
+
* at fast-forward), so a steady digit that a moving cab passes over is preferred.
|
|
22
|
+
*/
|
|
23
|
+
export declare function drawShaftNumbers(engine: TowerEngine, ctx: CanvasRenderingContext2D): void;
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { isElevatorKind } from '../../presentation/viewKinds.js';
|
|
2
|
+
import { FLOOR, TILE } from '../scale.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Elevator floor numbers, drawn in SCREEN space at the display resolution by
|
|
6
|
+
* the {@link TowerEngine} overlay (see towerOverlay.drawOverlay).
|
|
7
|
+
*
|
|
8
|
+
* They used to be baked into the shaft sprite, but that bitmap is cached at
|
|
9
|
+
* logical size (quality 1 in towerReconcile) and upscaled nearest-neighbor (the
|
|
10
|
+
* engine runs pixelArt with antialiasing off), so on a fractional device-pixel
|
|
11
|
+
* ratio (2.625 on a Pixel 8a) the baked digits garbled: the outline separated
|
|
12
|
+
* from the glyph and read as a doubled number on some floors. Drawn here as a
|
|
13
|
+
* fresh fillText each frame, every digit is rasterized once at the final display
|
|
14
|
+
* size, so it stays crisp at any zoom and DPR. The cost is per-frame work bounded
|
|
15
|
+
* by the two culls below (readable-zoom gate, then visible floor band per shaft).
|
|
16
|
+
*
|
|
17
|
+
* The font scales with the floor band (like the baked labels did) rather than
|
|
18
|
+
* being clamped to a fixed size: a fixed size grew relative to a shrinking band
|
|
19
|
+
* as you zoomed out and read as giant digits. Below a band height that can hold a
|
|
20
|
+
* readable digit without it dominating the floor, the numbers hide entirely and
|
|
21
|
+
* the left-edge ruler carries the floor reference. Numbers are NOT hidden behind
|
|
22
|
+
* a passing cab: doing so blinked them on and off as cars crossed floors (worse
|
|
23
|
+
* at fast-forward), so a steady digit that a moving cab passes over is preferred.
|
|
24
|
+
*/
|
|
25
|
+
function drawShaftNumbers(engine, ctx) {
|
|
26
|
+
const z = engine.cam.zoom;
|
|
27
|
+
const floorHpx = FLOOR * z;
|
|
28
|
+
// Hide numbers once a floor band is too short to hold a readable digit that
|
|
29
|
+
// does not dominate it (below this a fixed-size font looked giant and a scaled
|
|
30
|
+
// one was an unreadable smudge). The finiteness check also hides a non-finite
|
|
31
|
+
// zoom (NaN or Infinity), which would otherwise write "bold Infinitypx" as the
|
|
32
|
+
// font. Return before save() so save/restore balances.
|
|
33
|
+
if (!Number.isFinite(floorHpx) || floorHpx < 30)
|
|
34
|
+
return;
|
|
35
|
+
// Save/restore because this shares the overlay's 2D context with painters that
|
|
36
|
+
// run after it (drawRuler draws its labels at x=3 assuming the default left
|
|
37
|
+
// textAlign, drawRain strokes at its own lineWidth): leaving textAlign,
|
|
38
|
+
// textBaseline, lineJoin, miterLimit or lineWidth dirty would corrupt them.
|
|
39
|
+
ctx.save();
|
|
40
|
+
// ~18% of the floor band (matching the old baked proportion), floored at 7px
|
|
41
|
+
// for legibility. The 7px floor binds just above the gate (roughly zoom
|
|
42
|
+
// 0.67-0.81, where a proportional digit would fall under 7px); there the number
|
|
43
|
+
// is at most ~23% of the band, still readable and far from the giant sizes the
|
|
44
|
+
// old fixed 8px clamp produced when zoomed out.
|
|
45
|
+
const fontPx = Math.max(7, Math.round(8 * z));
|
|
46
|
+
ctx.font = `bold ${fontPx}px "MS Sans Serif", monospace`;
|
|
47
|
+
ctx.textAlign = "center";
|
|
48
|
+
ctx.textBaseline = "middle";
|
|
49
|
+
ctx.lineJoin = "round";
|
|
50
|
+
ctx.miterLimit = 2;
|
|
51
|
+
ctx.lineWidth = Math.max(2, Math.round(fontPx / 4));
|
|
52
|
+
// Visible floor band (screenToFloor(0) is the topmost visible floor, larger
|
|
53
|
+
// than the bottom; both are integers via Math.ceil), matching drawStatsMap.
|
|
54
|
+
const topFloor = engine.screenToFloor(0) + 1;
|
|
55
|
+
const botFloor = engine.screenToFloor(engine.viewHeight) - 1;
|
|
56
|
+
const tower = engine.sim.tower;
|
|
57
|
+
for (const t of tower.elevators ?? tower.transports) {
|
|
58
|
+
if (!isElevatorKind(t.kind))
|
|
59
|
+
continue;
|
|
60
|
+
const shaftWpx = t.width * TILE * z;
|
|
61
|
+
if (shaftWpx < 9)
|
|
62
|
+
continue; // shaft too thin to fit a number
|
|
63
|
+
const cx = engine.worldToScreenX(t.x + t.width / 2);
|
|
64
|
+
// cx is the shaft CENTER, so half the shaft width is the exact off-screen
|
|
65
|
+
// margin; a full width kept processing shafts up to a width past either edge.
|
|
66
|
+
const halfW = shaftWpx / 2;
|
|
67
|
+
if (cx < -halfW || cx > engine.viewWidth + halfW)
|
|
68
|
+
continue; // off-screen left/right
|
|
69
|
+
const skip = t.skipFloors && t.skipFloors.length ? new Set(t.skipFloors) : null;
|
|
70
|
+
const lo = Math.max(t.bottom, botFloor);
|
|
71
|
+
const hi = Math.min(t.top, topFloor);
|
|
72
|
+
for (let num = lo; num <= hi; num++) {
|
|
73
|
+
if (skip && skip.has(num))
|
|
74
|
+
continue; // express: not a stop, no number
|
|
75
|
+
const cy = engine.worldToScreenY(num) + floorHpx / 2;
|
|
76
|
+
const label = num >= 1 ? String(num) : `B${1 - num}`;
|
|
77
|
+
// A dark outline (stroke) then a near-white fill, both on the same path so
|
|
78
|
+
// they rasterize together. At screen resolution this reads on any shaft
|
|
79
|
+
// tint without the baked-bitmap ghosting the drop-shadow used to cause.
|
|
80
|
+
ctx.strokeStyle = "rgba(0,0,0,0.85)";
|
|
81
|
+
ctx.strokeText(label, cx, cy);
|
|
82
|
+
ctx.fillStyle = "rgba(255,255,255,0.95)";
|
|
83
|
+
ctx.fillText(label, cx, cy);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
ctx.restore();
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export { drawShaftNumbers };
|
|
90
|
+
//# sourceMappingURL=towerShaftNumbers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"towerShaftNumbers.js","sources":["../../../src/render/excalibur/towerShaftNumbers.ts"],"sourcesContent":["import { isElevatorKind } from \"../../presentation/viewKinds\";\nimport { FLOOR, TILE } from \"../scale\";\nimport type { TowerEngine } from \"./TowerEngine\";\n\n/**\n * Elevator floor numbers, drawn in SCREEN space at the display resolution by\n * the {@link TowerEngine} overlay (see towerOverlay.drawOverlay).\n *\n * They used to be baked into the shaft sprite, but that bitmap is cached at\n * logical size (quality 1 in towerReconcile) and upscaled nearest-neighbor (the\n * engine runs pixelArt with antialiasing off), so on a fractional device-pixel\n * ratio (2.625 on a Pixel 8a) the baked digits garbled: the outline separated\n * from the glyph and read as a doubled number on some floors. Drawn here as a\n * fresh fillText each frame, every digit is rasterized once at the final display\n * size, so it stays crisp at any zoom and DPR. The cost is per-frame work bounded\n * by the two culls below (readable-zoom gate, then visible floor band per shaft).\n *\n * The font scales with the floor band (like the baked labels did) rather than\n * being clamped to a fixed size: a fixed size grew relative to a shrinking band\n * as you zoomed out and read as giant digits. Below a band height that can hold a\n * readable digit without it dominating the floor, the numbers hide entirely and\n * the left-edge ruler carries the floor reference. Numbers are NOT hidden behind\n * a passing cab: doing so blinked them on and off as cars crossed floors (worse\n * at fast-forward), so a steady digit that a moving cab passes over is preferred.\n */\nexport function drawShaftNumbers(engine: TowerEngine, ctx: CanvasRenderingContext2D): void {\n const z = engine.cam.zoom;\n const floorHpx = FLOOR * z;\n // Hide numbers once a floor band is too short to hold a readable digit that\n // does not dominate it (below this a fixed-size font looked giant and a scaled\n // one was an unreadable smudge). The finiteness check also hides a non-finite\n // zoom (NaN or Infinity), which would otherwise write \"bold Infinitypx\" as the\n // font. Return before save() so save/restore balances.\n if (!Number.isFinite(floorHpx) || floorHpx < 30) return;\n // Save/restore because this shares the overlay's 2D context with painters that\n // run after it (drawRuler draws its labels at x=3 assuming the default left\n // textAlign, drawRain strokes at its own lineWidth): leaving textAlign,\n // textBaseline, lineJoin, miterLimit or lineWidth dirty would corrupt them.\n ctx.save();\n // ~18% of the floor band (matching the old baked proportion), floored at 7px\n // for legibility. The 7px floor binds just above the gate (roughly zoom\n // 0.67-0.81, where a proportional digit would fall under 7px); there the number\n // is at most ~23% of the band, still readable and far from the giant sizes the\n // old fixed 8px clamp produced when zoomed out.\n const fontPx = Math.max(7, Math.round(8 * z));\n ctx.font = `bold ${fontPx}px \"MS Sans Serif\", monospace`;\n ctx.textAlign = \"center\";\n ctx.textBaseline = \"middle\";\n ctx.lineJoin = \"round\";\n ctx.miterLimit = 2;\n ctx.lineWidth = Math.max(2, Math.round(fontPx / 4));\n // Visible floor band (screenToFloor(0) is the topmost visible floor, larger\n // than the bottom; both are integers via Math.ceil), matching drawStatsMap.\n const topFloor = engine.screenToFloor(0) + 1;\n const botFloor = engine.screenToFloor(engine.viewHeight) - 1;\n const tower = engine.sim.tower;\n for (const t of tower.elevators ?? tower.transports) {\n if (!isElevatorKind(t.kind)) continue;\n const shaftWpx = t.width * TILE * z;\n if (shaftWpx < 9) continue; // shaft too thin to fit a number\n const cx = engine.worldToScreenX(t.x + t.width / 2);\n // cx is the shaft CENTER, so half the shaft width is the exact off-screen\n // margin; a full width kept processing shafts up to a width past either edge.\n const halfW = shaftWpx / 2;\n if (cx < -halfW || cx > engine.viewWidth + halfW) continue; // off-screen left/right\n const skip = t.skipFloors && t.skipFloors.length ? new Set(t.skipFloors) : null;\n const lo = Math.max(t.bottom, botFloor);\n const hi = Math.min(t.top, topFloor);\n for (let num = lo; num <= hi; num++) {\n if (skip && skip.has(num)) continue; // express: not a stop, no number\n const cy = engine.worldToScreenY(num) + floorHpx / 2;\n const label = num >= 1 ? String(num) : `B${1 - num}`;\n // A dark outline (stroke) then a near-white fill, both on the same path so\n // they rasterize together. At screen resolution this reads on any shaft\n // tint without the baked-bitmap ghosting the drop-shadow used to cause.\n ctx.strokeStyle = \"rgba(0,0,0,0.85)\";\n ctx.strokeText(label, cx, cy);\n ctx.fillStyle = \"rgba(255,255,255,0.95)\";\n ctx.fillText(label, cx, cy);\n }\n }\n ctx.restore();\n}\n"],"names":[],"mappings":";;;AAIA;;;;;;;;;;;;;;;;;;;;AAoBG;AACG,SAAU,gBAAgB,CAAC,MAAmB,EAAE,GAA6B,EAAA;AACjF,IAAA,MAAM,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,IAAI;AACzB,IAAA,MAAM,QAAQ,GAAG,KAAK,GAAG,CAAC;;;;;;IAM1B,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,QAAQ,GAAG,EAAE;QAAE;;;;;IAKjD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E,GAAG,MAAM,CAAC,SAAS,GAAG,KAAK;AAAE,YAAA,SAAS;QAC3D,MAAM,IAAI,GAAG,CAAC,CAAC,UAAU,IAAI,CAAC,CAAC,UAAU,CAAC,MAAM,GAAG,IAAI,GAAG,CAAC,CAAC,CAAC,UAAU,CAAC,GAAG,IAAI;AAC/E,QAAA,MAAM,EAAE,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,EAAE,QAAQ,CAAC;AACvC,QAAA,MAAM,EAAE,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,QAAQ,CAAC;AACpC,QAAA,KAAK,IAAI,GAAG,GAAG,EAAE,EAAE,GAAG,IAAI,EAAE,EAAE,GAAG,EAAE,EAAE;AACnC,YAAA,IAAI,IAAI,IAAI,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC;AAAE,gBAAA,SAAS;AACpC,YAAA,MAAM,EAAE,GAAG,MAAM,CAAC,cAAc,CAAC,GAAG,CAAC,GAAG,QAAQ,GAAG,CAAC;YACpD,MAAM,KAAK,GAAG,GAAG,IAAI,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,GAAG,CAAA,CAAA,EAAI,CAAC,GAAG,GAAG,EAAE;;;;AAIpD,YAAA,GAAG,CAAC,WAAW,GAAG,kBAAkB;YACpC,GAAG,CAAC,UAAU,CAAC,KAAK,EAAE,EAAE,EAAE,EAAE,CAAC;AAC7B,YAAA,GAAG,CAAC,SAAS,GAAG,wBAAwB;YACxC,GAAG,CAAC,QAAQ,CAAC,KAAK,EAAE,EAAE,EAAE,EAAE,CAAC;QAC7B;IACF;IACA,GAAG,CAAC,OAAO,EAAE;AACf;;"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import type * as ex from "excalibur";
|
|
2
|
+
import type { RenderSim } from "../renderSim";
|
|
3
|
+
import type { UnitView } from "../../simport/view";
|
|
4
|
+
import type { TowerEngine } from "./TowerEngine";
|
|
5
|
+
import { type BridgeCell } from "./towerBridgeTiles";
|
|
6
|
+
/**
|
|
7
|
+
* The scene sync's structure pass: the floor and lobby cells of the structure
|
|
8
|
+
* TileMap, and the floor-1 entrance map the lobby cells read. Split out of
|
|
9
|
+
* `towerReconcile.ts`, which calls {@link syncStructureTiles} once per sync.
|
|
10
|
+
*/
|
|
11
|
+
/** What the tile pass last drew from, and what it kept for the syncs that
|
|
12
|
+
* skip the tiles: the rooms (every unit but the tiles, in `tower.units`
|
|
13
|
+
* order) and the lobby cells with their units. */
|
|
14
|
+
export interface StructPass {
|
|
15
|
+
sim: RenderSim | null;
|
|
16
|
+
units: readonly UnitView[] | null;
|
|
17
|
+
revision: number;
|
|
18
|
+
lit: boolean;
|
|
19
|
+
rooms: readonly UnitView[];
|
|
20
|
+
lobbies: readonly LobbyCell[];
|
|
21
|
+
/** The lobby cells that show a grand entrance, whose doorman and attendant
|
|
22
|
+
* come and go with their tower's tenants ({@link repaintEntrances}). */
|
|
23
|
+
entrances: readonly LobbyCell[];
|
|
24
|
+
/** The open-air cells under the sky bridge tiles drawn in a look, which
|
|
25
|
+
* show the bridge's underside. */
|
|
26
|
+
undersides: readonly UndersideCell[];
|
|
27
|
+
}
|
|
28
|
+
/** The open-air cell under a bridge tile, and that tile's place on its
|
|
29
|
+
* bridge. */
|
|
30
|
+
type UndersideCell = readonly [ex.Tile, BridgeCell];
|
|
31
|
+
/** A lobby cell: the tile, its lobby unit, which story of the lobby it shows
|
|
32
|
+
* (0 is the lobby's own floor), the lobby's height in stories (#308) and, on
|
|
33
|
+
* a sky bridge in a drawn look, its look and place on the bridge. */
|
|
34
|
+
export type LobbyCell = readonly [
|
|
35
|
+
ex.Tile,
|
|
36
|
+
UnitView,
|
|
37
|
+
number,
|
|
38
|
+
number,
|
|
39
|
+
BridgeCell?
|
|
40
|
+
];
|
|
41
|
+
/** A record that matches no sim, so the next sync walks every unit. */
|
|
42
|
+
export declare function emptyStructPass(): StructPass;
|
|
43
|
+
/** Bring the floor and lobby cells of the structure TileMap up to date and
|
|
44
|
+
* return the tower's rooms (every unit but the tiles, in `tower.units`
|
|
45
|
+
* order). A layout, unit list or sim change walks every unit once: it paints
|
|
46
|
+
* each tile, keeps the rooms and the lobby cells, and clears the cells no
|
|
47
|
+
* tile holds any more. A lighting-only change repaints the kept lobby cells.
|
|
48
|
+
* Any other sync touches no cell and hands back the kept rooms, whose entries
|
|
49
|
+
* stay current because the view patches them in place until it rebuilds the
|
|
50
|
+
* unit list. */
|
|
51
|
+
export declare function syncStructureTiles(engine: TowerEngine): readonly UnitView[];
|
|
52
|
+
/** Repaint the grand entrance cells for each tower's current staffing
|
|
53
|
+
* (`engine.towerStaffed`). The scene sync calls it after its room walk; a
|
|
54
|
+
* cell already showing the right graphic is left alone. A handful of cells. */
|
|
55
|
+
export declare function repaintEntrances(engine: TowerEngine): void;
|
|
56
|
+
export {};
|