@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,82 @@
|
|
|
1
|
+
import { hash } from '../../pixelSprites/common.js';
|
|
2
|
+
import { skyGlass } from './lobby.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* The tall pieces of a tall lobby's open hall (#308): a glazed arched window,
|
|
6
|
+
* a sky lobby's curtain wall of glass, and globe pendants on long cords. Each
|
|
7
|
+
* is drawn at its real height in the lobby's pixel scale, so the hall gets
|
|
8
|
+
* taller without anything in it stretching.
|
|
9
|
+
*/
|
|
10
|
+
/** A glazed opening with a gold frame and, when `head` is set, a round
|
|
11
|
+
* head: dark warm glass with a few city lights after dark, pale sky by day.
|
|
12
|
+
* A transom bar every story-ish keeps a tall window reading as glazing. */
|
|
13
|
+
function archedWindow(d, x, y, w, h, head, seed) {
|
|
14
|
+
const { ctx, lit } = d;
|
|
15
|
+
if (w < 3 || h < 6)
|
|
16
|
+
return;
|
|
17
|
+
ctx.fillStyle = "#C9A24B";
|
|
18
|
+
ctx.fillRect(x, y + (head ? 2 : 0), w, h - (head ? 2 : 0));
|
|
19
|
+
if (head) {
|
|
20
|
+
ctx.fillRect(x + 1, y + 1, w - 2, 1);
|
|
21
|
+
ctx.fillRect(x + 2, y, Math.max(1, w - 4), 1);
|
|
22
|
+
}
|
|
23
|
+
const gx = x + 1;
|
|
24
|
+
const gy = y + (head ? 2 : 1);
|
|
25
|
+
const gw = w - 2;
|
|
26
|
+
const gh = h - (head ? 3 : 2);
|
|
27
|
+
const g = ctx.createLinearGradient(0, gy, 0, gy + gh);
|
|
28
|
+
g.addColorStop(0, lit ? "#2E2C34" : "#B7CCDA");
|
|
29
|
+
g.addColorStop(1, lit ? "#26242C" : "#D3E0E8");
|
|
30
|
+
ctx.fillStyle = g;
|
|
31
|
+
ctx.fillRect(gx, gy, gw, gh);
|
|
32
|
+
if (head)
|
|
33
|
+
ctx.fillRect(x + 2, y + 1, Math.max(1, w - 4), 1);
|
|
34
|
+
if (lit) {
|
|
35
|
+
ctx.fillStyle = "#B89A62";
|
|
36
|
+
for (let yy = 3; yy < gh - 1; yy += 4) {
|
|
37
|
+
for (let xx = 0; xx < gw; xx += 2) {
|
|
38
|
+
if (hash(seed * 97 + xx * 13 + yy * 5) > 0.8)
|
|
39
|
+
ctx.fillRect(gx + xx, gy + yy, 1, 1);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
ctx.fillStyle = "rgba(138,116,48,0.8)"; // mullion and transom bars
|
|
44
|
+
if (gw >= 4)
|
|
45
|
+
ctx.fillRect(gx + (gw >> 1), gy, 1, gh);
|
|
46
|
+
for (let ty = 12; ty < gh - 4; ty += 12)
|
|
47
|
+
ctx.fillRect(gx, gy + ty, gw, 1);
|
|
48
|
+
}
|
|
49
|
+
/** A sky lobby's curtain wall: the one-story skyline glass run the hall's
|
|
50
|
+
* full height, with a transom every fifteen rows so it reads as one tall
|
|
51
|
+
* pane of glazing, not a stack of windows. */
|
|
52
|
+
function hallGlass(d, x, y, w, h, seed) {
|
|
53
|
+
const { ctx, lit } = d;
|
|
54
|
+
skyGlass(ctx, x, y, w, h, lit, seed);
|
|
55
|
+
ctx.fillStyle = "rgba(70,74,92,0.5)";
|
|
56
|
+
for (let ty = 15; ty < h - 4; ty += 15)
|
|
57
|
+
ctx.fillRect(x, y + ty, w, 1);
|
|
58
|
+
}
|
|
59
|
+
/** Three small globe pendants on cords of different lengths, hung from the
|
|
60
|
+
* hall's ceiling at `top` down toward `bottom`. */
|
|
61
|
+
function globePendants(d, cx, top, bottom) {
|
|
62
|
+
const { ctx, lit } = d;
|
|
63
|
+
const span = bottom - top;
|
|
64
|
+
if (span < 10)
|
|
65
|
+
return;
|
|
66
|
+
for (const [dx, drop] of [[-3, 0.6], [0, 0.85], [3, 0.7]]) {
|
|
67
|
+
const gy = top + Math.round(span * drop);
|
|
68
|
+
ctx.fillStyle = "#5A5448";
|
|
69
|
+
ctx.fillRect(cx + dx, top, 1, gy - top);
|
|
70
|
+
ctx.fillStyle = lit ? "#FBE7B8" : "#E8E2D2";
|
|
71
|
+
ctx.fillRect(cx + dx - 1, gy, 3, 2);
|
|
72
|
+
ctx.fillStyle = lit ? "#FFF4D6" : "#FFFFFF";
|
|
73
|
+
ctx.fillRect(cx + dx, gy, 1, 1);
|
|
74
|
+
if (lit) {
|
|
75
|
+
ctx.fillStyle = "rgba(248,226,180,0.22)";
|
|
76
|
+
ctx.fillRect(cx + dx - 2, gy - 1, 5, 4);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export { archedWindow, globePendants, hallGlass };
|
|
82
|
+
//# sourceMappingURL=tallLobbyPieces.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tallLobbyPieces.js","sources":["../../../../src/render/sprites/structure/tallLobbyPieces.ts"],"sourcesContent":["import type { DrawCtx } from \"../common\";\nimport { hash } from \"../../pixelSprites/common\";\nimport { skyGlass } from \"./lobby\";\n\n/**\n * The tall pieces of a tall lobby's open hall (#308): a glazed arched window,\n * a sky lobby's curtain wall of glass, and globe pendants on long cords. Each\n * is drawn at its real height in the lobby's pixel scale, so the hall gets\n * taller without anything in it stretching.\n */\n\n/** A glazed opening with a gold frame and, when `head` is set, a round\n * head: dark warm glass with a few city lights after dark, pale sky by day.\n * A transom bar every story-ish keeps a tall window reading as glazing. */\nexport function archedWindow(d: DrawCtx, x: number, y: number, w: number, h: number, head: boolean, seed: number): void {\n const { ctx, lit } = d;\n if (w < 3 || h < 6) return;\n ctx.fillStyle = \"#C9A24B\";\n ctx.fillRect(x, y + (head ? 2 : 0), w, h - (head ? 2 : 0));\n if (head) {\n ctx.fillRect(x + 1, y + 1, w - 2, 1);\n ctx.fillRect(x + 2, y, Math.max(1, w - 4), 1);\n }\n const gx = x + 1;\n const gy = y + (head ? 2 : 1);\n const gw = w - 2;\n const gh = h - (head ? 3 : 2);\n const g = ctx.createLinearGradient(0, gy, 0, gy + gh);\n g.addColorStop(0, lit ? \"#2E2C34\" : \"#B7CCDA\");\n g.addColorStop(1, lit ? \"#26242C\" : \"#D3E0E8\");\n ctx.fillStyle = g;\n ctx.fillRect(gx, gy, gw, gh);\n if (head) ctx.fillRect(x + 2, y + 1, Math.max(1, w - 4), 1);\n if (lit) {\n ctx.fillStyle = \"#B89A62\";\n for (let yy = 3; yy < gh - 1; yy += 4) {\n for (let xx = 0; xx < gw; xx += 2) {\n if (hash(seed * 97 + xx * 13 + yy * 5) > 0.8) ctx.fillRect(gx + xx, gy + yy, 1, 1);\n }\n }\n }\n ctx.fillStyle = \"rgba(138,116,48,0.8)\"; // mullion and transom bars\n if (gw >= 4) ctx.fillRect(gx + (gw >> 1), gy, 1, gh);\n for (let ty = 12; ty < gh - 4; ty += 12) ctx.fillRect(gx, gy + ty, gw, 1);\n}\n\n/** A sky lobby's curtain wall: the one-story skyline glass run the hall's\n * full height, with a transom every fifteen rows so it reads as one tall\n * pane of glazing, not a stack of windows. */\nexport function hallGlass(d: DrawCtx, x: number, y: number, w: number, h: number, seed: number): void {\n const { ctx, lit } = d;\n skyGlass(ctx, x, y, w, h, lit, seed);\n ctx.fillStyle = \"rgba(70,74,92,0.5)\";\n for (let ty = 15; ty < h - 4; ty += 15) ctx.fillRect(x, y + ty, w, 1);\n}\n\n/** Three small globe pendants on cords of different lengths, hung from the\n * hall's ceiling at `top` down toward `bottom`. */\nexport function globePendants(d: DrawCtx, cx: number, top: number, bottom: number): void {\n const { ctx, lit } = d;\n const span = bottom - top;\n if (span < 10) return;\n for (const [dx, drop] of [[-3, 0.6], [0, 0.85], [3, 0.7]] as const) {\n const gy = top + Math.round(span * drop);\n ctx.fillStyle = \"#5A5448\";\n ctx.fillRect(cx + dx, top, 1, gy - top);\n ctx.fillStyle = lit ? \"#FBE7B8\" : \"#E8E2D2\";\n ctx.fillRect(cx + dx - 1, gy, 3, 2);\n ctx.fillStyle = lit ?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GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,IAAI,CAAC;AACxC,QAAA,GAAG,CAAC,SAAS,GAAG,SAAS;AACzB,QAAA,GAAG,CAAC,QAAQ,CAAC,EAAE,GAAG,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,EAAE,GAAG,GAAG,CAAC;AACvC,QAAA,GAAG,CAAC,SAAS,GAAG,GAAG,GAAG,SAAS,GAAG,SAAS;AAC3C,QAAA,GAAG,CAAC,QAAQ,CAAC,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC;AACnC,QAAA,GAAG,CAAC,SAAS,GAAG,GAAG,GAAG,SAAS,GAAG,SAAS;AAC3C,QAAA,GAAG,CAAC,QAAQ,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC;QAC/B,IAAI,GAAG,EAAE;AACP,YAAA,GAAG,CAAC,SAAS,GAAG,wBAAwB;AACxC,YAAA,GAAG,CAAC,QAAQ,CAAC,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE,EAAE,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;QACzC;IACF;AACF;;"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Structure sprites: the floor shell, lobby, entrances, and rooftop dressing.
|
|
3
|
+
* This file is a barrel; the draw functions live in cohesive siblings under
|
|
4
|
+
* `structure/` and are re-exported here so every
|
|
5
|
+
* existing `import { … } from "./structure"` (and the `sprites.ts` barrel) keeps
|
|
6
|
+
* working unchanged:
|
|
7
|
+
* - `structure/shell.ts`: the bare floor, construction scaffold, burned shell.
|
|
8
|
+
* - `structure/lobby.ts`: the lobby concourse tiles + entrance dispatch.
|
|
9
|
+
* - `structure/entrance.ts`: the grand and service entrance facades.
|
|
10
|
+
* - `structure/rooftop.ts`: the tower crane, fire escape, and awning.
|
|
11
|
+
*/
|
|
12
|
+
export { drawFloor, drawConstruction, drawBurntShell, drawFlames } from "./structure/shell";
|
|
13
|
+
export { LOBBY_VARIANTS, lobbyVariant, ENTRANCE_GRAND_LEFT, ENTRANCE_GRAND_RIGHT, ENTRANCE_GRAND_SOLO, ENTRANCE_SERVICE, drawLobbyEntrance, drawLobby, } from "./structure/lobby";
|
|
14
|
+
export type { EntranceKind } from "./structure/lobby";
|
|
15
|
+
export { CRANE_W, CRANE_H, CRANE_MAST_ANCHOR_X, CRANE_MIN_ROOF_TILES, craneAnchorTile, craneMastTile, CRANE_REACH_LEFT_TILES, CRANE_REACH_RIGHT_TILES, craneRoof, drawCrane, ESCAPE_W, drawEscapeStairs, AWNING_W, drawAwning, } from "./structure/rooftop";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export { drawBurntShell, drawConstruction, drawFlames, drawFloor } from './structure/shell.js';
|
|
2
|
+
export { ENTRANCE_GRAND_LEFT, ENTRANCE_GRAND_RIGHT, ENTRANCE_GRAND_SOLO, ENTRANCE_SERVICE, LOBBY_VARIANTS, drawLobby, drawLobbyEntrance, lobbyVariant } from './structure/lobby.js';
|
|
3
|
+
export { AWNING_W, CRANE_H, CRANE_MAST_ANCHOR_X, CRANE_MIN_ROOF_TILES, CRANE_REACH_LEFT_TILES, CRANE_REACH_RIGHT_TILES, CRANE_W, ESCAPE_W, craneAnchorTile, craneMastTile, craneRoof, drawAwning, drawCrane, drawEscapeStairs } from './structure/rooftop.js';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Structure sprites: the floor shell, lobby, entrances, and rooftop dressing.
|
|
7
|
+
* This file is a barrel; the draw functions live in cohesive siblings under
|
|
8
|
+
* `structure/` and are re-exported here so every
|
|
9
|
+
* existing `import { … } from "./structure"` (and the `sprites.ts` barrel) keeps
|
|
10
|
+
* working unchanged:
|
|
11
|
+
* - `structure/shell.ts`: the bare floor, construction scaffold, burned shell.
|
|
12
|
+
* - `structure/lobby.ts`: the lobby concourse tiles + entrance dispatch.
|
|
13
|
+
* - `structure/entrance.ts`: the grand and service entrance facades.
|
|
14
|
+
* - `structure/rooftop.ts`: the tower crane, fire escape, and awning.
|
|
15
|
+
*/
|
|
16
|
+
//# sourceMappingURL=structure.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"structure.js","sources":["../../../src/render/sprites/structure.ts"],"sourcesContent":["/**\n * Structure sprites: the floor shell, lobby, entrances, and rooftop dressing.\n * This file is a barrel; the draw functions live in cohesive siblings under\n * `structure/` and are re-exported here so every\n * existing `import { … } from \"./structure\"` (and the `sprites.ts` barrel) keeps\n * working unchanged:\n * - `structure/shell.ts`: the bare floor, construction scaffold, burned shell.\n * - `structure/lobby.ts`: the lobby concourse tiles + entrance dispatch.\n * - `structure/entrance.ts`: the grand and service entrance facades.\n * - `structure/rooftop.ts`: the tower crane, fire escape, and awning.\n */\nexport { drawFloor, drawConstruction, drawBurntShell, drawFlames } from \"./structure/shell\";\nexport {\n LOBBY_VARIANTS,\n lobbyVariant,\n ENTRANCE_GRAND_LEFT,\n ENTRANCE_GRAND_RIGHT,\n ENTRANCE_GRAND_SOLO,\n ENTRANCE_SERVICE,\n drawLobbyEntrance,\n drawLobby,\n} from \"./structure/lobby\";\nexport type { EntranceKind } from \"./structure/lobby\";\nexport {\n CRANE_W,\n CRANE_H,\n CRANE_MAST_ANCHOR_X,\n CRANE_MIN_ROOF_TILES,\n craneAnchorTile,\n craneMastTile,\n CRANE_REACH_LEFT_TILES,\n CRANE_REACH_RIGHT_TILES,\n craneRoof,\n drawCrane,\n ESCAPE_W,\n drawEscapeStairs,\n AWNING_W,\n drawAwning,\n} from \"./structure/rooftop\";\n"],"names":[],"mappings":";;;;AAAA;;;;;;;;;;AAUG"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { FacilityKind } from "../../shared/types";
|
|
2
|
+
import type { TransportView } from "../../simport/view";
|
|
3
|
+
import { type CarArrow } from "../carIndicator";
|
|
4
|
+
export declare function drawTransport(ctx: CanvasRenderingContext2D, t: TransportView, sx: number, topY: number, w: number, floorH: number,
|
|
5
|
+
/** Whether this one-story flight stands beside a venue and winds
|
|
6
|
+
* (`venueFlights.ts`): a spiral stair, or an escalator that turns back
|
|
7
|
+
* halfway up. Ignored for an elevator and for a flight out of a tall lobby,
|
|
8
|
+
* which winds anyway. */
|
|
9
|
+
winds?: boolean): void;
|
|
10
|
+
/** A single elevator car graphic, drawn at (0,0) into a w×floorH rect, carrying
|
|
11
|
+
* `riders` passengers, their faces picked by the cab's seed (the gallery and
|
|
12
|
+
* the atlas; the game draws its riders as themselves, `cabGraphics.ts`, from
|
|
13
|
+
* the same back, slots and front). `arrow` is the direction lantern (null when idle) and
|
|
14
|
+
* `full` flags a car at capacity. `kind` dresses the cab per elevator type
|
|
15
|
+
* (anything but service/express renders the standard cab). The car is its own
|
|
16
|
+
* Excalibur Actor that the engine moves along the shaft (and swaps as it
|
|
17
|
+
* loads / changes direction). The board's warm brass-and-walnut cab. */
|
|
18
|
+
export declare function drawCar(ctx: CanvasRenderingContext2D, seed: number, w: number, floorH: number, riders: number, arrow?: CarArrow, full?: boolean, kind?: FacilityKind): void;
|
|
19
|
+
/** Where rider `p` of `rc` stands in a cab `cw` pixels wide: one per
|
|
20
|
+
* passenger up to the cab's room (`cabFit`), packed tighter as the car fills
|
|
21
|
+
* so a crowded cab reads at a glance; null past the cab's far wall. */
|
|
22
|
+
export declare function cabRiderX(cw: number, rc: number, p: number): number | null;
|
|
23
|
+
/** The line a cab's riders stand on: the cab floor, at their size on the
|
|
24
|
+
* floor. */
|
|
25
|
+
export declare function cabRiderFoot(floorH: number): number;
|
|
26
|
+
/** The back of a cab: its frame, interior and kind band, under the riders. */
|
|
27
|
+
export declare function drawCarBack(ctx: CanvasRenderingContext2D, w: number, floorH: number, kind?: FacilityKind): void;
|
|
28
|
+
/** The front of a cab, over its riders: the door frames, the center seam,
|
|
29
|
+
* the FULL bar and the direction lantern. */
|
|
30
|
+
export declare function drawCarFront(ctx: CanvasRenderingContext2D, w: number, floorH: number, arrow?: CarArrow, full?: boolean): void;
|
|
@@ -0,0 +1,376 @@
|
|
|
1
|
+
import { isElevatorKind } from '../../presentation/viewKinds.js';
|
|
2
|
+
import { facilityColor } from '../../presentation/facilityPresentation.js';
|
|
3
|
+
import { personRider } from '../pixelSprites/common.js';
|
|
4
|
+
import { layerBreak, layerEnd } from '../pixelSprites/layers.js';
|
|
5
|
+
import { RIDER_STEP } from '../carIndicator.js';
|
|
6
|
+
import { shadeAlpha, shade } from './common.js';
|
|
7
|
+
import { drawEscalatorSwitchback, drawEscalatorHalfTurn, drawEscalatorRun } from './escalator.js';
|
|
8
|
+
import { drawSpiralStair } from './spiralStair.js';
|
|
9
|
+
|
|
10
|
+
// ---- Transport ----------------------------------------------------------
|
|
11
|
+
function drawTransport(ctx, t, sx, topY, w, floorH,
|
|
12
|
+
/** Whether this one-story flight stands beside a venue and winds
|
|
13
|
+
* (`venueFlights.ts`): a spiral stair, or an escalator that turns back
|
|
14
|
+
* halfway up. Ignored for an elevator and for a flight out of a tall lobby,
|
|
15
|
+
* which winds anyway. */
|
|
16
|
+
winds = false) {
|
|
17
|
+
const color = facilityColor(t.kind);
|
|
18
|
+
const height = (t.top - t.bottom + 1) * floorH;
|
|
19
|
+
// NOTE: this draws only the *static* structure. Everything that moves
|
|
20
|
+
// (elevator cars, stair/escalator climbers) is a separate Excalibur Actor
|
|
21
|
+
// positioned by the engine — see TowerEngine's dynamic layer.
|
|
22
|
+
if (t.kind === "stairs") {
|
|
23
|
+
// No solid background — as in the original, stairs are an open structure you
|
|
24
|
+
// see the tower *through*; only the treads/handrail are drawn (in front of
|
|
25
|
+
// rooms via the engine's z-order). One FLIGHT per connected floor pair: the
|
|
26
|
+
// top band is just the arrival landing, so a two-floor stairway draws
|
|
27
|
+
// exactly one staircase rising one floor to a landing on the second-floor
|
|
28
|
+
// deck, not two stacked ones.
|
|
29
|
+
// A flight out of a tall lobby (#308) climbs the whole hall, as the
|
|
30
|
+
// original's two- and three-story stairs do: a spiral up the hall, since
|
|
31
|
+
// one straight flight that tall reads as a ladder.
|
|
32
|
+
// Beside a venue in Modern, a one-story flight is a spiral too
|
|
33
|
+
// (`venueFlights.ts`).
|
|
34
|
+
const span = t.top - t.bottom;
|
|
35
|
+
if (span > 1 || (winds && span === 1)) {
|
|
36
|
+
drawSpiralStair(ctx, sx, w, topY + floorH, topY + (span + 1) * floorH, span);
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
for (let fl = 1; fl <= span; fl++) {
|
|
40
|
+
// Each flight is confined to band `fl` (the departure floor's band); the
|
|
41
|
+
// top band stays the arrival landing so a two-floor stairway never draws
|
|
42
|
+
// a second stacked flight. The engine's own routed climbers ride over it.
|
|
43
|
+
drawStairFlight(ctx, sx, w, topY + fl * floorH, topY + (fl + 1) * floorH);
|
|
44
|
+
}
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
if (t.kind === "escalator") {
|
|
48
|
+
// Open structure like the stairs — no solid backing, you see the tower
|
|
49
|
+
// behind it. One diagonal run per floor pair, confined to the departure
|
|
50
|
+
// band, rising to the second-floor landing (the top band is the landing).
|
|
51
|
+
// Out of a tall lobby (#308), a switchback up the whole hall.
|
|
52
|
+
// Beside a venue in Modern, a one-story escalator turns back halfway up
|
|
53
|
+
// (`venueFlights.ts`).
|
|
54
|
+
const span = t.top - t.bottom;
|
|
55
|
+
if (span > 1) {
|
|
56
|
+
drawEscalatorSwitchback(ctx, sx, w, topY, floorH, span);
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
if (winds && span === 1) {
|
|
60
|
+
drawEscalatorHalfTurn(ctx, sx, w, topY + floorH, topY + 2 * floorH);
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
for (let fl = 1; fl <= span; fl++) {
|
|
64
|
+
drawEscalatorRun(ctx, sx, w, topY + fl * floorH, topY + (fl + 1) * floorH);
|
|
65
|
+
}
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
if (isElevatorKind(t.kind)) {
|
|
69
|
+
// Shaft backing tinted by elevator type, with rails and floor stops.
|
|
70
|
+
// Standard/service draw an OPAQUE dark column. The express is a see-through
|
|
71
|
+
// glass shaft in the retail game (harness pixel check: the express column
|
|
72
|
+
// reads statistically like the office floor behind it),
|
|
73
|
+
// so its backing is a low-alpha tint the rooms and people show through. The
|
|
74
|
+
// rails, stop lines, floor numbers, motor caps and car are still drawn.
|
|
75
|
+
const express = t.kind === "elevatorExpress";
|
|
76
|
+
if (express) {
|
|
77
|
+
ctx.fillStyle = shadeAlpha(color, -34, 0.35); // express glass backing
|
|
78
|
+
}
|
|
79
|
+
else {
|
|
80
|
+
ctx.fillStyle = shade(color, -34);
|
|
81
|
+
}
|
|
82
|
+
ctx.fillRect(sx, topY, w, height);
|
|
83
|
+
ctx.fillStyle = "rgba(0,0,0,0.5)";
|
|
84
|
+
ctx.fillRect(sx + 1, topY, 1, height);
|
|
85
|
+
ctx.fillRect(sx + w - 2, topY, 1, height);
|
|
86
|
+
// Warm inner guide rails give the opaque shafts depth. Skipped on express
|
|
87
|
+
// so nothing opaque narrows the see-through glass column.
|
|
88
|
+
if (!express) {
|
|
89
|
+
ctx.fillStyle = "#3A3630";
|
|
90
|
+
ctx.fillRect(sx + 3, topY, 2, height);
|
|
91
|
+
ctx.fillRect(sx + w - 5, topY, 2, height);
|
|
92
|
+
}
|
|
93
|
+
// Per-floor stop lines painted on the shaft backing, as in the original.
|
|
94
|
+
// Express elevators skip floors; like the original, a floor the car doesn't
|
|
95
|
+
// stop at shows no stop line, the shaft just passes through.
|
|
96
|
+
const skip = t.skipFloors && t.skipFloors.length ? new Set(t.skipFloors) : null;
|
|
97
|
+
for (let fl = 0; fl <= t.top - t.bottom; fl++) {
|
|
98
|
+
const num = t.top - fl; // band fl counts down from the top floor
|
|
99
|
+
if (skip && skip.has(num))
|
|
100
|
+
continue; // not a stop, leave the shaft blank here
|
|
101
|
+
const fy = topY + fl * floorH;
|
|
102
|
+
ctx.fillStyle = "rgba(255,255,255,0.05)";
|
|
103
|
+
ctx.fillRect(sx + 1, fy, w - 2, 1); // per-floor stop line
|
|
104
|
+
}
|
|
105
|
+
// The floor NUMBERS are not baked here: this bitmap is cached at logical size
|
|
106
|
+
// (quality 1 in towerReconcile) and upscaled nearest-neighbor (pixelArt), so
|
|
107
|
+
// a baked label garbles under a fractional device-pixel ratio. They are drawn
|
|
108
|
+
// fresh each frame in screen space by towerShaftNumbers.drawShaftNumbers
|
|
109
|
+
// (wired through towerOverlay.drawOverlay) instead, which renders at the real
|
|
110
|
+
// display resolution and stays crisp at any zoom.
|
|
111
|
+
// Machine housings cap the shaft top and bottom (where the extend-taller
|
|
112
|
+
// arrows also live in the original — that interaction is a planned
|
|
113
|
+
// follow-up). The board's darker motor gray.
|
|
114
|
+
const mh = 5;
|
|
115
|
+
for (const my of [topY, topY + height - mh]) {
|
|
116
|
+
ctx.fillStyle = "#3A3E44";
|
|
117
|
+
ctx.fillRect(sx, my, w, mh);
|
|
118
|
+
ctx.fillStyle = "#4E545C";
|
|
119
|
+
ctx.fillRect(sx, my, w, 1);
|
|
120
|
+
ctx.fillStyle = "rgba(0,0,0,0.45)";
|
|
121
|
+
ctx.fillRect(sx, my + mh - 1, w, 1);
|
|
122
|
+
for (let bx = sx + 2; bx < sx + w - 1; bx += 4)
|
|
123
|
+
ctx.fillRect(bx, my + 2, 1, 1); // bolts
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
/** One warm-tan stair flight: even treads over dark risers on a solid diagonal
|
|
128
|
+
* stringer, a walnut handrail on balusters ending in a newel post at each end,
|
|
129
|
+
* and a top arrival stair the flight lands on, all sitting on the floor line
|
|
130
|
+
* (the departure deck below is drawn by the floor behind the flight), confined
|
|
131
|
+
* to the band `[bandTop, bandBottom)`
|
|
132
|
+
* (the departure floor's band) so the arrival band above stays the landing,
|
|
133
|
+
* never a second stacked flight. The flight is drawn strictly inside
|
|
134
|
+
* `[sx, sx + w]` so it never overpaints a neighbor. Structure only, NO baked
|
|
135
|
+
* climber: the engine's routed sims ride over it as separate actors, so an empty
|
|
136
|
+
* tower shows a bare, unoccupied flight. Integer coordinates. */
|
|
137
|
+
function drawStairFlight(ctx, sx, w, bandTop, bandBottom) {
|
|
138
|
+
const railH = 9; // handrail height above a tread
|
|
139
|
+
const depth = 7; // stringer thickness under the treads
|
|
140
|
+
const x0 = sx + 10; // bottom (lower) landing sits on the left
|
|
141
|
+
const x1 = sx + w - 12; // top (upper) landing sits on the right
|
|
142
|
+
if (x1 - x0 < 8)
|
|
143
|
+
return; // too narrow to lay a readable flight (defensive)
|
|
144
|
+
// Keep the whole flight inside the band: the stringer drops `depth` below the
|
|
145
|
+
// incline, so the incline bottom clears the band bottom by that much (a flight
|
|
146
|
+
// that leaked past bandBottom would paint onto the floor below).
|
|
147
|
+
const yBot = bandBottom - depth - 2; // lower deck (departure), near the floor line
|
|
148
|
+
// The top tread and top landing reach the arrival deck (bandTop) so the flight
|
|
149
|
+
// visually connects to the second floor. The upper band is itself a landing, so
|
|
150
|
+
// meeting bandTop is correct; the handrail is clamped below so nothing rises
|
|
151
|
+
// past the deck into a "second flight" read.
|
|
152
|
+
const yTop = bandTop + 2;
|
|
153
|
+
if (yBot - yTop < 6)
|
|
154
|
+
return; // band too short for a readable flight
|
|
155
|
+
const n = 6; // steps
|
|
156
|
+
const treadW = (x1 - x0) / n;
|
|
157
|
+
const riseH = (yBot - yTop) / n;
|
|
158
|
+
// The smooth incline line (used for the stringer underside and the handrail)
|
|
159
|
+
// and the stepped top surface (flat within each tread, jumping at the front).
|
|
160
|
+
const line = (x) => yBot - ((x - x0) / (x1 - x0)) * (yBot - yTop);
|
|
161
|
+
const stepTopY = (x) => Math.round(yBot - Math.min(n - 1, Math.floor((x - x0) / treadW)) * riseH) - 2;
|
|
162
|
+
// Soft drop shadow just under the stringer. Height 1 so the deepest column (at
|
|
163
|
+
// x0, where line === yBot) ends on bandBottom - 1 and never paints the
|
|
164
|
+
// bandBottom row, which belongs to the floor below.
|
|
165
|
+
ctx.fillStyle = "rgba(0,0,0,0.28)";
|
|
166
|
+
for (let x = x0; x < x1; x++)
|
|
167
|
+
ctx.fillRect(x + 1, Math.round(line(x)) + depth + 1, 1, 1);
|
|
168
|
+
// Solid body: from the stepped top surface down to a straight diagonal stringer
|
|
169
|
+
// underside, so the treads read as steps on one continuous stringer.
|
|
170
|
+
for (let x = x0; x <= x1; x++) {
|
|
171
|
+
const top = stepTopY(x);
|
|
172
|
+
const bot = Math.round(line(x)) + depth;
|
|
173
|
+
ctx.fillStyle = "#8A7454"; // riser/stringer body
|
|
174
|
+
ctx.fillRect(x, top, 1, Math.max(1, bot - top));
|
|
175
|
+
ctx.fillStyle = "#2A2018"; // shaded stringer underside edge
|
|
176
|
+
ctx.fillRect(x, bot, 1, 2);
|
|
177
|
+
}
|
|
178
|
+
// Tread caps (warm tan, lit nosing) and a dark riser face at each step front.
|
|
179
|
+
for (let i = 0; i < n; i++) {
|
|
180
|
+
const l = Math.round(x0 + i * treadW);
|
|
181
|
+
const r = Math.round(x0 + (i + 1) * treadW);
|
|
182
|
+
const ty = Math.round(yBot - i * riseH) - 2;
|
|
183
|
+
ctx.fillStyle = "#EDE6D2";
|
|
184
|
+
ctx.fillRect(l, ty, r - l + 1, 2);
|
|
185
|
+
ctx.fillStyle = "#F8F2E0";
|
|
186
|
+
ctx.fillRect(l, ty, r - l + 1, 1);
|
|
187
|
+
const nty = Math.round(yBot - (i + 1) * riseH) - 2; // next tread top (higher)
|
|
188
|
+
ctx.fillStyle = "#241E14";
|
|
189
|
+
ctx.fillRect(r, nty, 1, Math.max(1, ty - nty));
|
|
190
|
+
}
|
|
191
|
+
// Walnut handrail on balusters, riding parallel above the flight. It follows
|
|
192
|
+
// the incline to x1 (the front of the top stair), then runs flat across that
|
|
193
|
+
// stair to a newel at its right end, so the rail terminates in a post rather
|
|
194
|
+
// than in mid-air. Rising past bandTop is intended: as in the original, a
|
|
195
|
+
// flight breaks the floor line it arrives at.
|
|
196
|
+
const railEnd = sx + w - 3; // last column of the top stair
|
|
197
|
+
const railY = (x) => Math.round(line(Math.min(x, x1))) - railH;
|
|
198
|
+
ctx.fillStyle = "#5A3E28";
|
|
199
|
+
for (let i = 1; i <= n; i++) {
|
|
200
|
+
// i = n lands on x1, the joint between the top stair and the one below it.
|
|
201
|
+
const bx = Math.round(x0 + i * treadW);
|
|
202
|
+
const ry = railY(bx);
|
|
203
|
+
ctx.fillRect(bx, ry, 1, Math.max(1, Math.round(line(bx)) - ry));
|
|
204
|
+
}
|
|
205
|
+
for (let x = x0; x <= railEnd; x++) {
|
|
206
|
+
const ry = railY(x);
|
|
207
|
+
ctx.fillStyle = "#6B4A2B";
|
|
208
|
+
ctx.fillRect(x, ry, 1, 2);
|
|
209
|
+
ctx.fillStyle = "#8A6440";
|
|
210
|
+
ctx.fillRect(x, ry, 1, 1);
|
|
211
|
+
}
|
|
212
|
+
// The top stair: the tread the flight arrives on, sitting on bandTop so it
|
|
213
|
+
// lands flush with the second floor. Drawn in the same colors as every other
|
|
214
|
+
// step (cap, lit nosing, stringer body, shaded underside) so it reads as the
|
|
215
|
+
// last stair rather than a differently shaded landing. The departure end gets
|
|
216
|
+
// nothing: a stub poking out to the left of the bottom step reads as a broken
|
|
217
|
+
// tread, and the deck it would sit on is already drawn by the floor behind it.
|
|
218
|
+
const rlx = x1;
|
|
219
|
+
const rlw = sx + w - 2 - x1;
|
|
220
|
+
ctx.fillStyle = "#8A7454"; // stringer body
|
|
221
|
+
ctx.fillRect(rlx, bandTop, rlw, 4);
|
|
222
|
+
ctx.fillStyle = "#EDE6D2"; // tread cap
|
|
223
|
+
ctx.fillRect(rlx, bandTop, rlw, 2);
|
|
224
|
+
ctx.fillStyle = "#F8F2E0"; // lit nosing
|
|
225
|
+
ctx.fillRect(rlx, bandTop, rlw, 1);
|
|
226
|
+
ctx.fillStyle = "#2A2018"; // shaded stringer underside edge
|
|
227
|
+
ctx.fillRect(rlx, bandTop + 4, rlw, 1);
|
|
228
|
+
// Newel posts at both ends, drawn after the stair so they stand proud of it.
|
|
229
|
+
// The baluster loop now covers i = 1..n, so the only bare ends left are the
|
|
230
|
+
// foot of the rail and the far end of the top stair. Each newel runs from the
|
|
231
|
+
// handrail's height at that end down into the deck it is planted in.
|
|
232
|
+
const newel = (px, top, bottom) => {
|
|
233
|
+
ctx.fillStyle = "#5A3E28";
|
|
234
|
+
ctx.fillRect(px - 1, top, 2, Math.max(1, bottom - top));
|
|
235
|
+
ctx.fillStyle = "#8A6440"; // lit cap, matches the handrail highlight
|
|
236
|
+
ctx.fillRect(px - 1, top, 2, 1);
|
|
237
|
+
};
|
|
238
|
+
newel(railEnd, railY(railEnd), bandTop + 4);
|
|
239
|
+
newel(x0, railY(x0), Math.round(line(x0)) + depth);
|
|
240
|
+
}
|
|
241
|
+
/** A single elevator car graphic, drawn at (0,0) into a w×floorH rect, carrying
|
|
242
|
+
* `riders` passengers, their faces picked by the cab's seed (the gallery and
|
|
243
|
+
* the atlas; the game draws its riders as themselves, `cabGraphics.ts`, from
|
|
244
|
+
* the same back, slots and front). `arrow` is the direction lantern (null when idle) and
|
|
245
|
+
* `full` flags a car at capacity. `kind` dresses the cab per elevator type
|
|
246
|
+
* (anything but service/express renders the standard cab). The car is its own
|
|
247
|
+
* Excalibur Actor that the engine moves along the shaft (and swaps as it
|
|
248
|
+
* loads / changes direction). The board's warm brass-and-walnut cab. */
|
|
249
|
+
function drawCar(ctx, seed, w, floorH, riders, arrow = null, full = false, kind = "elevatorStandard") {
|
|
250
|
+
drawCarBack(ctx, w, floorH, kind);
|
|
251
|
+
// The cab is the back; its riders are the furniture, and the door frames,
|
|
252
|
+
// the center seam, the FULL bar and the lantern drawn over them are the
|
|
253
|
+
// front (depth layers, `pixelSprites/layers.ts`). The floor band stays on
|
|
254
|
+
// the back: the riders stand on it (#999).
|
|
255
|
+
layerBreak(ctx);
|
|
256
|
+
const cw = Math.max(1, Math.round(w));
|
|
257
|
+
const rc = Math.max(0, Math.floor(riders));
|
|
258
|
+
for (let p = 0; p < rc; p++) {
|
|
259
|
+
const rx = cabRiderX(cw, rc, p);
|
|
260
|
+
if (rx === null)
|
|
261
|
+
break;
|
|
262
|
+
personRider(ctx, rx, cabRiderFoot(floorH), (p * 13 + seed) | 0);
|
|
263
|
+
}
|
|
264
|
+
layerEnd(ctx);
|
|
265
|
+
drawCarFront(ctx, w, floorH, arrow, full);
|
|
266
|
+
}
|
|
267
|
+
/** Where rider `p` of `rc` stands in a cab `cw` pixels wide: one per
|
|
268
|
+
* passenger up to the cab's room (`cabFit`), packed tighter as the car fills
|
|
269
|
+
* so a crowded cab reads at a glance; null past the cab's far wall. */
|
|
270
|
+
function cabRiderX(cw, rc, p) {
|
|
271
|
+
const gap = Math.max(RIDER_STEP, Math.min(7, (cw - 8) / rc));
|
|
272
|
+
const rx = 3 + p * gap;
|
|
273
|
+
return rx > cw - 5 ? null : rx; // never overflow the cab
|
|
274
|
+
}
|
|
275
|
+
/** The line a cab's riders stand on: the cab floor, at their size on the
|
|
276
|
+
* floor. */
|
|
277
|
+
function cabRiderFoot(floorH) {
|
|
278
|
+
return floorH - 3;
|
|
279
|
+
}
|
|
280
|
+
/** The back of a cab: its frame, interior and kind band, under the riders. */
|
|
281
|
+
function drawCarBack(ctx, w, floorH, kind = "elevatorStandard") {
|
|
282
|
+
// Per-kind cab dressing, keyed to the catalog palette so the cab echoes its
|
|
283
|
+
// shaft and toolbar identity. All three cabs share the warm brass-and-walnut
|
|
284
|
+
// read; the kind cue is carried by the interior tint and a distinct
|
|
285
|
+
// bottom-edge band (service hazard plate, express livery), so no single
|
|
286
|
+
// channel has to carry it. The top edge stays reserved for the FULL bar and
|
|
287
|
+
// the direction lantern on every kind.
|
|
288
|
+
const svc = kind === "elevatorService";
|
|
289
|
+
const express = kind === "elevatorExpress";
|
|
290
|
+
// Always a real color (unused on the standard path) so no branch can ever
|
|
291
|
+
// feed shade() an empty string, which canvas would swallow silently.
|
|
292
|
+
const accent = facilityColor(kind);
|
|
293
|
+
const cw = Math.max(1, Math.round(w));
|
|
294
|
+
const midX = Math.round(cw / 2);
|
|
295
|
+
// Cab frame, then the warm walnut interior with a brass ceiling rail. Service
|
|
296
|
+
// reads as a grayer staff freight cab; express keeps the walnut interior but
|
|
297
|
+
// wears its blue livery band below.
|
|
298
|
+
let cabFrame = "#4A4238";
|
|
299
|
+
if (svc)
|
|
300
|
+
cabFrame = "#54584C";
|
|
301
|
+
else if (express)
|
|
302
|
+
cabFrame = "#3A4048";
|
|
303
|
+
ctx.fillStyle = cabFrame;
|
|
304
|
+
ctx.fillRect(1, 1, cw - 2, floorH - 2);
|
|
305
|
+
ctx.fillStyle = express ? "#5A6472" : "#6A6E62"; // frame top rail
|
|
306
|
+
ctx.fillRect(1, 1, cw - 2, 1);
|
|
307
|
+
ctx.fillStyle = svc ? "#7C8072" : "#6B4A2B"; // walnut interior (gray-green for service)
|
|
308
|
+
ctx.fillRect(3, 3, cw - 6, floorH - 6);
|
|
309
|
+
ctx.fillStyle = "#C9A24B"; // brass ceiling rail
|
|
310
|
+
ctx.fillRect(3, 3, cw - 6, 1);
|
|
311
|
+
// Warm ceiling glow dot.
|
|
312
|
+
ctx.fillStyle = "rgba(248,226,180,0.5)";
|
|
313
|
+
ctx.fillRect(midX - 2, 3, 4, 2);
|
|
314
|
+
ctx.fillStyle = "#F8E2B4";
|
|
315
|
+
ctx.fillRect(midX - 1, 3, 2, 1);
|
|
316
|
+
if (svc) {
|
|
317
|
+
// Hazard-striped kick plate across the cab bottom: the staff-only cue.
|
|
318
|
+
ctx.fillStyle = shade(accent, -16);
|
|
319
|
+
ctx.fillRect(2, floorH - 5, cw - 4, 3);
|
|
320
|
+
ctx.fillStyle = "#bfa04a";
|
|
321
|
+
for (let r = 0; r < 3; r++) {
|
|
322
|
+
// Bound each 2px stripe to the plate's right edge at x = w-2, which a
|
|
323
|
+
// fractional w (the gallery's scaled cabs) would otherwise let it cross.
|
|
324
|
+
for (let x = 2 + ((r + 2) % 4); x <= cw - 4; x += 4) {
|
|
325
|
+
ctx.fillRect(x, floorH - 5 + r, 2, 1);
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
else if (express) {
|
|
330
|
+
// Solid express-blue band with a light pinstripe: the shuttle livery.
|
|
331
|
+
ctx.fillStyle = shade(accent, 20);
|
|
332
|
+
ctx.fillRect(2, floorH - 5, cw - 4, 3);
|
|
333
|
+
ctx.fillStyle = shade(accent, 120);
|
|
334
|
+
ctx.fillRect(2, floorH - 5, cw - 4, 1);
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
/** The front of a cab, over its riders: the door frames, the center seam,
|
|
338
|
+
* the FULL bar and the direction lantern. */
|
|
339
|
+
function drawCarFront(ctx, w, floorH, arrow = null, full = false) {
|
|
340
|
+
const cw = Math.max(1, Math.round(w));
|
|
341
|
+
// Door frames + the central seam, drawn over the riders so the cab reads as
|
|
342
|
+
// an enclosed car.
|
|
343
|
+
ctx.fillStyle = "rgba(40,44,54,0.24)";
|
|
344
|
+
ctx.fillRect(2, 2, 1, floorH - 4);
|
|
345
|
+
ctx.fillRect(cw - 3, 2, 1, floorH - 4);
|
|
346
|
+
ctx.fillStyle = "rgba(40,44,54,0.5)";
|
|
347
|
+
ctx.fillRect(cw / 2 - 0.5, 3, 1, floorH - 5);
|
|
348
|
+
// FULL: a red bar across the top edge when the cab is at capacity.
|
|
349
|
+
if (full) {
|
|
350
|
+
ctx.fillStyle = "#ff4d4d";
|
|
351
|
+
ctx.fillRect(2, 1, cw - 4, 2);
|
|
352
|
+
}
|
|
353
|
+
// Direction lantern: a bright chevron near the top, only while the car moves.
|
|
354
|
+
if (arrow) {
|
|
355
|
+
const cxp = cw / 2;
|
|
356
|
+
const s = Math.max(1.5, Math.min(3, cw * 0.12));
|
|
357
|
+
const ty = full ? 4 : 2.5; // sit below the FULL bar when both show
|
|
358
|
+
ctx.fillStyle = arrow === "up" ? "#7be88a" : "#ffab5e";
|
|
359
|
+
ctx.beginPath();
|
|
360
|
+
if (arrow === "up") {
|
|
361
|
+
ctx.moveTo(cxp, ty);
|
|
362
|
+
ctx.lineTo(cxp - s, ty + s);
|
|
363
|
+
ctx.lineTo(cxp + s, ty + s);
|
|
364
|
+
}
|
|
365
|
+
else {
|
|
366
|
+
ctx.moveTo(cxp, ty + s);
|
|
367
|
+
ctx.lineTo(cxp - s, ty);
|
|
368
|
+
ctx.lineTo(cxp + s, ty);
|
|
369
|
+
}
|
|
370
|
+
ctx.closePath();
|
|
371
|
+
ctx.fill();
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
export { cabRiderFoot, cabRiderX, drawCar, drawCarBack, drawCarFront, drawTransport };
|
|
376
|
+
//# sourceMappingURL=transport.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transport.js","sources":["../../../src/render/sprites/transport.ts"],"sourcesContent":["import { isElevatorKind } from \"../../presentation/viewKinds\";\nimport { facilityColor } from \"../../presentation/facilityPresentation\";\nimport type { FacilityKind } from \"../../shared/types\";\nimport type { TransportView } from \"../../simport/view\";\nimport { personRider } from \"../pixelSprites/common\";\nimport { layerBreak, layerEnd } from \"../pixelSprites/layers\";\nimport { RIDER_STEP, type CarArrow } from \"../carIndicator\";\nimport { shade, shadeAlpha } from \"./common\";\nimport { drawEscalatorHalfTurn, drawEscalatorRun, drawEscalatorSwitchback } from \"./escalator\";\nimport { drawSpiralStair } from \"./spiralStair\";\n\n// ---- Transport ----------------------------------------------------------\n\nexport function drawTransport(\n ctx: CanvasRenderingContext2D,\n t: TransportView,\n sx: number,\n topY: number,\n w: number,\n floorH: number,\n /** Whether this one-story flight stands beside a venue and winds\n * (`venueFlights.ts`): a spiral stair, or an escalator that turns back\n * halfway up. Ignored for an elevator and for a flight out of a tall lobby,\n * which winds anyway. */\n winds = false,\n): void {\n const color = facilityColor(t.kind);\n const height = (t.top - t.bottom + 1) * floorH;\n\n // NOTE: this draws only the *static* structure. Everything that moves\n // (elevator cars, stair/escalator climbers) is a separate Excalibur Actor\n // positioned by the engine — see TowerEngine's dynamic layer.\n\n if (t.kind === \"stairs\") {\n // No solid background — as in the original, stairs are an open structure you\n // see the tower *through*; only the treads/handrail are drawn (in front of\n // rooms via the engine's z-order). One FLIGHT per connected floor pair: the\n // top band is just the arrival landing, so a two-floor stairway draws\n // exactly one staircase rising one floor to a landing on the second-floor\n // deck, not two stacked ones.\n // A flight out of a tall lobby (#308) climbs the whole hall, as the\n // original's two- and three-story stairs do: a spiral up the hall, since\n // one straight flight that tall reads as a ladder.\n // Beside a venue in Modern, a one-story flight is a spiral too\n // (`venueFlights.ts`).\n const span = t.top - t.bottom;\n if (span > 1 || (winds && span === 1)) {\n drawSpiralStair(ctx, sx, w, topY + floorH, topY + (span + 1) * floorH, span);\n return;\n }\n for (let fl = 1; fl <= span; fl++) {\n // Each flight is confined to band `fl` (the departure floor's band); the\n // top band stays the arrival landing so a two-floor stairway never draws\n // a second stacked flight. The engine's own routed climbers ride over it.\n drawStairFlight(ctx, sx, w, topY + fl * floorH, topY + (fl + 1) * floorH);\n }\n return;\n }\n\n if (t.kind === \"escalator\") {\n // Open structure like the stairs — no solid backing, you see the tower\n // behind it. One diagonal run per floor pair, confined to the departure\n // band, rising to the second-floor landing (the top band is the landing).\n // Out of a tall lobby (#308), a switchback up the whole hall.\n // Beside a venue in Modern, a one-story escalator turns back halfway up\n // (`venueFlights.ts`).\n const span = t.top - t.bottom;\n if (span > 1) {\n drawEscalatorSwitchback(ctx, sx, w, topY, floorH, span);\n return;\n }\n if (winds && span === 1) {\n drawEscalatorHalfTurn(ctx, sx, w, topY + floorH, topY + 2 * floorH);\n return;\n }\n for (let fl = 1; fl <= span; fl++) {\n drawEscalatorRun(ctx, sx, w, topY + fl * floorH, topY + (fl + 1) * floorH);\n }\n return;\n }\n\n if (isElevatorKind(t.kind)) {\n // Shaft backing tinted by elevator type, with rails and floor stops.\n // Standard/service draw an OPAQUE dark column. The express is a see-through\n // glass shaft in the retail game (harness pixel check: the express column\n // reads statistically like the office floor behind it),\n // so its backing is a low-alpha tint the rooms and people show through. The\n // rails, stop lines, floor numbers, motor caps and car are still drawn.\n const express = t.kind === \"elevatorExpress\";\n if (express) {\n ctx.fillStyle = shadeAlpha(color, -34, 0.35); // express glass backing\n } else {\n ctx.fillStyle = shade(color, -34);\n }\n ctx.fillRect(sx, topY, w, height);\n ctx.fillStyle = \"rgba(0,0,0,0.5)\";\n ctx.fillRect(sx + 1, topY, 1, height);\n ctx.fillRect(sx + w - 2, topY, 1, height);\n // Warm inner guide rails give the opaque shafts depth. Skipped on express\n // so nothing opaque narrows the see-through glass column.\n if (!express) {\n ctx.fillStyle = \"#3A3630\";\n ctx.fillRect(sx + 3, topY, 2, height);\n ctx.fillRect(sx + w - 5, topY, 2, height);\n }\n // Per-floor stop lines painted on the shaft backing, as in the original.\n // Express elevators skip floors; like the original, a floor the car doesn't\n // stop at shows no stop line, the shaft just passes through.\n const skip = t.skipFloors && t.skipFloors.length ? new Set(t.skipFloors) : null;\n for (let fl = 0; fl <= t.top - t.bottom; fl++) {\n const num = t.top - fl; // band fl counts down from the top floor\n if (skip && skip.has(num)) continue; // not a stop, leave the shaft blank here\n const fy = topY + fl * floorH;\n ctx.fillStyle = \"rgba(255,255,255,0.05)\";\n ctx.fillRect(sx + 1, fy, w - 2, 1); // per-floor stop line\n }\n // The floor NUMBERS are not baked here: this bitmap is cached at logical size\n // (quality 1 in towerReconcile) and upscaled nearest-neighbor (pixelArt), so\n // a baked label garbles under a fractional device-pixel ratio. They are drawn\n // fresh each frame in screen space by towerShaftNumbers.drawShaftNumbers\n // (wired through towerOverlay.drawOverlay) instead, which renders at the real\n // display resolution and stays crisp at any zoom.\n // Machine housings cap the shaft top and bottom (where the extend-taller\n // arrows also live in the original — that interaction is a planned\n // follow-up). The board's darker motor gray.\n const mh = 5;\n for (const my of [topY, topY + height - mh]) {\n ctx.fillStyle = \"#3A3E44\";\n ctx.fillRect(sx, my, w, mh);\n ctx.fillStyle = \"#4E545C\";\n ctx.fillRect(sx, my, w, 1);\n ctx.fillStyle = \"rgba(0,0,0,0.45)\";\n ctx.fillRect(sx, my + mh - 1, w, 1);\n for (let bx = sx + 2; bx < sx + w - 1; bx += 4) ctx.fillRect(bx, my + 2, 1, 1); // bolts\n }\n }\n}\n\n/** One warm-tan stair flight: even treads over dark risers on a solid diagonal\n * stringer, a walnut handrail on balusters ending in a newel post at each end,\n * and a top arrival stair the flight lands on, all sitting on the floor line\n * (the departure deck below is drawn by the floor behind the flight), confined\n * to the band `[bandTop, bandBottom)`\n * (the departure floor's band) so the arrival band above stays the landing,\n * never a second stacked flight. The flight is drawn strictly inside\n * `[sx, sx + w]` so it never overpaints a neighbor. Structure only, NO baked\n * climber: the engine's routed sims ride over it as separate actors, so an empty\n * tower shows a bare, unoccupied flight. Integer coordinates. */\nfunction drawStairFlight(ctx: CanvasRenderingContext2D, sx: number, w: number, bandTop: number, bandBottom: number): void {\n const railH = 9; // handrail height above a tread\n const depth = 7; // stringer thickness under the treads\n const x0 = sx + 10; // bottom (lower) landing sits on the left\n const x1 = sx + w - 12; // top (upper) landing sits on the right\n if (x1 - x0 < 8) return; // too narrow to lay a readable flight (defensive)\n // Keep the whole flight inside the band: the stringer drops `depth` below the\n // incline, so the incline bottom clears the band bottom by that much (a flight\n // that leaked past bandBottom would paint onto the floor below).\n const yBot = bandBottom - depth - 2; // lower deck (departure), near the floor line\n // The top tread and top landing reach the arrival deck (bandTop) so the flight\n // visually connects to the second floor. The upper band is itself a landing, so\n // meeting bandTop is correct; the handrail is clamped below so nothing rises\n // past the deck into a \"second flight\" read.\n const yTop = bandTop + 2;\n if (yBot - yTop < 6) return; // band too short for a readable flight\n const n = 6; // steps\n const treadW = (x1 - x0) / n;\n const riseH = (yBot - yTop) / n;\n // The smooth incline line (used for the stringer underside and the handrail)\n // and the stepped top surface (flat within each tread, jumping at the front).\n const line = (x: number) => yBot - ((x - x0) / (x1 - x0)) * (yBot - yTop);\n const stepTopY = (x: number) => Math.round(yBot - Math.min(n - 1, Math.floor((x - x0) / treadW)) * riseH) - 2;\n // Soft drop shadow just under the stringer. Height 1 so the deepest column (at\n // x0, where line === yBot) ends on bandBottom - 1 and never paints the\n // bandBottom row, which belongs to the floor below.\n ctx.fillStyle = \"rgba(0,0,0,0.28)\";\n for (let x = x0; x < x1; x++) ctx.fillRect(x + 1, Math.round(line(x)) + depth + 1, 1, 1);\n // Solid body: from the stepped top surface down to a straight diagonal stringer\n // underside, so the treads read as steps on one continuous stringer.\n for (let x = x0; x <= x1; x++) {\n const top = stepTopY(x);\n const bot = Math.round(line(x)) + depth;\n ctx.fillStyle = \"#8A7454\"; // riser/stringer body\n ctx.fillRect(x, top, 1, Math.max(1, bot - top));\n ctx.fillStyle = \"#2A2018\"; // shaded stringer underside edge\n ctx.fillRect(x, bot, 1, 2);\n }\n // Tread caps (warm tan, lit nosing) and a dark riser face at each step front.\n for (let i = 0; i < n; i++) {\n const l = Math.round(x0 + i * treadW);\n const r = Math.round(x0 + (i + 1) * treadW);\n const ty = Math.round(yBot - i * riseH) - 2;\n ctx.fillStyle = \"#EDE6D2\";\n ctx.fillRect(l, ty, r - l + 1, 2);\n ctx.fillStyle = \"#F8F2E0\";\n ctx.fillRect(l, ty, r - l + 1, 1);\n const nty = Math.round(yBot - (i + 1) * riseH) - 2; // next tread top (higher)\n ctx.fillStyle = \"#241E14\";\n ctx.fillRect(r, nty, 1, Math.max(1, ty - nty));\n }\n // Walnut handrail on balusters, riding parallel above the flight. It follows\n // the incline to x1 (the front of the top stair), then runs flat across that\n // stair to a newel at its right end, so the rail terminates in a post rather\n // than in mid-air. Rising past bandTop is intended: as in the original, a\n // flight breaks the floor line it arrives at.\n const railEnd = sx + w - 3; // last column of the top stair\n const railY = (x: number) => Math.round(line(Math.min(x, x1))) - railH;\n ctx.fillStyle = \"#5A3E28\";\n for (let i = 1; i <= n; i++) {\n // i = n lands on x1, the joint between the top stair and the one below it.\n const bx = Math.round(x0 + i * treadW);\n const ry = railY(bx);\n ctx.fillRect(bx, ry, 1, Math.max(1, Math.round(line(bx)) - ry));\n }\n for (let x = x0; x <= railEnd; x++) {\n const ry = railY(x);\n ctx.fillStyle = \"#6B4A2B\";\n ctx.fillRect(x, ry, 1, 2);\n ctx.fillStyle = \"#8A6440\";\n ctx.fillRect(x, ry, 1, 1);\n }\n // The top stair: the tread the flight arrives on, sitting on bandTop so it\n // lands flush with the second floor. Drawn in the same colors as every other\n // step (cap, lit nosing, stringer body, shaded underside) so it reads as the\n // last stair rather than a differently shaded landing. The departure end gets\n // nothing: a stub poking out to the left of the bottom step reads as a broken\n // tread, and the deck it would sit on is already drawn by the floor behind it.\n const rlx = x1;\n const rlw = sx + w - 2 - x1;\n ctx.fillStyle = \"#8A7454\"; // stringer body\n ctx.fillRect(rlx, bandTop, rlw, 4);\n ctx.fillStyle = \"#EDE6D2\"; // tread cap\n ctx.fillRect(rlx, bandTop, rlw, 2);\n ctx.fillStyle = \"#F8F2E0\"; // lit nosing\n ctx.fillRect(rlx, bandTop, rlw, 1);\n ctx.fillStyle = \"#2A2018\"; // shaded stringer underside edge\n ctx.fillRect(rlx, bandTop + 4, rlw, 1);\n // Newel posts at both ends, drawn after the stair so they stand proud of it.\n // The baluster loop now covers i = 1..n, so the only bare ends left are the\n // foot of the rail and the far end of the top stair. Each newel runs from the\n // handrail's height at that end down into the deck it is planted in.\n const newel = (px: number, top: number, bottom: number): void => {\n ctx.fillStyle = \"#5A3E28\";\n ctx.fillRect(px - 1, top, 2, Math.max(1, bottom - top));\n ctx.fillStyle = \"#8A6440\"; // lit cap, matches the handrail highlight\n ctx.fillRect(px - 1, top, 2, 1);\n };\n newel(railEnd, railY(railEnd), bandTop + 4);\n newel(x0, railY(x0), Math.round(line(x0)) + depth);\n}\n\n/** A single elevator car graphic, drawn at (0,0) into a w×floorH rect, carrying\n * `riders` passengers, their faces picked by the cab's seed (the gallery and\n * the atlas; the game draws its riders as themselves, `cabGraphics.ts`, from\n * the same back, slots and front). `arrow` is the direction lantern (null when idle) and\n * `full` flags a car at capacity. `kind` dresses the cab per elevator type\n * (anything but service/express renders the standard cab). The car is its own\n * Excalibur Actor that the engine moves along the shaft (and swaps as it\n * loads / changes direction). The board's warm brass-and-walnut cab. */\nexport function drawCar(\n ctx: CanvasRenderingContext2D,\n seed: number,\n w: number,\n floorH: number,\n riders: number,\n arrow: CarArrow = null,\n full = false,\n kind: FacilityKind = \"elevatorStandard\",\n): void {\n drawCarBack(ctx, w, floorH, kind);\n // The cab is the back; its riders are the furniture, and the door frames,\n // the center seam, the FULL bar and the lantern drawn over them are the\n // front (depth layers, `pixelSprites/layers.ts`). The floor band stays on\n // the back: the riders stand on it (#999).\n layerBreak(ctx);\n const cw = Math.max(1, Math.round(w));\n const rc = Math.max(0, Math.floor(riders));\n for (let p = 0; p < rc; p++) {\n const rx = cabRiderX(cw, rc, p);\n if (rx === null) break;\n personRider(ctx, rx, cabRiderFoot(floorH), (p * 13 + seed) | 0);\n }\n layerEnd(ctx);\n drawCarFront(ctx, w, floorH, arrow, full);\n}\n\n/** Where rider `p` of `rc` stands in a cab `cw` pixels wide: one per\n * passenger up to the cab's room (`cabFit`), packed tighter as the car fills\n * so a crowded cab reads at a glance; null past the cab's far wall. */\nexport function cabRiderX(cw: number, rc: number, p: number): number | null {\n const gap = Math.max(RIDER_STEP, Math.min(7, (cw - 8) / rc));\n const rx = 3 + p * gap;\n return rx > cw - 5 ? null : rx; // never overflow the cab\n}\n\n/** The line a cab's riders stand on: the cab floor, at their size on the\n * floor. */\nexport function cabRiderFoot(floorH: number): number {\n return floorH - 3;\n}\n\n/** The back of a cab: its frame, interior and kind band, under the riders. */\nexport function drawCarBack(ctx: CanvasRenderingContext2D, w: number, floorH: number, kind: FacilityKind = \"elevatorStandard\"): void {\n // Per-kind cab dressing, keyed to the catalog palette so the cab echoes its\n // shaft and toolbar identity. All three cabs share the warm brass-and-walnut\n // read; the kind cue is carried by the interior tint and a distinct\n // bottom-edge band (service hazard plate, express livery), so no single\n // channel has to carry it. The top edge stays reserved for the FULL bar and\n // the direction lantern on every kind.\n const svc = kind === \"elevatorService\";\n const express = kind === \"elevatorExpress\";\n // Always a real color (unused on the standard path) so no branch can ever\n // feed shade() an empty string, which canvas would swallow silently.\n const accent = facilityColor(kind);\n const cw = Math.max(1, Math.round(w));\n const midX = Math.round(cw / 2);\n // Cab frame, then the warm walnut interior with a brass ceiling rail. Service\n // reads as a grayer staff freight cab; express keeps the walnut interior but\n // wears its blue livery band below.\n let cabFrame = \"#4A4238\";\n if (svc) cabFrame = \"#54584C\";\n else if (express) cabFrame = \"#3A4048\";\n ctx.fillStyle = cabFrame;\n ctx.fillRect(1, 1, cw - 2, floorH - 2);\n ctx.fillStyle = express ? \"#5A6472\" : \"#6A6E62\"; // frame top rail\n ctx.fillRect(1, 1, cw - 2, 1);\n ctx.fillStyle = svc ? \"#7C8072\" : \"#6B4A2B\"; // walnut interior (gray-green for service)\n ctx.fillRect(3, 3, cw - 6, floorH - 6);\n ctx.fillStyle = \"#C9A24B\"; // brass ceiling rail\n ctx.fillRect(3, 3, cw - 6, 1);\n // Warm ceiling glow dot.\n ctx.fillStyle = \"rgba(248,226,180,0.5)\";\n ctx.fillRect(midX - 2, 3, 4, 2);\n ctx.fillStyle = \"#F8E2B4\";\n ctx.fillRect(midX - 1, 3, 2, 1);\n if (svc) {\n // Hazard-striped kick plate across the cab bottom: the staff-only cue.\n ctx.fillStyle = shade(accent, -16);\n ctx.fillRect(2, floorH - 5, cw - 4, 3);\n ctx.fillStyle = \"#bfa04a\";\n for (let r = 0; r < 3; r++) {\n // Bound each 2px stripe to the plate's right edge at x = w-2, which a\n // fractional w (the gallery's scaled cabs) would otherwise let it cross.\n for (let x = 2 + ((r + 2) % 4); x <= cw - 4; x += 4) {\n ctx.fillRect(x, floorH - 5 + r, 2, 1);\n }\n }\n } else if (express) {\n // Solid express-blue band with a light pinstripe: the shuttle livery.\n ctx.fillStyle = shade(accent, 20);\n ctx.fillRect(2, floorH - 5, cw - 4, 3);\n ctx.fillStyle = shade(accent, 120);\n ctx.fillRect(2, floorH - 5, cw - 4, 1);\n }\n}\n\n/** The front of a cab, over its riders: the door frames, the center seam,\n * the FULL bar and the direction lantern. */\nexport function drawCarFront(ctx: CanvasRenderingContext2D, w: number, floorH: number, arrow: CarArrow = null, full = false): void {\n const cw = Math.max(1, Math.round(w));\n // Door frames + the central seam, drawn over the riders so the cab reads as\n // an enclosed car.\n ctx.fillStyle = \"rgba(40,44,54,0.24)\";\n ctx.fillRect(2, 2, 1, floorH - 4);\n ctx.fillRect(cw - 3, 2, 1, floorH - 4);\n ctx.fillStyle = \"rgba(40,44,54,0.5)\";\n ctx.fillRect(cw / 2 - 0.5, 3, 1, floorH - 5);\n // FULL: a red bar across the top edge when the cab is at capacity.\n if (full) {\n ctx.fillStyle = \"#ff4d4d\";\n ctx.fillRect(2, 1, cw - 4, 2);\n }\n // Direction lantern: a bright chevron near the top, only while the car moves.\n if (arrow) {\n const cxp = cw / 2;\n const s = Math.max(1.5, Math.min(3, cw * 0.12));\n const ty = full ? 4 : 2.5; // sit below the FULL bar when both show\n ctx.fillStyle = arrow === \"up\" ? \"#7be88a\" : \"#ffab5e\";\n ctx.beginPath();\n if (arrow === \"up\") {\n ctx.moveTo(cxp, ty);\n ctx.lineTo(cxp - s, ty + s);\n ctx.lineTo(cxp + s, ty + s);\n } else {\n ctx.moveTo(cxp, ty + s);\n ctx.lineTo(cxp - s, ty);\n ctx.lineTo(cxp + s, ty);\n }\n ctx.closePath();\n ctx.fill();\n }\n}\n"],"names":[],"mappings":";;;;;;;;;AAWA;AAEM,SAAU,aAAa,CAC3B,GAA6B,EAC7B,CAAgB,EAChB,EAAU,EACV,IAAY,EACZ,CAAS,EACT,MAAc;AACd;;;AAG0B;AAC1B,KAAK,GAAG,KAAK,EAAA;IAEb,MAAM,KAAK,GAAG,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC;AACnC,IAAA,MAAM,MAA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,EAAE;QACf,GAAG,CAAC,IAAI,EAAE;IACZ;AACF;;"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { UnitView } from "../simport/view";
|
|
2
|
+
import type { DrawCtx } from "./sprites/common";
|
|
3
|
+
export type { DrawCtx } from "./sprites/common";
|
|
4
|
+
export { AWNING_W, CRANE_H, CRANE_MAST_ANCHOR_X, CRANE_MIN_ROOF_TILES, CRANE_W, craneAnchorTile, craneMastTile, CRANE_REACH_LEFT_TILES, CRANE_REACH_RIGHT_TILES, craneRoof, drawAwning, drawCrane, drawEscapeStairs, drawLobbyEntrance, ENTRANCE_GRAND_LEFT, ENTRANCE_GRAND_RIGHT, ENTRANCE_GRAND_SOLO, ENTRANCE_SERVICE, type EntranceKind, ESCAPE_W, LOBBY_VARIANTS, lobbyVariant, } from "./sprites/structure";
|
|
5
|
+
export { drawGarbageTruck, drawMetroTrain, drawStreetCar } from "./sprites/facilities";
|
|
6
|
+
export { drawCar, drawTransport } from "./sprites/transport";
|
|
7
|
+
/**
|
|
8
|
+
* Procedural sprite drawing. Rather than ship external image assets, every
|
|
9
|
+
* facility is drawn from layered shapes — walls, floors, furniture, windows
|
|
10
|
+
* and signage — to evoke the chunky, detailed pixel look of the 1994 original.
|
|
11
|
+
* Per-unit color variation (seeded by the unit id) keeps rows of identical
|
|
12
|
+
* facilities from reading as one flat color block. All drawing is in screen
|
|
13
|
+
* space.
|
|
14
|
+
*/
|
|
15
|
+
/** Draw a placed room/structure unit into the given screen rectangle. */
|
|
16
|
+
export declare function drawUnit(d: DrawCtx, u: UnitView, x: number, y: number, w: number, h: number): void;
|