@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,243 @@
|
|
|
1
|
+
import { shade, busyStations, castShadow, personStanding, hash, shell, roomOccupants } from './common.js';
|
|
2
|
+
import { artRow, authoredWidth } from './artScale.js';
|
|
3
|
+
import { layerBreak, layerEnd } from './layers.js';
|
|
4
|
+
|
|
5
|
+
const AMUSEMENTS_DEFAULT = { wall: "#201830", floor: "#2A2038", neon: "#F04AA0", attraction: "arcade" };
|
|
6
|
+
const AMUSEMENTS_LOOKS = {
|
|
7
|
+
"Classic Arcade": { wall: "#201830", floor: "#2A2038", neon: "#F04AA0", attraction: "arcade" },
|
|
8
|
+
"VR Lounge": { wall: "#101A2E", floor: "#16203A", neon: "#3AD0E0", attraction: "vr" },
|
|
9
|
+
"Claw Parlor": { wall: "#3A1630", floor: "#2E1828", neon: "#FFC24A", attraction: "claw" },
|
|
10
|
+
"Mini Golf": { wall: "#123018", floor: "#1E7A3A", neon: "#7AE06A", attraction: "golf" },
|
|
11
|
+
};
|
|
12
|
+
/** A stable per-room seed from GEOGRAPHY (floor, x), so the crowd and screen
|
|
13
|
+
* colors survive a save/export/import (which renumbers `u.id`). */
|
|
14
|
+
function figureSeed(u) {
|
|
15
|
+
return (u.floor * 131 + u.x * 17) >>> 0;
|
|
16
|
+
}
|
|
17
|
+
/** The five arcade screen hues, a cheerful spread that keeps the dark room lively. */
|
|
18
|
+
const SCREEN_HUES = ["#F0503A", "#3AC0F0", "#6BE05A", "#F0C43A", "#C060F0"];
|
|
19
|
+
/** A small glowing screen: a bright field with a 1px inner scanline, so a dark
|
|
20
|
+
* arcade reads as full of lit displays rather than black boxes. */
|
|
21
|
+
function screen(ctx, x, y, w, h, hue) {
|
|
22
|
+
ctx.fillStyle = shade(hue, -50);
|
|
23
|
+
ctx.fillRect(x - 1, y - 1, w + 2, h + 2); // dark bezel
|
|
24
|
+
ctx.fillStyle = hue;
|
|
25
|
+
ctx.fillRect(x, y, w, h);
|
|
26
|
+
ctx.fillStyle = shade(hue, 60); // bright highlight blip
|
|
27
|
+
ctx.fillRect(x + 1, y + 1, Math.max(1, w - 3), 1);
|
|
28
|
+
}
|
|
29
|
+
/** The marquee band: the shared anchor shape. A dark header strip with a glowing
|
|
30
|
+
* neon rule and evenly spaced bulb dots, so every attraction is unmistakably an
|
|
31
|
+
* amusements hall. Returns the Y just below the band. */
|
|
32
|
+
function marquee(ctx, x, y, w, neon, lit) {
|
|
33
|
+
const band = 5;
|
|
34
|
+
ctx.fillStyle = "#14101C";
|
|
35
|
+
ctx.fillRect(x, y, w, band);
|
|
36
|
+
ctx.fillStyle = neon; // the glowing neon rule
|
|
37
|
+
ctx.fillRect(x, y + band - 2, w, 1);
|
|
38
|
+
const bulb = lit ? shade(neon, 70) : shade(neon, -20);
|
|
39
|
+
for (let bx = x + 3; bx < x + w - 1; bx += 7) {
|
|
40
|
+
ctx.fillStyle = bulb;
|
|
41
|
+
ctx.fillRect(bx, y + 1, 2, 2);
|
|
42
|
+
}
|
|
43
|
+
return y + band;
|
|
44
|
+
}
|
|
45
|
+
function drawArcade(ctx, x, floorY, w, aw, top, look, occ, seed) {
|
|
46
|
+
// A row of arcade cabinets along the back wall, each a tall box with a glowing
|
|
47
|
+
// screen and a lit control panel; players stand at a share of them.
|
|
48
|
+
const cabW = 11;
|
|
49
|
+
const gap = 4;
|
|
50
|
+
const cabH = Math.min(floorY - top - 2, 22);
|
|
51
|
+
const cabY = floorY - cabH;
|
|
52
|
+
// Cabinet anchors: the cabinet-plus-gap slot is authored art, so the row is
|
|
53
|
+
// counted against the authored run (the hall's width in tiles) and fitted
|
|
54
|
+
// into the screen run by `artRow`. Counting slots off the pixel width retired a cabinet, and the
|
|
55
|
+
// player standing at it, when the tile narrowed. The far margin is 5 rather
|
|
56
|
+
// than the near 3 because a player stands at the cabinet's right edge and
|
|
57
|
+
// carries a contact-shadow column past it; at 3 the last one reached outside
|
|
58
|
+
// the hall and was clipped, which is this same bug wearing a different hat.
|
|
59
|
+
// At the 12-tile hall the catalog ships, the count is the same either way; at
|
|
60
|
+
// a few other widths the wider margin does cost a cabinet, which is the price
|
|
61
|
+
// of keeping every player whole.
|
|
62
|
+
const spots = artRow(aw - 3 - 5 - cabW, x + 3, x + w - 5 - cabW, cabW + gap, 1, cabW);
|
|
63
|
+
const busy = busyStations(spots.length, occ, seed * 31);
|
|
64
|
+
spots.forEach((cx, i) => {
|
|
65
|
+
ctx.fillStyle = shade(look.wall, 26); // cabinet body
|
|
66
|
+
ctx.fillRect(cx, cabY, cabW, cabH);
|
|
67
|
+
ctx.fillStyle = shade(look.wall, 44); // lit side edge
|
|
68
|
+
ctx.fillRect(cx + cabW - 1, cabY, 1, cabH);
|
|
69
|
+
screen(ctx, cx + 2, cabY + 2, cabW - 4, Math.round(cabH * 0.4), SCREEN_HUES[(i + seed) % SCREEN_HUES.length]);
|
|
70
|
+
ctx.fillStyle = look.neon; // control-panel light strip
|
|
71
|
+
ctx.fillRect(cx + 1, cabY + Math.round(cabH * 0.62), cabW - 2, 1);
|
|
72
|
+
castShadow(ctx, cx, floorY, cabW);
|
|
73
|
+
});
|
|
74
|
+
// A player at the cabinets the occupancy fills, scattered by the hash. Drawn
|
|
75
|
+
// after every cabinet: a player stands at a cabinet's right edge and reaches
|
|
76
|
+
// into the gap, so where the row compresses the next cabinet would otherwise
|
|
77
|
+
// paint over part of them.
|
|
78
|
+
spots.forEach((cx, i) => {
|
|
79
|
+
if (busy.has(i))
|
|
80
|
+
personStanding(ctx, cx + cabW - 2, floorY, seed + i * 7);
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
function drawVr(ctx, x, floorY, w, top, look, occ, seed) {
|
|
84
|
+
// A sleek lounge: floor pods marked by a glowing ring, each with a standing
|
|
85
|
+
// player wearing a bright headset visor. Cooler and emptier than the arcade.
|
|
86
|
+
const podGap = Math.max(18, Math.round((w - 8) / 3));
|
|
87
|
+
let i = 0;
|
|
88
|
+
for (let px = x + Math.round(podGap / 2); px < x + w - 6; px += podGap, i++) {
|
|
89
|
+
// Glowing floor ring under the pod.
|
|
90
|
+
ctx.fillStyle = look.neon;
|
|
91
|
+
ctx.fillRect(px - 6, floorY - 1, 12, 1);
|
|
92
|
+
ctx.fillStyle = shade(look.neon, -40);
|
|
93
|
+
ctx.fillRect(px - 6, floorY, 12, 1);
|
|
94
|
+
// A tall accent pillar with a light bar (the pod's tracker mast).
|
|
95
|
+
ctx.fillStyle = shade(look.wall, 30);
|
|
96
|
+
ctx.fillRect(px - 7, top + 2, 2, floorY - top - 3);
|
|
97
|
+
ctx.fillStyle = look.neon;
|
|
98
|
+
ctx.fillRect(px - 7, top + 4, 2, 4);
|
|
99
|
+
if (i < occ) {
|
|
100
|
+
personStanding(ctx, px - 2, floorY, seed + i * 13);
|
|
101
|
+
// Bright visor over the figure's face.
|
|
102
|
+
ctx.fillStyle = shade(look.neon, 40);
|
|
103
|
+
ctx.fillRect(px - 1, floorY - 16, 5, 2);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
function drawClaw(ctx, x, floorY, w, aw, top, look, occ, seed) {
|
|
108
|
+
// A bank of claw machines: glass cases lit from within, packed with colorful
|
|
109
|
+
// plush prizes, a claw rail across the top. Candy-bright, kid crowd.
|
|
110
|
+
const macW = 13;
|
|
111
|
+
const gap = 4;
|
|
112
|
+
const macH = Math.min(floorY - top - 2, 24);
|
|
113
|
+
const macY = floorY - macH;
|
|
114
|
+
// Keep prize colors fixed to the room, independent of render offset.
|
|
115
|
+
const prizeShift = Math.floor(hash(seed) * SCREEN_HUES.length);
|
|
116
|
+
// Machine anchors, on the same rule as the arcade row: counted
|
|
117
|
+
// against the authored run, fitted into the screen run by `artRow`, with the
|
|
118
|
+
// far margin widened to hold the player who stands at the last machine's edge.
|
|
119
|
+
const spots = artRow(aw - 3 - 5 - macW, x + 3, x + w - 5 - macW, macW + gap, 1, macW);
|
|
120
|
+
const busy = busyStations(spots.length, occ, seed * 23);
|
|
121
|
+
spots.forEach((mx, i) => {
|
|
122
|
+
ctx.fillStyle = shade(look.neon, -30); // machine frame
|
|
123
|
+
ctx.fillRect(mx, macY, macW, macH);
|
|
124
|
+
const glassY = macY + 4;
|
|
125
|
+
const glassH = Math.round(macH * 0.5);
|
|
126
|
+
ctx.fillStyle = shade(look.wall, 34); // lit glass case
|
|
127
|
+
ctx.fillRect(mx + 1, glassY, macW - 2, glassH);
|
|
128
|
+
// A jumble of plush prizes inside.
|
|
129
|
+
for (let py = 0; py < 2; py++) {
|
|
130
|
+
for (let gx = mx + 2, c = 0; gx + 2 < mx + macW - 1; gx += 3, c++) {
|
|
131
|
+
ctx.fillStyle = SCREEN_HUES[(i * 4 + c + py + prizeShift) % SCREEN_HUES.length];
|
|
132
|
+
ctx.fillRect(gx, glassY + glassH - 3 - py * 3, 2, 2);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
ctx.fillStyle = "#C0C4CC"; // claw rail + claw
|
|
136
|
+
ctx.fillRect(mx + 1, glassY, macW - 2, 1);
|
|
137
|
+
ctx.fillRect(mx + Math.round(macW / 2), glassY + 1, 1, 3);
|
|
138
|
+
ctx.fillStyle = look.neon; // prize-chute glow
|
|
139
|
+
ctx.fillRect(mx + 1, macY + macH - 3, macW - 2, 1);
|
|
140
|
+
castShadow(ctx, mx, floorY, macW);
|
|
141
|
+
});
|
|
142
|
+
// Players after every machine, for the same reason as the arcade's.
|
|
143
|
+
spots.forEach((mx, i) => {
|
|
144
|
+
if (busy.has(i))
|
|
145
|
+
personStanding(ctx, mx + macW - 2, floorY, seed + i * 5);
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
function drawGolf(ctx, x, floorY, w, aw, look, occ, seed) {
|
|
149
|
+
// A mini-golf bay: bright turf, a couple of holes with pin flags, a windmill
|
|
150
|
+
// obstacle, and a putter mid-swing. The one non-dark attraction.
|
|
151
|
+
ctx.fillStyle = look.floor; // extend the turf up a little as a putting green
|
|
152
|
+
ctx.fillRect(x, floorY - 3, w, 3);
|
|
153
|
+
ctx.fillStyle = shade(look.floor, 22); // mown highlight stripes
|
|
154
|
+
// The last stripe is cut to the wall rather than drawn 4 wide past it. Both
|
|
155
|
+
// draw paths clip a unit to its own rect, so the overhang was never visible as
|
|
156
|
+
// a bleed; what it was is a rect outside the box, which the containment guard
|
|
157
|
+
// reads as a row that does not know where its room ends. The cut keeps the
|
|
158
|
+
// drawn pixels identical and the claim honest.
|
|
159
|
+
//
|
|
160
|
+
// The floor of 0 is not dead code, though it looks it: the loop condition
|
|
161
|
+
// leaves a positive remainder, but at a fractional width that remainder can be
|
|
162
|
+
// under a pixel, and flooring it gives 0. An empty stripe is the right answer
|
|
163
|
+
// there. Widening it to 1 to avoid the no-op draw would put it past the wall.
|
|
164
|
+
for (let sx = x; sx < x + w; sx += 8)
|
|
165
|
+
ctx.fillRect(sx, floorY - 3, Math.max(0, Math.min(4, Math.floor(x + w - sx))), 1);
|
|
166
|
+
// Holes with pin flags.
|
|
167
|
+
const flags = ["#F0503A", "#F0C43A"];
|
|
168
|
+
let f = 0;
|
|
169
|
+
for (let hx = x + 12; hx < x + w - 6; hx += Math.max(20, Math.round((w - 16) / 2)), f++) {
|
|
170
|
+
ctx.fillStyle = "#12200F"; // the cup
|
|
171
|
+
ctx.fillRect(hx, floorY - 1, 3, 1);
|
|
172
|
+
ctx.fillStyle = "#D8D0B8"; // flag pole
|
|
173
|
+
ctx.fillRect(hx + 1, floorY - 12, 1, 11);
|
|
174
|
+
ctx.fillStyle = flags[f % flags.length];
|
|
175
|
+
ctx.fillRect(hx + 2, floorY - 12, 5, 3);
|
|
176
|
+
}
|
|
177
|
+
// A little windmill obstacle at the back.
|
|
178
|
+
const wmX = x + Math.round(w * 0.72);
|
|
179
|
+
ctx.fillStyle = shade(look.wall, 40);
|
|
180
|
+
ctx.fillRect(wmX, floorY - 14, 6, 14);
|
|
181
|
+
ctx.fillStyle = look.neon;
|
|
182
|
+
ctx.fillRect(wmX - 3, floorY - 15, 12, 2); // sail bar
|
|
183
|
+
ctx.fillRect(wmX + 2, floorY - 20, 2, 12);
|
|
184
|
+
// A golfer mid-putt (only when someone is here), plus any extra visitors
|
|
185
|
+
// watching. The watcher row is bounded by the bay WIDTH, not the raw occupant
|
|
186
|
+
// count, so a forged/corrupt save with a huge `occupants` can never
|
|
187
|
+
// over-iterate. Its 12px pitch is authored art, so the row is counted
|
|
188
|
+
// against the authored run and fitted into the screen run by `artRow`: read
|
|
189
|
+
// off the pixel width, the bay lost a standing spot when the tile narrowed. The start clearance stays
|
|
190
|
+
// in screen pixels because what it clears (the golfer and the putter) is
|
|
191
|
+
// fixed-size art. A bay whose screen run is gone (`x + w - 7` left of
|
|
192
|
+
// `x + 32`) gets no watcher; one with any run at all gets at least one.
|
|
193
|
+
if (occ > 0) {
|
|
194
|
+
personStanding(ctx, x + 6, floorY, seed);
|
|
195
|
+
ctx.fillStyle = "#D8D0B8"; // putter
|
|
196
|
+
ctx.fillRect(x + 11, floorY - 6, 5, 1);
|
|
197
|
+
ctx.fillRect(x + 15, floorY - 3, 1, 3);
|
|
198
|
+
}
|
|
199
|
+
const spots = artRow(aw - 32 - 7, x + 32, x + w - 7, 12, 1, 6);
|
|
200
|
+
// `occ` is already whole (`roomOccupants`), and the golfer is one of them.
|
|
201
|
+
const watchers = Math.min(Math.max(0, occ - 1), spots.length);
|
|
202
|
+
for (let i = 0; i < watchers; i++)
|
|
203
|
+
personStanding(ctx, spots[i], floorY, seed + (i + 1) * 9);
|
|
204
|
+
}
|
|
205
|
+
/** The Modern Amusements hall. Reused for every attraction subtype; the look's
|
|
206
|
+
* `attraction` discriminant picks the interior so a Classic Arcade, VR Lounge,
|
|
207
|
+
* Claw Parlor, and Mini Golf each render as their own room. */
|
|
208
|
+
function amusements(d, u, x, y, w, h) {
|
|
209
|
+
const { ctx } = d;
|
|
210
|
+
const look = (u.subtype !== undefined && AMUSEMENTS_LOOKS[u.subtype]) || AMUSEMENTS_DEFAULT;
|
|
211
|
+
const floorY = shell(ctx, x, y, w, h, look.wall, look.floor);
|
|
212
|
+
const top = marquee(ctx, x, y, w, look.neon, d.lit);
|
|
213
|
+
layerBreak(ctx); // the shell ends; the attraction follows
|
|
214
|
+
const occ = roomOccupants(u);
|
|
215
|
+
const seed = figureSeed(u);
|
|
216
|
+
// The room's authored width comes from its TILES, not its pixels, so a row's
|
|
217
|
+
// capacity is the same whatever scale the caller draws at.
|
|
218
|
+
const aw = authoredWidth(u.width);
|
|
219
|
+
switch (look.attraction) {
|
|
220
|
+
case "arcade":
|
|
221
|
+
drawArcade(ctx, x, floorY, w, aw, top, look, occ, seed);
|
|
222
|
+
break;
|
|
223
|
+
case "vr":
|
|
224
|
+
drawVr(ctx, x, floorY, w, top, look, occ, seed);
|
|
225
|
+
break;
|
|
226
|
+
case "claw":
|
|
227
|
+
drawClaw(ctx, x, floorY, w, aw, top, look, occ, seed);
|
|
228
|
+
break;
|
|
229
|
+
case "golf":
|
|
230
|
+
drawGolf(ctx, x, floorY, w, aw, look, occ, seed);
|
|
231
|
+
break;
|
|
232
|
+
}
|
|
233
|
+
// The furniture ends here: the glow wash covers the whole upper wall.
|
|
234
|
+
layerEnd(ctx);
|
|
235
|
+
// A warm marquee glow wash near the top when the hall is lit at night.
|
|
236
|
+
if (d.lit) {
|
|
237
|
+
ctx.fillStyle = "rgba(255,220,140,0.06)";
|
|
238
|
+
ctx.fillRect(x, top, w, Math.round((floorY - top) * 0.4));
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
export { AMUSEMENTS_DEFAULT, AMUSEMENTS_LOOKS, amusements };
|
|
243
|
+
//# sourceMappingURL=amusements.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"amusements.js","sources":["../../../src/render/pixelSprites/amusements.ts"],"sourcesContent":["import type { UnitView } from \"../../simport/view\";\nimport { busyStations, castShadow, hash, personStanding, roomOccupants, shade, shell, type RoomCtx } from \"./common\";\nimport { artRow, authoredWidth } from \"./artScale\";\nimport { layerBreak, layerEnd } from \"./layers\";\n\n/**\n * Modern Amusements art: an arcade / games hall with four attraction types\n * (classic cabinets, a VR lounge, a claw parlor, and a mini-golf bay). Every\n * attraction keeps one anchor shape, the neon marquee band across the top, and\n * its subtype furnishes the rest, so a Classic Arcade and a Mini Golf read as\n * clearly different rooms. The look tables and the draw body live here; the\n * kind is Modern-only (never exported to the 1994 TDT) so nothing here carries\n * an ordinal.\n *\n * Drawing reads only bake-signature inputs (subtype via the look, the real\n * occupant count, `lit`, and a stable geography seed), so a placed room stays\n * cacheable, an empty hall reads empty, a full one full, and a TDT id renumber\n * never reshuffles the crowd.\n */\n\nexport interface AmusementsLook {\n wall: string;\n floor: string;\n /** The marquee / accent neon color; the attraction's glowing elements pick\n * their own screen hues, but the marquee and trim read this. */\n neon: string;\n /** Which attraction fills the hall. 1:1 with the subtype, so the look table\n * stays trivially pairwise-distinct. */\n attraction: \"arcade\" | \"vr\" | \"claw\" | \"golf\";\n}\n\nexport const AMUSEMENTS_DEFAULT: AmusementsLook = { wall: \"#201830\", floor: \"#2A2038\", neon: \"#F04AA0\", attraction: \"arcade\" };\nexport const AMUSEMENTS_LOOKS: Record<string, AmusementsLook> = {\n \"Classic Arcade\": { wall: \"#201830\", floor: \"#2A2038\", neon: \"#F04AA0\", attraction: \"arcade\" },\n \"VR Lounge\": { wall: \"#101A2E\", floor: \"#16203A\", neon: \"#3AD0E0\", attraction: \"vr\" },\n \"Claw Parlor\": { wall: \"#3A1630\", floor: \"#2E1828\", neon: \"#FFC24A\", attraction: \"claw\" },\n \"Mini Golf\": { wall: \"#123018\", floor: \"#1E7A3A\", neon: \"#7AE06A\", attraction: \"golf\" },\n};\n\n/** A stable per-room seed from GEOGRAPHY (floor, x), so the crowd and screen\n * colors survive a save/export/import (which renumbers `u.id`). */\nfunction figureSeed(u: Pick<UnitView, \"floor\" | \"x\">): number {\n return (u.floor * 131 + u.x * 17) >>> 0;\n}\n\n/** The five arcade screen hues, a cheerful spread that keeps the dark room lively. */\nconst SCREEN_HUES = [\"#F0503A\", \"#3AC0F0\", \"#6BE05A\", \"#F0C43A\", \"#C060F0\"];\n\n/** A small glowing screen: a bright field with a 1px inner scanline, so a dark\n * arcade reads as full of lit displays rather than black boxes. */\nfunction screen(ctx: CanvasRenderingContext2D, x: number, y: number, w: number, h: number, hue: string): void {\n ctx.fillStyle = shade(hue, -50);\n ctx.fillRect(x - 1, y - 1, w + 2, h + 2); // dark bezel\n ctx.fillStyle = hue;\n ctx.fillRect(x, y, w, h);\n ctx.fillStyle = shade(hue, 60); // bright highlight blip\n ctx.fillRect(x + 1, y + 1, Math.max(1, w - 3), 1);\n}\n\n/** The marquee band: the shared anchor shape. A dark header strip with a glowing\n * neon rule and evenly spaced bulb dots, so every attraction is unmistakably an\n * amusements hall. Returns the Y just below the band. */\nfunction marquee(ctx: CanvasRenderingContext2D, x: number, y: number, w: number, neon: string, lit: boolean): number {\n const band = 5;\n ctx.fillStyle = \"#14101C\";\n ctx.fillRect(x, y, w, band);\n ctx.fillStyle = neon; // the glowing neon rule\n ctx.fillRect(x, y + band - 2, w, 1);\n const bulb = lit ? shade(neon, 70) : shade(neon, -20);\n for (let bx = x + 3; bx < x + w - 1; bx += 7) {\n ctx.fillStyle = bulb;\n ctx.fillRect(bx, y + 1, 2, 2);\n }\n return y + band;\n}\n\nfunction drawArcade(ctx: CanvasRenderingContext2D, x: number, floorY: number, w: number, aw: number, top: number, look: AmusementsLook, occ: number, seed: number): void {\n // A row of arcade cabinets along the back wall, each a tall box with a glowing\n // screen and a lit control panel; players stand at a share of them.\n const cabW = 11;\n const gap = 4;\n const cabH = Math.min(floorY - top - 2, 22);\n const cabY = floorY - cabH;\n // Cabinet anchors: the cabinet-plus-gap slot is authored art, so the row is\n // counted against the authored run (the hall's width in tiles) and fitted\n // into the screen run by `artRow`. Counting slots off the pixel width retired a cabinet, and the\n // player standing at it, when the tile narrowed. The far margin is 5 rather\n // than the near 3 because a player stands at the cabinet's right edge and\n // carries a contact-shadow column past it; at 3 the last one reached outside\n // the hall and was clipped, which is this same bug wearing a different hat.\n // At the 12-tile hall the catalog ships, the count is the same either way; at\n // a few other widths the wider margin does cost a cabinet, which is the price\n // of keeping every player whole.\n const spots = artRow(aw - 3 - 5 - cabW, x + 3, x + w - 5 - cabW, cabW + gap, 1, cabW);\n const busy = busyStations(spots.length, occ, seed * 31);\n spots.forEach((cx, i) => {\n ctx.fillStyle = shade(look.wall, 26); // cabinet body\n ctx.fillRect(cx, cabY, cabW, cabH);\n ctx.fillStyle = shade(look.wall, 44); // lit side edge\n ctx.fillRect(cx + cabW - 1, cabY, 1, cabH);\n screen(ctx, cx + 2, cabY + 2, cabW - 4, Math.round(cabH * 0.4), SCREEN_HUES[(i + seed) % SCREEN_HUES.length]);\n ctx.fillStyle = look.neon; // control-panel light strip\n ctx.fillRect(cx + 1, cabY + Math.round(cabH * 0.62), cabW - 2, 1);\n castShadow(ctx, cx, floorY, cabW);\n });\n // A player at the cabinets the occupancy fills, scattered by the hash. Drawn\n // after every cabinet: a player stands at a cabinet's right edge and reaches\n // into the gap, so where the row compresses the next cabinet would otherwise\n // paint over part of them.\n spots.forEach((cx, i) => {\n if (busy.has(i)) personStanding(ctx, cx + cabW - 2, floorY, seed + i * 7);\n });\n}\n\nfunction drawVr(ctx: CanvasRenderingContext2D, x: number, floorY: number, w: number, top: number, look: AmusementsLook, occ: number, seed: number): void {\n // A sleek lounge: floor pods marked by a glowing ring, each with a standing\n // player wearing a bright headset visor. Cooler and emptier than the arcade.\n const podGap = Math.max(18, Math.round((w - 8) / 3));\n let i = 0;\n for (let px = x + Math.round(podGap / 2); px < x + w - 6; px += podGap, i++) {\n // Glowing floor ring under the pod.\n ctx.fillStyle = look.neon;\n ctx.fillRect(px - 6, floorY - 1, 12, 1);\n ctx.fillStyle = shade(look.neon, -40);\n ctx.fillRect(px - 6, floorY, 12, 1);\n // A tall accent pillar with a light bar (the pod's tracker mast).\n ctx.fillStyle = shade(look.wall, 30);\n ctx.fillRect(px - 7, top + 2, 2, floorY - top - 3);\n ctx.fillStyle = look.neon;\n ctx.fillRect(px - 7, top + 4, 2, 4);\n if (i < occ) {\n personStanding(ctx, px - 2, floorY, seed + i * 13);\n // Bright visor over the figure's face.\n ctx.fillStyle = shade(look.neon, 40);\n ctx.fillRect(px - 1, floorY - 16, 5, 2);\n }\n }\n}\n\nfunction drawClaw(ctx: CanvasRenderingContext2D, x: number, floorY: number, w: number, aw: number, top: number, look: AmusementsLook, occ: number, seed: number): void {\n // A bank of claw machines: glass cases lit from within, packed with colorful\n // plush prizes, a claw rail across the top. Candy-bright, kid crowd.\n const macW = 13;\n const gap = 4;\n const macH = Math.min(floorY - top - 2, 24);\n const macY = floorY - macH;\n // Keep prize colors fixed to the room, independent of render offset.\n const prizeShift = Math.floor(hash(seed) * SCREEN_HUES.length);\n // Machine anchors, on the same rule as the arcade row: counted\n // against the authored run, fitted into the screen run by `artRow`, with the\n // far margin widened to hold the player who stands at the last machine's edge.\n const spots = artRow(aw - 3 - 5 - macW, x + 3, x + w - 5 - macW, macW + gap, 1, macW);\n const busy = busyStations(spots.length, occ, seed * 23);\n spots.forEach((mx, i) => {\n ctx.fillStyle = shade(look.neon, -30); // machine frame\n ctx.fillRect(mx, macY, macW, macH);\n const glassY = macY + 4;\n const glassH = Math.round(macH * 0.5);\n ctx.fillStyle = shade(look.wall, 34); // lit glass case\n ctx.fillRect(mx + 1, glassY, macW - 2, glassH);\n // A jumble of plush prizes inside.\n for (let py = 0; py < 2; py++) {\n for (let gx = mx + 2, c = 0; gx + 2 < mx + macW - 1; gx += 3, c++) {\n ctx.fillStyle = SCREEN_HUES[(i * 4 + c + py + prizeShift) % SCREEN_HUES.length];\n ctx.fillRect(gx, glassY + glassH - 3 - py * 3, 2, 2);\n }\n }\n ctx.fillStyle = \"#C0C4CC\"; // claw rail + claw\n ctx.fillRect(mx + 1, glassY, macW - 2, 1);\n ctx.fillRect(mx + Math.round(macW / 2), glassY + 1, 1, 3);\n ctx.fillStyle = look.neon; // prize-chute glow\n ctx.fillRect(mx + 1, macY + macH - 3, macW - 2, 1);\n castShadow(ctx, mx, floorY, macW);\n });\n // Players after every machine, for the same reason as the arcade's.\n spots.forEach((mx, i) => {\n if (busy.has(i)) personStanding(ctx, mx + macW - 2, floorY, seed + i * 5);\n });\n}\n\nfunction drawGolf(ctx: CanvasRenderingContext2D, x: number, floorY: number, w: number, aw: number, look: AmusementsLook, occ: number, seed: number): void {\n // A mini-golf bay: bright turf, a couple of holes with pin flags, a windmill\n // obstacle, and a putter mid-swing. The one non-dark attraction.\n ctx.fillStyle = look.floor; // extend the turf up a little as a putting green\n ctx.fillRect(x, floorY - 3, w, 3);\n ctx.fillStyle = shade(look.floor, 22); // mown highlight stripes\n // The last stripe is cut to the wall rather than drawn 4 wide past it. Both\n // draw paths clip a unit to its own rect, so the overhang was never visible as\n // a bleed; what it was is a rect outside the box, which the containment guard\n // reads as a row that does not know where its room ends. The cut keeps the\n // drawn pixels identical and the claim honest.\n //\n // The floor of 0 is not dead code, though it looks it: the loop condition\n // leaves a positive remainder, but at a fractional width that remainder can be\n // under a pixel, and flooring it gives 0. An empty stripe is the right answer\n // there. Widening it to 1 to avoid the no-op draw would put it past the wall.\n for (let sx = x; sx < x + w; sx += 8) ctx.fillRect(sx, floorY - 3, Math.max(0, Math.min(4, Math.floor(x + w - sx))), 1);\n // Holes with pin flags.\n const flags = [\"#F0503A\", \"#F0C43A\"];\n let f = 0;\n for (let hx = x + 12; hx < x + w - 6; hx += Math.max(20, Math.round((w - 16) / 2)), f++) {\n ctx.fillStyle = \"#12200F\"; // the cup\n ctx.fillRect(hx, floorY - 1, 3, 1);\n ctx.fillStyle = \"#D8D0B8\"; // flag pole\n ctx.fillRect(hx + 1, floorY - 12, 1, 11);\n ctx.fillStyle = flags[f % flags.length];\n ctx.fillRect(hx + 2, floorY - 12, 5, 3);\n }\n // A little windmill obstacle at the back.\n const wmX = x + Math.round(w * 0.72);\n ctx.fillStyle = shade(look.wall, 40);\n ctx.fillRect(wmX, floorY - 14, 6, 14);\n ctx.fillStyle = look.neon;\n ctx.fillRect(wmX - 3, floorY - 15, 12, 2); // sail bar\n ctx.fillRect(wmX + 2, floorY - 20, 2, 12);\n // A golfer mid-putt (only when someone is here), plus any extra visitors\n // watching. The watcher row is bounded by the bay WIDTH, not the raw occupant\n // count, so a forged/corrupt save with a huge `occupants` can never\n // over-iterate. Its 12px pitch is authored art, so the row is counted\n // against the authored run and fitted into the screen run by `artRow`: read\n // off the pixel width, the bay lost a standing spot when the tile narrowed. The start clearance stays\n // in screen pixels because what it clears (the golfer and the putter) is\n // fixed-size art. A bay whose screen run is gone (`x + w - 7` left of\n // `x + 32`) gets no watcher; one with any run at all gets at least one.\n if (occ > 0) {\n personStanding(ctx, x + 6, floorY, seed);\n ctx.fillStyle = \"#D8D0B8\"; // putter\n ctx.fillRect(x + 11, floorY - 6, 5, 1);\n ctx.fillRect(x + 15, floorY - 3, 1, 3);\n }\n const spots = artRow(aw - 32 - 7, x + 32, x + w - 7, 12, 1, 6);\n // `occ` is already whole (`roomOccupants`), and the golfer is one of them.\n const watchers = Math.min(Math.max(0, occ - 1), spots.length);\n for (let i = 0; i < watchers; i++) personStanding(ctx, spots[i], floorY, seed + (i + 1) * 9);\n}\n\n/** The Modern Amusements hall. Reused for every attraction subtype; the look's\n * `attraction` discriminant picks the interior so a Classic Arcade, VR Lounge,\n * Claw Parlor, and Mini Golf each render as their own room. */\nexport function amusements(d: RoomCtx, u: UnitView, x: number, y: number, w: number, h: number): void {\n const { ctx } = d;\n const look = (u.subtype !== undefined && AMUSEMENTS_LOOKS[u.subtype]) || AMUSEMENTS_DEFAULT;\n const floorY = shell(ctx, x, y, w, h, look.wall, look.floor);\n const top = marquee(ctx, x, y, w, look.neon, d.lit);\n layerBreak(ctx); // the shell ends; the attraction follows\n const occ = roomOccupants(u);\n const seed = figureSeed(u);\n // The room's authored width comes from its TILES, not its pixels, so a row's\n // capacity is the same whatever scale the caller draws at.\n const aw = authoredWidth(u.width);\n switch (look.attraction) {\n case \"arcade\":\n drawArcade(ctx, x, floorY, w, aw, top, look, occ, seed);\n break;\n case \"vr\":\n drawVr(ctx, x, floorY, w, top, look, occ, seed);\n break;\n case \"claw\":\n drawClaw(ctx, x, floorY, w, aw, top, look, occ, seed);\n break;\n case \"golf\":\n drawGolf(ctx, x, floorY, w, aw, look, occ, seed);\n break;\n }\n // The furniture ends here: the glow wash covers the whole upper wall.\n layerEnd(ctx);\n // A warm marquee glow wash near the top when the hall is lit at night.\n if (d.lit) {\n ctx.fillStyle = \"rgba(255,220,140,0.06)\";\n ctx.fillRect(x, top, w, Math.round((floorY - top) * 0.4));\n }\n}\n"],"names":[],"mappings":";;;;MA+Ba,kBAAkB,GAAmB,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ;AACrH,MAAM,gBAAgB,GAAmC;AAC9D,IAAA,gBAAgB,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE;AAC9F,IAAA,WAAW,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE,UAAU,EAAE,IAAI,EAAE;AACrF,IAAA,aAAa,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,EAAE;AACzF,IAAA,WAAW,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,EAAE;;AAGzF;AACoE;AACpE,SAAS,UAAU,CAAC,CAAgC,EAAA;AAClD,IAAA,OAAO,CAAC,CAAC,CAAC,KAAK,GAAG,GAAG,GAAG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AC,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,CAAC;YAChD;;;IAGJ,QAAQ,CAAC,GAAG,CAAC;;AAEb,IAAA,IAAI,CAAC,CAAC,GAAG,EAAE;AACT,QAAA,GAAG,CAAC,SAAS,GAAG,wBAAwB;QACxC,GAAG,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,CAAC;IAC3D;AACF;;"}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The room-art scale seam, split out of `common.ts` so both stay under the
|
|
3
|
+
* line ceiling.
|
|
4
|
+
*
|
|
5
|
+
* Furniture inside these rooms is written as pixel literals against a TILE 11
|
|
6
|
+
* by FLOOR 44 world, the same reference footprint `sprites/facilities/
|
|
7
|
+
* serviceKit` records for the service sprites. The world moved to TILE 10 by
|
|
8
|
+
* FLOOR 45, so a room of the same tile width is about 9% narrower in pixels
|
|
9
|
+
* while the room itself did not shrink. Layouts that counted how many chairs,
|
|
10
|
+
* cabinets, or customers fit straight off the screen width therefore tied
|
|
11
|
+
* capacity to the tile instead of to the room, and several quietly lost a slot:
|
|
12
|
+
* occupants who were present stopped being drawn at all (issue #813). The
|
|
13
|
+
* helpers below count in the authored scale, so capacity follows the room's
|
|
14
|
+
* width in tiles, while the step stays the authored pitch in screen pixels. An
|
|
15
|
+
* item is fixed-size pixel art that did not shrink with the tile, so the space
|
|
16
|
+
* between items must not shrink either: scaling the pitch spends the gap the
|
|
17
|
+
* art was drawn with, and a row authored shoulder to shoulder (the nightclub's
|
|
18
|
+
* dancers, whose 6px figures sit at a 6px pitch) has no gap to spend and comes
|
|
19
|
+
* out overlapping. A row still compresses when its run genuinely cannot hold it,
|
|
20
|
+
* which is the honest last resort rather than the default.
|
|
21
|
+
*/
|
|
22
|
+
/** The tile the room art was authored against. A literal on purpose: it is
|
|
23
|
+
* history, and pinning it to the live TILE would erase the very drift these
|
|
24
|
+
* helpers exist to absorb. Exported so a test can state a room's capacity in
|
|
25
|
+
* authored units instead of restating 11 of its own. */
|
|
26
|
+
export declare const ART_TILE = 11;
|
|
27
|
+
/**
|
|
28
|
+
* A room's width in the scale its furniture was drawn for, taken from its width
|
|
29
|
+
* in TILES.
|
|
30
|
+
*
|
|
31
|
+
* Tiles are the scale-free statement of how big a room is, which is why capacity
|
|
32
|
+
* hangs off them. Restating the room's SCREEN width instead only agrees while
|
|
33
|
+
* the caller draws at the world tile. Today every caller does (`/gallery` and
|
|
34
|
+
* `/preview` draw at world size and zoom with `ctx.scale`), but a caller that
|
|
35
|
+
* drew at a tile of its own would hand a 12-tile boutique over at 144px, which
|
|
36
|
+
* reads as 158 authored pixels and seats 22 browsers where the game seats 18.
|
|
37
|
+
* That page would advertise a capacity the room does not have.
|
|
38
|
+
*/
|
|
39
|
+
export declare function authoredWidth(tiles: number): number;
|
|
40
|
+
/** An authored length restated on screen. Fractional on purpose: callers round
|
|
41
|
+
* the finished coordinate, so a row keeps an even pitch instead of collecting a
|
|
42
|
+
* rounding error at every step. */
|
|
43
|
+
export declare function screenLength(authoredLength: number): number;
|
|
44
|
+
/**
|
|
45
|
+
* Integer anchors for one row of repeated furniture.
|
|
46
|
+
*
|
|
47
|
+
* `authoredRun` is how much room the row has measured in AUTHORED pixels: the
|
|
48
|
+
* container it sits in (the room, or a counter or mat or table inside it) less
|
|
49
|
+
* the row's own margins, all in the scale the art was drawn at. `from` is the
|
|
50
|
+
* first anchor on screen, `limit` the furthest one an item may take, and `dir`
|
|
51
|
+
* the way the row fills. `pitch` is the authored step.
|
|
52
|
+
*
|
|
53
|
+
* How many fit is decided entirely by that authored run, because an item and the
|
|
54
|
+
* clearance around it are fixed-size pixel art and only the container grew when
|
|
55
|
+
* the tile shrank. That ties capacity to the container's width in tiles, which
|
|
56
|
+
* the scale change did not touch.
|
|
57
|
+
*
|
|
58
|
+
* The step is that same pitch in SCREEN pixels, no longer scaled down with the
|
|
59
|
+
* tile. Scaling it spent the gap the art was drawn with, since the item did not
|
|
60
|
+
* shrink and only the space between items can absorb the difference, and a row
|
|
61
|
+
* authored shoulder to shoulder had no gap to spend. Read the arithmetic
|
|
62
|
+
* plainly, though: a caller that measures `authoredRun` across the same span it
|
|
63
|
+
* hands to `from` and `limit` gives the row about 10/11 of the screen its
|
|
64
|
+
* authored count needs, so `run / (count - 1)` binds and the row still
|
|
65
|
+
* compresses to roughly the old step. THAT IS THE COMMON CASE and the pitch is
|
|
66
|
+
* an upper bound, not a promise. What changed is that compression is now
|
|
67
|
+
* bounded by the room the row actually has, so a caller that can give the row
|
|
68
|
+
* more screen (the nightclub, whose crowd runs on past the lit dance floor)
|
|
69
|
+
* reaches the full authored pitch instead of being held under it.
|
|
70
|
+
*
|
|
71
|
+
* `minStep` is the item's own width, when the caller knows it. Compression has
|
|
72
|
+
* to stop somewhere, and the honest floor is the point where items would start
|
|
73
|
+
* drawing through each other: below it the row is wrong, however tight it looks. Pass
|
|
74
|
+
* it and the count drops instead, which only bites where the run physically
|
|
75
|
+
* cannot hold the authored count without stacking. Omit it and the row may
|
|
76
|
+
* compress without limit, which is safe for a row whose items are narrower than
|
|
77
|
+
* their pitch by a comfortable margin.
|
|
78
|
+
*
|
|
79
|
+
* The authored run is passed in rather than worked back out of the screen
|
|
80
|
+
* geometry on purpose. Every caller knows it exactly, while re-deriving it from
|
|
81
|
+
* a screen width that has already been rounded loses a fraction of a pixel, and
|
|
82
|
+
* a row whose authored run divides exactly by its pitch loses a whole slot to
|
|
83
|
+
* that fraction. A 24-tile nightclub was one dancer short for precisely this
|
|
84
|
+
* reason.
|
|
85
|
+
*
|
|
86
|
+
* Returns no anchors when nothing fits: a `limit` that has crossed `from` means
|
|
87
|
+
* the room is too narrow for the row, which is a real case for a caller that
|
|
88
|
+
* draws rooms at a size of its own. The screen run binds at that end, so a
|
|
89
|
+
* row with authored room but no pixels seats nobody rather than an item that
|
|
90
|
+
* would hang out of the box.
|
|
91
|
+
*
|
|
92
|
+
* Anchors are integers, so a run under a pixel wide is served by a single
|
|
93
|
+
* column: with fractional ends the first anchor can sit up to half a pixel
|
|
94
|
+
* outside the run, which is the ordinary cost of drawing pixel art at a
|
|
95
|
+
* fractional offset and not a containment failure at any whole-pixel caller.
|
|
96
|
+
*/
|
|
97
|
+
export declare function artRow(authoredRun: number, from: number, limit: number, pitch: number, dir?: 1 | -1, minStep?: number): number[];
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import { TILE } from '../scale.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The room-art scale seam, split out of `common.ts` so both stay under the
|
|
5
|
+
* line ceiling.
|
|
6
|
+
*
|
|
7
|
+
* Furniture inside these rooms is written as pixel literals against a TILE 11
|
|
8
|
+
* by FLOOR 44 world, the same reference footprint `sprites/facilities/
|
|
9
|
+
* serviceKit` records for the service sprites. The world moved to TILE 10 by
|
|
10
|
+
* FLOOR 45, so a room of the same tile width is about 9% narrower in pixels
|
|
11
|
+
* while the room itself did not shrink. Layouts that counted how many chairs,
|
|
12
|
+
* cabinets, or customers fit straight off the screen width therefore tied
|
|
13
|
+
* capacity to the tile instead of to the room, and several quietly lost a slot:
|
|
14
|
+
* occupants who were present stopped being drawn at all (issue #813). The
|
|
15
|
+
* helpers below count in the authored scale, so capacity follows the room's
|
|
16
|
+
* width in tiles, while the step stays the authored pitch in screen pixels. An
|
|
17
|
+
* item is fixed-size pixel art that did not shrink with the tile, so the space
|
|
18
|
+
* between items must not shrink either: scaling the pitch spends the gap the
|
|
19
|
+
* art was drawn with, and a row authored shoulder to shoulder (the nightclub's
|
|
20
|
+
* dancers, whose 6px figures sit at a 6px pitch) has no gap to spend and comes
|
|
21
|
+
* out overlapping. A row still compresses when its run genuinely cannot hold it,
|
|
22
|
+
* which is the honest last resort rather than the default.
|
|
23
|
+
*/
|
|
24
|
+
/** The tile the room art was authored against. A literal on purpose: it is
|
|
25
|
+
* history, and pinning it to the live TILE would erase the very drift these
|
|
26
|
+
* helpers exist to absorb. Exported so a test can state a room's capacity in
|
|
27
|
+
* authored units instead of restating 11 of its own. */
|
|
28
|
+
const ART_TILE = 11;
|
|
29
|
+
/**
|
|
30
|
+
* A room's width in the scale its furniture was drawn for, taken from its width
|
|
31
|
+
* in TILES.
|
|
32
|
+
*
|
|
33
|
+
* Tiles are the scale-free statement of how big a room is, which is why capacity
|
|
34
|
+
* hangs off them. Restating the room's SCREEN width instead only agrees while
|
|
35
|
+
* the caller draws at the world tile. Today every caller does (`/gallery` and
|
|
36
|
+
* `/preview` draw at world size and zoom with `ctx.scale`), but a caller that
|
|
37
|
+
* drew at a tile of its own would hand a 12-tile boutique over at 144px, which
|
|
38
|
+
* reads as 158 authored pixels and seats 22 browsers where the game seats 18.
|
|
39
|
+
* That page would advertise a capacity the room does not have.
|
|
40
|
+
*/
|
|
41
|
+
function authoredWidth(tiles) {
|
|
42
|
+
return tiles * ART_TILE;
|
|
43
|
+
}
|
|
44
|
+
/** An authored length restated on screen. Fractional on purpose: callers round
|
|
45
|
+
* the finished coordinate, so a row keeps an even pitch instead of collecting a
|
|
46
|
+
* rounding error at every step. */
|
|
47
|
+
function screenLength(authoredLength) {
|
|
48
|
+
return (authoredLength * TILE) / ART_TILE;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Integer anchors for one row of repeated furniture.
|
|
52
|
+
*
|
|
53
|
+
* `authoredRun` is how much room the row has measured in AUTHORED pixels: the
|
|
54
|
+
* container it sits in (the room, or a counter or mat or table inside it) less
|
|
55
|
+
* the row's own margins, all in the scale the art was drawn at. `from` is the
|
|
56
|
+
* first anchor on screen, `limit` the furthest one an item may take, and `dir`
|
|
57
|
+
* the way the row fills. `pitch` is the authored step.
|
|
58
|
+
*
|
|
59
|
+
* How many fit is decided entirely by that authored run, because an item and the
|
|
60
|
+
* clearance around it are fixed-size pixel art and only the container grew when
|
|
61
|
+
* the tile shrank. That ties capacity to the container's width in tiles, which
|
|
62
|
+
* the scale change did not touch.
|
|
63
|
+
*
|
|
64
|
+
* The step is that same pitch in SCREEN pixels, no longer scaled down with the
|
|
65
|
+
* tile. Scaling it spent the gap the art was drawn with, since the item did not
|
|
66
|
+
* shrink and only the space between items can absorb the difference, and a row
|
|
67
|
+
* authored shoulder to shoulder had no gap to spend. Read the arithmetic
|
|
68
|
+
* plainly, though: a caller that measures `authoredRun` across the same span it
|
|
69
|
+
* hands to `from` and `limit` gives the row about 10/11 of the screen its
|
|
70
|
+
* authored count needs, so `run / (count - 1)` binds and the row still
|
|
71
|
+
* compresses to roughly the old step. THAT IS THE COMMON CASE and the pitch is
|
|
72
|
+
* an upper bound, not a promise. What changed is that compression is now
|
|
73
|
+
* bounded by the room the row actually has, so a caller that can give the row
|
|
74
|
+
* more screen (the nightclub, whose crowd runs on past the lit dance floor)
|
|
75
|
+
* reaches the full authored pitch instead of being held under it.
|
|
76
|
+
*
|
|
77
|
+
* `minStep` is the item's own width, when the caller knows it. Compression has
|
|
78
|
+
* to stop somewhere, and the honest floor is the point where items would start
|
|
79
|
+
* drawing through each other: below it the row is wrong, however tight it looks. Pass
|
|
80
|
+
* it and the count drops instead, which only bites where the run physically
|
|
81
|
+
* cannot hold the authored count without stacking. Omit it and the row may
|
|
82
|
+
* compress without limit, which is safe for a row whose items are narrower than
|
|
83
|
+
* their pitch by a comfortable margin.
|
|
84
|
+
*
|
|
85
|
+
* The authored run is passed in rather than worked back out of the screen
|
|
86
|
+
* geometry on purpose. Every caller knows it exactly, while re-deriving it from
|
|
87
|
+
* a screen width that has already been rounded loses a fraction of a pixel, and
|
|
88
|
+
* a row whose authored run divides exactly by its pitch loses a whole slot to
|
|
89
|
+
* that fraction. A 24-tile nightclub was one dancer short for precisely this
|
|
90
|
+
* reason.
|
|
91
|
+
*
|
|
92
|
+
* Returns no anchors when nothing fits: a `limit` that has crossed `from` means
|
|
93
|
+
* the room is too narrow for the row, which is a real case for a caller that
|
|
94
|
+
* draws rooms at a size of its own. The screen run binds at that end, so a
|
|
95
|
+
* row with authored room but no pixels seats nobody rather than an item that
|
|
96
|
+
* would hang out of the box.
|
|
97
|
+
*
|
|
98
|
+
* Anchors are integers, so a run under a pixel wide is served by a single
|
|
99
|
+
* column: with fractional ends the first anchor can sit up to half a pixel
|
|
100
|
+
* outside the run, which is the ordinary cost of drawing pixel art at a
|
|
101
|
+
* fractional offset and not a containment failure at any whole-pixel caller.
|
|
102
|
+
*/
|
|
103
|
+
function artRow(authoredRun, from, limit, pitch, dir = 1, minStep = 0) {
|
|
104
|
+
if (!(pitch > 0) || !(dir * (limit - from) >= 0) || !(authoredRun >= 0))
|
|
105
|
+
return []; // nothing fits (NaN included)
|
|
106
|
+
// An infinite end would make the count Infinity, and `Array.from` throws on it
|
|
107
|
+
// in the render path. A unit forged with `width: Infinity` is the way in.
|
|
108
|
+
if (!Number.isFinite(authoredRun) || !Number.isFinite(from) || !Number.isFinite(limit))
|
|
109
|
+
return [];
|
|
110
|
+
// The epsilon keeps a slot that lands exactly on a boundary. Callers that own
|
|
111
|
+
// a whole room hand in an exact integer, but one measured off a proportion of
|
|
112
|
+
// a fractional width can arrive as 161.99999999999997, and losing a seat to
|
|
113
|
+
// that is the bug this helper exists to prevent.
|
|
114
|
+
const wanted = Math.floor(authoredRun / pitch + 1e-9) + 1;
|
|
115
|
+
// Two anchors cannot share a pixel, so the screen run bounds the count as
|
|
116
|
+
// well: a room whose margins eat all of it seats one item, not the several its
|
|
117
|
+
// authored width would otherwise allow.
|
|
118
|
+
//
|
|
119
|
+
// Both ends move INWARD to the first whole pixel the row may occupy, and the
|
|
120
|
+
// run is what lies between them. Every anchor is rounded to a pixel, so those
|
|
121
|
+
// integers are the row, and measuring the run any other way states room the
|
|
122
|
+
// row does not have: rounding the near end outward while flooring the far one
|
|
123
|
+
// inward buys a column the pixels do not contain, and the row answers with a
|
|
124
|
+
// count it can only fit by stepping tighter than the pitch. At a half-pixel
|
|
125
|
+
// room origin that put the club's dancers back through each other, which is
|
|
126
|
+
// the defect this helper exists to prevent. Whole-pixel callers, which is
|
|
127
|
+
// every one in the game (a room's origin is `tile * TILE`), are unaffected:
|
|
128
|
+
// rounding an integer inward returns it.
|
|
129
|
+
const edge = dir > 0 ? Math.floor(limit) : Math.ceil(limit);
|
|
130
|
+
const first = dir > 0 ? Math.ceil(from) : Math.floor(from);
|
|
131
|
+
// Moving both ends inward can cross them, which means no whole pixel lies in
|
|
132
|
+
// the run at all (`from` and `limit` inside one pixel of each other). That is
|
|
133
|
+
// one item at the nearest pixel, never two anchors sharing it.
|
|
134
|
+
const span = dir * (edge - first);
|
|
135
|
+
const run = Math.max(0, span);
|
|
136
|
+
const start = span >= 0 ? first : Math.round(from);
|
|
137
|
+
// A row may not compress past the width of the thing it repeats. Without this
|
|
138
|
+
// the count is honored at any cost and the items simply overlap, which is the
|
|
139
|
+
// defect in a different coat: the nightclub's dancers, whose count comes off
|
|
140
|
+
// the dance floor while their run is measured to the DJ booth, stack from
|
|
141
|
+
// about 360px of room upward.
|
|
142
|
+
const holds = minStep > 0 ? Math.floor(run / minStep) + 1 : Infinity;
|
|
143
|
+
const count = Math.max(1, Math.min(wanted, run + 1, holds));
|
|
144
|
+
const step = count > 1 ? Math.min(pitch, run / (count - 1)) : 0;
|
|
145
|
+
const lo = Math.min(start, edge);
|
|
146
|
+
const hi = Math.max(start, edge);
|
|
147
|
+
return Array.from({ length: count }, (_, i) => Math.min(hi, Math.max(lo, Math.round(start + dir * i * step))));
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
export { ART_TILE, artRow, authoredWidth, screenLength };
|
|
151
|
+
//# sourceMappingURL=artScale.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"artScale.js","sources":["../../../src/render/pixelSprites/artScale.ts"],"sourcesContent":["import { TILE } from \"../scale\";\n\n/**\n * The room-art scale seam, split out of `common.ts` so both stay under the\n * line ceiling.\n *\n * Furniture inside these rooms is written as pixel literals against a TILE 11\n * by FLOOR 44 world, the same reference footprint `sprites/facilities/\n * serviceKit` records for the service sprites. The world moved to TILE 10 by\n * FLOOR 45, so a room of the same tile width is about 9% narrower in pixels\n * while the room itself did not shrink. Layouts that counted how many chairs,\n * cabinets, or customers fit straight off the screen width therefore tied\n * capacity to the tile instead of to the room, and several quietly lost a slot:\n * occupants who were present stopped being drawn at all (issue #813). The\n * helpers below count in the authored scale, so capacity follows the room's\n * width in tiles, while the step stays the authored pitch in screen pixels. An\n * item is fixed-size pixel art that did not shrink with the tile, so the space\n * between items must not shrink either: scaling the pitch spends the gap the\n * art was drawn with, and a row authored shoulder to shoulder (the nightclub's\n * dancers, whose 6px figures sit at a 6px pitch) has no gap to spend and comes\n * out overlapping. A row still compresses when its run genuinely cannot hold it,\n * which is the honest last resort rather than the default.\n */\n\n/** The tile the room art was authored against. A literal on purpose: it is\n * history, and pinning it to the live TILE would erase the very drift these\n * helpers exist to absorb. Exported so a test can state a room's capacity in\n * authored units instead of restating 11 of its own. */\nexport const ART_TILE = 11;\n\n/**\n * A room's width in the scale its furniture was drawn for, taken from its width\n * in TILES.\n *\n * Tiles are the scale-free statement of how big a room is, which is why capacity\n * hangs off them. Restating the room's SCREEN width instead only agrees while\n * the caller draws at the world tile. Today every caller does (`/gallery` and\n * `/preview` draw at world size and zoom with `ctx.scale`), but a caller that\n * drew at a tile of its own would hand a 12-tile boutique over at 144px, which\n * reads as 158 authored pixels and seats 22 browsers where the game seats 18.\n * That page would advertise a capacity the room does not have.\n */\nexport function authoredWidth(tiles: number): number {\n return tiles * ART_TILE;\n}\n\n/** An authored length restated on screen. Fractional on purpose: callers round\n * the finished coordinate, so a row keeps an even pitch instead of collecting a\n * rounding error at every step. */\nexport function screenLength(authoredLength: number): number {\n return (authoredLength * TILE) / ART_TILE;\n}\n\n/**\n * Integer anchors for one row of repeated furniture.\n *\n * `authoredRun` is how much room the row has measured in AUTHORED pixels: the\n * container it sits in (the room, or a counter or mat or table inside it) less\n * the row's own margins, all in the scale the art was drawn at. `from` is the\n * first anchor on screen, `limit` the furthest one an item may take, and `dir`\n * the way the row fills. `pitch` is the authored step.\n *\n * How many fit is decided entirely by that authored run, because an item and the\n * clearance around it are fixed-size pixel art and only the container grew when\n * the tile shrank. That ties capacity to the container's width in tiles, which\n * the scale change did not touch.\n *\n * The step is that same pitch in SCREEN pixels, no longer scaled down with the\n * tile. Scaling it spent the gap the art was drawn with, since the item did not\n * shrink and only the space between items can absorb the difference, and a row\n * authored shoulder to shoulder had no gap to spend. Read the arithmetic\n * plainly, though: a caller that measures `authoredRun` across the same span it\n * hands to `from` and `limit` gives the row about 10/11 of the screen its\n * authored count needs, so `run / (count - 1)` binds and the row still\n * compresses to roughly the old step. THAT IS THE COMMON CASE and the pitch is\n * an upper bound, not a promise. What changed is that compression is now\n * bounded by the room the row actually has, so a caller that can give the row\n * more screen (the nightclub, whose crowd runs on past the lit dance floor)\n * reaches the full authored pitch instead of being held under it.\n *\n * `minStep` is the item's own width, when the caller knows it. Compression has\n * to stop somewhere, and the honest floor is the point where items would start\n * drawing through each other: below it the row is wrong, however tight it looks. Pass\n * it and the count drops instead, which only bites where the run physically\n * cannot hold the authored count without stacking. Omit it and the row may\n * compress without limit, which is safe for a row whose items are narrower than\n * their pitch by a comfortable margin.\n *\n * The authored run is passed in rather than worked back out of the screen\n * geometry on purpose. Every caller knows it exactly, while re-deriving it from\n * a screen width that has already been rounded loses a fraction of a pixel, and\n * a row whose authored run divides exactly by its pitch loses a whole slot to\n * that fraction. A 24-tile nightclub was one dancer short for precisely this\n * reason.\n *\n * Returns no anchors when nothing fits: a `limit` that has crossed `from` means\n * the room is too narrow for the row, which is a real case for a caller that\n * draws rooms at a size of its own. The screen run binds at that end, so a\n * row with authored room but no pixels seats nobody rather than an item that\n * would hang out of the box.\n *\n * Anchors are integers, so a run under a pixel wide is served by a single\n * column: with fractional ends the first anchor can sit up to half a pixel\n * outside the run, which is the ordinary cost of drawing pixel art at a\n * fractional offset and not a containment failure at any whole-pixel caller.\n */\nexport function artRow(authoredRun: number, from: number, limit: number, pitch: number, dir: 1 | -1 = 1, minStep = 0): number[] {\n if (!(pitch > 0) || !(dir * (limit - from) >= 0) || !(authoredRun >= 0)) return []; // nothing fits (NaN included)\n // An infinite end would make the count Infinity, and `Array.from` throws on it\n // in the render path. A unit forged with `width: Infinity` is the way in.\n if (!Number.isFinite(authoredRun) || !Number.isFinite(from) || !Number.isFinite(limit)) return [];\n // The epsilon keeps a slot that lands exactly on a boundary. Callers that own\n // a whole room hand in an exact integer, but one measured off a proportion of\n // a fractional width can arrive as 161.99999999999997, and losing a seat to\n // that is the bug this helper exists to prevent.\n const wanted = Math.floor(authoredRun / pitch + 1e-9) + 1;\n // Two anchors cannot share a pixel, so the screen run bounds the count as\n // well: a room whose margins eat all of it seats one item, not the several its\n // authored width would otherwise allow.\n //\n // Both ends move INWARD to the first whole pixel the row may occupy, and the\n // run is what lies between them. Every anchor is rounded to a pixel, so those\n // integers are the row, and measuring the run any other way states room the\n // row does not have: rounding the near end outward while flooring the far one\n // inward buys a column the pixels do not contain, and the row answers with a\n // count it can only fit by stepping tighter than the pitch. At a half-pixel\n // room origin that put the club's dancers back through each other, which is\n // the defect this helper exists to prevent. Whole-pixel callers, which is\n // every one in the game (a room's origin is `tile * TILE`), are unaffected:\n // rounding an integer inward returns it.\n const edge = dir > 0 ? Math.floor(limit) : Math.ceil(limit);\n const first = dir > 0 ? Math.ceil(from) : Math.floor(from);\n // Moving both ends inward can cross them, which means no whole pixel lies in\n // the run at all (`from` and `limit` inside one pixel of each other). That is\n // one item at the nearest pixel, never two anchors sharing it.\n const span = dir * (edge - first);\n const run = Math.max(0, span);\n const start = span >= 0 ? first : Math.round(from);\n // A row may not compress past the width of the thing it repeats. Without this\n // the count is honored at any cost and the items simply overlap, which is the\n // defect in a different coat: the nightclub's dancers, whose count comes off\n // the dance floor while their run is measured to the DJ booth, stack from\n // about 360px of room upward.\n const holds = minStep > 0 ? Math.floor(run / minStep) + 1 : Infinity;\n const count = Math.max(1, Math.min(wanted, run + 1, holds));\n const step = count > 1 ? Math.min(pitch, run / (count - 1)) : 0;\n const lo = Math.min(start, edge);\n const hi = Math.max(start, edge);\n return Array.from({ length: count }, (_, i) =>\n Math.min(hi, Math.max(lo, Math.round(start + dir * i * step))));\n}\n\n"],"names":[],"mappings":";;AAEA;;;;;;;;;;;;;;;;;;;;AAoBG;AAEH;;;AAGyD;AAClD,MAAM,QAAQ,GAAG;AAExB;;;;;;;;;;;AAWG;AACG,SAAU,aAAa,CAAC,KAAa,EAAA;IACzC,OAAO,KAAK,GAAG,QAAQ;AACzB;AAEA;;AAEoC;AAC9B,SAAU,YAAY,CAAC,cAAsB,EAAA;AACjD,IAAA,OAAO,CAAC,cAAc,GAAG,IAAI,IAAI,QAAQ;AAC3C;AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoDG;SACa,MAAM,CAAC,WAAmB,EAAE,IAAY,EAAE,KAAa,EAAE,KAAa,EAAE,GAAA,GAAc,CAAC,EAAE,OAAO,GAAG,CAAC,EAAA;IAClH,IAAI,EAAE,KAAK,GAAG,CAAC,CAAC,IAAI,EAAE,GAAG,IAAI,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,WAAW,IAAI,CAAC,CAAC;QAAE,OAAO,EAAE,CAAC;;;IAGnF,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC;AAAE,QAAA,OAAO,EAAE;;;;;AAKjG,IAAA,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,WAAW,GAAG,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC;;;;;;;;;;;;;;;IAezD,MAAM,IAAI,GAAG,GAAG,GAAG,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,GAA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}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { UnitView } from "../../simport/view";
|
|
2
|
+
import { type RoomCtx } from "./common";
|
|
3
|
+
/**
|
|
4
|
+
* Modern Boutique Bay art: a bay of small independent trades (florist, barber,
|
|
5
|
+
* phone repair, vintage, tattoo, record store, gallery). Every trade keeps one
|
|
6
|
+
* anchor shape, the shopfront fascia band across the top, and its subtype
|
|
7
|
+
* furnishes its own shopfront, so a Florist and a Tattoo parlor read as clearly
|
|
8
|
+
* different rooms. Modern-only (never exported to the 1994 TDT), so nothing here
|
|
9
|
+
* carries an ordinal.
|
|
10
|
+
*
|
|
11
|
+
* Drawing reads only bake-signature inputs (subtype via the look, the real
|
|
12
|
+
* occupant count, `lit`, and a stable geography seed), so a placed room stays
|
|
13
|
+
* cacheable, an empty shop reads empty, and a TDT id renumber never reshuffles
|
|
14
|
+
* the figures.
|
|
15
|
+
*/
|
|
16
|
+
export interface BoutiqueLook {
|
|
17
|
+
wall: string;
|
|
18
|
+
floor: string;
|
|
19
|
+
/** The fascia / sign accent; the interior props pick their own colors, but the
|
|
20
|
+
* shared shopfront band reads this. */
|
|
21
|
+
accent: string;
|
|
22
|
+
/** Which trade fills the shop. 1:1 with the subtype, so the look table stays
|
|
23
|
+
* trivially pairwise-distinct. */
|
|
24
|
+
trade: "florist" | "barber" | "phone" | "vintage" | "tattoo" | "records" | "gallery";
|
|
25
|
+
}
|
|
26
|
+
export declare const BOUTIQUE_DEFAULT: BoutiqueLook;
|
|
27
|
+
export declare const BOUTIQUE_LOOKS: Record<string, BoutiqueLook>;
|
|
28
|
+
/** The Modern Boutique Bay. Reused for every trade subtype; the look's `trade`
|
|
29
|
+
* discriminant picks the shopfront so each trade renders as its own room. */
|
|
30
|
+
export declare function boutiqueBay(d: RoomCtx, u: UnitView, x: number, y: number, w: number, h: number): void;
|