@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,11 @@
|
|
|
1
|
+
import type { UnitView } from "../../simport/view";
|
|
2
|
+
import { type RoomCtx } from "./common";
|
|
3
|
+
/** Whether a skyline window is lit, keyed on room and window position. */
|
|
4
|
+
export declare function skylineWindowLit(seed: number, building: number, row: number): boolean;
|
|
5
|
+
export declare function skyBar(d: RoomCtx, u: UnitView, x: number, y: number, w: number, h: number): void;
|
|
6
|
+
/** Where the bartender stands: halfway between the two stools that straddle
|
|
7
|
+
* `mid` (the pair at the nearer end when `mid` is past the row), so he keeps
|
|
8
|
+
* clear of both their columns. With fewer than two stools he stands at `mid`,
|
|
9
|
+
* or one column along when that is a stool's. Whole pixels, so at a
|
|
10
|
+
* half-pixel origin the result is still a column the stools can be told from. */
|
|
11
|
+
export declare function bartenderX(stools: readonly number[], mid: number): number;
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { hash, shell, roomOccupants, shade, busyStations, personStanding, personSeated } from './common.js';
|
|
2
|
+
import { authoredWidth, artRow } from './artScale.js';
|
|
3
|
+
import { layerBreak } from './layers.js';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Modern Sky Bar art: a warm rooftop cocktail lounge at dusk, its back wall a big
|
|
7
|
+
* dark window onto a lit skyline, with a bar counter of glowing bottles, a row of
|
|
8
|
+
* stools, and patrons that fill in with the real occupant count. Like the other
|
|
9
|
+
* Track-2 showpieces it has no subtypes, so this is one bespoke look. Modern-only
|
|
10
|
+
* (never exported to the 1994 TDT). The bar only ever draws while open (the closed
|
|
11
|
+
* shutter covers its daytime hours), so this is always the evening scene.
|
|
12
|
+
*
|
|
13
|
+
* Drawing reads only bake-signature inputs (the real occupant count and a stable
|
|
14
|
+
* geography seed), so a placed room stays cacheable, an empty bar reads quiet, and
|
|
15
|
+
* a TDT id renumber never reshuffles the crowd or the skyline.
|
|
16
|
+
*/
|
|
17
|
+
const WALL = "#241a2a"; // dusk-purple interior
|
|
18
|
+
const SKY = "#0e1526"; // night sky through the window
|
|
19
|
+
const COUNTER = "#3a2418"; // warm wood bar
|
|
20
|
+
const BOTTLE = ["#e0b040", "#c85050", "#50b0c0", "#a060c0"]; // backlit bottles
|
|
21
|
+
const WINDOW_LIGHT = ["#f0d070", "#f0a850", "#d0d0f0"]; // distant city windows
|
|
22
|
+
/** Whether a skyline window is lit, keyed on room and window position. */
|
|
23
|
+
function skylineWindowLit(seed, building, row) {
|
|
24
|
+
return hash(seed * 31 + building * 131 + row * 17) > 0.55;
|
|
25
|
+
}
|
|
26
|
+
/** The counter's inset from each wall, shared by its drawn width and its authored one. */
|
|
27
|
+
const BAR_INSET = 3;
|
|
28
|
+
/** A stable per-room seed from GEOGRAPHY (floor, x), so the crowd, bottles, and
|
|
29
|
+
* skyline survive a save/export/import (which renumbers `u.id`). */
|
|
30
|
+
function figureSeed(u) {
|
|
31
|
+
return (u.floor * 167 + u.x * 29) >>> 0;
|
|
32
|
+
}
|
|
33
|
+
function skyBar(d, u, x, y, w, h) {
|
|
34
|
+
const { ctx } = d;
|
|
35
|
+
const floorY = shell(ctx, x, y, w, h, WALL, WALL);
|
|
36
|
+
const seed = figureSeed(u);
|
|
37
|
+
const occ = roomOccupants(u);
|
|
38
|
+
// The skyline window fills the upper back wall: a dark sky pane with a jagged
|
|
39
|
+
// silhouette of buildings and scattered lit windows, the bar's whole reason to
|
|
40
|
+
// sit up high.
|
|
41
|
+
const winTop = y + 3;
|
|
42
|
+
const winBot = floorY - 9;
|
|
43
|
+
ctx.fillStyle = SKY;
|
|
44
|
+
ctx.fillRect(x + 2, winTop, w - 4, winBot - winTop);
|
|
45
|
+
// Building silhouettes rising from the sill, of stable pseudo-random heights.
|
|
46
|
+
for (let bx = x + 3, i = 0; bx + 4 < x + w - 3; bx += 6, i++) {
|
|
47
|
+
const bh = 4 + Math.round(hash(seed + i * 5) * (winBot - winTop - 5));
|
|
48
|
+
ctx.fillStyle = shade(SKY, 10);
|
|
49
|
+
ctx.fillRect(bx, winBot - bh, 5, bh);
|
|
50
|
+
// A few lit windows on each building, picked by `skylineWindowLit`; the
|
|
51
|
+
// color and stagger use the window's height inside the room.
|
|
52
|
+
for (let wy = winBot - bh + 2, k = 0; wy < winBot - 1; wy += 3, k++) {
|
|
53
|
+
const ry = wy - y; // the window's height inside the room
|
|
54
|
+
if (skylineWindowLit(seed, i, k)) {
|
|
55
|
+
ctx.fillStyle = WINDOW_LIGHT[(i + ry) % WINDOW_LIGHT.length];
|
|
56
|
+
ctx.fillRect(bx + 1 + ((ry & 1) ? 2 : 0), wy, 1, 1);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
// The window frame.
|
|
61
|
+
ctx.fillStyle = shade(WALL, 30);
|
|
62
|
+
ctx.fillRect(x + 2, winTop, w - 4, 1);
|
|
63
|
+
ctx.fillRect(x + 2, winBot, w - 4, 1);
|
|
64
|
+
layerBreak(ctx); // the shell ends; the bar and the patrons follow
|
|
65
|
+
// The bar counter along the floor line, with a row of backlit bottles behind it.
|
|
66
|
+
const barX = x + BAR_INSET;
|
|
67
|
+
const barW = w - 2 * BAR_INSET;
|
|
68
|
+
ctx.fillStyle = COUNTER;
|
|
69
|
+
ctx.fillRect(barX, floorY - 4, barW, 4);
|
|
70
|
+
ctx.fillStyle = shade(COUNTER, 26); // polished edge
|
|
71
|
+
ctx.fillRect(barX, floorY - 4, barW, 1);
|
|
72
|
+
for (let lx = barX + 2, i = 0; lx < barX + barW - 2; lx += 4, i++) {
|
|
73
|
+
ctx.fillStyle = BOTTLE[(i + seed) % BOTTLE.length];
|
|
74
|
+
ctx.fillRect(lx, floorY - 7, 1, 3); // a bottle glowing on the back shelf
|
|
75
|
+
}
|
|
76
|
+
// Stool anchors: the 7px stool pitch is authored art, counted against the
|
|
77
|
+
// COUNTER's authored run and fitted into the screen run by `artRow`. Read
|
|
78
|
+
// off the counter's pixel width it lost two stools when the tile narrowed, and
|
|
79
|
+
// two patrons who were at the bar went undrawn with them. The counter's own
|
|
80
|
+
// authored width is named rather than folded into the row's margins so the
|
|
81
|
+
// two lengths read as what they are, and it shares `barW`'s inset.
|
|
82
|
+
const counterArtW = authoredWidth(u.width) - 2 * BAR_INSET;
|
|
83
|
+
const stools = artRow(counterArtW - 3 - 9, barX + 3, barX + barW - 9, 7, 1, 6);
|
|
84
|
+
// Which stools are taken: the occupancy says how many, the seed says which.
|
|
85
|
+
// The old loop counted a hash-skipped stool against the occupancy as if
|
|
86
|
+
// someone had sat there, so a bar with five patrons could show two.
|
|
87
|
+
const taken = busyStations(stools.length, occ, seed * 19);
|
|
88
|
+
// Patrons: a bartender behind the counter when the bar is live, and guests on
|
|
89
|
+
// stools in front of it. The bartender is staff, not one of the room's
|
|
90
|
+
// occupants, so he does not come off the stool count. Stools sit closer
|
|
91
|
+
// together than a figure is wide, so a patron partly overlapping him is
|
|
92
|
+
// inherent here and always was. Standing within a pixel of a patron's column
|
|
93
|
+
// is not, since the two then read as one person rather than two, so he stands
|
|
94
|
+
// halfway between the two stools that straddle the counter's middle. He
|
|
95
|
+
// places himself against EVERY stool, taken or not, so where he stands
|
|
96
|
+
// depends on the room alone: the atlas bakes a crowd by adding patrons one at
|
|
97
|
+
// a time, and a bartender who stepped aside only once a stool filled would
|
|
98
|
+
// move between two of those steps.
|
|
99
|
+
if (occ > 0)
|
|
100
|
+
personStanding(ctx, bartenderX(stools, barX + Math.round(barW / 2) - 3), floorY - 6, seed + 2);
|
|
101
|
+
stools.forEach((sx, i) => {
|
|
102
|
+
if (!taken.has(i))
|
|
103
|
+
return;
|
|
104
|
+
personSeated(ctx, sx, floorY - 1, seed + i * 11);
|
|
105
|
+
ctx.fillStyle = shade(COUNTER, -18); // the stool
|
|
106
|
+
ctx.fillRect(sx + 1, floorY - 1, 2, 1);
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
/** Where the bartender stands: halfway between the two stools that straddle
|
|
110
|
+
* `mid` (the pair at the nearer end when `mid` is past the row), so he keeps
|
|
111
|
+
* clear of both their columns. With fewer than two stools he stands at `mid`,
|
|
112
|
+
* or one column along when that is a stool's. Whole pixels, so at a
|
|
113
|
+
* half-pixel origin the result is still a column the stools can be told from. */
|
|
114
|
+
function bartenderX(stools, mid) {
|
|
115
|
+
const at = Math.round(mid);
|
|
116
|
+
if (stools.length < 2)
|
|
117
|
+
return stools.includes(at) ? at + 1 : at;
|
|
118
|
+
let right = stools.findIndex((s) => s > at);
|
|
119
|
+
if (right <= 0)
|
|
120
|
+
right = right === 0 ? 1 : stools.length - 1;
|
|
121
|
+
return Math.floor((stools[right - 1] + stools[right]) / 2);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
export { bartenderX, skyBar, skylineWindowLit };
|
|
125
|
+
//# sourceMappingURL=skyBar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skyBar.js","sources":["../../../src/render/pixelSprites/skyBar.ts"],"sourcesContent":["import type { UnitView } from \"../../simport/view\";\nimport { busyStations, hash, personSeated, personStanding, roomOccupants, shade, shell, type RoomCtx } from \"./common\";\nimport { artRow, authoredWidth } from \"./artScale\";\nimport { layerBreak } from \"./layers\";\n\n/**\n * Modern Sky Bar art: a warm rooftop cocktail lounge at dusk, its back wall a big\n * dark window onto a lit skyline, with a bar counter of glowing bottles, a row of\n * stools, and patrons that fill in with the real occupant count. Like the other\n * Track-2 showpieces it has no subtypes, so this is one bespoke look. Modern-only\n * (never exported to the 1994 TDT). The bar only ever draws while open (the closed\n * shutter covers its daytime hours), so this is always the evening scene.\n *\n * Drawing reads only bake-signature inputs (the real occupant count and a stable\n * geography seed), so a placed room stays cacheable, an empty bar reads quiet, and\n * a TDT id renumber never reshuffles the crowd or the skyline.\n */\n\nconst WALL = \"#241a2a\"; // dusk-purple interior\nconst SKY = \"#0e1526\"; // night sky through the window\nconst COUNTER = \"#3a2418\"; // warm wood bar\nconst BOTTLE = [\"#e0b040\", \"#c85050\", \"#50b0c0\", \"#a060c0\"]; // backlit bottles\nconst WINDOW_LIGHT = [\"#f0d070\", \"#f0a850\", \"#d0d0f0\"]; // distant city windows\n/** Whether a skyline window is lit, keyed on room and window position. */\nexport function skylineWindowLit(seed: number, building: number, row: number): boolean {\n return hash(seed * 31 + building * 131 + row * 17) > 0.55;\n}\n\n/** The counter's inset from each wall, shared by its drawn width and its authored one. */\nconst BAR_INSET = 3;\n\n/** A stable per-room seed from GEOGRAPHY (floor, x), so the crowd, bottles, and\n * skyline survive a save/export/import (which renumbers `u.id`). */\nfunction figureSeed(u: Pick<UnitView, \"floor\" | \"x\">): number {\n return (u.floor * 167 + u.x * 29) >>> 0;\n}\n\nexport function skyBar(d: RoomCtx, u: UnitView, x: number, y: number, w: number, h: number): void {\n const { ctx } = d;\n const floorY = shell(ctx, x, y, w, h, WALL, WALL);\n const seed = figureSeed(u);\n const occ = roomOccupants(u);\n\n // The skyline window fills the upper back wall: a dark sky pane with a jagged\n // silhouette of buildings and scattered lit windows, the bar's whole reason to\n // sit up high.\n const winTop = y + 3;\n const winBot = floorY - 9;\n ctx.fillStyle = SKY;\n ctx.fillRect(x + 2, winTop, w - 4, winBot - winTop);\n // Building silhouettes rising from the sill, of stable pseudo-random heights.\n for (let bx = x + 3, i = 0; bx + 4 < x + w - 3; bx += 6, i++) {\n const bh = 4 + Math.round(hash(seed + i * 5) * (winBot - winTop - 5));\n ctx.fillStyle = shade(SKY, 10);\n ctx.fillRect(bx, winBot - bh, 5, bh);\n // A few lit windows on each building, picked by `skylineWindowLit`; the\n // color and stagger use the window's height inside the room.\n for (let wy = winBot - bh + 2, k = 0; wy < winBot - 1; wy += 3, k++) {\n const ry = wy - y; // the window's height inside the room\n if (skylineWindowLit(seed, i, k)) {\n ctx.fillStyle = WINDOW_LIGHT[(i + ry) % WINDOW_LIGHT.length];\n ctx.fillRect(bx + 1 + ((ry & 1) ? 2 : 0), wy, 1, 1);\n }\n }\n }\n // The window frame.\n ctx.fillStyle = shade(WALL, 30);\n ctx.fillRect(x + 2, winTop, w - 4, 1);\n ctx.fillRect(x + 2, winBot, w - 4, 1);\n\n layerBreak(ctx); // the shell ends; the bar and the patrons follow\n\n // The bar counter along the floor line, with a row of backlit bottles behind it.\n const barX = x + BAR_INSET;\n const barW = w - 2 * BAR_INSET;\n ctx.fillStyle = COUNTER;\n ctx.fillRect(barX, floorY - 4, barW, 4);\n ctx.fillStyle = shade(COUNTER, 26); // polished edge\n ctx.fillRect(barX, floorY - 4, barW, 1);\n for (let lx = barX + 2, i = 0; lx < barX + barW - 2; lx += 4, i++) {\n ctx.fillStyle = BOTTLE[(i + seed) % BOTTLE.length];\n ctx.fillRect(lx, floorY - 7, 1, 3); // a bottle glowing on the back shelf\n }\n\n // Stool anchors: the 7px stool pitch is authored art, counted against the\n // COUNTER's authored run and fitted into the screen run by `artRow`. Read\n // off the counter's pixel width it lost two stools when the tile narrowed, and\n // two patrons who were at the bar went undrawn with them. The counter's own\n // authored width is named rather than folded into the row's margins so the\n // two lengths read as what they are, and it shares `barW`'s inset.\n const counterArtW = authoredWidth(u.width) - 2 * BAR_INSET;\n const stools = artRow(counterArtW - 3 - 9, barX + 3, barX + barW - 9, 7, 1, 6);\n // Which stools are taken: the occupancy says how many, the seed says which.\n // The old loop counted a hash-skipped stool against the occupancy as if\n // someone had sat there, so a bar with five patrons could show two.\n const taken = busyStations(stools.length, occ, seed * 19);\n // Patrons: a bartender behind the counter when the bar is live, and guests on\n // stools in front of it. The bartender is staff, not one of the room's\n // occupants, so he does not come off the stool count. Stools sit closer\n // together than a figure is wide, so a patron partly overlapping him is\n // inherent here and always was. Standing within a pixel of a patron's column\n // is not, since the two then read as one person rather than two, so he stands\n // halfway between the two stools that straddle the counter's middle. He\n // places himself against EVERY stool, taken or not, so where he stands\n // depends on the room alone: the atlas bakes a crowd by adding patrons one at\n // a time, and a bartender who stepped aside only once a stool filled would\n // move between two of those steps.\n if (occ > 0) personStanding(ctx, bartenderX(stools, barX + Math.round(barW / 2) - 3), floorY - 6, seed + 2);\n stools.forEach((sx, i) => {\n if (!taken.has(i)) return;\n personSeated(ctx, sx, floorY - 1, seed + i * 11);\n ctx.fillStyle = shade(COUNTER, -18); // the stool\n ctx.fillRect(sx + 1, floorY - 1, 2, 1);\n });\n}\n\n/** Where the bartender stands: halfway between the two stools that straddle\n * `mid` (the pair at the nearer end when `mid` is past the row), so he keeps\n * clear of both their columns. With fewer than two stools he stands at `mid`,\n * or one column along when that is a stool's. Whole pixels, so at a\n * half-pixel origin the result is still a column the stools can be told from. */\nexport function bartenderX(stools: readonly number[], mid: number): number {\n const at = Math.round(mid);\n if (stools.length < 2) return stools.includes(at) ? at + 1 : at;\n let right = stools.findIndex((s) => s > at);\n if (right <= 0) right = right === 0 ? 1 : stools.length - 1;\n return Math.floor((stools[right - 1] + stools[right]) / 2);\n}\n"],"names":[],"mappings":";;;;AAKA;;;;;;;;;;;AAWG;AAEH,MAAM,IAAI,GAAG,SAAS,CAAC;AACvB,MAAM,GAAG,GAAG,SAAS,CAAC;AACtB,MAAM,OAAO,GAAG,SAAS,CAAC;AAC1B,MAAM,MAAM,GAAG,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC;AAC5D,MAAM,YAAY,GAAG,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC;AACvD;SACgB,gBAAgB,CAAC,IAAY,EAAE,QAAgB,EAAE,GAAW,EAAA;AAC1E,IAAA,OAAO,IAAI,CAAC,IAAI,GAAG,EAAE,GAAG,QAAQ,GAAG,GAAG,GAAG,GAAG,GAAG,EAAE,CAAC,GAAG,IAAI;AAC3D;AAEA;AACA,MAAM,SAAS,GAAG,CAAC;AAEnB;AACqE;AACrE,SAAS,UAAU,CAAC,CAAgC,EAAA;AAClD,IAAA,OAAO,CAAC,CAAC,CAAC,KAAK,GAAG,GAAG,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,MAAM,CAAC;AACzC;AAEM,SAAU,MAAM,C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QAAA,GAAG,CAAC,SAAS,GAAG,KAAK,CAAC,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC;AACpC,QAAA,GAAG,CAAC,QAAQ,CAAC,EAAE,GAAG,CAAC,EAAE,MAAM,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;AACxC,IAAA,CAAC,CAAC;AACJ;AAEA;;;;AAIkF;AAC5E,SAAU,UAAU,CAAC,MAAyB,EAAE,GAAW,EAAA;IAC/D,MAAM,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC;AAC1B,IAAA,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC;AAAE,QAAA,OAAO,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,CAAC,GAAG,EAAE;AAC/D,IAAA,IAAI,KAAK,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC;IAC3C,IAAI,KAAK,IAAI,CAAC;AAAE,QAAA,KAAK,GAAG,KAAK,KAAK,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,GAAG,CAAC;IAC3D,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,KAAK,GAAG,CAAC,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;AAC5D;;"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { shell, roomOccupants, shade, hash, personStanding, busyStations } from './common.js';
|
|
2
|
+
import { layerBreak } from './layers.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Modern Spa art: a calm, warm wellness room with a steaming hot tub, a row of
|
|
6
|
+
* massage tables, and potted greenery, with a few guests relaxing that fill in
|
|
7
|
+
* with the real occupant count. Like the nightclub it has no subtypes, so this is
|
|
8
|
+
* one bespoke look. Modern-only (never exported to the 1994 TDT). The spa only
|
|
9
|
+
* ever draws while open (the closed shutter covers its off hours), so this is
|
|
10
|
+
* always the daytime scene.
|
|
11
|
+
*
|
|
12
|
+
* Drawing reads only bake-signature inputs (the real occupant count and a stable
|
|
13
|
+
* geography seed), so a placed room stays cacheable, an empty spa reads calm and
|
|
14
|
+
* unattended, and a TDT id renumber never reshuffles the guests.
|
|
15
|
+
*/
|
|
16
|
+
const WALL = "#2a4740"; // deep calm teal
|
|
17
|
+
const FLOOR = "#d8cbb8"; // warm stone
|
|
18
|
+
const WATER = "#7fd0c4"; // hot-tub water
|
|
19
|
+
const TOWEL = "#f0ece2"; // massage-table linen
|
|
20
|
+
const PLANT = "#4f9a5c"; // greenery
|
|
21
|
+
/** A stable per-room seed from GEOGRAPHY (floor, x), so the guests and steam
|
|
22
|
+
* survive a save/export/import (which renumbers `u.id`). */
|
|
23
|
+
function figureSeed(u) {
|
|
24
|
+
return (u.floor * 149 + u.x * 23) | 0;
|
|
25
|
+
}
|
|
26
|
+
function spa(d, u, x, y, w, h) {
|
|
27
|
+
const { ctx } = d;
|
|
28
|
+
const floorY = shell(ctx, x, y, w, h, WALL, FLOOR);
|
|
29
|
+
const seed = figureSeed(u);
|
|
30
|
+
const occ = roomOccupants(u);
|
|
31
|
+
// A warm accent band along the top of the back wall, the spa's calm signature.
|
|
32
|
+
ctx.fillStyle = shade(WALL, 22);
|
|
33
|
+
ctx.fillRect(x, y + 3, w, 2);
|
|
34
|
+
layerBreak(ctx); // the shell ends; the tub, tables, plants and guests follow
|
|
35
|
+
// The hot tub on the left: a raised stone rim with steaming water, plus a few
|
|
36
|
+
// rising steam wisps so the scene reads warm even when empty.
|
|
37
|
+
const tubX = x + 3;
|
|
38
|
+
const tubW = Math.min(Math.round(w * 0.34), w - 6);
|
|
39
|
+
const tubTop = floorY - 7;
|
|
40
|
+
ctx.fillStyle = shade(FLOOR, -28); // stone rim
|
|
41
|
+
ctx.fillRect(tubX, tubTop, tubW, 7);
|
|
42
|
+
ctx.fillStyle = WATER;
|
|
43
|
+
ctx.fillRect(tubX + 1, tubTop + 1, tubW - 2, 4);
|
|
44
|
+
ctx.fillStyle = shade(WATER, 24); // a lighter ripple line
|
|
45
|
+
ctx.fillRect(tubX + 1, tubTop + 2, tubW - 2, 1);
|
|
46
|
+
// Steam wisps rising from the tub (geometry-stable dots).
|
|
47
|
+
ctx.fillStyle = shade(WALL, 40);
|
|
48
|
+
for (let sx = tubX + 2, i = 0; sx < tubX + tubW - 1; sx += 5, i++) {
|
|
49
|
+
const top = tubTop - 5 - (hash(seed + i * 3) > 0.5 ? 1 : 0);
|
|
50
|
+
for (let sy = top; sy < tubTop; sy += 2)
|
|
51
|
+
ctx.fillRect(sx, sy, 1, 1);
|
|
52
|
+
}
|
|
53
|
+
// A guest soaking in the tub when the spa is busy.
|
|
54
|
+
if (occ > 0)
|
|
55
|
+
personStanding(ctx, tubX + Math.round(tubW / 2) - 3, tubTop + 1, seed + 5);
|
|
56
|
+
// Massage tables on the right: linen-topped beds along the floor line. This
|
|
57
|
+
// row keeps its plain loop and its authored 11px pitch. Unlike the other rows
|
|
58
|
+
// in this pass it is capped at three beds long before the room runs out of
|
|
59
|
+
// wall, so the narrower tile never cost it a bed and there is nothing here for
|
|
60
|
+
// the row helper to put right. Measured at 11 by 44 and at 10 by 45: three
|
|
61
|
+
// beds either way.
|
|
62
|
+
const bedX0 = tubX + tubW + 4;
|
|
63
|
+
const beds = [];
|
|
64
|
+
for (let bx = bedX0; bx + 8 < x + w - 2 && beds.length < 3; bx += 11)
|
|
65
|
+
beds.push(bx);
|
|
66
|
+
// Who is on a table: the hash scatters them, the occupancy says how many, and
|
|
67
|
+
// the guest already soaking in the tub is one of the same people. Counting the
|
|
68
|
+
// tub and the tables separately showed two guests for a spa holding one.
|
|
69
|
+
const lying = busyStations(beds.length, occ - (occ > 0 ? 1 : 0), seed * 13);
|
|
70
|
+
beds.forEach((bx, i) => {
|
|
71
|
+
ctx.fillStyle = shade(FLOOR, -18); // the table base
|
|
72
|
+
ctx.fillRect(bx, floorY - 3, 8, 3);
|
|
73
|
+
ctx.fillStyle = TOWEL; // the linen
|
|
74
|
+
ctx.fillRect(bx, floorY - 4, 8, 1);
|
|
75
|
+
if (lying.has(i)) {
|
|
76
|
+
ctx.fillStyle = shade(TOWEL, -10);
|
|
77
|
+
ctx.fillRect(bx + 1, floorY - 5, 6, 1);
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
// Potted greenery bookends the room, a spot of calm color against the stone.
|
|
81
|
+
ctx.fillStyle = shade(FLOOR, -34);
|
|
82
|
+
ctx.fillRect(x + w - 4, floorY - 2, 2, 2); // pot
|
|
83
|
+
ctx.fillStyle = PLANT;
|
|
84
|
+
ctx.fillRect(x + w - 5, floorY - 5, 4, 3); // fronds
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export { spa };
|
|
88
|
+
//# sourceMappingURL=spa.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spa.js","sources":["../../../src/render/pixelSprites/spa.ts"],"sourcesContent":["import type { UnitView } from \"../../simport/view\";\nimport { busyStations, hash, personStanding, roomOccupants, shade, shell, type RoomCtx } from \"./common\";\nimport { layerBreak } from \"./layers\";\n\n/**\n * Modern Spa art: a calm, warm wellness room with a steaming hot tub, a row of\n * massage tables, and potted greenery, with a few guests relaxing that fill in\n * with the real occupant count. Like the nightclub it has no subtypes, so this is\n * one bespoke look. Modern-only (never exported to the 1994 TDT). The spa only\n * ever draws while open (the closed shutter covers its off hours), so this is\n * always the daytime scene.\n *\n * Drawing reads only bake-signature inputs (the real occupant count and a stable\n * geography seed), so a placed room stays cacheable, an empty spa reads calm and\n * unattended, and a TDT id renumber never reshuffles the guests.\n */\n\nconst WALL = \"#2a4740\"; // deep calm teal\nconst FLOOR = \"#d8cbb8\"; // warm stone\nconst WATER = \"#7fd0c4\"; // hot-tub water\nconst TOWEL = \"#f0ece2\"; // massage-table linen\nconst PLANT = \"#4f9a5c\"; // greenery\n\n/** A stable per-room seed from GEOGRAPHY (floor, x), so the guests and steam\n * survive a save/export/import (which renumbers `u.id`). */\nfunction figureSeed(u: Pick<UnitView, \"floor\" | \"x\">): number {\n return (u.floor * 149 + u.x * 23) | 0;\n}\n\nexport function spa(d: RoomCtx, u: UnitView, x: number, y: number, w: number, h: number): void {\n const { ctx } = d;\n const floorY = shell(ctx, x, y, w, h, WALL, FLOOR);\n const seed = figureSeed(u);\n const occ = roomOccupants(u);\n\n // A warm accent band along the top of the back wall, the spa's calm signature.\n ctx.fillStyle = shade(WALL, 22);\n ctx.fillRect(x, y + 3, w, 2);\n\n layerBreak(ctx); // the shell ends; the tub, tables, plants and guests follow\n\n // The hot tub on the left: a raised stone rim with steaming water, plus a few\n // rising steam wisps so the scene reads warm even when empty.\n const tubX = x + 3;\n const tubW = Math.min(Math.round(w * 0.34), w - 6);\n const tubTop = floorY - 7;\n ctx.fillStyle = shade(FLOOR, -28); // stone rim\n ctx.fillRect(tubX, tubTop, tubW, 7);\n ctx.fillStyle = WATER;\n ctx.fillRect(tubX + 1, tubTop + 1, tubW - 2, 4);\n ctx.fillStyle = shade(WATER, 24); // a lighter ripple line\n ctx.fillRect(tubX + 1, tubTop + 2, tubW - 2, 1);\n // Steam wisps rising from the tub (geometry-stable dots).\n ctx.fillStyle = shade(WALL, 40);\n for (let sx = tubX + 2, i = 0; sx < tubX + tubW - 1; sx += 5, i++) {\n const top = tubTop - 5 - (hash(seed + i * 3) > 0.5 ? 1 : 0);\n for (let sy = top; sy < tubTop; sy += 2) ctx.fillRect(sx, sy, 1, 1);\n }\n // A guest soaking in the tub when the spa is busy.\n if (occ > 0) personStanding(ctx, tubX + Math.round(tubW / 2) - 3, tubTop + 1, seed + 5);\n\n // Massage tables on the right: linen-topped beds along the floor line. This\n // row keeps its plain loop and its authored 11px pitch. Unlike the other rows\n // in this pass it is capped at three beds long before the room runs out of\n // wall, so the narrower tile never cost it a bed and there is nothing here for\n // the row helper to put right. Measured at 11 by 44 and at 10 by 45: three\n // beds either way.\n const bedX0 = tubX + tubW + 4;\n const beds: number[] = [];\n for (let bx = bedX0; bx + 8 < x + w - 2 && beds.length < 3; bx += 11) beds.push(bx);\n // Who is on a table: the hash scatters them, the occupancy says how many, and\n // the guest already soaking in the tub is one of the same people. Counting the\n // tub and the tables separately showed two guests for a spa holding one.\n const lying = busyStations(beds.length, occ - (occ > 0 ? 1 : 0), seed * 13);\n beds.forEach((bx, i) => {\n ctx.fillStyle = shade(FLOOR, -18); // the table base\n ctx.fillRect(bx, floorY - 3, 8, 3);\n ctx.fillStyle = TOWEL; // the linen\n ctx.fillRect(bx, floorY - 4, 8, 1);\n if (lying.has(i)) {\n ctx.fillStyle = shade(TOWEL, -10);\n ctx.fillRect(bx + 1, floorY - 5, 6, 1);\n }\n });\n\n // Potted greenery bookends the room, a spot of calm color against the stone.\n ctx.fillStyle = shade(FLOOR, -34);\n ctx.fillRect(x + w - 4, floorY - 2, 2, 2); // pot\n ctx.fillStyle = PLANT;\n ctx.fillRect(x + w - 5, floorY - 5, 4, 3); // fronds\n}\n"],"names":[],"mappings":";;;AAIA;;;;;;;;;;;AAWG;AAEH,MAAM,IAAI,GAAG,SAAS,CAAC;AACvB,MAAM,KAAK,GAAG,SAAS,CAAC;AACxB,MAAM,KAAK,GAAG,SAAS,CAAC;AACxB,MAAM,KAAK,GAAG,SAAS,CAAC;AACxB,MAAM,KAAK,GAAG,SAAS,CAAC;AAExB;AAC6D;AAC7D,SAAS,UAAU,CAAC,CAAgC,EAAA;AAClD,IAAA,OAAO,CAAC,CAAC,CAAC,KAAK,GAAG,GAAG,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,IAAI,CAAC;AACvC;AAEM,SAAU,GAAG,CAAC,CAAU,EAAE,CAAW,EAAE,CAAS,EAAE,CAAS,EAAE,CAAS,EAAE,CAAS,EAAA;AACrF,IAAA,MAAM,EAAE,GAAG,EAAE,GAAG,CAAC;AACjB,IAAA,MAAM,MAAM,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,IAAI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AAQ,CAAC,EAAE,EAAE,MAAM,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;AAClC,QAAA,GAAG,CAAC,SAAS,GAAG,KAAK,CAAC;AACtB,QAAA,GAAG,CAAC,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;AAClC,QAAA,IAAI,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE;YAChB,GAAG,CAAC,SAAS,GAAG,KAAK,CAAC,KAAK,EAAE,CAAC,EAAE,CAAC;AACjC,YAAA,GAAG,CAAC,QAAQ,CAAC,EAAE,GAAG,CAAC,EAAE,MAAM,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;QACxC;AACF,IAAA,CAAC,CAAC;;IAGF,GAAG,CAAC,SAAS,GAAG,KAAK,CAAC,KAAK,EAAE,CAAC,EAAE,CAAC;AACjC,IAAA,GAAG,CAAC,QAAQ,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;AAC1C,IAAA,GAAG,CAAC,SAAS,GAAG,KAAK;AACrB,IAAA,GAAG,CAAC,QAAQ,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;AAC5C;;"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { FacilityKind, UnitState } from "../shared/types";
|
|
2
|
+
import type { UnitView } from "../simport/view";
|
|
3
|
+
import { type RoomCtx } from "./pixelSprites/common";
|
|
4
|
+
/**
|
|
5
|
+
* Faithful "dollhouse cross-section" room art, following the SimTower design
|
|
6
|
+
* spec: a flat pale back wall, a hard floor line, 2–4 big furniture pieces on
|
|
7
|
+
* that line, the upper wall mostly empty, and tiny silhouette people. No
|
|
8
|
+
* flickering window grid, no corner badges — those read as a modern facade and
|
|
9
|
+
* clutter, which is exactly what the original avoids.
|
|
10
|
+
*
|
|
11
|
+
* Drawing is resolution-independent: each routine fills the screen rect it's
|
|
12
|
+
* given. Baking these into fixed-size canvases (for Excalibur sprites) just
|
|
13
|
+
* means calling them once into an offscreen context.
|
|
14
|
+
*
|
|
15
|
+
* This file is the entry point + barrel. The palette, primitives, and per-kind
|
|
16
|
+
* draw routines live in cohesive siblings under `pixelSprites/` and are
|
|
17
|
+
* re-exported here so every existing `import { … } from "./pixelSprites"` keeps
|
|
18
|
+
* working unchanged:
|
|
19
|
+
* - `pixelSprites/common.ts`: palette, seeded-variety helpers, person, shell.
|
|
20
|
+
* - `pixelSprites/residential.ts`: office, condo, hotel.
|
|
21
|
+
* - `pixelSprites/food.ts`: fast food, restaurant, cinema + their look tables.
|
|
22
|
+
* - `pixelSprites/shop.ts`: shop + its look table.
|
|
23
|
+
*/
|
|
24
|
+
export declare function drawRoom(d: RoomCtx, u: UnitView, x: number, y: number, w: number, h: number): void;
|
|
25
|
+
/** Convenience used by the preview/gallery: pick a representative state. */
|
|
26
|
+
export declare function sampleState(kind: FacilityKind): UnitState;
|
|
27
|
+
export { PAL, SHIRTS, SKIN, person, personSeated, personStanding, type RoomCtx } from "./pixelSprites/common";
|
|
28
|
+
export { FASTFOOD_LOOKS, RESTAURANT_LOOKS, FOODHALL_LOOKS, type FastFoodLook, type RestaurantLook } from "./pixelSprites/food";
|
|
29
|
+
export { AMUSEMENTS_LOOKS, type AmusementsLook } from "./pixelSprites/amusements";
|
|
30
|
+
export { BOUTIQUE_LOOKS, type BoutiqueLook } from "./pixelSprites/boutique";
|
|
31
|
+
export { FITNESS_LOOKS, type FitnessLook } from "./pixelSprites/fitness";
|
|
32
|
+
export { CLINIC_LOOKS, type ClinicLook } from "./pixelSprites/clinic";
|
|
33
|
+
export { SHOP_LOOKS, type ShopLook } from "./pixelSprites/shop";
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
import { hasBusinessHours, isOpenAt } from '../presentation/viewKinds.js';
|
|
2
|
+
import { facilityColor } from '../presentation/facilityPresentation.js';
|
|
3
|
+
import { isLateHour, LATE_NIGHT_KINDS } from './lateNight.js';
|
|
4
|
+
import { closedShutter, POPULATED, noticeBadge } from './pixelSprites/common.js';
|
|
5
|
+
export { PAL, SHIRTS, SKIN, person, personSeated, personStanding } from './pixelSprites/common.js';
|
|
6
|
+
import { layerEnd } from './pixelSprites/layers.js';
|
|
7
|
+
import { hotel, condo, office } from './pixelSprites/residential.js';
|
|
8
|
+
import { rentalApartment, rentalStudio } from './pixelSprites/residentialRentalSprites.js';
|
|
9
|
+
import { cinema, foodHall, restaurant, fastFood } from './pixelSprites/food.js';
|
|
10
|
+
import { amusements } from './pixelSprites/amusements.js';
|
|
11
|
+
export { AMUSEMENTS_LOOKS } from './pixelSprites/amusements.js';
|
|
12
|
+
import { boutiqueBay } from './pixelSprites/boutique.js';
|
|
13
|
+
export { BOUTIQUE_LOOKS } from './pixelSprites/boutique.js';
|
|
14
|
+
import { fitnessClub } from './pixelSprites/fitness.js';
|
|
15
|
+
export { FITNESS_LOOKS } from './pixelSprites/fitness.js';
|
|
16
|
+
import { clinic } from './pixelSprites/clinic.js';
|
|
17
|
+
export { CLINIC_LOOKS } from './pixelSprites/clinic.js';
|
|
18
|
+
import { nightclub } from './pixelSprites/nightclub.js';
|
|
19
|
+
import { spa } from './pixelSprites/spa.js';
|
|
20
|
+
import { skyBar } from './pixelSprites/skyBar.js';
|
|
21
|
+
import { daycare } from './pixelSprites/daycare.js';
|
|
22
|
+
import { shop } from './pixelSprites/shop.js';
|
|
23
|
+
export { FASTFOOD_LOOKS, FOODHALL_LOOKS, RESTAURANT_LOOKS } from './pixelSprites/food.looks.js';
|
|
24
|
+
export { SHOP_LOOKS } from './pixelSprites/shop.looks.js';
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Faithful "dollhouse cross-section" room art, following the SimTower design
|
|
28
|
+
* spec: a flat pale back wall, a hard floor line, 2–4 big furniture pieces on
|
|
29
|
+
* that line, the upper wall mostly empty, and tiny silhouette people. No
|
|
30
|
+
* flickering window grid, no corner badges — those read as a modern facade and
|
|
31
|
+
* clutter, which is exactly what the original avoids.
|
|
32
|
+
*
|
|
33
|
+
* Drawing is resolution-independent: each routine fills the screen rect it's
|
|
34
|
+
* given. Baking these into fixed-size canvases (for Excalibur sprites) just
|
|
35
|
+
* means calling them once into an offscreen context.
|
|
36
|
+
*
|
|
37
|
+
* This file is the entry point + barrel. The palette, primitives, and per-kind
|
|
38
|
+
* draw routines live in cohesive siblings under `pixelSprites/` and are
|
|
39
|
+
* re-exported here so every existing `import { … } from "./pixelSprites"` keeps
|
|
40
|
+
* working unchanged:
|
|
41
|
+
* - `pixelSprites/common.ts`: palette, seeded-variety helpers, person, shell.
|
|
42
|
+
* - `pixelSprites/residential.ts`: office, condo, hotel.
|
|
43
|
+
* - `pixelSprites/food.ts`: fast food, restaurant, cinema + their look tables.
|
|
44
|
+
* - `pixelSprites/shop.ts`: shop + its look table.
|
|
45
|
+
*/
|
|
46
|
+
function drawRoom(d, u, x, y, w, h) {
|
|
47
|
+
const { ctx } = d;
|
|
48
|
+
// Commercial shows its shutter whenever it's outside business hours.
|
|
49
|
+
if (hasBusinessHours(u.kind) &&
|
|
50
|
+
u.state !== "empty" &&
|
|
51
|
+
u.state !== "construction" &&
|
|
52
|
+
!isOpenAt(u.kind, d.hour)) {
|
|
53
|
+
closedShutter(d, x, y, w, h, facilityColor(u.kind));
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
switch (u.kind) {
|
|
57
|
+
case "office":
|
|
58
|
+
office(d, u, x, y, w, h);
|
|
59
|
+
break;
|
|
60
|
+
case "condo":
|
|
61
|
+
condo(d, u, x, y, w, h);
|
|
62
|
+
break;
|
|
63
|
+
case "rentalStudio":
|
|
64
|
+
rentalStudio(d, u, x, y, w, h);
|
|
65
|
+
break;
|
|
66
|
+
case "rentalApartment":
|
|
67
|
+
rentalApartment(d, u, x, y, w, h);
|
|
68
|
+
break;
|
|
69
|
+
case "hotelSingle":
|
|
70
|
+
hotel(d, u, x, y, w, h, 1);
|
|
71
|
+
break;
|
|
72
|
+
case "hotelDouble":
|
|
73
|
+
hotel(d, u, x, y, w, h, 2);
|
|
74
|
+
break;
|
|
75
|
+
case "hotelSuite":
|
|
76
|
+
hotel(d, u, x, y, w, h, 3);
|
|
77
|
+
break;
|
|
78
|
+
case "fastFood":
|
|
79
|
+
fastFood(d, u, x, y, w, h);
|
|
80
|
+
break;
|
|
81
|
+
case "restaurant":
|
|
82
|
+
restaurant(d, u, x, y, w, h);
|
|
83
|
+
break;
|
|
84
|
+
case "foodHall":
|
|
85
|
+
// A hall of food stalls: rendered with the restaurant drawer, but each
|
|
86
|
+
// stall subtype carries its own look so the stalls read as distinct.
|
|
87
|
+
foodHall(d, u, x, y, w, h);
|
|
88
|
+
break;
|
|
89
|
+
case "amusements":
|
|
90
|
+
// A Modern arcade / games hall; each attraction subtype (arcade, VR,
|
|
91
|
+
// claw, mini-golf) draws its own interior under a shared neon marquee.
|
|
92
|
+
amusements(d, u, x, y, w, h);
|
|
93
|
+
break;
|
|
94
|
+
case "boutiqueBay":
|
|
95
|
+
// A Modern bay of small trades; each trade subtype (florist, barber,
|
|
96
|
+
// phone repair, vintage, tattoo, records, gallery) draws its own shopfront.
|
|
97
|
+
boutiqueBay(d, u, x, y, w, h);
|
|
98
|
+
break;
|
|
99
|
+
case "fitnessClub":
|
|
100
|
+
// A Modern members' gym; each format subtype (weights, yoga, spin, boxing,
|
|
101
|
+
// climbing) draws its own equipment under a shared mirror strip.
|
|
102
|
+
fitnessClub(d, u, x, y, w, h);
|
|
103
|
+
break;
|
|
104
|
+
case "clinic":
|
|
105
|
+
// A Modern health clinic; each practice subtype (dental, urgent care,
|
|
106
|
+
// optometry, pharmacy, physio) draws its own room under a clinical trim band.
|
|
107
|
+
clinic(d, u, x, y, w, h);
|
|
108
|
+
break;
|
|
109
|
+
case "nightclub":
|
|
110
|
+
// A Modern nightclub: one dark room with colored beams, a DJ booth, a
|
|
111
|
+
// glowing dance floor, and a crowd that fills in with occupancy.
|
|
112
|
+
nightclub(d, u, x, y, w, h);
|
|
113
|
+
break;
|
|
114
|
+
case "spa":
|
|
115
|
+
// A Modern wellness spa: one calm room with a steaming hot tub, massage
|
|
116
|
+
// tables, and greenery, with guests that fill in with occupancy.
|
|
117
|
+
spa(d, u, x, y, w, h);
|
|
118
|
+
break;
|
|
119
|
+
case "skyBar":
|
|
120
|
+
// A Modern rooftop bar: a dusk lounge with a lit-skyline window, a bar of
|
|
121
|
+
// glowing bottles, and patrons that fill in with occupancy.
|
|
122
|
+
skyBar(d, u, x, y, w, h);
|
|
123
|
+
break;
|
|
124
|
+
case "daycare":
|
|
125
|
+
// A Modern daycare: a bright playroom with a soft play mat, toy shelf, a
|
|
126
|
+
// caregiver, and small children that fill in with occupancy.
|
|
127
|
+
daycare(d, u, x, y, w, h);
|
|
128
|
+
break;
|
|
129
|
+
case "shop":
|
|
130
|
+
shop(d, u, x, y, w, h);
|
|
131
|
+
break;
|
|
132
|
+
case "cinema":
|
|
133
|
+
cinema(d, u, x, y, w, h);
|
|
134
|
+
break;
|
|
135
|
+
default:
|
|
136
|
+
// Service / special facilities keep their existing iconographic look.
|
|
137
|
+
ctx.fillStyle = "#3a3f4a";
|
|
138
|
+
ctx.fillRect(x, y, w, h);
|
|
139
|
+
}
|
|
140
|
+
// The furniture ends here: the night scrim and the notice badge draw over
|
|
141
|
+
// the room after it, so the atlas's depth layers put them on the shell.
|
|
142
|
+
layerEnd(ctx);
|
|
143
|
+
// Lights out at night: an empty home/workplace, or a home whose residents
|
|
144
|
+
// are asleep in the small hours. Every kind in LATE_NIGHT_KINDS (the condo and
|
|
145
|
+
// both rentals) hides its residents then, so all three dim alike; a rental no
|
|
146
|
+
// longer reads brighter at 2 AM than the condo beside it (owner, #1025).
|
|
147
|
+
const lateNight = isLateHour(d.hour);
|
|
148
|
+
const emptyAtNight = d.lit && u.occupants <= 0 && POPULATED.has(u.kind);
|
|
149
|
+
const asleepHome = LATE_NIGHT_KINDS.has(u.kind) && u.occupants > 0 && lateNight;
|
|
150
|
+
if ((emptyAtNight || asleepHome) && u.state !== "empty" && u.state !== "construction") {
|
|
151
|
+
ctx.fillStyle = "rgba(8,10,22,0.5)";
|
|
152
|
+
ctx.fillRect(x, y, w, h);
|
|
153
|
+
}
|
|
154
|
+
// A tenant on notice (satisfaction bottomed out) — flag it so the player can
|
|
155
|
+
// spot the at-risk lease at a glance and fix the cause before they leave.
|
|
156
|
+
if (u.state === "vacating")
|
|
157
|
+
noticeBadge(ctx, x, y, w, h);
|
|
158
|
+
}
|
|
159
|
+
/** Convenience used by the preview/gallery: pick a representative state. */
|
|
160
|
+
function sampleState(kind) {
|
|
161
|
+
if (kind === "hotelSingle" || kind === "hotelDouble" || kind === "hotelSuite")
|
|
162
|
+
return "occupied";
|
|
163
|
+
return "occupied";
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
export { drawRoom, sampleState };
|
|
167
|
+
//# sourceMappingURL=pixelSprites.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pixelSprites.js","sources":["../../src/render/pixelSprites.ts"],"sourcesContent":["import type { FacilityKind, UnitState } from \"../shared/types\";\nimport type { UnitView } from \"../simport/view\";\nimport { hasBusinessHours, isOpenAt } from \"../presentation/viewKinds\";\nimport { facilityColor } from \"../presentation/facilityPresentation\";\nimport { LATE_NIGHT_KINDS, isLateHour } from \"./lateNight\";\nimport { POPULATED, closedShutter, noticeBadge, type RoomCtx } from \"./pixelSprites/common\";\nimport { layerEnd } from \"./pixelSprites/layers\";\nimport { condo, hotel, office } from \"./pixelSprites/residential\";\nimport { rentalApartment, rentalStudio } from \"./pixelSprites/residentialRentalSprites\";\nimport { cinema, fastFood, foodHall, restaurant } from \"./pixelSprites/food\";\nimport { amusements } from \"./pixelSprites/amusements\";\nimport { boutiqueBay } from \"./pixelSprites/boutique\";\nimport { fitnessClub } from \"./pixelSprites/fitness\";\nimport { clinic } from \"./pixelSprites/clinic\";\nimport { nightclub } from \"./pixelSprites/nightclub\";\nimport { spa } from \"./pixelSprites/spa\";\nimport { skyBar } from \"./pixelSprites/skyBar\";\nimport { daycare } from \"./pixelSprites/daycare\";\nimport { shop } from \"./pixelSprites/shop\";\n\n/**\n * Faithful \"dollhouse cross-section\" room art, following the SimTower design\n * spec: a flat pale back wall, a hard floor line, 2–4 big furniture pieces on\n * that line, the upper wall mostly empty, and tiny silhouette people. No\n * flickering window grid, no corner badges — those read as a modern facade and\n * clutter, which is exactly what the original avoids.\n *\n * Drawing is resolution-independent: each routine fills the screen rect it's\n * given. Baking these into fixed-size canvases (for Excalibur sprites) just\n * means calling them once into an offscreen context.\n *\n * This file is the entry point + barrel. The palette, primitives, and per-kind\n * draw routines live in cohesive siblings under `pixelSprites/` and are\n * re-exported here so every existing `import { … } from \"./pixelSprites\"` keeps\n * working unchanged:\n * - `pixelSprites/common.ts`: palette, seeded-variety helpers, person, shell.\n * - `pixelSprites/residential.ts`: office, condo, hotel.\n * - `pixelSprites/food.ts`: fast food, restaurant, cinema + their look tables.\n * - `pixelSprites/shop.ts`: shop + its look table.\n */\n\nexport function drawRoom(d: RoomCtx, u: UnitView, x: number, y: number, w: number, h: number): void {\n const { ctx } = d;\n // Commercial shows its shutter whenever it's outside business hours.\n if (\n hasBusinessHours(u.kind) &&\n u.state !== \"empty\" &&\n u.state !== \"construction\" &&\n !isOpenAt(u.kind, d.hour)\n ) {\n closedShutter(d, x, y, w, h, facilityColor(u.kind));\n return;\n }\n switch (u.kind) {\n case \"office\":\n office(d, u, x, y, w, h);\n break;\n case \"condo\":\n condo(d, u, x, y, w, h);\n break;\n case \"rentalStudio\":\n rentalStudio(d, u, x, y, w, h);\n break;\n case \"rentalApartment\":\n rentalApartment(d, u, x, y, w, h);\n break;\n case \"hotelSingle\":\n hotel(d, u, x, y, w, h, 1);\n break;\n case \"hotelDouble\":\n hotel(d, u, x, y, w, h, 2);\n break;\n case \"hotelSuite\":\n hotel(d, u, x, y, w, h, 3);\n break;\n case \"fastFood\":\n fastFood(d, u, x, y, w, h);\n break;\n case \"restaurant\":\n restaurant(d, u, x, y, w, h);\n break;\n case \"foodHall\":\n // A hall of food stalls: rendered with the restaurant drawer, but each\n // stall subtype carries its own look so the stalls read as distinct.\n foodHall(d, u, x, y, w, h);\n break;\n case \"amusements\":\n // A Modern arcade / games hall; each attraction subtype (arcade, VR,\n // claw, mini-golf) draws its own interior under a shared neon marquee.\n amusements(d, u, x, y, w, h);\n break;\n case \"boutiqueBay\":\n // A Modern bay of small trades; each trade subtype (florist, barber,\n // phone repair, vintage, tattoo, records, gallery) draws its own shopfront.\n boutiqueBay(d, u, x, y, w, h);\n break;\n case \"fitnessClub\":\n // A Modern members' gym; each format subtype (weights, yoga, spin, boxing,\n // climbing) draws its own equipment under a shared mirror strip.\n fitnessClub(d, u, x, y, w, h);\n break;\n case \"clinic\":\n // A Modern health clinic; each practice subtype (dental, urgent care,\n // optometry, pharmacy, physio) draws its own room under a clinical trim band.\n clinic(d, u, x, y, w, h);\n break;\n case \"nightclub\":\n // A Modern nightclub: one dark room with colored beams, a DJ booth, a\n // glowing dance floor, and a crowd that fills in with occupancy.\n nightclub(d, u, x, y, w, h);\n break;\n case \"spa\":\n // A Modern wellness spa: one calm room with a steaming hot tub, massage\n // tables, and greenery, with guests that fill in with occupancy.\n spa(d, u, x, y, w, h);\n break;\n case \"skyBar\":\n // A Modern rooftop bar: a dusk lounge with a lit-skyline window, a bar of\n // glowing bottles, and patrons that fill in with occupancy.\n skyBar(d, u, x, y, w, h);\n break;\n case \"daycare\":\n // A Modern daycare: a bright playroom with a soft play mat, toy shelf, a\n // caregiver, and small children that fill in with occupancy.\n daycare(d, u, x, y, w, h);\n break;\n case \"shop\":\n shop(d, u, x, y, w, h);\n break;\n case \"cinema\":\n cinema(d, u, x, y, w, h);\n break;\n default:\n // Service / special facilities keep their existing iconographic look.\n ctx.fillStyle = \"#3a3f4a\";\n ctx.fillRect(x, y, w, h);\n }\n // The furniture ends here: the night scrim and the notice badge draw over\n // the room after it, so the atlas's depth layers put them on the shell.\n layerEnd(ctx);\n // Lights out at night: an empty home/workplace, or a home whose residents\n // are asleep in the small hours. Every kind in LATE_NIGHT_KINDS (the condo and\n // both rentals) hides its residents then, so all three dim alike; a rental no\n // longer reads brighter at 2 AM than the condo beside it (owner, #1025).\n const lateNight = isLateHour(d.hour);\n const emptyAtNight = d.lit && u.occupants <= 0 && POPULATED.has(u.kind);\n const asleepHome = LATE_NIGHT_KINDS.has(u.kind) && u.occupants > 0 && lateNight;\n if ((emptyAtNight || asleepHome) && u.state !== \"empty\" && u.state !== \"construction\") {\n ctx.fillStyle = \"rgba(8,10,22,0.5)\";\n ctx.fillRect(x, y, w, h);\n }\n // A tenant on notice (satisfaction bottomed out) — flag it so the player can\n // spot the at-risk lease at a glance and fix the cause before they leave.\n if (u.state === \"vacating\") noticeBadge(ctx, x, y, w, h);\n}\n\n/** Convenience used by the preview/gallery: pick a representative state. */\nexport function sampleState(kind: FacilityKind): UnitState {\n if (kind === \"hotelSingle\" || kind === \"hotelDouble\" || kind === \"hotelSuite\") return \"occupied\";\n return \"occupied\";\n}\n\n// ---- Barrel: preserve the original public surface of this module. ----\nexport { PAL, SHIRTS, SKIN, person, personSeated, personStanding, type RoomCtx } from \"./pixelSprites/common\";\nexport { FASTFOOD_LOOKS, RESTAURANT_LOOKS, FOODHALL_LOOKS, type FastFoodLook, type RestaurantLook } from \"./pixelSprites/food\";\nexport { AMUSEMENTS_LOOKS, type AmusementsLook } from \"./pixelSprites/amusements\";\nexport { BOUTIQUE_LOOKS, type BoutiqueLook } from \"./pixelSprites/boutique\";\nexport { FITNESS_LOOKS, type FitnessLook } from \"./pixelSprites/fitness\";\nexport { CLINIC_LOOKS, type ClinicLook } from \"./pixelSprites/clinic\";\nexport { SHOP_LOOKS, type ShopLook } from \"./pixelSprites/shop\";\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;A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AAC,KAAK,KAAK,OAAO,IAAI,CAAC,CAAC,KAAK,KAAK,cAAc,EAAE;AACrF,QAAA,GAAG,CAAC,SAAS,GAAG,mBAAmB;QACnC,GAAG,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;IAC1B;;;AAGA,IAAA,IAAI,CAAC,CAAC,KAAK,KAAK,UAAU;QAAE,WAAW,CAAC,GAAG,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;AAC1D;AAEA;AACM,SAAU,WAAW,CAAC,IAAkB,EAAA;IAC5C,IAAI,IAAI,KAAK,aAAa,IAAI,IAAI,KAAK,aAAa,IAAI,IAAI,KAAK,YAAY;AAAE,QAAA,OAAO,UAAU;AAChG,IAAA,OAAO,UAAU;AACnB;;"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The fixed world-space region grid for room composition (CAP-2 of the mobile
|
|
3
|
+
* render-perf spec, `_bmad-output/specs/spec-render-perf-mobile-zoom/`,
|
|
4
|
+
* design in `region-design.md`). Settled room units draw into one cached
|
|
5
|
+
* canvas per region instead of one per unit, so the GPU sees a few dozen
|
|
6
|
+
* textures instead of ~1,635 and its sprite batches stop flushing on texture
|
|
7
|
+
* slots. Pure module, no Excalibur import: the constants and the footprint
|
|
8
|
+
* mapping are unit-tested directly, including the pinned GPU texture-size
|
|
9
|
+
* ceiling (the TRANSPORT_BAND_FLOORS precedent in scale.ts).
|
|
10
|
+
*
|
|
11
|
+
* Region size: 32 tiles x 20 floors = 352 x 880 px. The taller-thinner cut
|
|
12
|
+
* won the upload micro-bench (spec memlog 2026-07-15): it absorbs a drain
|
|
13
|
+
* budget of four full re-uploads per frame with no measurable frame-time
|
|
14
|
+
* change on the software-GL venue, and both pixel sides sit well under the
|
|
15
|
+
* 2048 MAX_TEXTURE_SIZE floor of low-end mobile GPUs.
|
|
16
|
+
*/
|
|
17
|
+
export declare const REGION_TILES = 32;
|
|
18
|
+
export declare const REGION_FLOORS = 20;
|
|
19
|
+
/** Grid dimensions in regions, from the view's world (the tower catalog's).
|
|
20
|
+
* The lot is 375 tiles x 110 floors, so 12 x 6 regions bound the whole world;
|
|
21
|
+
* only regions holding a settled room ever materialize a canvas. */
|
|
22
|
+
export declare function regionCols(): number;
|
|
23
|
+
export declare function regionRows(): number;
|
|
24
|
+
/** Column of the region containing this tile. */
|
|
25
|
+
export declare function regionCol(tile: number): number;
|
|
26
|
+
/** Row of the region containing this floor (rows count up from minFloor). */
|
|
27
|
+
export declare function regionRow(floor: number): number;
|
|
28
|
+
/** Stable scalar key for a region cell. */
|
|
29
|
+
export declare function regionKey(col: number, row: number): number;
|
|
30
|
+
/** Every region key a unit footprint intersects: floors `floor..floor+floors-1`,
|
|
31
|
+
* tiles `x..x+width-1`. There is no small upper bound: a typical room near a
|
|
32
|
+
* boundary lands in two (corner case four) regions, while the full-lot metro
|
|
33
|
+
* spans every column. Each member region draws the whole unit clipped to its
|
|
34
|
+
* own rect, so the union equals the unclipped draw with no visible seam (the
|
|
35
|
+
* transport-band argument). Ranges clamp to the grid: placement and save
|
|
36
|
+
* import already reject off-lot footprints, but a raw caller must never be
|
|
37
|
+
* handed a key outside `[0, regionCols() * regionRows())`, because column
|
|
38
|
+
* overflow would alias into the next row's keys. */
|
|
39
|
+
export declare function regionsOf(floor: number, x: number, width: number, floors: number): number[];
|
|
40
|
+
/** World-pixel rectangle of a region: `x, y` is the TOP-LEFT corner (matching
|
|
41
|
+
* the anchor-0,0 actor convention), `w, h` the canvas size. Floor f occupies
|
|
42
|
+
* world y in [-f*FLOOR, -(f-1)*FLOOR), so the region's top edge sits at the
|
|
43
|
+
* top of its highest floor. */
|
|
44
|
+
export declare function regionRect(key: number): {
|
|
45
|
+
x: number;
|
|
46
|
+
y: number;
|
|
47
|
+
w: number;
|
|
48
|
+
h: number;
|
|
49
|
+
};
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { viewWorld } from '../presentation/viewWorld.js';
|
|
2
|
+
import { FLOOR, TILE } from './scale.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* The fixed world-space region grid for room composition (CAP-2 of the mobile
|
|
6
|
+
* render-perf spec, `_bmad-output/specs/spec-render-perf-mobile-zoom/`,
|
|
7
|
+
* design in `region-design.md`). Settled room units draw into one cached
|
|
8
|
+
* canvas per region instead of one per unit, so the GPU sees a few dozen
|
|
9
|
+
* textures instead of ~1,635 and its sprite batches stop flushing on texture
|
|
10
|
+
* slots. Pure module, no Excalibur import: the constants and the footprint
|
|
11
|
+
* mapping are unit-tested directly, including the pinned GPU texture-size
|
|
12
|
+
* ceiling (the TRANSPORT_BAND_FLOORS precedent in scale.ts).
|
|
13
|
+
*
|
|
14
|
+
* Region size: 32 tiles x 20 floors = 352 x 880 px. The taller-thinner cut
|
|
15
|
+
* won the upload micro-bench (spec memlog 2026-07-15): it absorbs a drain
|
|
16
|
+
* budget of four full re-uploads per frame with no measurable frame-time
|
|
17
|
+
* change on the software-GL venue, and both pixel sides sit well under the
|
|
18
|
+
* 2048 MAX_TEXTURE_SIZE floor of low-end mobile GPUs.
|
|
19
|
+
*/
|
|
20
|
+
const REGION_TILES = 32;
|
|
21
|
+
const REGION_FLOORS = 20;
|
|
22
|
+
/** Grid dimensions in regions, from the view's world (the tower catalog's).
|
|
23
|
+
* The lot is 375 tiles x 110 floors, so 12 x 6 regions bound the whole world;
|
|
24
|
+
* only regions holding a settled room ever materialize a canvas. */
|
|
25
|
+
function regionCols() {
|
|
26
|
+
return Math.ceil(viewWorld().lotWidth / REGION_TILES);
|
|
27
|
+
}
|
|
28
|
+
function regionRows() {
|
|
29
|
+
const w = viewWorld();
|
|
30
|
+
return Math.ceil((w.maxFloor - w.minFloor + 1) / REGION_FLOORS);
|
|
31
|
+
}
|
|
32
|
+
/** Column of the region containing this tile. */
|
|
33
|
+
function regionCol(tile) {
|
|
34
|
+
return Math.floor(tile / REGION_TILES);
|
|
35
|
+
}
|
|
36
|
+
/** Row of the region containing this floor (rows count up from minFloor). */
|
|
37
|
+
function regionRow(floor) {
|
|
38
|
+
return Math.floor((floor - viewWorld().minFloor) / REGION_FLOORS);
|
|
39
|
+
}
|
|
40
|
+
/** Stable scalar key for a region cell. */
|
|
41
|
+
function regionKey(col, row) {
|
|
42
|
+
return row * regionCols() + col;
|
|
43
|
+
}
|
|
44
|
+
/** Every region key a unit footprint intersects: floors `floor..floor+floors-1`,
|
|
45
|
+
* tiles `x..x+width-1`. There is no small upper bound: a typical room near a
|
|
46
|
+
* boundary lands in two (corner case four) regions, while the full-lot metro
|
|
47
|
+
* spans every column. Each member region draws the whole unit clipped to its
|
|
48
|
+
* own rect, so the union equals the unclipped draw with no visible seam (the
|
|
49
|
+
* transport-band argument). Ranges clamp to the grid: placement and save
|
|
50
|
+
* import already reject off-lot footprints, but a raw caller must never be
|
|
51
|
+
* handed a key outside `[0, regionCols() * regionRows())`, because column
|
|
52
|
+
* overflow would alias into the next row's keys. */
|
|
53
|
+
function regionsOf(floor, x, width, floors) {
|
|
54
|
+
const c0 = Math.max(0, regionCol(x));
|
|
55
|
+
const c1 = Math.min(regionCol(x + width - 1), regionCols() - 1);
|
|
56
|
+
const r0 = Math.max(0, regionRow(floor));
|
|
57
|
+
const r1 = Math.min(regionRow(floor + floors - 1), regionRows() - 1);
|
|
58
|
+
const keys = [];
|
|
59
|
+
for (let r = r0; r <= r1; r++)
|
|
60
|
+
for (let c = c0; c <= c1; c++)
|
|
61
|
+
keys.push(regionKey(c, r));
|
|
62
|
+
return keys;
|
|
63
|
+
}
|
|
64
|
+
/** World-pixel rectangle of a region: `x, y` is the TOP-LEFT corner (matching
|
|
65
|
+
* the anchor-0,0 actor convention), `w, h` the canvas size. Floor f occupies
|
|
66
|
+
* world y in [-f*FLOOR, -(f-1)*FLOOR), so the region's top edge sits at the
|
|
67
|
+
* top of its highest floor. */
|
|
68
|
+
function regionRect(key) {
|
|
69
|
+
const cols = regionCols();
|
|
70
|
+
const row = Math.floor(key / cols);
|
|
71
|
+
const col = key % cols;
|
|
72
|
+
const topFloor = viewWorld().minFloor + (row + 1) * REGION_FLOORS - 1;
|
|
73
|
+
return {
|
|
74
|
+
x: col * REGION_TILES * TILE,
|
|
75
|
+
y: -topFloor * FLOOR,
|
|
76
|
+
w: REGION_TILES * TILE,
|
|
77
|
+
h: REGION_FLOORS * FLOOR,
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export { REGION_FLOORS, REGION_TILES, regionCol, regionCols, regionKey, regionRect, regionRow, regionRows, regionsOf };
|
|
82
|
+
//# sourceMappingURL=regionGrid.js.map
|