@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 @@
|
|
|
1
|
+
{"version":3,"file":"regionGrid.js","sources":["../../src/render/regionGrid.ts"],"sourcesContent":["import { viewWorld } from \"../presentation/viewWorld\";\nimport { FLOOR, TILE } from \"./scale\";\n\n/**\n * The fixed world-space region grid for room composition (CAP-2 of the mobile\n * render-perf spec, `_bmad-output/specs/spec-render-perf-mobile-zoom/`,\n * design in `region-design.md`). Settled room units draw into one cached\n * canvas per region instead of one per unit, so the GPU sees a few dozen\n * textures instead of ~1,635 and its sprite batches stop flushing on texture\n * slots. Pure module, no Excalibur import: the constants and the footprint\n * mapping are unit-tested directly, including the pinned GPU texture-size\n * ceiling (the TRANSPORT_BAND_FLOORS precedent in scale.ts).\n *\n * Region size: 32 tiles x 20 floors = 352 x 880 px. The taller-thinner cut\n * won the upload micro-bench (spec memlog 2026-07-15): it absorbs a drain\n * budget of four full re-uploads per frame with no measurable frame-time\n * change on the software-GL venue, and both pixel sides sit well under the\n * 2048 MAX_TEXTURE_SIZE floor of low-end mobile GPUs.\n */\n\nexport const REGION_TILES = 32;\nexport const REGION_FLOORS = 20;\n\n/** Grid dimensions in regions, from the view's world (the tower catalog's).\n * The lot is 375 tiles x 110 floors, so 12 x 6 regions bound the whole world;\n * only regions holding a settled room ever materialize a canvas. */\nexport function regionCols(): number {\n return Math.ceil(viewWorld().lotWidth / REGION_TILES);\n}\nexport function regionRows(): number {\n const w = viewWorld();\n return Math.ceil((w.maxFloor - w.minFloor + 1) / REGION_FLOORS);\n}\n\n/** Column of the region containing this tile. */\nexport function regionCol(tile: number): number {\n return Math.floor(tile / REGION_TILES);\n}\n\n/** Row of the region containing this floor (rows count up from minFloor). */\nexport function regionRow(floor: number): number {\n return Math.floor((floor - viewWorld().minFloor) / REGION_FLOORS);\n}\n\n/** Stable scalar key for a region cell. */\nexport function regionKey(col: number, row: number): number {\n return row * regionCols() + col;\n}\n\n/** Every region key a unit footprint intersects: floors `floor..floor+floors-1`,\n * tiles `x..x+width-1`. There is no small upper bound: a typical room near a\n * boundary lands in two (corner case four) regions, while the full-lot metro\n * spans every column. Each member region draws the whole unit clipped to its\n * own rect, so the union equals the unclipped draw with no visible seam (the\n * transport-band argument). Ranges clamp to the grid: placement and save\n * import already reject off-lot footprints, but a raw caller must never be\n * handed a key outside `[0, regionCols() * regionRows())`, because column\n * overflow would alias into the next row's keys. */\nexport function regionsOf(floor: number, x: number, width: number, floors: number): number[] {\n const c0 = Math.max(0, regionCol(x));\n const c1 = Math.min(regionCol(x + width - 1), regionCols() - 1);\n const r0 = Math.max(0, regionRow(floor));\n const r1 = Math.min(regionRow(floor + floors - 1), regionRows() - 1);\n const keys: number[] = [];\n for (let r = r0; r <= r1; r++) for (let c = c0; c <= c1; c++) keys.push(regionKey(c, r));\n return keys;\n}\n\n/** World-pixel rectangle of a region: `x, y` is the TOP-LEFT corner (matching\n * the anchor-0,0 actor convention), `w, h` the canvas size. Floor f occupies\n * world y in [-f*FLOOR, -(f-1)*FLOOR), so the region's top edge sits at the\n * top of its highest floor. */\nexport function regionRect(key: number): { x: number; y: number; w: number; h: number } {\n const cols = regionCols();\n const row = Math.floor(key / cols);\n const col = key % cols;\n const topFloor = viewWorld().minFloor + (row + 1) * REGION_FLOORS - 1;\n return {\n x: col * REGION_TILES * TILE,\n y: -topFloor * FLOOR,\n w: REGION_TILES * TILE,\n h: REGION_FLOORS * FLOOR,\n };\n}\n"],"names":[],"mappings":";;;AAGA;;;;;;;;;;;;;;;AAeG;AAEI,MAAM,YAAY,GAAG;AACrB,MAAM,aAAa,GAAG;AAE7B;;AAEqE;SACrD,UAAU,GAAA;IACxB,OAAO,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC,QAAQ,GAAG,YAAY,CAAC;AACvD;SACgB,UAAU,GAAA;AACxB,IAAA,MAAM,CAAC,GAAG,SAAS,EAAE;AACrB,IAAA,OAAO,IAAI,CAAC,I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,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AACxF,IAAA,OAAO,IAAI;AACb;AAEA;;;AAGgC;AAC1B,SAAU,UAAU,CAAC,GAAW,EAAA;AACpC,IAAA,MAAM,IAAI,GAAG,UAAU,EAAE;IACzB,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,GAAG,IAAI,CAAC;AAClC,IAAA,MAAM,GAAG,GAAG,GAAG,GAAG,IAAI;AACtB,IAAA,MAAM,QAAQ,GAAG,SAAS,EAAE,CAAC,QAAQ,GAAG,CAAC,GAAG,GAAG,CAAC,IAAI,aAAa,GAAG,CAAC;IACrE,OAAO;AACL,QAAA,CAAC,EAAE,GAAG,GAAG,YAAY,GAAG,IAAI;AAC5B,QAAA,CAAC,EAAE,CAAC,QAAQ,GAAG,KAAK;QACpB,CAAC,EAAE,YAAY,GAAG,IAAI;QACtB,CAAC,EAAE,aAAa,GAAG,KAAK;KACzB;AACH;;"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { UnitView } from "../simport/view";
|
|
2
|
+
import { type DrawCtx } from "./sprites";
|
|
3
|
+
/**
|
|
4
|
+
* How the web game paints one room into a canvas, shared by the game and the
|
|
5
|
+
* atlas export so the two cannot drift. Settled rooms go through the region
|
|
6
|
+
* compositor (`excalibur/towerRegions.ts`); burning and unbuilt rooms through
|
|
7
|
+
* their own per-frame canvas (`excalibur/towerReconcile.ts` `addRoom`).
|
|
8
|
+
*/
|
|
9
|
+
/** A settled room at (dx, dy) inside a shared canvas: clipped to its own
|
|
10
|
+
* rect (one sprite must never bleed onto a neighbor), with the dead-parking
|
|
11
|
+
* mark over an unchained space. `d.ctx` must already be the target. */
|
|
12
|
+
export declare function paintSettledUnit(d: DrawCtx, u: UnitView, dx: number, dy: number, w: number, h: number, dead: boolean): void;
|
|
13
|
+
/** A burning or unbuilt room into its own `w` x `h` canvas at the origin.
|
|
14
|
+
* The dead-parking mark never applies to an animated state. */
|
|
15
|
+
export declare function paintAnimatedUnit(d: DrawCtx, u: UnitView, w: number, h: number): void;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { drawUnit } from './sprites.js';
|
|
2
|
+
import { drawDeadParkingX } from './sprites/facilities/garage.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* How the web game paints one room into a canvas, shared by the game and the
|
|
6
|
+
* atlas export so the two cannot drift. Settled rooms go through the region
|
|
7
|
+
* compositor (`excalibur/towerRegions.ts`); burning and unbuilt rooms through
|
|
8
|
+
* their own per-frame canvas (`excalibur/towerReconcile.ts` `addRoom`).
|
|
9
|
+
*/
|
|
10
|
+
/** A settled room at (dx, dy) inside a shared canvas: clipped to its own
|
|
11
|
+
* rect (one sprite must never bleed onto a neighbor), with the dead-parking
|
|
12
|
+
* mark over an unchained space. `d.ctx` must already be the target. */
|
|
13
|
+
function paintSettledUnit(d, u, dx, dy, w, h, dead) {
|
|
14
|
+
const ctx = d.ctx;
|
|
15
|
+
ctx.save();
|
|
16
|
+
ctx.beginPath();
|
|
17
|
+
ctx.rect(dx, dy, w, h);
|
|
18
|
+
ctx.clip();
|
|
19
|
+
d.parkingDead = dead;
|
|
20
|
+
drawUnit(d, u, dx, dy, w, h);
|
|
21
|
+
if (dead)
|
|
22
|
+
drawDeadParkingX(ctx, dx, dy, w, h);
|
|
23
|
+
ctx.restore();
|
|
24
|
+
}
|
|
25
|
+
/** A burning or unbuilt room into its own `w` x `h` canvas at the origin.
|
|
26
|
+
* The dead-parking mark never applies to an animated state. */
|
|
27
|
+
function paintAnimatedUnit(d, u, w, h) {
|
|
28
|
+
d.parkingDead = false;
|
|
29
|
+
drawUnit(d, u, 0, 0, w, h);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export { paintAnimatedUnit, paintSettledUnit };
|
|
33
|
+
//# sourceMappingURL=regionPaint.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"regionPaint.js","sources":["../../src/render/regionPaint.ts"],"sourcesContent":["import type { UnitView } from \"../simport/view\";\nimport { drawUnit, type DrawCtx } from \"./sprites\";\nimport { drawDeadParkingX } from \"./sprites/facilities/garage\";\n\n/**\n * How the web game paints one room into a canvas, shared by the game and the\n * atlas export so the two cannot drift. Settled rooms go through the region\n * compositor (`excalibur/towerRegions.ts`); burning and unbuilt rooms through\n * their own per-frame canvas (`excalibur/towerReconcile.ts` `addRoom`).\n */\n\n/** A settled room at (dx, dy) inside a shared canvas: clipped to its own\n * rect (one sprite must never bleed onto a neighbor), with the dead-parking\n * mark over an unchained space. `d.ctx` must already be the target. */\nexport function paintSettledUnit(d: DrawCtx, u: UnitView, dx: number, dy: number, w: number, h: number, dead: boolean): void {\n const ctx = d.ctx;\n ctx.save();\n ctx.beginPath();\n ctx.rect(dx, dy, w, h);\n ctx.clip();\n d.parkingDead = dead;\n drawUnit(d, u, dx, dy, w, h);\n if (dead) drawDeadParkingX(ctx, dx, dy, w, h);\n ctx.restore();\n}\n\n/** A burning or unbuilt room into its own `w` x `h` canvas at the origin.\n * The dead-parking mark never applies to an animated state. */\nexport function paintAnimatedUnit(d: DrawCtx, u: UnitView, w: number, h: number): void {\n d.parkingDead = false;\n drawUnit(d, u, 0, 0, w, h);\n}\n"],"names":[],"mappings":";;;AAIA;;;;;AAKG;AAEH;;AAEwE;AAClE,SAAU,gBAAgB,CAAC,CAAU,EAAE,CAAW,EAAE,EAAU,EAAE,EAAU,EAAE,CAAS,EAAE,CAAS,EAAE,IAAa,EAAA;AACnH,IAAA,MAAM,GAAG,GAAG,CAAC,CAAC,GAAG;IACjB,GAAG,CAAC,IAAI,EAAE;IACV,GAAG,CAAC,SAAS,EAAE;IACf,GAAG,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC;IACtB,GAAG,CAAC,IAAI,EAAE;AACV,IAAA,CAAC,CAAC,WAAW,GAAG,IAAI;AACpB,IAAA,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC;AAC5B,IAAA,IAAI,IAAI;QAAE,gBAAgB,CAAC,GAAG,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC;IAC7C,GAAG,CAAC,OAAO,EAAE;AACf;AAEA;AACgE;AAC1D,SAAU,iBAAiB,CAAC,CAAU,EAAE,CAAW,EAAE,CAAS,EAAE,CAAS,EAAA;AAC7E,IAAA,CAAC,CAAC,WAAW,GAAG,KAAK;AACrB,IAAA,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;AAC5B;;"}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import type { ElevatorQueueView } from "../shared/engineTypes";
|
|
2
|
+
import type { HeatCell, HeatmapMode } from "../shared/engineTypes";
|
|
3
|
+
import type { GameMode, SerializedView, WeatherKind } from "../shared/types";
|
|
4
|
+
import type { BombSearchView, CrowdView, FireResponseView, TowerView } from "../simport/view";
|
|
5
|
+
import type { LobbyHalls } from "./lobbyHalls";
|
|
6
|
+
/**
|
|
7
|
+
* Everything the renderer reads from the simulation, and nothing else (facade
|
|
8
|
+
* slice 3, #1210). `TowerEngine.sim` and the scene modules are typed by this
|
|
9
|
+
* interface, so the compiler lists the read surface.
|
|
10
|
+
*
|
|
11
|
+
* The port's adapter (`PortRenderSim`) fills these members from the Rust
|
|
12
|
+
* engine's frame (`renderSim.types.test.ts` holds it to the interface).
|
|
13
|
+
*
|
|
14
|
+
* Reads are grouped by how often they happen:
|
|
15
|
+
*
|
|
16
|
+
* - Per frame, cheap: `clock`, `tower.revision`, the effect counters, `weather`.
|
|
17
|
+
* - Per frame, memoized by the engine: `crowd.queueView`.
|
|
18
|
+
* - Never per frame: `congestion`. It builds the per-floor congestion map, a
|
|
19
|
+
* walk over every room, and its answer moves with every step, so the
|
|
20
|
+
* engine's memo misses on each running frame (#338). Tests and tools read it.
|
|
21
|
+
* - Per step or per HUD tick: `population` (it walks every room, so it is never
|
|
22
|
+
* read per frame, #1234).
|
|
23
|
+
* - Per scene sync or hourly: `floorHeatmap`, `peakCongestion`, `parkingUsage`,
|
|
24
|
+
* `recyclingFill`, `positionReachable`.
|
|
25
|
+
* - Once per tower: `mode`, `rng.initialSeed`, `view`.
|
|
26
|
+
*
|
|
27
|
+
* Members whose comment starts "View:" are on `SimView` today; those under
|
|
28
|
+
* "Frame slices (3b)" move behind view slices in slice 3b.
|
|
29
|
+
*/
|
|
30
|
+
export interface RenderSim {
|
|
31
|
+
/** The tower's mode, which picks its catalog (`towerCatalog`). */
|
|
32
|
+
readonly mode: GameMode;
|
|
33
|
+
/** View: `header.sceneSeed`. The founding seed the scenery derives from; fixed for a tower's life. */
|
|
34
|
+
readonly rng: {
|
|
35
|
+
readonly initialSeed: number;
|
|
36
|
+
};
|
|
37
|
+
/** View: `header.camera`. The saved camera. Read on construction and on `setSim` to restore it (`adoptCamera`); null means no saved view. */
|
|
38
|
+
readonly view: SerializedView | null;
|
|
39
|
+
/** View: `header.weather`. */
|
|
40
|
+
readonly weather: WeatherKind;
|
|
41
|
+
/** View: `header.population`. */
|
|
42
|
+
readonly population: number;
|
|
43
|
+
/** The clock the renderer reads; `clockView.ts` derives the same answers from `header.minutes`. */
|
|
44
|
+
readonly clock: RenderClock;
|
|
45
|
+
/** View: `tower`, plus the parking set the garage sprites read. */
|
|
46
|
+
readonly tower: RenderTower;
|
|
47
|
+
/** View: `crowd`, plus the elevator queue projection (frame slice). */
|
|
48
|
+
readonly crowd: CrowdView & {
|
|
49
|
+
queueView(tower: RenderTower): ElevatorQueueView;
|
|
50
|
+
};
|
|
51
|
+
/** Effect counters: a change fires one visual. View: `header.fx`. */
|
|
52
|
+
readonly santaFxSeq: number;
|
|
53
|
+
readonly vipFxSeq: number;
|
|
54
|
+
readonly explosionFx: {
|
|
55
|
+
readonly floor: number;
|
|
56
|
+
readonly x: number;
|
|
57
|
+
readonly seq: number;
|
|
58
|
+
};
|
|
59
|
+
/** `x`, when the host has it, is a tile of the stretch of floor the thief
|
|
60
|
+
* prowled, so he runs that tower's rooms on a lot with several. */
|
|
61
|
+
readonly thiefFx: {
|
|
62
|
+
readonly caught: boolean;
|
|
63
|
+
readonly floor: number;
|
|
64
|
+
readonly x?: number;
|
|
65
|
+
readonly seq: number;
|
|
66
|
+
};
|
|
67
|
+
readonly treasureFx: {
|
|
68
|
+
readonly floor: number;
|
|
69
|
+
readonly x: number;
|
|
70
|
+
readonly seq: number;
|
|
71
|
+
};
|
|
72
|
+
/** Classic's bomb search while one runs, else null. View: `header.bombSearch`. */
|
|
73
|
+
readonly bombSearch?: BombSearchView | null;
|
|
74
|
+
/** The guards and the helicopter answering a fire, else null. View: `header.fireResponse`. */
|
|
75
|
+
readonly fireResponse?: FireResponseView | null;
|
|
76
|
+
/** Frame slices (3b): answered by the live engine today. */
|
|
77
|
+
congestion(): number;
|
|
78
|
+
peakCongestion(): number;
|
|
79
|
+
floorHeatmap(mode: HeatmapMode): HeatCell[];
|
|
80
|
+
/** Usage slice: the garage fill for `spots` working spaces, and the recycling fill. */
|
|
81
|
+
parkingUsage(spots: number): number;
|
|
82
|
+
recyclingFill(): number;
|
|
83
|
+
/** Reachability: whether a walker can stand at `floor`, `x`. */
|
|
84
|
+
positionReachable(floor: number, x: number): boolean;
|
|
85
|
+
}
|
|
86
|
+
/** The clock reads the renderer makes. */
|
|
87
|
+
export interface RenderClock {
|
|
88
|
+
/** The game clock in minutes since the start; it moves on every sim step. */
|
|
89
|
+
readonly minutes: number;
|
|
90
|
+
readonly hour: number;
|
|
91
|
+
readonly minute: number;
|
|
92
|
+
readonly minuteOfDay: number;
|
|
93
|
+
isMorning(): boolean;
|
|
94
|
+
isEvening(): boolean;
|
|
95
|
+
isNight(): boolean;
|
|
96
|
+
}
|
|
97
|
+
/** The tower members the renderer reads beyond {@link TowerView}. */
|
|
98
|
+
export interface RenderTower extends TowerView {
|
|
99
|
+
/** Working garage spaces by unit id (usage slice). */
|
|
100
|
+
functionalParkingSet(): ReadonlySet<number>;
|
|
101
|
+
/** The lobby halls taller than one story (#308, #2068). Read once per
|
|
102
|
+
* structure pass, never per frame. */
|
|
103
|
+
tallLobbies(): LobbyHalls;
|
|
104
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"renderSim.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { CatalogFacility } from "../catalog/catalogTypes";
|
|
2
|
+
import type { FacilityKind, Unit, UnitState } from "../shared/types";
|
|
3
|
+
import { type DrawCtx } from "./sprites";
|
|
4
|
+
/**
|
|
5
|
+
* One room or shaft drawn on its own, as the game draws it, for the pages that
|
|
6
|
+
* show the art outside a tower: the sprite gallery (`gallery.ts`) and the Help
|
|
7
|
+
* site's room pages. Both read the engine's catalog for every size and name, so
|
|
8
|
+
* this module takes the catalog's facts through `facts` rather than carrying a
|
|
9
|
+
* table of its own.
|
|
10
|
+
*/
|
|
11
|
+
/** A kind's catalog entry, from whichever catalog the page read. */
|
|
12
|
+
export type FactsOf = (kind: FacilityKind) => CatalogFacility;
|
|
13
|
+
/** How a room is shown: its state, its people and, for a shop or a restaurant,
|
|
14
|
+
* its canon variant. */
|
|
15
|
+
export interface RoomPose {
|
|
16
|
+
state?: UnitState;
|
|
17
|
+
/** Occupants; defaults to the kind's population when occupied, else none. */
|
|
18
|
+
occupants?: number;
|
|
19
|
+
subtype?: string;
|
|
20
|
+
/** The floor the room stands on, which styles a lobby (1 is the ground
|
|
21
|
+
* concourse, anything else the sky-lobby look). */
|
|
22
|
+
floor?: number;
|
|
23
|
+
}
|
|
24
|
+
/** A unit for the painters, standing alone at the left edge of its box. */
|
|
25
|
+
export declare function portraitUnit(facts: FactsOf, kind: FacilityKind, state: UnitState, occupants: number, id?: number, subtype?: string, floorOverride?: number): Unit;
|
|
26
|
+
/**
|
|
27
|
+
* Draw a room centered in the cell `cx, cy, cw, ch`, leaving `captionH` free at
|
|
28
|
+
* the bottom, at up to `mag` whole multiples of the world scale.
|
|
29
|
+
*/
|
|
30
|
+
export declare function drawRoomPortrait(d: DrawCtx, facts: FactsOf, kind: FacilityKind, pose: RoomPose, cx: number, cy: number, cw: number, ch: number, captionH: number, mag: number): void;
|
|
31
|
+
/**
|
|
32
|
+
* Draw a shaft of `kind` over `span` floors of travel (plus the floor it lands
|
|
33
|
+
* on), centered in the cell like a room, with two cars for an elevator.
|
|
34
|
+
*/
|
|
35
|
+
export declare function drawTransportPortrait(d: DrawCtx, facts: FactsOf, kind: FacilityKind, span: number, cx: number, cy: number, cw: number, ch: number, captionH: number, mag: number): void;
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import { fitAtGameScale } from './catalogScale.js';
|
|
2
|
+
import { TILE, FLOOR } from './scale.js';
|
|
3
|
+
import { drawUnit } from './sprites.js';
|
|
4
|
+
import { drawTransport, drawCar } from './sprites/transport.js';
|
|
5
|
+
|
|
6
|
+
/** A unit for the painters, standing alone at the left edge of its box. */
|
|
7
|
+
function portraitUnit(facts, kind, state, occupants, id = 1, subtype, floorOverride) {
|
|
8
|
+
const f = facts(kind);
|
|
9
|
+
return {
|
|
10
|
+
id,
|
|
11
|
+
kind,
|
|
12
|
+
// Lobbies style by floor (1 = the grand ground concourse, else the sky-
|
|
13
|
+
// lobby look). Default to the ground lobby, the one the starter tower
|
|
14
|
+
// builds; `floorOverride` shows the sky-lobby variant too.
|
|
15
|
+
floor: floorOverride ?? (kind === "lobby" ? 1 : 5),
|
|
16
|
+
x: 0,
|
|
17
|
+
width: f.width,
|
|
18
|
+
state,
|
|
19
|
+
satisfaction: 1,
|
|
20
|
+
occupants,
|
|
21
|
+
everOccupied: true,
|
|
22
|
+
pendingIncome: 0,
|
|
23
|
+
label: f.name,
|
|
24
|
+
subtype,
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Draw a room centered in the cell `cx, cy, cw, ch`, leaving `captionH` free at
|
|
29
|
+
* the bottom, at up to `mag` whole multiples of the world scale.
|
|
30
|
+
*/
|
|
31
|
+
function drawRoomPortrait(d, facts, kind, pose, cx, cy, cw, ch, captionH, mag) {
|
|
32
|
+
const f = facts(kind);
|
|
33
|
+
const state = pose.state ?? "occupied";
|
|
34
|
+
// Size the cell by the facility's own floor count so a genuinely multi-
|
|
35
|
+
// floor kind (cinema, party hall, metro) shows at its true proportion
|
|
36
|
+
// instead of squished into one floor. `fitAtGameScale` steps a footprint
|
|
37
|
+
// that overflows the cell down to a smaller whole multiple (and below 1x
|
|
38
|
+
// only when nothing else fits), so a room loses size rather than shape.
|
|
39
|
+
const floors = f.floors ?? 1;
|
|
40
|
+
const box = fitAtGameScale(f.width, floors, cw - 16, ch - captionH, mag);
|
|
41
|
+
const w = box.w;
|
|
42
|
+
const h = box.h;
|
|
43
|
+
// Under 1px is as unusable as zero, and worse than nothing: drawFloor
|
|
44
|
+
// clamps height up to 1, so a sub-pixel box paints a stray hairline. Both
|
|
45
|
+
// are skipped, which is what "a degenerate cell draws nothing" has to mean.
|
|
46
|
+
if (w < 1 || h < 1)
|
|
47
|
+
return;
|
|
48
|
+
// Whole screen pixels for the origin: centering can land on a half pixel,
|
|
49
|
+
// and with the scale a whole multiple, a whole origin is what keeps every
|
|
50
|
+
// magnified world pixel on whole screen pixels instead of antialiasing.
|
|
51
|
+
const x = Math.round(cx + (cw - w) / 2);
|
|
52
|
+
const y = Math.round(cy + (ch - captionH - h) / 2);
|
|
53
|
+
// The painters are FIXED-PIXEL: they draw a 17px cubicle whatever box they
|
|
54
|
+
// are handed, because the game always rasterizes a unit at exactly its
|
|
55
|
+
// world size and lets the camera do the zooming. So magnify the way the
|
|
56
|
+
// camera does, by transforming the context, and hand the painter its world
|
|
57
|
+
// box. Inflating the box instead would grow the room while its furniture
|
|
58
|
+
// stayed put, which is the same wrong-proportion defect the gallery was
|
|
59
|
+
// fixed to stop, just moved from aspect to interior scale.
|
|
60
|
+
const worldW = f.width * TILE;
|
|
61
|
+
const worldH = floors * FLOOR;
|
|
62
|
+
const ctx = d.ctx;
|
|
63
|
+
ctx.save();
|
|
64
|
+
ctx.imageSmoothingEnabled = false;
|
|
65
|
+
ctx.translate(x, y);
|
|
66
|
+
ctx.scale(box.scale, box.scale);
|
|
67
|
+
// Floor strip for context, in world units like everything else here.
|
|
68
|
+
const floorU = portraitUnit(facts, "floor", "occupied", 0, 999);
|
|
69
|
+
const pad = 6 / box.scale;
|
|
70
|
+
// The wedding hall crowns the tower: only its ground story stands on a floor,
|
|
71
|
+
// and the garden above it stands in the open sky.
|
|
72
|
+
const stripH = kind === "weddingHall" ? FLOOR : worldH;
|
|
73
|
+
drawUnit(d, floorU, -pad, worldH - stripH, worldW + pad * 2, stripH);
|
|
74
|
+
const occupants = pose.occupants ?? (state === "occupied" ? f.population : 0);
|
|
75
|
+
drawUnit(d, portraitUnit(facts, kind, state, occupants, 1, pose.subtype, pose.floor), 0, 0, worldW, worldH);
|
|
76
|
+
ctx.restore();
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Draw a shaft of `kind` over `span` floors of travel (plus the floor it lands
|
|
80
|
+
* on), centered in the cell like a room, with two cars for an elevator.
|
|
81
|
+
*/
|
|
82
|
+
function drawTransportPortrait(d, facts, kind, span, cx, cy, cw, ch, captionH, mag) {
|
|
83
|
+
const f = facts(kind);
|
|
84
|
+
// A shaft is drawn as its span plus the floor it lands on, so it is sized
|
|
85
|
+
// as a `span + 1` floor footprint and its per-floor pitch falls out of the
|
|
86
|
+
// fitted box. Same scale as the rooms, so a shaft and a room next to each
|
|
87
|
+
// other are honest about their relative proportions.
|
|
88
|
+
const floors = span + 1;
|
|
89
|
+
const box = fitAtGameScale(f.width, floors, cw - 16, ch - captionH, mag);
|
|
90
|
+
// World units, like the room path: the shaft art is fixed-pixel too, so the
|
|
91
|
+
// context carries the magnification and the painter is handed its true box.
|
|
92
|
+
const worldW = f.width * TILE;
|
|
93
|
+
const floorH = FLOOR;
|
|
94
|
+
const w = box.w;
|
|
95
|
+
// Same degenerate-cell guard as the room path above: sub-pixel counts as
|
|
96
|
+
// empty, because drawFloor clamps a zero height up to a visible 1px.
|
|
97
|
+
if (w < 1 || box.h < 1)
|
|
98
|
+
return;
|
|
99
|
+
const cars = kind.startsWith("elevator") ? 2 : 0;
|
|
100
|
+
const t = {
|
|
101
|
+
id: 1,
|
|
102
|
+
kind,
|
|
103
|
+
x: 0,
|
|
104
|
+
width: f.width,
|
|
105
|
+
bottom: 1,
|
|
106
|
+
top: 1 + span,
|
|
107
|
+
cars,
|
|
108
|
+
carPositions: cars ? [1.4, 1 + span - 0.6] : [],
|
|
109
|
+
carDir: cars ? [1, -1] : [],
|
|
110
|
+
load: 1,
|
|
111
|
+
};
|
|
112
|
+
// Whole screen pixels for the origin, as in the room path.
|
|
113
|
+
const x = Math.round(cx + (cw - w) / 2);
|
|
114
|
+
const topY = Math.round(cy + (ch - captionH - box.h) / 2);
|
|
115
|
+
const ctx = d.ctx;
|
|
116
|
+
ctx.save();
|
|
117
|
+
ctx.imageSmoothingEnabled = false;
|
|
118
|
+
ctx.translate(x, topY);
|
|
119
|
+
ctx.scale(box.scale, box.scale);
|
|
120
|
+
// Backing floors so the shaft reads in context, in world units.
|
|
121
|
+
const pad = 8 / box.scale;
|
|
122
|
+
for (let i = 0; i <= span; i++) {
|
|
123
|
+
drawUnit(d, portraitUnit(facts, "floor", "occupied", 0, 500 + i), -pad, i * floorH, worldW + pad * 2, floorH);
|
|
124
|
+
}
|
|
125
|
+
drawTransport(ctx, t, 0, 0, worldW, floorH);
|
|
126
|
+
// Elevators also show their cars so the per-kind cab dressing (standard,
|
|
127
|
+
// service, express) is visible.
|
|
128
|
+
for (let i = 0; i < cars; i++) {
|
|
129
|
+
ctx.save();
|
|
130
|
+
// Whole world units so the cab's 1px dressing rows (hazard stripes,
|
|
131
|
+
// livery pinstripe) sit on the world grid. With a whole origin and a
|
|
132
|
+
// whole-multiple scale they land on whole screen pixels too. Only a cell
|
|
133
|
+
// too narrow for 1x (a narrow phone) scales by a fraction and softens them.
|
|
134
|
+
ctx.translate(0, Math.round((t.top - t.carPositions[i]) * floorH));
|
|
135
|
+
drawCar(ctx, i * 7 + 1, worldW, floorH, i === 0 ? 2 : 0, i === 0 ? "up" : "down", false, kind);
|
|
136
|
+
ctx.restore();
|
|
137
|
+
}
|
|
138
|
+
ctx.restore();
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
export { drawRoomPortrait, drawTransportPortrait, portraitUnit };
|
|
142
|
+
//# sourceMappingURL=roomPortrait.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"roomPortrait.js","sources":["../../src/render/roomPortrait.ts"],"sourcesContent":["import type { CatalogFacility } from \"../catalog/catalogTypes\";\nimport type { FacilityKind, Transport, Unit, UnitState } from \"../shared/types\";\nimport { fitAtGameScale } from \"./catalogScale\";\nimport { FLOOR, TILE } from \"./scale\";\nimport { drawCar, drawTransport, drawUnit, type DrawCtx } from \"./sprites\";\n\n/**\n * One room or shaft drawn on its own, as the game draws it, for the pages that\n * show the art outside a tower: the sprite gallery (`gallery.ts`) and the Help\n * site's room pages. Both read the engine's catalog for every size and name, so\n * this module takes the catalog's facts through `facts` rather than carrying a\n * table of its own.\n */\n\n/** A kind's catalog entry, from whichever catalog the page read. */\nexport type FactsOf = (kind: FacilityKind) => CatalogFacility;\n\n/** How a room is shown: its state, its people and, for a shop or a restaurant,\n * its canon variant. */\nexport interface RoomPose {\n state?: UnitState;\n /** Occupants; defaults to the kind's population when occupied, else none. */\n occupants?: number;\n subtype?: string;\n /** The floor the room stands on, which styles a lobby (1 is the ground\n * concourse, anything else the sky-lobby look). */\n floor?: number;\n}\n\n/** A unit for the painters, standing alone at the left edge of its box. */\nexport function portraitUnit(facts: FactsOf, kind: FacilityKind, state: UnitState, occupants: number, id = 1, subtype?: string, floorOverride?: number): Unit {\n const f = facts(kind);\n return {\n id,\n kind,\n // Lobbies style by floor (1 = the grand ground concourse, else the sky-\n // lobby look). Default to the ground lobby, the one the starter tower\n // builds; `floorOverride` shows the sky-lobby variant too.\n floor: floorOverride ?? (kind === \"lobby\" ? 1 : 5),\n x: 0,\n width: f.width,\n state,\n satisfaction: 1,\n occupants,\n everOccupied: true,\n pendingIncome: 0,\n label: f.name,\n subtype,\n };\n}\n\n/**\n * Draw a room centered in the cell `cx, cy, cw, ch`, leaving `captionH` free at\n * the bottom, at up to `mag` whole multiples of the world scale.\n */\nexport function drawRoomPortrait(d: DrawCtx, facts: FactsOf, kind: FacilityKind, pose: RoomPose, cx: number, cy: number, cw: number, ch: number, captionH: number, mag: number): void {\n const f = facts(kind);\n const state = pose.state ?? \"occupied\";\n // Size the cell by the facility's own floor count so a genuinely multi-\n // floor kind (cinema, party hall, metro) shows at its true proportion\n // instead of squished into one floor. `fitAtGameScale` steps a footprint\n // that overflows the cell down to a smaller whole multiple (and below 1x\n // only when nothing else fits), so a room loses size rather than shape.\n const floors = f.floors ?? 1;\n const box = fitAtGameScale(f.width, floors, cw - 16, ch - captionH, mag);\n const w = box.w;\n const h = box.h;\n // Under 1px is as unusable as zero, and worse than nothing: drawFloor\n // clamps height up to 1, so a sub-pixel box paints a stray hairline. Both\n // are skipped, which is what \"a degenerate cell draws nothing\" has to mean.\n if (w < 1 || h < 1) return;\n // Whole screen pixels for the origin: centering can land on a half pixel,\n // and with the scale a whole multiple, a whole origin is what keeps every\n // magnified world pixel on whole screen pixels instead of antialiasing.\n const x = Math.round(cx + (cw - w) / 2);\n const y = Math.round(cy + (ch - captionH - h) / 2);\n // The painters are FIXED-PIXEL: they draw a 17px cubicle whatever box they\n // are handed, because the game always rasterizes a unit at exactly its\n // world size and lets the camera do the zooming. So magnify the way the\n // camera does, by transforming the context, and hand the painter its world\n // box. Inflating the box instead would grow the room while its furniture\n // stayed put, which is the same wrong-proportion defect the gallery was\n // fixed to stop, just moved from aspect to interior scale.\n const worldW = f.width * TILE;\n const worldH = floors * FLOOR;\n const ctx = d.ctx;\n ctx.save();\n ctx.imageSmoothingEnabled = false;\n ctx.translate(x, y);\n ctx.scale(box.scale, box.scale);\n // Floor strip for context, in world units like everything else here.\n const floorU = portraitUnit(facts, \"floor\", \"occupied\", 0, 999);\n const pad = 6 / box.scale;\n // The wedding hall crowns the tower: only its ground story stands on a floor,\n // and the garden above it stands in the open sky.\n const stripH = kind === \"weddingHall\" ? FLOOR : worldH;\n drawUnit(d, floorU, -pad, worldH - stripH, worldW + pad * 2, stripH);\n const occupants = pose.occupants ?? (state === \"occupied\" ? f.population : 0);\n drawUnit(d, portraitUnit(facts, kind, state, occupants, 1, pose.subtype, pose.floor), 0, 0, worldW, worldH);\n ctx.restore();\n}\n\n/**\n * Draw a shaft of `kind` over `span` floors of travel (plus the floor it lands\n * on), centered in the cell like a room, with two cars for an elevator.\n */\nexport function drawTransportPortrait(d: DrawCtx, facts: FactsOf, kind: FacilityKind, span: number, cx: number, cy: number, cw: number, ch: number, captionH: number, mag: number): void {\n const f = facts(kind);\n // A shaft is drawn as its span plus the floor it lands on, so it is sized\n // as a `span + 1` floor footprint and its per-floor pitch falls out of the\n // fitted box. Same scale as the rooms, so a shaft and a room next to each\n // other are honest about their relative proportions.\n const floors = span + 1;\n const box = fitAtGameScale(f.width, floors, cw - 16, ch - captionH, mag);\n // World units, like the room path: the shaft art is fixed-pixel too, so the\n // context carries the magnification and the painter is handed its true box.\n const worldW = f.width * TILE;\n const floorH = FLOOR;\n const w = box.w;\n // Same degenerate-cell guard as the room path above: sub-pixel counts as\n // empty, because drawFloor clamps a zero height up to a visible 1px.\n if (w < 1 || box.h < 1) return;\n const cars = kind.startsWith(\"elevator\") ? 2 : 0;\n const t: Transport = {\n id: 1,\n kind,\n x: 0,\n width: f.width,\n bottom: 1,\n top: 1 + span,\n cars,\n carPositions: cars ? [1.4, 1 + span - 0.6] : [],\n carDir: cars ? [1, -1] : [],\n load: 1,\n };\n // Whole screen pixels for the origin, as in the room path.\n const x = Math.round(cx + (cw - w) / 2);\n const topY = Math.round(cy + (ch - captionH - box.h) / 2);\n const ctx = d.ctx;\n ctx.save();\n ctx.imageSmoothingEnabled = false;\n ctx.translate(x, topY);\n ctx.scale(box.scale, box.scale);\n // Backing floors so the shaft reads in context, in world units.\n const pad = 8 / box.scale;\n for (let i = 0; i <= span; i++) {\n drawUnit(d, portraitUnit(facts, \"floor\", \"occupied\", 0, 500 + i), -pad, i * floorH, worldW + pad * 2, floorH);\n }\n drawTransport(ctx, t, 0, 0, worldW, floorH);\n // Elevators also show their cars so the per-kind cab dressing (standard,\n // service, express) is visible.\n for (let i = 0; i < cars; i++) {\n ctx.save();\n // Whole world units so the cab's 1px dressing rows (hazard stripes,\n // livery pinstripe) sit on the world grid. With a whole origin and a\n // whole-multiple scale they land on whole screen pixels too. Only a cell\n // too narrow for 1x (a narrow phone) scales by a fraction and softens them.\n ctx.translate(0, Math.round((t.top - t.carPositions[i]) * floorH));\n drawCar(ctx, i * 7 + 1, worldW, floorH, i === 0 ? 2 : 0, i === 0 ? \"up\" : \"down\", false, kind);\n ctx.restore();\n }\n ctx.restore();\n}\n"],"names":[],"mappings":";;;;;AA6BA;SACgB,YAAY,CAAC,KAAc,EAAE,IAAkB,EAAE,KAAgB,EAAE,SAAiB,EAAE,EAAE,GAAG,CAAC,EAAE,OAAgB,EAAE,aAAsB,EAAA;AACpJ,IAAA,MAAM,CAAC,GAAG,KAAK,CAAC,IAAI,CAAC;IACrB,OAAO;QACL,EAAE;QACF,IAAI;;;;AAIJ,QAAA,KAAK,EAAE,aAAa,KAAK,IAAI,KAAK,OAAO,GAAG,CAAC,GAAG,CAAC,CAAC;AAClD,QAAA,CAAC,EAAE,CAAC;QACJ,KAAK,EAAE,CAAC,CAAC,KAAK;QACd,KAAK;AACL,QAAA,YAAY,EAAE,CAAC;QACf,SAAS;AACT,QAAA,YAAY,EAAE,IAAI;AAClB,QAAA,aAAa,EAAE,CAAC;QAChB,KAAK,EAAE,CAAC,CAAC,IAAI;QACb,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,GAAG,CAAC,KAAK;AACzB,IAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,IAAI,EAAE,CAAC,EAAE,EAAE;AAC9B,QAAA,QAAQ,CAAC,CAAC,EAAE,YAAY,CAAC,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,CAAC,EAAE,GAAG,GAAG,CAAC,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,MAAM,EAAE,MAAM,GAAG,GAAG,GAAG,CAAC,EAAE,MAAM,CAAC;IAC/G;AACA,IAAA,aAAa,CAAC,GAAG,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC;;;AAG3C,IAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC,EAAE,EAAE;QAC7B,GAAG,CAAC,IAAI,EAAE;;;;;QAKV,GAAG,CAAC,SAAS,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,MAAM,CAAC,CAAC;AAClE,QAAA,OAAO,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,KAAK,CAAC,GAAG,IAAI,GAAG,MAAM,EAAE,KAAK,EAAE,IAAI,CAAC;QAC9F,GAAG,CAAC,OAAO,EAAE;IACf;IACA,GAAG,CAAC,OAAO,EAAE;AACf;;"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { UnitState } from "../shared/types";
|
|
2
|
+
/**
|
|
3
|
+
* Modern's room shading (#2097): a light pass over each settled room, lit
|
|
4
|
+
* from the upper left like Modern's people, baked into the room's region
|
|
5
|
+
* canvas on the web only. The shared room sprites (and so the native atlas)
|
|
6
|
+
* stay flat, and Classic never shades.
|
|
7
|
+
*
|
|
8
|
+
* A room in a state the player reads by its color (vacant gray, a dirty
|
|
9
|
+
* tray, a closed sign, construction, fire, gutted) is left flat, so the
|
|
10
|
+
* pass never changes what a reserved cue looks like.
|
|
11
|
+
*/
|
|
12
|
+
/** Whether a room gets the pass: Modern's look, and someone is there. */
|
|
13
|
+
export declare function shadesRoom(shadedLook: boolean, u: {
|
|
14
|
+
readonly state: UnitState;
|
|
15
|
+
}): boolean;
|
|
16
|
+
/** The light from above: a warm lift at the ceiling, clear through the
|
|
17
|
+
* middle, a cool shadow at the floor. */
|
|
18
|
+
export declare const ROOM_LIGHT: {
|
|
19
|
+
readonly ceiling: "rgba(255,248,230,0.10)";
|
|
20
|
+
readonly clear: "rgba(255,255,255,0)";
|
|
21
|
+
readonly floor: "rgba(20,16,30,0.14)";
|
|
22
|
+
};
|
|
23
|
+
/** The lit left wall edge and the shaded right one. */
|
|
24
|
+
export declare const ROOM_EDGE: {
|
|
25
|
+
readonly lit: "rgba(255,248,230,0.16)";
|
|
26
|
+
readonly shaded: "rgba(20,16,30,0.18)";
|
|
27
|
+
};
|
|
28
|
+
/** Shade the room at (x, y), `w` by `h`, in the region canvas. */
|
|
29
|
+
export declare function shadeRoom(ctx: CanvasRenderingContext2D, x: number, y: number, w: number, h: number): void;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { isPresent } from '../shared/unitState.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Modern's room shading (#2097): a light pass over each settled room, lit
|
|
5
|
+
* from the upper left like Modern's people, baked into the room's region
|
|
6
|
+
* canvas on the web only. The shared room sprites (and so the native atlas)
|
|
7
|
+
* stay flat, and Classic never shades.
|
|
8
|
+
*
|
|
9
|
+
* A room in a state the player reads by its color (vacant gray, a dirty
|
|
10
|
+
* tray, a closed sign, construction, fire, gutted) is left flat, so the
|
|
11
|
+
* pass never changes what a reserved cue looks like.
|
|
12
|
+
*/
|
|
13
|
+
/** Whether a room gets the pass: Modern's look, and someone is there. */
|
|
14
|
+
function shadesRoom(shadedLook, u) {
|
|
15
|
+
return shadedLook && isPresent(u);
|
|
16
|
+
}
|
|
17
|
+
/** The light from above: a warm lift at the ceiling, clear through the
|
|
18
|
+
* middle, a cool shadow at the floor. */
|
|
19
|
+
const ROOM_LIGHT = { ceiling: "rgba(255,248,230,0.10)", clear: "rgba(255,255,255,0)", floor: "rgba(20,16,30,0.14)" };
|
|
20
|
+
/** The lit left wall edge and the shaded right one. */
|
|
21
|
+
const ROOM_EDGE = { lit: "rgba(255,248,230,0.16)", shaded: "rgba(20,16,30,0.18)" };
|
|
22
|
+
/** Where the ceiling's lift has faded out, as a share of the room's height. */
|
|
23
|
+
const CLEAR_AT = 0.45;
|
|
24
|
+
/** Shade the room at (x, y), `w` by `h`, in the region canvas. */
|
|
25
|
+
function shadeRoom(ctx, x, y, w, h) {
|
|
26
|
+
if (w <= 0 || h <= 0)
|
|
27
|
+
return;
|
|
28
|
+
ctx.save();
|
|
29
|
+
const light = ctx.createLinearGradient(0, y, 0, y + h);
|
|
30
|
+
light.addColorStop(0, ROOM_LIGHT.ceiling);
|
|
31
|
+
light.addColorStop(CLEAR_AT, ROOM_LIGHT.clear);
|
|
32
|
+
light.addColorStop(1, ROOM_LIGHT.floor);
|
|
33
|
+
ctx.fillStyle = light;
|
|
34
|
+
ctx.fillRect(x, y, w, h);
|
|
35
|
+
ctx.fillStyle = ROOM_EDGE.lit;
|
|
36
|
+
ctx.fillRect(x, y, 1, h);
|
|
37
|
+
ctx.fillStyle = ROOM_EDGE.shaded;
|
|
38
|
+
ctx.fillRect(x + w - 2, y, 2, h);
|
|
39
|
+
ctx.restore();
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export { ROOM_EDGE, ROOM_LIGHT, shadeRoom, shadesRoom };
|
|
43
|
+
//# sourceMappingURL=roomShading.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"roomShading.js","sources":["../../src/render/roomShading.ts"],"sourcesContent":["import { isPresent } from \"../shared/unitState\";\nimport type { UnitState } from \"../shared/types\";\n\n/**\n * Modern's room shading (#2097): a light pass over each settled room, lit\n * from the upper left like Modern's people, baked into the room's region\n * canvas on the web only. The shared room sprites (and so the native atlas)\n * stay flat, and Classic never shades.\n *\n * A room in a state the player reads by its color (vacant gray, a dirty\n * tray, a closed sign, construction, fire, gutted) is left flat, so the\n * pass never changes what a reserved cue looks like.\n */\n\n/** Whether a room gets the pass: Modern's look, and someone is there. */\nexport function shadesRoom(shadedLook: boolean, u: { readonly state: UnitState }): boolean {\n return shadedLook && isPresent(u);\n}\n\n/** The light from above: a warm lift at the ceiling, clear through the\n * middle, a cool shadow at the floor. */\nexport const ROOM_LIGHT = { ceiling: \"rgba(255,248,230,0.10)\", clear: \"rgba(255,255,255,0)\", floor: \"rgba(20,16,30,0.14)\" } as const;\n/** The lit left wall edge and the shaded right one. */\nexport const ROOM_EDGE = { lit: \"rgba(255,248,230,0.16)\", shaded: \"rgba(20,16,30,0.18)\" } as const;\n/** Where the ceiling's lift has faded out, as a share of the room's height. */\nconst CLEAR_AT = 0.45;\n\n/** Shade the room at (x, y), `w` by `h`, in the region canvas. */\nexport function shadeRoom(ctx: CanvasRenderingContext2D, x: number, y: number, w: number, h: number): void {\n if (w <= 0 || h <= 0) return;\n ctx.save();\n const light = ctx.createLinearGradient(0, y, 0, y + h);\n light.addColorStop(0, ROOM_LIGHT.ceiling);\n light.addColorStop(CLEAR_AT, ROOM_LIGHT.clear);\n light.addColorStop(1, ROOM_LIGHT.floor);\n ctx.fillStyle = light;\n ctx.fillRect(x, y, w, h);\n ctx.fillStyle = ROOM_EDGE.lit;\n ctx.fillRect(x, y, 1, h);\n ctx.fillStyle = ROOM_EDGE.shaded;\n ctx.fillRect(x + w - 2, y, 2, h);\n ctx.restore();\n}\n"],"names":[],"mappings":";;AAGA;;;;;;;;;AASG;AAEH;AACM,SAAU,UAAU,CAAC,UAAmB,EAAE,CAAgC,EAAA;AAC9E,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AO,EAAE;AACf;;"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* World-scale render constants, in a pure module (no Excalibur import) so unit
|
|
3
|
+
* tests can pin the invariants that TowerEngine's drawing depends on.
|
|
4
|
+
*/
|
|
5
|
+
/** World pixels per tile. */
|
|
6
|
+
export declare const TILE = 10;
|
|
7
|
+
/** Tiles per floor. The 1994 original is 8px tiles and a 36px floor pitch, both
|
|
8
|
+
* measured off a retail render (the Wine harness, loading `TOWER13.TDT`): nine
|
|
9
|
+
* consecutive floor gaps of exactly 36px, and an elevator shaft 31-32px wide,
|
|
10
|
+
* which is its 4-tile car at 8px a tile. 36 / 8 is 4.5. */
|
|
11
|
+
export declare const TILES_PER_FLOOR = 4.5;
|
|
12
|
+
/** World pixels per floor, at the original's proportions.
|
|
13
|
+
*
|
|
14
|
+
* This was `4 * TILE`, justified as making the 4-tile car "read square, as in
|
|
15
|
+
* the 1994 original". The measurement above disproves that: the original's car
|
|
16
|
+
* is 32 x 36, TALLER than it is wide. A square car is 12.5% too wide for its
|
|
17
|
+
* height, and every sprite authored against it inherited the error.
|
|
18
|
+
*
|
|
19
|
+
* 10 x 45 restores 4.5 exactly, at 1.25x the original's resolution and close
|
|
20
|
+
* enough to the old 11 x 44 that existing art barely moves. 8 x 36 would match
|
|
21
|
+
* the original outright but throw away resolution already drawn; 16 x 72 would
|
|
22
|
+
* be a clean 2x but pushes a shaft band past the texture cap below.
|
|
23
|
+
*
|
|
24
|
+
* `scale.test.ts` pins the ratio and the taller-than-wide car. */
|
|
25
|
+
export declare const FLOOR: number;
|
|
26
|
+
/** Max floors drawn into a single shaft-graphic band. A shaft's backing bitmap
|
|
27
|
+
* is `floors * FLOOR` px tall; a mobile GPU's MAX_TEXTURE_SIZE is often 4096
|
|
28
|
+
* and sometimes 2048, and a bitmap past that fails to upload (renders black).
|
|
29
|
+
* 45 floors -> 2025px, still under both, so tall shafts are split into bands.
|
|
30
|
+
* `scale.test.ts` pins the product against the 2048px cap. */
|
|
31
|
+
export declare const TRANSPORT_BAND_FLOORS = 45;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* World-scale render constants, in a pure module (no Excalibur import) so unit
|
|
3
|
+
* tests can pin the invariants that TowerEngine's drawing depends on.
|
|
4
|
+
*/
|
|
5
|
+
/** World pixels per tile. */
|
|
6
|
+
const TILE = 10;
|
|
7
|
+
/** Tiles per floor. The 1994 original is 8px tiles and a 36px floor pitch, both
|
|
8
|
+
* measured off a retail render (the Wine harness, loading `TOWER13.TDT`): nine
|
|
9
|
+
* consecutive floor gaps of exactly 36px, and an elevator shaft 31-32px wide,
|
|
10
|
+
* which is its 4-tile car at 8px a tile. 36 / 8 is 4.5. */
|
|
11
|
+
const TILES_PER_FLOOR = 4.5;
|
|
12
|
+
/** World pixels per floor, at the original's proportions.
|
|
13
|
+
*
|
|
14
|
+
* This was `4 * TILE`, justified as making the 4-tile car "read square, as in
|
|
15
|
+
* the 1994 original". The measurement above disproves that: the original's car
|
|
16
|
+
* is 32 x 36, TALLER than it is wide. A square car is 12.5% too wide for its
|
|
17
|
+
* height, and every sprite authored against it inherited the error.
|
|
18
|
+
*
|
|
19
|
+
* 10 x 45 restores 4.5 exactly, at 1.25x the original's resolution and close
|
|
20
|
+
* enough to the old 11 x 44 that existing art barely moves. 8 x 36 would match
|
|
21
|
+
* the original outright but throw away resolution already drawn; 16 x 72 would
|
|
22
|
+
* be a clean 2x but pushes a shaft band past the texture cap below.
|
|
23
|
+
*
|
|
24
|
+
* `scale.test.ts` pins the ratio and the taller-than-wide car. */
|
|
25
|
+
const FLOOR = TILES_PER_FLOOR * TILE;
|
|
26
|
+
/** Max floors drawn into a single shaft-graphic band. A shaft's backing bitmap
|
|
27
|
+
* is `floors * FLOOR` px tall; a mobile GPU's MAX_TEXTURE_SIZE is often 4096
|
|
28
|
+
* and sometimes 2048, and a bitmap past that fails to upload (renders black).
|
|
29
|
+
* 45 floors -> 2025px, still under both, so tall shafts are split into bands.
|
|
30
|
+
* `scale.test.ts` pins the product against the 2048px cap. */
|
|
31
|
+
const TRANSPORT_BAND_FLOORS = 45;
|
|
32
|
+
|
|
33
|
+
export { FLOOR, TILE, TILES_PER_FLOOR, TRANSPORT_BAND_FLOORS };
|
|
34
|
+
//# sourceMappingURL=scale.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scale.js","sources":["../../src/render/scale.ts"],"sourcesContent":["/**\n * World-scale render constants, in a pure module (no Excalibur import) so unit\n * tests can pin the invariants that TowerEngine's drawing depends on.\n */\n\n/** World pixels per tile. */\nexport const TILE = 10;\n\n/** Tiles per floor. The 1994 original is 8px tiles and a 36px floor pitch, both\n * measured off a retail render (the Wine harness, loading `TOWER13.TDT`): nine\n * consecutive floor gaps of exactly 36px, and an elevator shaft 31-32px wide,\n * which is its 4-tile car at 8px a tile. 36 / 8 is 4.5. */\nexport const TILES_PER_FLOOR = 4.5;\n\n/** World pixels per floor, at the original's proportions.\n *\n * This was `4 * TILE`, justified as making the 4-tile car \"read square, as in\n * the 1994 original\". The measurement above disproves that: the original's car\n * is 32 x 36, TALLER than it is wide. A square car is 12.5% too wide for its\n * height, and every sprite authored against it inherited the error.\n *\n * 10 x 45 restores 4.5 exactly, at 1.25x the original's resolution and close\n * enough to the old 11 x 44 that existing art barely moves. 8 x 36 would match\n * the original outright but throw away resolution already drawn; 16 x 72 would\n * be a clean 2x but pushes a shaft band past the texture cap below.\n *\n * `scale.test.ts` pins the ratio and the taller-than-wide car. */\nexport const FLOOR = TILES_PER_FLOOR * TILE;\n\n/** Max floors drawn into a single shaft-graphic band. A shaft's backing bitmap\n * is `floors * FLOOR` px tall; a mobile GPU's MAX_TEXTURE_SIZE is often 4096\n * and sometimes 2048, and a bitmap past that fails to upload (renders black).\n * 45 floors -> 2025px, still under both, so tall shafts are split into bands.\n * `scale.test.ts` pins the product against the 2048px cap. */\nexport const TRANSPORT_BAND_FLOORS = 45;\n"],"names":[],"mappings":"AAAA;;;AAGG;AAEH;AACO,MAAM,IAAI,GAAG;AAEpB;;;AAG4D;AACrD,MAAM,eAAe,GAAG;AAE/B;;;;;;;;;;;;AAYmE;AAC5D,MAAM,KAAK,GAAG,eAAe,GAAG;AAEvC;;;;AAI+D;AACxD,MAAM,qBAAqB,GAAG;;"}
|