@verticopolis/components 0.0.0-stage → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ASSETS-LICENSE.md +49 -0
- package/LICENSE +21 -0
- package/README.md +121 -2
- package/lib/audio/Audio.d.ts +110 -0
- package/lib/audio/Audio.js +199 -0
- package/lib/audio/Audio.js.map +1 -0
- package/lib/audio/ToneAudioEngine.d.ts +125 -0
- package/lib/audio/ToneAudioEngine.js +452 -0
- package/lib/audio/ToneAudioEngine.js.map +1 -0
- package/lib/audio/audioAssets.d.ts +25 -0
- package/lib/audio/audioAssets.js +28 -0
- package/lib/audio/audioAssets.js.map +1 -0
- package/lib/audio/awayWatch.d.ts +17 -0
- package/lib/audio/awayWatch.js +33 -0
- package/lib/audio/awayWatch.js.map +1 -0
- package/lib/audio/firstCueLatch.d.ts +18 -0
- package/lib/audio/firstCueLatch.js +34 -0
- package/lib/audio/firstCueLatch.js.map +1 -0
- package/lib/audio/lightEnvelope.d.ts +64 -0
- package/lib/audio/lightEnvelope.js +124 -0
- package/lib/audio/lightEnvelope.js.map +1 -0
- package/lib/audio/lightSynth.d.ts +125 -0
- package/lib/audio/lightSynth.js +203 -0
- package/lib/audio/lightSynth.js.map +1 -0
- package/lib/audio/toneContext.d.ts +30 -0
- package/lib/audio/toneContext.js +79 -0
- package/lib/audio/toneContext.js.map +1 -0
- package/lib/audio/toneCrowd.d.ts +62 -0
- package/lib/audio/toneCrowd.js +429 -0
- package/lib/audio/toneCrowd.js.map +1 -0
- package/lib/audio/toneCrowdData.d.ts +144 -0
- package/lib/audio/toneCrowdData.js +317 -0
- package/lib/audio/toneCrowdData.js.map +1 -0
- package/lib/audio/toneCrowdPrograms.d.ts +71 -0
- package/lib/audio/toneCrowdPrograms.js +273 -0
- package/lib/audio/toneCrowdPrograms.js.map +1 -0
- package/lib/audio/toneCrowdVoices.d.ts +49 -0
- package/lib/audio/toneCrowdVoices.js +212 -0
- package/lib/audio/toneCrowdVoices.js.map +1 -0
- package/lib/audio/toneMusicVoices.d.ts +11 -0
- package/lib/audio/toneMusicVoices.js +31 -0
- package/lib/audio/toneMusicVoices.js.map +1 -0
- package/lib/audio/tonePercussion.d.ts +45 -0
- package/lib/audio/tonePercussion.js +97 -0
- package/lib/audio/tonePercussion.js.map +1 -0
- package/lib/audio/toneRain.d.ts +23 -0
- package/lib/audio/toneRain.js +39 -0
- package/lib/audio/toneRain.js.map +1 -0
- package/lib/audio/toneRecordingMock.d.ts +89 -0
- package/lib/audio/toneRecordingMock.js +145 -0
- package/lib/audio/toneRecordingMock.js.map +1 -0
- package/lib/audio/toneRoomTone.d.ts +11 -0
- package/lib/audio/toneRoomTone.js +27 -0
- package/lib/audio/toneRoomTone.js.map +1 -0
- package/lib/audio/toneScenes.d.ts +57 -0
- package/lib/audio/toneScenes.js +208 -0
- package/lib/audio/toneScenes.js.map +1 -0
- package/lib/audio/toneTracks.d.ts +50 -0
- package/lib/audio/toneTracks.js +356 -0
- package/lib/audio/toneTracks.js.map +1 -0
- package/lib/audio/toneVoices.d.ts +57 -0
- package/lib/audio/toneVoices.js +208 -0
- package/lib/audio/toneVoices.js.map +1 -0
- package/lib/catalog/catalogTypes.d.ts +428 -0
- package/lib/catalog/catalogTypes.js +102 -0
- package/lib/catalog/catalogTypes.js.map +1 -0
- package/lib/catalog/skyBridgeTypes.d.ts +25 -0
- package/lib/catalog/skyBridgeTypes.js +7 -0
- package/lib/catalog/skyBridgeTypes.js.map +1 -0
- package/lib/catalog/starDutyTypes.d.ts +22 -0
- package/lib/catalog/starDutyTypes.js +7 -0
- package/lib/catalog/starDutyTypes.js.map +1 -0
- package/lib/catalog/towerCatalog.d.ts +32 -0
- package/lib/catalog/towerCatalog.js +44 -0
- package/lib/catalog/towerCatalog.js.map +1 -0
- package/lib/engineBinding/binding.d.ts +36 -0
- package/lib/engineBinding/binding.js +90 -0
- package/lib/engineBinding/binding.js.map +1 -0
- package/lib/engineBinding/catalog.d.ts +24 -0
- package/lib/engineBinding/catalog.js +267 -0
- package/lib/engineBinding/catalog.js.map +1 -0
- package/lib/engineBinding/engine.d.ts +866 -0
- package/lib/engineBinding/exportTiers.d.ts +289 -0
- package/lib/engineBinding/exportTiers.js +283 -0
- package/lib/engineBinding/exportTiers.js.map +1 -0
- package/lib/engineBinding/toolingMethods.d.ts +12 -0
- package/lib/engineBinding/toolingMethods.js +20 -0
- package/lib/engineBinding/toolingMethods.js.map +1 -0
- package/lib/events/gameplayCatalog.d.ts +57 -0
- package/lib/events/gameplayCatalog.js +214 -0
- package/lib/events/gameplayCatalog.js.map +1 -0
- package/lib/events/gameplayEventRules.d.ts +4 -0
- package/lib/events/gameplayEventRules.js +32 -0
- package/lib/events/gameplayEventRules.js.map +1 -0
- package/lib/events/gameplayEvents.d.ts +284 -0
- package/lib/presentation/clockText.d.ts +28 -0
- package/lib/presentation/clockText.js +38 -0
- package/lib/presentation/clockText.js.map +1 -0
- package/lib/presentation/facilityPresentation.d.ts +20 -0
- package/lib/presentation/facilityPresentation.js +164 -0
- package/lib/presentation/facilityPresentation.js.map +1 -0
- package/lib/presentation/statsCopy.d.ts +20 -0
- package/lib/presentation/statsCopy.js +37 -0
- package/lib/presentation/statsCopy.js.map +1 -0
- package/lib/presentation/traffic.d.ts +75 -0
- package/lib/presentation/traffic.js +79 -0
- package/lib/presentation/traffic.js.map +1 -0
- package/lib/presentation/viewKinds.d.ts +33 -0
- package/lib/presentation/viewKinds.js +88 -0
- package/lib/presentation/viewKinds.js.map +1 -0
- package/lib/presentation/viewWorld.d.ts +29 -0
- package/lib/presentation/viewWorld.js +31 -0
- package/lib/presentation/viewWorld.js.map +1 -0
- package/lib/render/atlas/archive.d.ts +78 -0
- package/lib/render/atlas/archive.js +427 -0
- package/lib/render/atlas/archive.js.map +1 -0
- package/lib/render/atlas/bake.d.ts +132 -0
- package/lib/render/atlas/bake.js +331 -0
- package/lib/render/atlas/bake.js.map +1 -0
- package/lib/render/atlas/bakeAdditions.d.ts +24 -0
- package/lib/render/atlas/bakeAdditions.js +46 -0
- package/lib/render/atlas/bakeAdditions.js.map +1 -0
- package/lib/render/atlas/browserEntry.d.ts +12 -0
- package/lib/render/atlas/browserEntry.js +222 -0
- package/lib/render/atlas/browserEntry.js.map +1 -0
- package/lib/render/atlas/catalog.d.ts +118 -0
- package/lib/render/atlas/catalog.js +253 -0
- package/lib/render/atlas/catalog.js.map +1 -0
- package/lib/render/atlas/catalogExtras.d.ts +45 -0
- package/lib/render/atlas/catalogExtras.js +217 -0
- package/lib/render/atlas/catalogExtras.js.map +1 -0
- package/lib/render/atlas/compose.d.ts +30 -0
- package/lib/render/atlas/compose.js +125 -0
- package/lib/render/atlas/compose.js.map +1 -0
- package/lib/render/atlas/cycles.d.ts +25 -0
- package/lib/render/atlas/cycles.js +41 -0
- package/lib/render/atlas/cycles.js.map +1 -0
- package/lib/render/atlas/lookup.d.ts +65 -0
- package/lib/render/atlas/lookup.js +83 -0
- package/lib/render/atlas/lookup.js.map +1 -0
- package/lib/render/atlas/pack.d.ts +23 -0
- package/lib/render/atlas/pack.js +50 -0
- package/lib/render/atlas/pack.js.map +1 -0
- package/lib/render/atlas/paint.d.ts +120 -0
- package/lib/render/atlas/paint.js +154 -0
- package/lib/render/atlas/paint.js.map +1 -0
- package/lib/render/atlas/pixels.d.ts +46 -0
- package/lib/render/atlas/pixels.js +158 -0
- package/lib/render/atlas/pixels.js.map +1 -0
- package/lib/render/atlas/png.d.ts +3 -0
- package/lib/render/atlas/png.js +102 -0
- package/lib/render/atlas/png.js.map +1 -0
- package/lib/render/atlas/raster.d.ts +34 -0
- package/lib/render/atlas/raster.js +114 -0
- package/lib/render/atlas/raster.js.map +1 -0
- package/lib/render/atlas/recyclingFill.d.ts +5 -0
- package/lib/render/atlas/recyclingFill.js +65 -0
- package/lib/render/atlas/recyclingFill.js.map +1 -0
- package/lib/render/atlas/samples.d.ts +24 -0
- package/lib/render/atlas/samples.js +75 -0
- package/lib/render/atlas/samples.js.map +1 -0
- package/lib/render/atlas/scenery.d.ts +230 -0
- package/lib/render/atlas/scenery.js +242 -0
- package/lib/render/atlas/scenery.js.map +1 -0
- package/lib/render/atlas/schema.d.ts +189 -0
- package/lib/render/atlas/schema.js +31 -0
- package/lib/render/atlas/schema.js.map +1 -0
- package/lib/render/atlas/shellMarks.d.ts +16 -0
- package/lib/render/atlas/shellMarks.js +72 -0
- package/lib/render/atlas/shellMarks.js.map +1 -0
- package/lib/render/atlas/store.d.ts +75 -0
- package/lib/render/atlas/store.js +127 -0
- package/lib/render/atlas/store.js.map +1 -0
- package/lib/render/atlas/verify.d.ts +43 -0
- package/lib/render/atlas/verify.js +87 -0
- package/lib/render/atlas/verify.js.map +1 -0
- package/lib/render/atlas/verifyExtras.d.ts +19 -0
- package/lib/render/atlas/verifyExtras.js +310 -0
- package/lib/render/atlas/verifyExtras.js.map +1 -0
- package/lib/render/cameraBounds.d.ts +71 -0
- package/lib/render/cameraBounds.js +107 -0
- package/lib/render/cameraBounds.js.map +1 -0
- package/lib/render/carIndicator.d.ts +41 -0
- package/lib/render/carIndicator.js +45 -0
- package/lib/render/carIndicator.js.map +1 -0
- package/lib/render/carMotion.d.ts +33 -0
- package/lib/render/carMotion.js +42 -0
- package/lib/render/carMotion.js.map +1 -0
- package/lib/render/catalogScale.d.ts +40 -0
- package/lib/render/catalogScale.js +33 -0
- package/lib/render/catalogScale.js.map +1 -0
- package/lib/render/climbPath.d.ts +59 -0
- package/lib/render/climbPath.js +115 -0
- package/lib/render/climbPath.js.map +1 -0
- package/lib/render/depthPlanes.d.ts +55 -0
- package/lib/render/depthPlanes.js +58 -0
- package/lib/render/depthPlanes.js.map +1 -0
- package/lib/render/excalibur/TowerEngine.d.ts +348 -0
- package/lib/render/excalibur/TowerEngine.js +415 -0
- package/lib/render/excalibur/TowerEngine.js.map +1 -0
- package/lib/render/excalibur/cabGraphics.d.ts +75 -0
- package/lib/render/excalibur/cabGraphics.js +108 -0
- package/lib/render/excalibur/cabGraphics.js.map +1 -0
- package/lib/render/excalibur/cabParts.d.ts +32 -0
- package/lib/render/excalibur/cabParts.js +79 -0
- package/lib/render/excalibur/cabParts.js.map +1 -0
- package/lib/render/excalibur/cabRiders.d.ts +72 -0
- package/lib/render/excalibur/cabRiders.js +176 -0
- package/lib/render/excalibur/cabRiders.js.map +1 -0
- package/lib/render/excalibur/crowdCull.d.ts +34 -0
- package/lib/render/excalibur/crowdCull.js +72 -0
- package/lib/render/excalibur/crowdCull.js.map +1 -0
- package/lib/render/excalibur/crowdFigure.d.ts +42 -0
- package/lib/render/excalibur/crowdFigure.js +99 -0
- package/lib/render/excalibur/crowdFigure.js.map +1 -0
- package/lib/render/excalibur/crowdLook.d.ts +137 -0
- package/lib/render/excalibur/crowdLook.js +186 -0
- package/lib/render/excalibur/crowdLook.js.map +1 -0
- package/lib/render/excalibur/frameHold.d.ts +23 -0
- package/lib/render/excalibur/frameHold.js +30 -0
- package/lib/render/excalibur/frameHold.js.map +1 -0
- package/lib/render/excalibur/guardPosition.d.ts +17 -0
- package/lib/render/excalibur/guardPosition.js +37 -0
- package/lib/render/excalibur/guardPosition.js.map +1 -0
- package/lib/render/excalibur/keyboardHost.d.ts +15 -0
- package/lib/render/excalibur/keyboardHost.js +22 -0
- package/lib/render/excalibur/keyboardHost.js.map +1 -0
- package/lib/render/excalibur/longPress.d.ts +16 -0
- package/lib/render/excalibur/longPress.js +71 -0
- package/lib/render/excalibur/longPress.js.map +1 -0
- package/lib/render/excalibur/peopleGfx.d.ts +16 -0
- package/lib/render/excalibur/peopleGfx.js +46 -0
- package/lib/render/excalibur/peopleGfx.js.map +1 -0
- package/lib/render/excalibur/peopleWindow.d.ts +35 -0
- package/lib/render/excalibur/peopleWindow.js +38 -0
- package/lib/render/excalibur/peopleWindow.js.map +1 -0
- package/lib/render/excalibur/personFocus.d.ts +36 -0
- package/lib/render/excalibur/personFocus.js +169 -0
- package/lib/render/excalibur/personFocus.js.map +1 -0
- package/lib/render/excalibur/pointerButtonGuard.d.ts +35 -0
- package/lib/render/excalibur/pointerButtonGuard.js +86 -0
- package/lib/render/excalibur/pointerButtonGuard.js.map +1 -0
- package/lib/render/excalibur/pressLifecycle.d.ts +26 -0
- package/lib/render/excalibur/pressLifecycle.js +66 -0
- package/lib/render/excalibur/pressLifecycle.js.map +1 -0
- package/lib/render/excalibur/rainShelter.d.ts +16 -0
- package/lib/render/excalibur/rainShelter.js +94 -0
- package/lib/render/excalibur/rainShelter.js.map +1 -0
- package/lib/render/excalibur/roomSignature.d.ts +30 -0
- package/lib/render/excalibur/roomSignature.js +49 -0
- package/lib/render/excalibur/roomSignature.js.map +1 -0
- package/lib/render/excalibur/sceneBake.d.ts +9 -0
- package/lib/render/excalibur/sceneBake.js +12 -0
- package/lib/render/excalibur/sceneBake.js.map +1 -0
- package/lib/render/excalibur/thiefSpan.d.ts +18 -0
- package/lib/render/excalibur/thiefSpan.js +51 -0
- package/lib/render/excalibur/thiefSpan.js.map +1 -0
- package/lib/render/excalibur/towerBridgeTiles.d.ts +30 -0
- package/lib/render/excalibur/towerBridgeTiles.js +43 -0
- package/lib/render/excalibur/towerBridgeTiles.js.map +1 -0
- package/lib/render/excalibur/towerCrowd.d.ts +73 -0
- package/lib/render/excalibur/towerCrowd.js +464 -0
- package/lib/render/excalibur/towerCrowd.js.map +1 -0
- package/lib/render/excalibur/towerCrowdLayout.d.ts +40 -0
- package/lib/render/excalibur/towerCrowdLayout.js +77 -0
- package/lib/render/excalibur/towerCrowdLayout.js.map +1 -0
- package/lib/render/excalibur/towerFireResponse.d.ts +25 -0
- package/lib/render/excalibur/towerFireResponse.js +89 -0
- package/lib/render/excalibur/towerFireResponse.js.map +1 -0
- package/lib/render/excalibur/towerFrame.d.ts +8 -0
- package/lib/render/excalibur/towerFrame.js +57 -0
- package/lib/render/excalibur/towerFrame.js.map +1 -0
- package/lib/render/excalibur/towerGhostLabel.d.ts +9 -0
- package/lib/render/excalibur/towerGhostLabel.js +37 -0
- package/lib/render/excalibur/towerGhostLabel.js.map +1 -0
- package/lib/render/excalibur/towerHallDoors.d.ts +42 -0
- package/lib/render/excalibur/towerHallDoors.js +129 -0
- package/lib/render/excalibur/towerHallDoors.js.map +1 -0
- package/lib/render/excalibur/towerHaloRings.d.ts +34 -0
- package/lib/render/excalibur/towerHaloRings.js +45 -0
- package/lib/render/excalibur/towerHaloRings.js.map +1 -0
- package/lib/render/excalibur/towerInputCamera.d.ts +90 -0
- package/lib/render/excalibur/towerInputCamera.js +480 -0
- package/lib/render/excalibur/towerInputCamera.js.map +1 -0
- package/lib/render/excalibur/towerMetro.d.ts +31 -0
- package/lib/render/excalibur/towerMetro.js +115 -0
- package/lib/render/excalibur/towerMetro.js.map +1 -0
- package/lib/render/excalibur/towerNoiseReach.d.ts +32 -0
- package/lib/render/excalibur/towerNoiseReach.js +75 -0
- package/lib/render/excalibur/towerNoiseReach.js.map +1 -0
- package/lib/render/excalibur/towerOverlay.d.ts +59 -0
- package/lib/render/excalibur/towerOverlay.js +453 -0
- package/lib/render/excalibur/towerOverlay.js.map +1 -0
- package/lib/render/excalibur/towerReconcile.d.ts +17 -0
- package/lib/render/excalibur/towerReconcile.js +404 -0
- package/lib/render/excalibur/towerReconcile.js.map +1 -0
- package/lib/render/excalibur/towerRegions.d.ts +61 -0
- package/lib/render/excalibur/towerRegions.js +193 -0
- package/lib/render/excalibur/towerRegions.js.map +1 -0
- package/lib/render/excalibur/towerScene.d.ts +66 -0
- package/lib/render/excalibur/towerScene.js +443 -0
- package/lib/render/excalibur/towerScene.js.map +1 -0
- package/lib/render/excalibur/towerScenery.d.ts +12 -0
- package/lib/render/excalibur/towerScenery.js +299 -0
- package/lib/render/excalibur/towerScenery.js.map +1 -0
- package/lib/render/excalibur/towerSceneryDraw.d.ts +86 -0
- package/lib/render/excalibur/towerSceneryDraw.js +288 -0
- package/lib/render/excalibur/towerSceneryDraw.js.map +1 -0
- package/lib/render/excalibur/towerShaftNumbers.d.ts +23 -0
- package/lib/render/excalibur/towerShaftNumbers.js +90 -0
- package/lib/render/excalibur/towerShaftNumbers.js.map +1 -0
- package/lib/render/excalibur/towerStructTiles.d.ts +56 -0
- package/lib/render/excalibur/towerStructTiles.js +238 -0
- package/lib/render/excalibur/towerStructTiles.js.map +1 -0
- package/lib/render/excalibur/towerSyncSchedule.d.ts +84 -0
- package/lib/render/excalibur/towerSyncSchedule.js +137 -0
- package/lib/render/excalibur/towerSyncSchedule.js.map +1 -0
- package/lib/render/excalibur/towerWalkerBuild.d.ts +30 -0
- package/lib/render/excalibur/towerWalkerBuild.js +126 -0
- package/lib/render/excalibur/towerWalkerBuild.js.map +1 -0
- package/lib/render/excalibur/trafficSpotlight.d.ts +29 -0
- package/lib/render/excalibur/trafficSpotlight.js +64 -0
- package/lib/render/excalibur/trafficSpotlight.js.map +1 -0
- package/lib/render/facadeGeometry.d.ts +50 -0
- package/lib/render/facadeGeometry.js +79 -0
- package/lib/render/facadeGeometry.js.map +1 -0
- package/lib/render/groundEntrances.d.ts +44 -0
- package/lib/render/groundEntrances.js +118 -0
- package/lib/render/groundEntrances.js.map +1 -0
- package/lib/render/lateNight.d.ts +14 -0
- package/lib/render/lateNight.js +18 -0
- package/lib/render/lateNight.js.map +1 -0
- package/lib/render/lobbyHalls.d.ts +44 -0
- package/lib/render/lobbyHalls.js +63 -0
- package/lib/render/lobbyHalls.js.map +1 -0
- package/lib/render/metroTrainSchedule.d.ts +20 -0
- package/lib/render/metroTrainSchedule.js +65 -0
- package/lib/render/metroTrainSchedule.js.map +1 -0
- package/lib/render/overviewMap/drawList.d.ts +67 -0
- package/lib/render/overviewMap/drawList.js +103 -0
- package/lib/render/overviewMap/drawList.js.map +1 -0
- package/lib/render/overviewMap/extent.d.ts +70 -0
- package/lib/render/overviewMap/extent.js +155 -0
- package/lib/render/overviewMap/extent.js.map +1 -0
- package/lib/render/overviewMap/floorSpans.d.ts +27 -0
- package/lib/render/overviewMap/floorSpans.js +32 -0
- package/lib/render/overviewMap/floorSpans.js.map +1 -0
- package/lib/render/overviewMap/gaps.d.ts +48 -0
- package/lib/render/overviewMap/gaps.js +148 -0
- package/lib/render/overviewMap/gaps.js.map +1 -0
- package/lib/render/overviewMap/geometry.d.ts +139 -0
- package/lib/render/overviewMap/geometry.js +245 -0
- package/lib/render/overviewMap/geometry.js.map +1 -0
- package/lib/render/overviewMap/heatView.d.ts +91 -0
- package/lib/render/overviewMap/heatView.js +143 -0
- package/lib/render/overviewMap/heatView.js.map +1 -0
- package/lib/render/overviewMap/hotelView.d.ts +82 -0
- package/lib/render/overviewMap/hotelView.js +136 -0
- package/lib/render/overviewMap/hotelView.js.map +1 -0
- package/lib/render/overviewMap/model.d.ts +97 -0
- package/lib/render/overviewMap/model.js +116 -0
- package/lib/render/overviewMap/model.js.map +1 -0
- package/lib/render/overviewMap/paint.d.ts +63 -0
- package/lib/render/overviewMap/paint.js +168 -0
- package/lib/render/overviewMap/paint.js.map +1 -0
- package/lib/render/overviewMap/style.d.ts +46 -0
- package/lib/render/overviewMap/style.js +117 -0
- package/lib/render/overviewMap/style.js.map +1 -0
- package/lib/render/overviewMap/tierView.d.ts +103 -0
- package/lib/render/overviewMap/tierView.js +209 -0
- package/lib/render/overviewMap/tierView.js.map +1 -0
- package/lib/render/overviewMap/viewMark.d.ts +69 -0
- package/lib/render/overviewMap/viewMark.js +103 -0
- package/lib/render/overviewMap/viewMark.js.map +1 -0
- package/lib/render/overviewMap/views.d.ts +24 -0
- package/lib/render/overviewMap/views.js +29 -0
- package/lib/render/overviewMap/views.js.map +1 -0
- package/lib/render/pinchTracker.d.ts +91 -0
- package/lib/render/pinchTracker.js +145 -0
- package/lib/render/pinchTracker.js.map +1 -0
- package/lib/render/pixelSprites/amusements.d.ts +32 -0
- package/lib/render/pixelSprites/amusements.js +243 -0
- package/lib/render/pixelSprites/amusements.js.map +1 -0
- package/lib/render/pixelSprites/artScale.d.ts +97 -0
- package/lib/render/pixelSprites/artScale.js +151 -0
- package/lib/render/pixelSprites/artScale.js.map +1 -0
- package/lib/render/pixelSprites/boutique.d.ts +30 -0
- package/lib/render/pixelSprites/boutique.js +244 -0
- package/lib/render/pixelSprites/boutique.js.map +1 -0
- package/lib/render/pixelSprites/clinic.d.ts +30 -0
- package/lib/render/pixelSprites/clinic.js +184 -0
- package/lib/render/pixelSprites/clinic.js.map +1 -0
- package/lib/render/pixelSprites/common.d.ts +185 -0
- package/lib/render/pixelSprites/common.js +449 -0
- package/lib/render/pixelSprites/common.js.map +1 -0
- package/lib/render/pixelSprites/daycare.d.ts +3 -0
- package/lib/render/pixelSprites/daycare.js +99 -0
- package/lib/render/pixelSprites/daycare.js.map +1 -0
- package/lib/render/pixelSprites/dollhouse.d.ts +45 -0
- package/lib/render/pixelSprites/dollhouse.js +110 -0
- package/lib/render/pixelSprites/dollhouse.js.map +1 -0
- package/lib/render/pixelSprites/fitness.d.ts +30 -0
- package/lib/render/pixelSprites/fitness.js +176 -0
- package/lib/render/pixelSprites/fitness.js.map +1 -0
- package/lib/render/pixelSprites/food.d.ts +27 -0
- package/lib/render/pixelSprites/food.interiors.d.ts +38 -0
- package/lib/render/pixelSprites/food.interiors.js +516 -0
- package/lib/render/pixelSprites/food.interiors.js.map +1 -0
- package/lib/render/pixelSprites/food.js +36 -0
- package/lib/render/pixelSprites/food.js.map +1 -0
- package/lib/render/pixelSprites/food.kit.d.ts +50 -0
- package/lib/render/pixelSprites/food.kit.js +140 -0
- package/lib/render/pixelSprites/food.kit.js.map +1 -0
- package/lib/render/pixelSprites/food.looks.d.ts +45 -0
- package/lib/render/pixelSprites/food.looks.js +56 -0
- package/lib/render/pixelSprites/food.looks.js.map +1 -0
- package/lib/render/pixelSprites/layers.d.ts +49 -0
- package/lib/render/pixelSprites/layers.js +61 -0
- package/lib/render/pixelSprites/layers.js.map +1 -0
- package/lib/render/pixelSprites/nightclub.d.ts +3 -0
- package/lib/render/pixelSprites/nightclub.js +108 -0
- package/lib/render/pixelSprites/nightclub.js.map +1 -0
- package/lib/render/pixelSprites/people.d.ts +168 -0
- package/lib/render/pixelSprites/people.js +431 -0
- package/lib/render/pixelSprites/people.js.map +1 -0
- package/lib/render/pixelSprites/residential.d.ts +5 -0
- package/lib/render/pixelSprites/residential.js +506 -0
- package/lib/render/pixelSprites/residential.js.map +1 -0
- package/lib/render/pixelSprites/residential.looks.d.ts +40 -0
- package/lib/render/pixelSprites/residential.looks.js +43 -0
- package/lib/render/pixelSprites/residential.looks.js.map +1 -0
- package/lib/render/pixelSprites/residential.roaches.d.ts +38 -0
- package/lib/render/pixelSprites/residential.roaches.js +88 -0
- package/lib/render/pixelSprites/residential.roaches.js.map +1 -0
- package/lib/render/pixelSprites/residentialRentalSprites.d.ts +11 -0
- package/lib/render/pixelSprites/residentialRentalSprites.js +19 -0
- package/lib/render/pixelSprites/residentialRentalSprites.js.map +1 -0
- package/lib/render/pixelSprites/shop.d.ts +14 -0
- package/lib/render/pixelSprites/shop.interiors.d.ts +50 -0
- package/lib/render/pixelSprites/shop.interiors.js +382 -0
- package/lib/render/pixelSprites/shop.interiors.js.map +1 -0
- package/lib/render/pixelSprites/shop.js +72 -0
- package/lib/render/pixelSprites/shop.js.map +1 -0
- package/lib/render/pixelSprites/shop.looks.d.ts +17 -0
- package/lib/render/pixelSprites/shop.looks.js +24 -0
- package/lib/render/pixelSprites/shop.looks.js.map +1 -0
- package/lib/render/pixelSprites/skyBar.d.ts +11 -0
- package/lib/render/pixelSprites/skyBar.js +125 -0
- package/lib/render/pixelSprites/skyBar.js.map +1 -0
- package/lib/render/pixelSprites/spa.d.ts +3 -0
- package/lib/render/pixelSprites/spa.js +88 -0
- package/lib/render/pixelSprites/spa.js.map +1 -0
- package/lib/render/pixelSprites.d.ts +33 -0
- package/lib/render/pixelSprites.js +167 -0
- package/lib/render/pixelSprites.js.map +1 -0
- package/lib/render/regionGrid.d.ts +49 -0
- package/lib/render/regionGrid.js +82 -0
- package/lib/render/regionGrid.js.map +1 -0
- package/lib/render/regionPaint.d.ts +15 -0
- package/lib/render/regionPaint.js +33 -0
- package/lib/render/regionPaint.js.map +1 -0
- package/lib/render/renderSim.d.ts +104 -0
- package/lib/render/renderSim.js +2 -0
- package/lib/render/renderSim.js.map +1 -0
- package/lib/render/roomPortrait.d.ts +35 -0
- package/lib/render/roomPortrait.js +142 -0
- package/lib/render/roomPortrait.js.map +1 -0
- package/lib/render/roomShading.d.ts +29 -0
- package/lib/render/roomShading.js +43 -0
- package/lib/render/roomShading.js.map +1 -0
- package/lib/render/scale.d.ts +31 -0
- package/lib/render/scale.js +34 -0
- package/lib/render/scale.js.map +1 -0
- package/lib/render/sceneryLayout.d.ts +234 -0
- package/lib/render/sceneryLayout.js +199 -0
- package/lib/render/sceneryLayout.js.map +1 -0
- package/lib/render/sprites/common.d.ts +41 -0
- package/lib/render/sprites/common.js +46 -0
- package/lib/render/sprites/common.js.map +1 -0
- package/lib/render/sprites/escalator.d.ts +27 -0
- package/lib/render/sprites/escalator.js +156 -0
- package/lib/render/sprites/escalator.js.map +1 -0
- package/lib/render/sprites/events.d.ts +56 -0
- package/lib/render/sprites/events.js +280 -0
- package/lib/render/sprites/events.js.map +1 -0
- package/lib/render/sprites/facilities/garage.d.ts +23 -0
- package/lib/render/sprites/facilities/garage.js +230 -0
- package/lib/render/sprites/facilities/garage.js.map +1 -0
- package/lib/render/sprites/facilities/recycling.d.ts +3 -0
- package/lib/render/sprites/facilities/recycling.js +210 -0
- package/lib/render/sprites/facilities/recycling.js.map +1 -0
- package/lib/render/sprites/facilities/recyclingLook.d.ts +49 -0
- package/lib/render/sprites/facilities/recyclingLook.js +52 -0
- package/lib/render/sprites/facilities/recyclingLook.js.map +1 -0
- package/lib/render/sprites/facilities/service.d.ts +14 -0
- package/lib/render/sprites/facilities/service.js +437 -0
- package/lib/render/sprites/facilities/service.js.map +1 -0
- package/lib/render/sprites/facilities/serviceKit.d.ts +61 -0
- package/lib/render/sprites/facilities/serviceKit.js +113 -0
- package/lib/render/sprites/facilities/serviceKit.js.map +1 -0
- package/lib/render/sprites/facilities/vehicles.d.ts +38 -0
- package/lib/render/sprites/facilities/vehicles.js +276 -0
- package/lib/render/sprites/facilities/vehicles.js.map +1 -0
- package/lib/render/sprites/facilities/venue.d.ts +28 -0
- package/lib/render/sprites/facilities/venue.js +211 -0
- package/lib/render/sprites/facilities/venue.js.map +1 -0
- package/lib/render/sprites/facilities/weddingHall.d.ts +9 -0
- package/lib/render/sprites/facilities/weddingHall.js +410 -0
- package/lib/render/sprites/facilities/weddingHall.js.map +1 -0
- package/lib/render/sprites/facilities.d.ts +22 -0
- package/lib/render/sprites/facilities.js +24 -0
- package/lib/render/sprites/facilities.js.map +1 -0
- package/lib/render/sprites/helicopter.d.ts +11 -0
- package/lib/render/sprites/helicopter.js +60 -0
- package/lib/render/sprites/helicopter.js.map +1 -0
- package/lib/render/sprites/sky.d.ts +67 -0
- package/lib/render/sprites/sky.js +85 -0
- package/lib/render/sprites/sky.js.map +1 -0
- package/lib/render/sprites/spiralStair.d.ts +19 -0
- package/lib/render/sprites/spiralStair.js +111 -0
- package/lib/render/sprites/spiralStair.js.map +1 -0
- package/lib/render/sprites/structure/entrance.d.ts +35 -0
- package/lib/render/sprites/structure/entrance.js +347 -0
- package/lib/render/sprites/structure/entrance.js.map +1 -0
- package/lib/render/sprites/structure/lobby.d.ts +88 -0
- package/lib/render/sprites/structure/lobby.js +350 -0
- package/lib/render/sprites/structure/lobby.js.map +1 -0
- package/lib/render/sprites/structure/revolvingDoor.d.ts +53 -0
- package/lib/render/sprites/structure/revolvingDoor.js +184 -0
- package/lib/render/sprites/structure/revolvingDoor.js.map +1 -0
- package/lib/render/sprites/structure/rooftop.d.ts +93 -0
- package/lib/render/sprites/structure/rooftop.js +302 -0
- package/lib/render/sprites/structure/rooftop.js.map +1 -0
- package/lib/render/sprites/structure/shell.d.ts +19 -0
- package/lib/render/sprites/structure/shell.js +142 -0
- package/lib/render/sprites/structure/shell.js.map +1 -0
- package/lib/render/sprites/structure/skyBridge.d.ts +28 -0
- package/lib/render/sprites/structure/skyBridge.js +259 -0
- package/lib/render/sprites/structure/skyBridge.js.map +1 -0
- package/lib/render/sprites/structure/tallLobby.d.ts +8 -0
- package/lib/render/sprites/structure/tallLobby.js +166 -0
- package/lib/render/sprites/structure/tallLobby.js.map +1 -0
- package/lib/render/sprites/structure/tallLobbyPieces.d.ts +18 -0
- package/lib/render/sprites/structure/tallLobbyPieces.js +82 -0
- package/lib/render/sprites/structure/tallLobbyPieces.js.map +1 -0
- package/lib/render/sprites/structure.d.ts +15 -0
- package/lib/render/sprites/structure.js +16 -0
- package/lib/render/sprites/structure.js.map +1 -0
- package/lib/render/sprites/transport.d.ts +30 -0
- package/lib/render/sprites/transport.js +376 -0
- package/lib/render/sprites/transport.js.map +1 -0
- package/lib/render/sprites.d.ts +16 -0
- package/lib/render/sprites.js +108 -0
- package/lib/render/sprites.js.map +1 -0
- package/lib/render/venueFlights.d.ts +61 -0
- package/lib/render/venueFlights.js +50 -0
- package/lib/render/venueFlights.js.map +1 -0
- package/lib/shared/engineTypes.d.ts +256 -0
- package/lib/shared/engineTypes.js +8 -0
- package/lib/shared/engineTypes.js.map +1 -0
- package/lib/shared/floorRuns.d.ts +22 -0
- package/lib/shared/floorRuns.js +39 -0
- package/lib/shared/floorRuns.js.map +1 -0
- package/lib/shared/inputEvents.d.ts +18 -0
- package/lib/shared/inputEvents.js +23 -0
- package/lib/shared/inputEvents.js.map +1 -0
- package/lib/shared/serializedGame.d.ts +142 -0
- package/lib/shared/serializedGame.js +2 -0
- package/lib/shared/serializedGame.js.map +1 -0
- package/lib/shared/types.d.ts +298 -0
- package/lib/shared/types.js +47 -0
- package/lib/shared/types.js.map +1 -0
- package/lib/shared/unitState.d.ts +36 -0
- package/lib/shared/unitState.js +42 -0
- package/lib/shared/unitState.js.map +1 -0
- package/lib/shared/vacateReasonText.d.ts +20 -0
- package/lib/shared/vacateReasonText.js +23 -0
- package/lib/shared/vacateReasonText.js.map +1 -0
- package/lib/shared/viewZoom.d.ts +14 -0
- package/lib/shared/viewZoom.js +17 -0
- package/lib/shared/viewZoom.js.map +1 -0
- package/lib/shared/wellFormed.d.ts +14 -0
- package/lib/shared/wellFormed.js +19 -0
- package/lib/shared/wellFormed.js.map +1 -0
- package/lib/simport/cards.d.ts +26 -0
- package/lib/simport/cards.js +138 -0
- package/lib/simport/cards.js.map +1 -0
- package/lib/simport/clockView.d.ts +24 -0
- package/lib/simport/clockView.js +43 -0
- package/lib/simport/clockView.js.map +1 -0
- package/lib/simport/commands.d.ts +215 -0
- package/lib/simport/commands.js +2 -0
- package/lib/simport/commands.js.map +1 -0
- package/lib/simport/emergencyReads.d.ts +19 -0
- package/lib/simport/emergencyReads.js +47 -0
- package/lib/simport/emergencyReads.js.map +1 -0
- package/lib/simport/enginePort.d.ts +433 -0
- package/lib/simport/enginePort.js +11 -0
- package/lib/simport/enginePort.js.map +1 -0
- package/lib/simport/fixtures/catalog.classic.json +2137 -0
- package/lib/simport/fixtures/catalog.modern.json +2515 -0
- package/lib/simport/fixtures/viewLayout.json +927 -0
- package/lib/simport/headerClock.d.ts +31 -0
- package/lib/simport/headerClock.js +29 -0
- package/lib/simport/headerClock.js.map +1 -0
- package/lib/simport/panels.d.ts +243 -0
- package/lib/simport/panels.js +2 -0
- package/lib/simport/panels.js.map +1 -0
- package/lib/simport/personCards.d.ts +63 -0
- package/lib/simport/personCards.js +55 -0
- package/lib/simport/personCards.js.map +1 -0
- package/lib/simport/portCodes.d.ts +41 -0
- package/lib/simport/portCodes.js +49 -0
- package/lib/simport/portCodes.js.map +1 -0
- package/lib/simport/portEvents.d.ts +39 -0
- package/lib/simport/portEvents.js +43 -0
- package/lib/simport/portEvents.js.map +1 -0
- package/lib/simport/portRenderSim.d.ts +70 -0
- package/lib/simport/portRenderSim.js +129 -0
- package/lib/simport/portRenderSim.js.map +1 -0
- package/lib/simport/queries.d.ts +64 -0
- package/lib/simport/queries.js +30 -0
- package/lib/simport/queries.js.map +1 -0
- package/lib/simport/recyclingPort.d.ts +13 -0
- package/lib/simport/recyclingPort.js +2 -0
- package/lib/simport/recyclingPort.js.map +1 -0
- package/lib/simport/request.d.ts +44 -0
- package/lib/simport/request.js +214 -0
- package/lib/simport/request.js.map +1 -0
- package/lib/simport/roomTiers.d.ts +102 -0
- package/lib/simport/roomTiers.js +122 -0
- package/lib/simport/roomTiers.js.map +1 -0
- package/lib/simport/scheduleSlots.d.ts +19 -0
- package/lib/simport/scheduleSlots.js +87 -0
- package/lib/simport/scheduleSlots.js.map +1 -0
- package/lib/simport/skyBridgePort.d.ts +20 -0
- package/lib/simport/skyBridgePort.js +2 -0
- package/lib/simport/skyBridgePort.js.map +1 -0
- package/lib/simport/skyBridgeView.d.ts +15 -0
- package/lib/simport/skyBridgeView.js +42 -0
- package/lib/simport/skyBridgeView.js.map +1 -0
- package/lib/simport/statsSheet.d.ts +15 -0
- package/lib/simport/statsSheet.js +101 -0
- package/lib/simport/statsSheet.js.map +1 -0
- package/lib/simport/tdtRecords.d.ts +9 -0
- package/lib/simport/tdtRecords.js +112 -0
- package/lib/simport/tdtRecords.js.map +1 -0
- package/lib/simport/tdtReportFacts.d.ts +110 -0
- package/lib/simport/tdtReportFacts.js +8 -0
- package/lib/simport/tdtReportFacts.js.map +1 -0
- package/lib/simport/trafficPort.d.ts +22 -0
- package/lib/simport/trafficPort.js +2 -0
- package/lib/simport/trafficPort.js.map +1 -0
- package/lib/simport/view.d.ts +275 -0
- package/lib/simport/view.js +2 -0
- package/lib/simport/view.js.map +1 -0
- package/lib/simport/viewReader.d.ts +89 -0
- package/lib/simport/viewReader.js +426 -0
- package/lib/simport/viewReader.js.map +1 -0
- package/lib/styles/game/appearance.css +108 -0
- package/lib/styles/game/base.css +68 -0
- package/lib/styles/game/components.css +69 -0
- package/lib/styles/game/desk-title.css +183 -0
- package/lib/styles/game/desk.css +487 -0
- package/lib/styles/game/dialogs.css +360 -0
- package/lib/styles/game/editor-sidebar.css +116 -0
- package/lib/styles/game/elevator-schedule.css +217 -0
- package/lib/styles/game/file-dialog.css +470 -0
- package/lib/styles/game/help.css +141 -0
- package/lib/styles/game/launch-fireworks.css +17 -0
- package/lib/styles/game/media-landscape.css +333 -0
- package/lib/styles/game/media-phone.css +303 -0
- package/lib/styles/game/media-tablet-touch.css +177 -0
- package/lib/styles/game/menubar.css +158 -0
- package/lib/styles/game/new-tower.css +219 -0
- package/lib/styles/game/onboarding.css +32 -0
- package/lib/styles/game/screen-saver.css +85 -0
- package/lib/styles/game/splash.css +413 -0
- package/lib/styles/game/stats-saves.css +106 -0
- package/lib/styles/game/tools-stage.css +340 -0
- package/lib/styles/game/topbar.css +191 -0
- package/lib/styles/menu-bar.css +108 -0
- package/lib/styles/not-found.css +335 -0
- package/lib/styles/overview-map-views.css +88 -0
- package/lib/styles/overview-map.css +195 -0
- package/lib/styles/retro-components.css +179 -0
- package/lib/styles/retro-page.css +254 -0
- package/lib/styles/retro-tokens.css +122 -0
- package/lib/styles/schemes/high-contrast.css +173 -0
- package/lib/styles/schemes/skyline.css +134 -0
- package/lib/styles.css +66 -0
- package/lib/ui/desk/deskGeometry.d.ts +59 -0
- package/lib/ui/desk/deskGeometry.js +106 -0
- package/lib/ui/desk/deskGeometry.js.map +1 -0
- package/lib/ui/desk/deskWindow.d.ts +90 -0
- package/lib/ui/desk/deskWindow.js +253 -0
- package/lib/ui/desk/deskWindow.js.map +1 -0
- package/lib/ui/desk/deskWindowMenu.d.ts +55 -0
- package/lib/ui/desk/deskWindowMenu.js +143 -0
- package/lib/ui/desk/deskWindowMenu.js.map +1 -0
- package/lib/ui/escape.d.ts +1 -0
- package/lib/ui/escape.js +14 -0
- package/lib/ui/escape.js.map +1 -0
- package/lib/ui/format.d.ts +14 -0
- package/lib/ui/format.js +36 -0
- package/lib/ui/format.js.map +1 -0
- package/lib/ui/iconPaths.generated.d.ts +4 -0
- package/lib/ui/iconPaths.generated.js +68 -0
- package/lib/ui/iconPaths.generated.js.map +1 -0
- package/lib/ui/icons.d.ts +83 -0
- package/lib/ui/icons.js +156 -0
- package/lib/ui/icons.js.map +1 -0
- package/lib/ui/menuBar.d.ts +94 -0
- package/lib/ui/menuBar.js +361 -0
- package/lib/ui/menuBar.js.map +1 -0
- package/lib/ui/modalPrecedence.d.ts +108 -0
- package/lib/ui/modalPrecedence.js +165 -0
- package/lib/ui/modalPrecedence.js.map +1 -0
- package/lib/ui/movableWindow.d.ts +124 -0
- package/lib/ui/movableWindow.js +247 -0
- package/lib/ui/movableWindow.js.map +1 -0
- package/lib/ui/overviewMapInput.d.ts +109 -0
- package/lib/ui/overviewMapInput.js +135 -0
- package/lib/ui/overviewMapInput.js.map +1 -0
- package/lib/ui/uiModal.d.ts +38 -0
- package/lib/ui/uiModal.js +70 -0
- package/lib/ui/uiModal.js.map +1 -0
- package/lib/wasmhost/buildSection.d.ts +54 -0
- package/lib/wasmhost/buildSection.js +143 -0
- package/lib/wasmhost/buildSection.js.map +1 -0
- package/lib/wasmhost/catalogCheck.d.ts +11 -0
- package/lib/wasmhost/catalogCheck.js +43 -0
- package/lib/wasmhost/catalogCheck.js.map +1 -0
- package/lib/wasmhost/engineAssets.d.ts +57 -0
- package/lib/wasmhost/engineAssets.js +63 -0
- package/lib/wasmhost/engineAssets.js.map +1 -0
- package/lib/wasmhost/engineBoot.d.ts +165 -0
- package/lib/wasmhost/engineBoot.js +254 -0
- package/lib/wasmhost/engineBoot.js.map +1 -0
- package/lib/wasmhost/engineChoice.d.ts +6 -0
- package/lib/wasmhost/engineChoice.js +2 -0
- package/lib/wasmhost/engineChoice.js.map +1 -0
- package/lib/wasmhost/engineDiagnostics.d.ts +66 -0
- package/lib/wasmhost/engineDiagnostics.js +189 -0
- package/lib/wasmhost/engineDiagnostics.js.map +1 -0
- package/lib/wasmhost/engineDiagnosticsLive.d.ts +15 -0
- package/lib/wasmhost/engineDiagnosticsLive.js +31 -0
- package/lib/wasmhost/engineDiagnosticsLive.js.map +1 -0
- package/lib/wasmhost/engineIdentity.d.ts +30 -0
- package/lib/wasmhost/engineIdentity.js +59 -0
- package/lib/wasmhost/engineIdentity.js.map +1 -0
- package/lib/wasmhost/engineLabel.d.ts +40 -0
- package/lib/wasmhost/engineLabel.js +50 -0
- package/lib/wasmhost/engineLabel.js.map +1 -0
- package/lib/wasmhost/engineLoad.d.ts +48 -0
- package/lib/wasmhost/engineLoad.js +53 -0
- package/lib/wasmhost/engineLoad.js.map +1 -0
- package/lib/wasmhost/enginePackageCheck.d.ts +77 -0
- package/lib/wasmhost/enginePackageCheck.js +274 -0
- package/lib/wasmhost/enginePackageCheck.js.map +1 -0
- package/lib/wasmhost/enginePackageNames.d.ts +25 -0
- package/lib/wasmhost/enginePackageNames.js +28 -0
- package/lib/wasmhost/enginePackageNames.js.map +1 -0
- package/lib/wasmhost/enginePackageRecord.d.ts +78 -0
- package/lib/wasmhost/enginePackageRecord.js +108 -0
- package/lib/wasmhost/enginePackageRecord.js.map +1 -0
- package/lib/wasmhost/engineRepair.d.ts +55 -0
- package/lib/wasmhost/engineRepair.js +183 -0
- package/lib/wasmhost/engineRepair.js.map +1 -0
- package/lib/wasmhost/frameView.d.ts +87 -0
- package/lib/wasmhost/frameView.js +133 -0
- package/lib/wasmhost/frameView.js.map +1 -0
- package/lib/wasmhost/hostFault.d.ts +40 -0
- package/lib/wasmhost/hostFault.js +94 -0
- package/lib/wasmhost/hostFault.js.map +1 -0
- package/lib/wasmhost/loadEngineModule.d.ts +79 -0
- package/lib/wasmhost/loadEngineModule.js +66 -0
- package/lib/wasmhost/loadEngineModule.js.map +1 -0
- package/lib/wasmhost/packageHash.d.ts +48 -0
- package/lib/wasmhost/packageHash.js +436 -0
- package/lib/wasmhost/packageHash.js.map +1 -0
- package/lib/wasmhost/rustEngine.d.ts +49 -0
- package/lib/wasmhost/rustEngine.js +63 -0
- package/lib/wasmhost/rustEngine.js.map +1 -0
- package/lib/wasmhost/slotPopulation.d.ts +19 -0
- package/lib/wasmhost/slotPopulation.js +69 -0
- package/lib/wasmhost/slotPopulation.js.map +1 -0
- package/lib/wasmhost/telemetry.d.ts +31 -0
- package/lib/wasmhost/telemetry.js +13 -0
- package/lib/wasmhost/telemetry.js.map +1 -0
- package/package.json +80 -4
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extent.js","sources":["../../../src/render/overviewMap/extent.ts"],"sourcesContent":["/**\n * What the overview MAP window (#343) spans, and where the main view sits\n * against it. Pure, like `geometry.ts`, so the window only calls it.\n *\n * The map shows a banded crop of the built tower (SPEC, Constraints), in both\n * game modes (owner, 2026-11-04): from one floor of ground under the lowest\n * built floor to the top built floor plus the sky headroom, with the top\n * rounded up to the next band of `MAP_BAND_FLOORS` floors, at least\n * `MAP_MIN_FLOORS` tall, and never past the world's top or bottom. Across, it\n * is the whole lot plus a margin of `mapSideMarginTiles` on each side, so it\n * does reach past the world there: a tower built from edge to edge does not\n * touch the map's sides (as the main view shows sky beside the lot). Building\n * inside a band leaves the extent alone, so the map does not rescale on every\n * new floor. The camera clamp still covers the whole world, so the view can\n * sit above the crop; `viewPlacement` says when.\n */\nimport { FLOOR } from \"../scale\";\nimport { MAP_LINES_BELOW_LOWEST_FLOOR, mapExtent, viewportRect, type MapCamera, type MapExtent, type MapLayout, type MapRect, type MapWorld } from \"./geometry\";\n\n/** The crop's top rounds up to a multiple of this many floor lines. */\nexport const MAP_BAND_FLOORS = 10;\n\n/** The crop is at least this many floors tall, unless the world itself is\n * shorter (the crop never goes past the world's top). */\nexport const MAP_MIN_FLOORS = 30;\n\n/** The margin beside the lot on each side, as a share of the lot's width. */\nexport const MAP_SIDE_MARGIN_SHARE = 0.04;\n\n/** The margin beside a lot of `lotWidth` tiles on each side, in whole tiles:\n * `MAP_SIDE_MARGIN_SHARE` of the lot rounded up, so any lot gets at least one\n * tile. A width that is not a positive finite number gets one tile. */\nexport function mapSideMarginTiles(lotWidth: number): number {\n if (!(Number.isFinite(lotWidth) && lotWidth > 0)) return 1;\n return Math.max(1, Math.ceil(lotWidth * MAP_SIDE_MARGIN_SHARE));\n}\n\n/** The floors the tower has built, as `SimView.tower` reports them. */\nexport interface BuiltFloors {\n readonly lowestFloor: number;\n readonly highestFloor: number;\n}\n\n/**\n * The banded crop for a world and the floors built in it, with the side\n * margins. A missing range, or a lowest floor that is not finite, reads as the\n * ground floor; a top that is not finite, or under the lowest, reads as the\n * lowest; a range outside the world is held inside it. So a bad view still\n * gives a usable map. A lot so wide that the margins would take the width\n * past a finite number gets no margin, so the extent always has a finite,\n * positive width and `fitLayout` reads it as it is.\n *\n * `reserve` is the strip at the top of a box `boxHeight` tall that a view's\n * legend covers (#1769): the crop grows upward by just enough floors of sky\n * that the strip holds only those, so the legend hides no floor of the crop.\n * The strip is held to half the box, and a strip that is not a positive\n * number, or a box that is not, adds nothing.\n */\nexport function bandedExtent(world: MapWorld, built: BuiltFloors | null, skyFloors: number, boxHeight = 0, reserve = 0): MapExtent {\n const whole = mapExtent(world, skyFloors);\n // The same sky `mapExtent` used (it reads a bad value as no sky), so the world's\n // top floor below falls out of `whole` exactly.\n const sky = Math.max(0, Number.isFinite(skyFloors) ? skyFloors : 0);\n const worldLowest = whole.bottomLine + MAP_LINES_BELOW_LOWEST_FLOOR;\n const worldHighest = whole.topLine - sky;\n const lowest = withinWorld(built?.lowestFloor, 1, worldLowest, worldHighest);\n const highest = Math.max(lowest, withinWorld(built?.highestFloor, lowest, worldLowest, worldHighest));\n const bottomLine = lowest - MAP_LINES_BELOW_LOWEST_FLOOR;\n // Both candidates for the top sit on the band grid, so a small tower that the\n // minimum height holds up does not rescale one floor at a time either. The\n // minimum is measured from the ground's bottom line (or the crop's, if that is\n // higher), so digging basements under a small tower never lowers the top.\n const groundBottom = 1 - MAP_LINES_BELOW_LOWEST_FLOOR;\n const minTop = toBand(Math.max(bottomLine, groundBottom) + MAP_MIN_FLOORS);\n const cropTop = Math.min(whole.topLine, Math.max(toBand(highest + sky), minTop));\n const topLine = cropTop + floorsUnder(Math.min(reserve, boxHeight / 2), boxHeight, cropTop - bottomLine);\n // `whole.width` is the lot as `mapExtent` trusts it (a bad width reads as 1).\n const margin = mapSideMarginTiles(whole.width);\n const width = whole.width + 2 * margin;\n if (!(Number.isFinite(width) && width > 0)) return { leftTile: 0, width: whole.width, topLine, bottomLine };\n return { leftTile: -margin, width, topLine, bottomLine };\n}\n\n/** How many floors to add over `floors` so that the top `strip` of a box\n * `box` tall covers only them: `a` with `a * box / (floors + a) >= strip`.\n * Zero for a strip or box that is not a positive finite number. */\nfunction floorsUnder(strip: number, box: number, floors: number): number {\n if (!(strip > 0 && Number.isFinite(box) && box > 0 && floors > 0)) return 0;\n return Math.ceil((strip * floors) / (box - strip));\n}\n\n/** A floor line rounded up onto the band grid. */\nfunction toBand(line: number): number {\n return Math.ceil(line / MAP_BAND_FLOORS) * MAP_BAND_FLOORS;\n}\n\nfunction withinWorld(n: number | undefined, fallback: number, lo: number, hi: number): number {\n const v = n !== undefined && Number.isFinite(n) ? Math.floor(n) : fallback;\n return Math.max(lo, Math.min(hi, v));\n}\n\n/** Whether two extents are the same, so the window rebuilds its layout only when\n * a band is crossed. */\nexport function sameExtent(a: MapExtent, b: MapExtent): boolean {\n return a.leftTile === b.leftTile && a.width === b.width && a.topLine === b.topLine && a.bottomLine === b.bottomLine;\n}\n\n/** Where the main view sits against the map's extent. */\nexport type ViewOutside = \"none\" | \"above\" | \"below\";\n\nexport interface ViewPlacement {\n /** The visible area clipped to the map (see `viewportRect`). */\n readonly rect: MapRect;\n /** Whether any of the view lies past the map's top or bottom edge (true too\n * when all of it does). The lot's sides are not counted: the camera clamp\n * keeps the view's center on the lot, and `rect` is clipped to the sides on\n * its own. */\n readonly clipped: boolean;\n /** Whether the whole view lies past one edge, so `rect` has no height and\n * the window draws the edge band with a chevron instead. */\n readonly outside: ViewOutside;\n /** The floor line the view's center falls on (floor `f` spans the lines\n * `f - 1`, exclusive, to `f`), or null when the camera's position is not a\n * finite number. It can be past the built floors (in the sky or the ground);\n * the text summary says so. */\n readonly centerFloor: number | null;\n}\n\n/**\n * The view against the map. A camera the clamp lets sit in the sky above the\n * crop is `outside: \"above\"`. The camera is read the way `viewportRect` reads\n * it (a bad zoom is 1, a bad position 0, a bad viewport size 0), so `outside`\n * and `rect` agree: a view outside has a `rect` with no height.\n */\nexport function viewPlacement(layout: MapLayout, cam: MapCamera): ViewPlacement {\n const rect = viewportRect(layout, cam);\n const zoom = Number.isFinite(cam.zoom) && cam.zoom > 0 ? cam.zoom : 1;\n const posY = Number.isFinite(cam.posY) ? cam.posY : 0;\n const halfFloors = Math.max(0, Number.isFinite(cam.viewHeight) ? cam.viewHeight : 0) / 2 / zoom / FLOOR;\n const centerLine = -posY / FLOOR;\n const viewTop = centerLine + halfFloors;\n const viewBottom = centerLine - halfFloors;\n const { topLine, bottomLine } = layout.extent;\n // A view with height is outside when its clipped rectangle has none and the\n // view reaches past an edge, so the two can never disagree by a rounding\n // error at an edge; its center says which side. (A view thinner than float\n // precision inside the map has no rectangle either, and stays on the map.) A\n // view with no height that sits exactly on an edge line is on the map.\n const clipped = viewTop > topLine || viewBottom < bottomLine;\n let outside: ViewOutside = \"none\";\n if (halfFloors > 0) {\n if (!(rect.h > 0) && clipped) outside = centerLine >= (topLine + bottomLine) / 2 ? \"above\" : \"below\";\n } else if (viewBottom > topLine) outside = \"above\";\n else if (viewTop < bottomLine) outside = \"below\";\n return {\n rect,\n clipped,\n outside,\n // The line's ceiling is the floor it falls on; `|| 0` turns -0 into 0.\n centerFloor: Number.isFinite(cam.posY) ? Math.ceil(centerLine) || 0 : null,\n };\n}\n\n/**\n * The band drawn on the map's edge when the whole view lies past it: the view's\n * horizontal span (at least `minWidth` so it can be seen, and at least a pixel\n * each way unless the map itself is smaller), `thickness` tall,\n * against the top edge for a view above the map and the bottom edge for one\n * below. Null when the view is on the map.\n */\nexport function edgeBand(layout: MapLayout, placement: ViewPlacement, thickness: number, minWidth = thickness): MapRect | null {\n if (placement.outside === \"none\") return null;\n // At least a pixel each way, whatever the caller asks for.\n const atLeastOne = (n: number) => (Number.isFinite(n) && n > 1 ? n : 1);\n const h = Math.min(layout.height, atLeastOne(thickness));\n const spanW = Number.isFinite(placement.rect.w) ? placement.rect.w : 0;\n const spanX = Number.isFinite(placement.rect.x) ? placement.rect.x : 0;\n const w = Math.min(layout.width, Math.max(atLeastOne(minWidth), spanW));\n const x = Math.max(0, Math.min(layout.width - w, spanX + spanW / 2 - w / 2));\n return { x, y: placement.outside === \"above\" ? 0 : layout.height - h, w, h };\n}\n"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;AAeG;AAIH;AACO,MAAM,eAAe,GAAG;AAE/B;AAC0D;AACnD,MAAM,cAAc,GAAG;AAE9B;AACO,MAAM,qBAAqB,GAAG;AAErC;;AAEwE;AAClE,SAAU,kBAAkB,CAAC,QAAgB,EAAA;AACjD,IAAA,IAAI,EAAE,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,QAAQ,GAAG,CAAC,CAAC;AAAE,QAAA,OAAO,CAAC;AAC1D,IAAA,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,QAAQ,GAAG,qBAAqB,CAAC,CAAC;AACjE;AAQA;;;;;;;;;;;;;;AAcG;AACG,SAAU,YAAY,CAAC,KAAe,EAAE,KAAyB,EAAE,SAAiB,EAAE,SAAS,GAAG,CAAC,EAAE,OAAO,GAAG,CAAC,EAAA;IACpH,MAAM,KAAK,GAAG,SAAS,CAAC,KAAK,EAAE,SAAS,CAAC;;;IAGzC,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,GAAG,SAAS,GAAG,CAAC,CAAC;AACnE,IAAA,MAAM,WAAW,GAAG,KAAK,CAAC,UAAU,GAAG,4BAA4B;AACnE,IAAA,MAAM,YAAY,GAAG,KAAK,CAAC,OAAO,GAAG,GAAG;AACxC,IAAA,MAAM,MAAM,GAAG,WAAW,CAAC,KAAK,EAAE,WAAW,EAAE,CAAC,EAAE,WAAW,EAAE,YAAY,CAAC;IAC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I,SAAS,CAAC,OAAO,KAAK,MAAM;AAAE,QAAA,OAAO,IAAI;;IAE7C,MAAM,UAAU,GAAG,CAAC,CAAS,MAAM,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AACvE,IAAA,MAAM,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC;IACxD,MAAM,KAAK,GAAG,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC;IACtE,MAAM,KAAK,GAAG,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC;IACtE,MAAM,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,KAAK,CAAC,CAAC;AACvE,IAAA,MAAM,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,KAAK,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;IAC5E,OAAO,EAAE,CAAC,EAAE,CAAC,EAAE,SAAS,CAAC,OAAO,KAAK,OAAO,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE;AAC9E;;"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Each floor's built spans as the overview MAP's draw list meets them
|
|
3
|
+
* (`buildMapDrawList` fills one while it walks the runs, the tall lobby halls
|
|
4
|
+
* and the rooms, so finding the gaps between buildings costs no walk of its
|
|
5
|
+
* own). `gaps.ts` reads it.
|
|
6
|
+
*
|
|
7
|
+
* A span is a column range `[from, to)` of built space on one floor: a floor
|
|
8
|
+
* or lobby run, a raised story of a tall hall, or an upper floor of a room
|
|
9
|
+
* taller than one floor. A span that starts where the floor's last one ended
|
|
10
|
+
* extends it in place, so a floor the view lists left to right as one
|
|
11
|
+
* building stays one span, and `split` stays false for a tower with no gap
|
|
12
|
+
* anywhere.
|
|
13
|
+
*/
|
|
14
|
+
import type { MapLayout } from "./geometry";
|
|
15
|
+
export declare class FloorSpans {
|
|
16
|
+
/** Each floor's spans, flat `[from, to, from, to, ...]`, by the floor's row
|
|
17
|
+
* counted from `lowest`. */
|
|
18
|
+
readonly rows: Array<number[] | undefined>;
|
|
19
|
+
/** The floor of row 0: the one under the map's bottom line. */
|
|
20
|
+
readonly lowest: number;
|
|
21
|
+
/** Whether any floor holds more than one span. Without that there is no gap. */
|
|
22
|
+
split: boolean;
|
|
23
|
+
constructor(layout: MapLayout);
|
|
24
|
+
/** Record built space at columns `[from, to)` on `floor`. A floor off the
|
|
25
|
+
* map, or a value that is not finite, records nothing. */
|
|
26
|
+
add(floor: number, from: number, to: number): void;
|
|
27
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/** A hand-built extent taller than any world is held to this many floors. */
|
|
2
|
+
const MAX_ROWS = 4096;
|
|
3
|
+
class FloorSpans {
|
|
4
|
+
constructor(layout) {
|
|
5
|
+
/** Whether any floor holds more than one span. Without that there is no gap. */
|
|
6
|
+
this.split = false;
|
|
7
|
+
this.lowest = Math.floor(layout.extent.bottomLine);
|
|
8
|
+
const rows = Math.ceil(layout.extent.topLine) - this.lowest + 1;
|
|
9
|
+
this.rows = new Array(Number.isFinite(rows) && rows > 0 ? Math.min(rows, MAX_ROWS) : 0);
|
|
10
|
+
}
|
|
11
|
+
/** Record built space at columns `[from, to)` on `floor`. A floor off the
|
|
12
|
+
* map, or a value that is not finite, records nothing. */
|
|
13
|
+
add(floor, from, to) {
|
|
14
|
+
const row = floor - this.lowest;
|
|
15
|
+
if (!(row >= 0 && row < this.rows.length && Number.isInteger(row) && Number.isFinite(from) && to > from && Number.isFinite(to)))
|
|
16
|
+
return;
|
|
17
|
+
const list = this.rows[row];
|
|
18
|
+
if (!list) {
|
|
19
|
+
this.rows[row] = [from, to];
|
|
20
|
+
}
|
|
21
|
+
else if (list[list.length - 1] === from) {
|
|
22
|
+
list[list.length - 1] = to;
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
list.push(from, to);
|
|
26
|
+
this.split = true;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export { FloorSpans };
|
|
32
|
+
//# sourceMappingURL=floorSpans.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"floorSpans.js","sources":["../../../src/render/overviewMap/floorSpans.ts"],"sourcesContent":["/**\n * Each floor's built spans as the overview MAP's draw list meets them\n * (`buildMapDrawList` fills one while it walks the runs, the tall lobby halls\n * and the rooms, so finding the gaps between buildings costs no walk of its\n * own). `gaps.ts` reads it.\n *\n * A span is a column range `[from, to)` of built space on one floor: a floor\n * or lobby run, a raised story of a tall hall, or an upper floor of a room\n * taller than one floor. A span that starts where the floor's last one ended\n * extends it in place, so a floor the view lists left to right as one\n * building stays one span, and `split` stays false for a tower with no gap\n * anywhere.\n */\nimport type { MapLayout } from \"./geometry\";\n\n/** A hand-built extent taller than any world is held to this many floors. */\nconst MAX_ROWS = 4096;\n\nexport class FloorSpans {\n /** Each floor's spans, flat `[from, to, from, to, ...]`, by the floor's row\n * counted from `lowest`. */\n readonly rows: Array<number[] | undefined>;\n /** The floor of row 0: the one under the map's bottom line. */\n readonly lowest: number;\n /** Whether any floor holds more than one span. Without that there is no gap. */\n split = false;\n\n constructor(layout: MapLayout) {\n this.lowest = Math.floor(layout.extent.bottomLine);\n const rows = Math.ceil(layout.extent.topLine) - this.lowest + 1;\n this.rows = new Array<number[] | undefined>(Number.isFinite(rows) && rows > 0 ? Math.min(rows, MAX_ROWS) : 0);\n }\n\n /** Record built space at columns `[from, to)` on `floor`. A floor off the\n * map, or a value that is not finite, records nothing. */\n add(floor: number, from: number, to: number): void {\n const row = floor - this.lowest;\n if (!(row >= 0 && row < this.rows.length && Number.isInteger(row) && Number.isFinite(from) && to > from && Number.isFinite(to))) return;\n const list = this.rows[row];\n if (!list) {\n this.rows[row] = [from, to];\n } else if (list[list.length - 1] === from) {\n list[list.length - 1] = to;\n } else {\n list.push(from, to);\n this.split = true;\n }\n }\n}\n"],"names":[],"mappings":"AAeA;AACA,MAAM,QAAQ,GAAG,IAAI;MAER,UAAU,CAAA;AASrB,IAAA,WAAA,CAAY,MAAiB,EAAA;;QAF7B,IAAA,CAAA,KAAK,GAAG,KAAK;AAGX,QAAA,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC;AAClD,QAAA,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC,MAAM,GAAG,CAAC;AAC/D,QAAA,IAAI,CAAC,IAAI,GAAG,IAAI,KAAK,CAAuB,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,IAAI,GAAG,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAC;IAC/G;AAEA;AAC2D;AAC3D,IAAA,GAAG,CAAC,KAAa,EAAE,IAAY,EAAE,EAAU,EAAA;AACzC,QAAA,MAAM,GAAG,GAAG,KAAK,GAAG,IAAI,CAAC,MAAM;AAC/B,QAAA,IAAI,EAAE,GAAG,IAAI,CAAC,IAAI,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,IAAI,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,IAAI,IAAI,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;YAAE;QACjI,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC;QAC3B,IAAI,CAAC,IAAI,EAAE;YACT,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,EAAE,EAAE,CAAC;QAC7B;aAAO,IAAI,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,KAAK,IAAI,EAAE;YACzC,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,GAAG,EAAE;QAC5B;aAAO;AACL,YAAA,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,CAAC;AACnB,YAAA,IAAI,CAAC,KAAK,GAAG,IAAI;QACnB;IACF;AACD;;"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The open air between buildings on the overview MAP (#343): a column of
|
|
3
|
+
* tiles on a floor with built space on both sides of it and nothing in it (no
|
|
4
|
+
* floor or lobby tile, no room, no raised story of a tall lobby hall). Two
|
|
5
|
+
* Modern towers on one lot, or a tower whose upper floors step apart, leave
|
|
6
|
+
* such gaps, and the main view shows sky through them.
|
|
7
|
+
*
|
|
8
|
+
* The map packs the whole lot into a small box, often under one pixel per
|
|
9
|
+
* tile, so a gap of a few tiles drew as a one-pixel seam, or as nothing, and
|
|
10
|
+
* the buildings read as one block. Each gap is kept at least `minPx` map
|
|
11
|
+
* pixels wide here, centered on the real gap, by taking the extra pixels from
|
|
12
|
+
* the buildings beside it (each keeps a pixel of its own, so a narrow
|
|
13
|
+
* building between two gaps never vanishes). A gap that is already wide
|
|
14
|
+
* enough keeps its true width, and every gap shows at least one pixel. The map's scale is unchanged, so the camera
|
|
15
|
+
* rectangle and a press on the map still land where they did.
|
|
16
|
+
*
|
|
17
|
+
* The window clears these rectangles after the rooms and before the shafts,
|
|
18
|
+
* so the map's backdrop (sky above the ground line, earth below it) shows
|
|
19
|
+
* through, and a shaft standing beside a gap still draws whole.
|
|
20
|
+
*
|
|
21
|
+
* Cost: no walk of its own. The draw list's walk records each floor's spans
|
|
22
|
+
* (`FloorSpans`, a few numbers a floor); a tower in one piece stops there.
|
|
23
|
+
* Otherwise one walk of the floors that hold two spans or more, sorting a
|
|
24
|
+
* floor's few spans only where a hall or a tall room added one out of order.
|
|
25
|
+
* Rows that repeat floor over floor join into one rectangle, so a tower pair
|
|
26
|
+
* 70 floors tall adds one rectangle per gap.
|
|
27
|
+
*/
|
|
28
|
+
import { type MapSource } from "./drawList";
|
|
29
|
+
import { FloorSpans } from "./floorSpans";
|
|
30
|
+
import { type MapLayout, type MapRect } from "./geometry";
|
|
31
|
+
/** The narrowest a gap between buildings draws, in CSS pixels. The window
|
|
32
|
+
* multiplies it by the device pixel ratio. */
|
|
33
|
+
export declare const MAP_MIN_GAP_CSS_PX = 4;
|
|
34
|
+
/** What `buildMapGaps` finds the gaps from: the draw list's own source. */
|
|
35
|
+
export type MapGapSource = Pick<MapSource, "structure" | "rooms" | "floorsOf" | "tallLobbies">;
|
|
36
|
+
/**
|
|
37
|
+
* The gaps between buildings on a source alone: the draw list's walk with
|
|
38
|
+
* `FloorSpans`, then `mapGaps`. The window's model takes the two steps itself,
|
|
39
|
+
* so it walks the tower once.
|
|
40
|
+
*/
|
|
41
|
+
export declare function buildMapGaps(layout: MapLayout, source: MapGapSource, minPx: number): readonly MapRect[];
|
|
42
|
+
/**
|
|
43
|
+
* The gaps between buildings in the spans the draw list recorded, as map
|
|
44
|
+
* rectangles in device pixels, each at least `minPx` wide where the buildings
|
|
45
|
+
* beside it leave room. A tower with no floor of two spans answers at once.
|
|
46
|
+
* Sorts each floor's spans in place.
|
|
47
|
+
*/
|
|
48
|
+
export declare function mapGaps(layout: MapLayout, byFloor: FloorSpans, minPx: number): readonly MapRect[];
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import { buildMapDrawList } from './drawList.js';
|
|
2
|
+
import { FloorSpans } from './floorSpans.js';
|
|
3
|
+
import { lineToMapY, tileToMapX } from './geometry.js';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* The open air between buildings on the overview MAP (#343): a column of
|
|
7
|
+
* tiles on a floor with built space on both sides of it and nothing in it (no
|
|
8
|
+
* floor or lobby tile, no room, no raised story of a tall lobby hall). Two
|
|
9
|
+
* Modern towers on one lot, or a tower whose upper floors step apart, leave
|
|
10
|
+
* such gaps, and the main view shows sky through them.
|
|
11
|
+
*
|
|
12
|
+
* The map packs the whole lot into a small box, often under one pixel per
|
|
13
|
+
* tile, so a gap of a few tiles drew as a one-pixel seam, or as nothing, and
|
|
14
|
+
* the buildings read as one block. Each gap is kept at least `minPx` map
|
|
15
|
+
* pixels wide here, centered on the real gap, by taking the extra pixels from
|
|
16
|
+
* the buildings beside it (each keeps a pixel of its own, so a narrow
|
|
17
|
+
* building between two gaps never vanishes). A gap that is already wide
|
|
18
|
+
* enough keeps its true width, and every gap shows at least one pixel. The map's scale is unchanged, so the camera
|
|
19
|
+
* rectangle and a press on the map still land where they did.
|
|
20
|
+
*
|
|
21
|
+
* The window clears these rectangles after the rooms and before the shafts,
|
|
22
|
+
* so the map's backdrop (sky above the ground line, earth below it) shows
|
|
23
|
+
* through, and a shaft standing beside a gap still draws whole.
|
|
24
|
+
*
|
|
25
|
+
* Cost: no walk of its own. The draw list's walk records each floor's spans
|
|
26
|
+
* (`FloorSpans`, a few numbers a floor); a tower in one piece stops there.
|
|
27
|
+
* Otherwise one walk of the floors that hold two spans or more, sorting a
|
|
28
|
+
* floor's few spans only where a hall or a tall room added one out of order.
|
|
29
|
+
* Rows that repeat floor over floor join into one rectangle, so a tower pair
|
|
30
|
+
* 70 floors tall adds one rectangle per gap.
|
|
31
|
+
*/
|
|
32
|
+
/** The narrowest a gap between buildings draws, in CSS pixels. The window
|
|
33
|
+
* multiplies it by the device pixel ratio. */
|
|
34
|
+
const MAP_MIN_GAP_CSS_PX = 4;
|
|
35
|
+
/** No gap: what a tower in one piece answers. */
|
|
36
|
+
const NO_GAPS = Object.freeze([]);
|
|
37
|
+
/** Sort a floor's spans by their start, in place, and join the ones that
|
|
38
|
+
* touch or overlap. Returns how many numbers of `flat` now hold the joined
|
|
39
|
+
* `[from, to)` pairs. A floor holds a few spans, and the view lists its runs
|
|
40
|
+
* left to right, so the insertion sort moves only what a hall or a tall room
|
|
41
|
+
* added. */
|
|
42
|
+
function joinSpans(flat) {
|
|
43
|
+
for (let i = 2; i < flat.length; i += 2) {
|
|
44
|
+
const from = flat[i];
|
|
45
|
+
const to = flat[i + 1];
|
|
46
|
+
let at = i;
|
|
47
|
+
while (at > 0 && flat[at - 2] > from) {
|
|
48
|
+
flat[at] = flat[at - 2];
|
|
49
|
+
flat[at + 1] = flat[at - 1];
|
|
50
|
+
at -= 2;
|
|
51
|
+
}
|
|
52
|
+
flat[at] = from;
|
|
53
|
+
flat[at + 1] = to;
|
|
54
|
+
}
|
|
55
|
+
let n = 0;
|
|
56
|
+
for (let i = 0; i < flat.length; i += 2) {
|
|
57
|
+
if (n > 0 && flat[i] <= flat[n - 1]) {
|
|
58
|
+
flat[n - 1] = Math.max(flat[n - 1], flat[i + 1]);
|
|
59
|
+
}
|
|
60
|
+
else {
|
|
61
|
+
flat[n] = flat[i];
|
|
62
|
+
flat[n + 1] = flat[i + 1];
|
|
63
|
+
n += 2;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
return n;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* The gaps between buildings on a source alone: the draw list's walk with
|
|
70
|
+
* `FloorSpans`, then `mapGaps`. The window's model takes the two steps itself,
|
|
71
|
+
* so it walks the tower once.
|
|
72
|
+
*/
|
|
73
|
+
function buildMapGaps(layout, source, minPx) {
|
|
74
|
+
const spans = new FloorSpans(layout);
|
|
75
|
+
buildMapDrawList(layout, { ...source, transports: [] }, spans);
|
|
76
|
+
return mapGaps(layout, spans, minPx);
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* The gaps between buildings in the spans the draw list recorded, as map
|
|
80
|
+
* rectangles in device pixels, each at least `minPx` wide where the buildings
|
|
81
|
+
* beside it leave room. A tower with no floor of two spans answers at once.
|
|
82
|
+
* Sorts each floor's spans in place.
|
|
83
|
+
*/
|
|
84
|
+
function mapGaps(layout, byFloor, minPx) {
|
|
85
|
+
if (!byFloor.split)
|
|
86
|
+
return NO_GAPS;
|
|
87
|
+
const lowest = byFloor.lowest;
|
|
88
|
+
// Every gap shows, a pixel wide at the least.
|
|
89
|
+
const need = Number.isFinite(minPx) && minPx > 1 ? Math.ceil(minPx) : 1;
|
|
90
|
+
const mapW = Math.max(1, Math.floor(layout.width));
|
|
91
|
+
const mapH = Math.max(1, Math.floor(layout.height));
|
|
92
|
+
/** Rectangles still open for joining, by their columns, with the floor
|
|
93
|
+
* they last reached. */
|
|
94
|
+
const open = new Map();
|
|
95
|
+
const out = [];
|
|
96
|
+
for (let row = 0; row < byFloor.rows.length; row++) {
|
|
97
|
+
const spans = byFloor.rows[row];
|
|
98
|
+
// A gap needs two spans; one span is one building.
|
|
99
|
+
if (!spans || spans.length < 4)
|
|
100
|
+
continue;
|
|
101
|
+
const count = joinSpans(spans);
|
|
102
|
+
const floor = row + lowest;
|
|
103
|
+
const top = Math.round(lineToMapY(layout, floor));
|
|
104
|
+
const bottom = Math.round(lineToMapY(layout, floor - 1));
|
|
105
|
+
if (bottom <= 0 || top >= mapH)
|
|
106
|
+
continue;
|
|
107
|
+
const y0 = Math.max(0, top);
|
|
108
|
+
const y1 = Math.min(mapH, Math.max(bottom, y0 + 1));
|
|
109
|
+
for (let i = 2; i < count; i += 2) {
|
|
110
|
+
// In whole map pixels: the building on the left, the gap, the building
|
|
111
|
+
// on the right, each rounded the way the draw list rounds a block.
|
|
112
|
+
const leftStart = Math.round(tileToMapX(layout, spans[i - 2]));
|
|
113
|
+
const gapStart = Math.round(tileToMapX(layout, spans[i - 1]));
|
|
114
|
+
const gapEnd = Math.round(tileToMapX(layout, spans[i]));
|
|
115
|
+
const rightEnd = Math.round(tileToMapX(layout, spans[i + 1]));
|
|
116
|
+
const short = Math.max(0, need - (gapEnd - gapStart));
|
|
117
|
+
// A building gives at most what leaves it a pixel even when gaps on both
|
|
118
|
+
// of its sides take their share.
|
|
119
|
+
const leftSpare = Math.max(0, Math.floor((gapStart - leftStart - 1) / 2));
|
|
120
|
+
const rightSpare = Math.max(0, Math.floor((rightEnd - gapEnd - 1) / 2));
|
|
121
|
+
let fromRight = Math.min(Math.floor(short / 2), rightSpare);
|
|
122
|
+
const fromLeft = Math.min(short - fromRight, leftSpare);
|
|
123
|
+
fromRight = Math.min(short - fromLeft, rightSpare);
|
|
124
|
+
const left = Math.max(0, gapStart - fromLeft);
|
|
125
|
+
const right = Math.min(mapW, gapEnd + fromRight);
|
|
126
|
+
if (right <= left)
|
|
127
|
+
continue;
|
|
128
|
+
const key = left * (mapW + 1) + right;
|
|
129
|
+
const held = open.get(key);
|
|
130
|
+
// Floors go bottom to top. The floor under this one held the same
|
|
131
|
+
// columns: grow that rectangle up over this row instead of starting
|
|
132
|
+
// another.
|
|
133
|
+
if (held && held.floor === floor - 1 && held.rect.y === y1) {
|
|
134
|
+
held.rect.h += held.rect.y - y0;
|
|
135
|
+
held.rect.y = y0;
|
|
136
|
+
held.floor = floor;
|
|
137
|
+
continue;
|
|
138
|
+
}
|
|
139
|
+
const rect = { x: left, y: y0, w: right - left, h: y1 - y0 };
|
|
140
|
+
open.set(key, { rect, floor });
|
|
141
|
+
out.push(rect);
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
return out;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
export { MAP_MIN_GAP_CSS_PX, buildMapGaps, mapGaps };
|
|
148
|
+
//# sourceMappingURL=gaps.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gaps.js","sources":["../../../src/render/overviewMap/gaps.ts"],"sourcesContent":["/**\n * The open air between buildings on the overview MAP (#343): a column of\n * tiles on a floor with built space on both sides of it and nothing in it (no\n * floor or lobby tile, no room, no raised story of a tall lobby hall). Two\n * Modern towers on one lot, or a tower whose upper floors step apart, leave\n * such gaps, and the main view shows sky through them.\n *\n * The map packs the whole lot into a small box, often under one pixel per\n * tile, so a gap of a few tiles drew as a one-pixel seam, or as nothing, and\n * the buildings read as one block. Each gap is kept at least `minPx` map\n * pixels wide here, centered on the real gap, by taking the extra pixels from\n * the buildings beside it (each keeps a pixel of its own, so a narrow\n * building between two gaps never vanishes). A gap that is already wide\n * enough keeps its true width, and every gap shows at least one pixel. The map's scale is unchanged, so the camera\n * rectangle and a press on the map still land where they did.\n *\n * The window clears these rectangles after the rooms and before the shafts,\n * so the map's backdrop (sky above the ground line, earth below it) shows\n * through, and a shaft standing beside a gap still draws whole.\n *\n * Cost: no walk of its own. The draw list's walk records each floor's spans\n * (`FloorSpans`, a few numbers a floor); a tower in one piece stops there.\n * Otherwise one walk of the floors that hold two spans or more, sorting a\n * floor's few spans only where a hall or a tall room added one out of order.\n * Rows that repeat floor over floor join into one rectangle, so a tower pair\n * 70 floors tall adds one rectangle per gap.\n */\nimport { buildMapDrawList, type MapSource } from \"./drawList\";\nimport { FloorSpans } from \"./floorSpans\";\nimport { lineToMapY, tileToMapX, type MapLayout, type MapRect } from \"./geometry\";\n\n/** The narrowest a gap between buildings draws, in CSS pixels. The window\n * multiplies it by the device pixel ratio. */\nexport const MAP_MIN_GAP_CSS_PX = 4;\n\n/** No gap: what a tower in one piece answers. */\nconst NO_GAPS: readonly MapRect[] = Object.freeze([]);\n\n/** What `buildMapGaps` finds the gaps from: the draw list's own source. */\nexport type MapGapSource = Pick<MapSource, \"structure\" | \"rooms\" | \"floorsOf\" | \"tallLobbies\">;\n\n/** Sort a floor's spans by their start, in place, and join the ones that\n * touch or overlap. Returns how many numbers of `flat` now hold the joined\n * `[from, to)` pairs. A floor holds a few spans, and the view lists its runs\n * left to right, so the insertion sort moves only what a hall or a tall room\n * added. */\nfunction joinSpans(flat: number[]): number {\n for (let i = 2; i < flat.length; i += 2) {\n const from = flat[i];\n const to = flat[i + 1];\n let at = i;\n while (at > 0 && flat[at - 2] > from) {\n flat[at] = flat[at - 2];\n flat[at + 1] = flat[at - 1];\n at -= 2;\n }\n flat[at] = from;\n flat[at + 1] = to;\n }\n let n = 0;\n for (let i = 0; i < flat.length; i += 2) {\n if (n > 0 && flat[i] <= flat[n - 1]) {\n flat[n - 1] = Math.max(flat[n - 1], flat[i + 1]);\n } else {\n flat[n] = flat[i];\n flat[n + 1] = flat[i + 1];\n n += 2;\n }\n }\n return n;\n}\n\n/**\n * The gaps between buildings on a source alone: the draw list's walk with\n * `FloorSpans`, then `mapGaps`. The window's model takes the two steps itself,\n * so it walks the tower once.\n */\nexport function buildMapGaps(layout: MapLayout, source: MapGapSource, minPx: number): readonly MapRect[] {\n const spans = new FloorSpans(layout);\n buildMapDrawList(layout, { ...source, transports: [] }, spans);\n return mapGaps(layout, spans, minPx);\n}\n\n/**\n * The gaps between buildings in the spans the draw list recorded, as map\n * rectangles in device pixels, each at least `minPx` wide where the buildings\n * beside it leave room. A tower with no floor of two spans answers at once.\n * Sorts each floor's spans in place.\n */\nexport function mapGaps(layout: MapLayout, byFloor: FloorSpans, minPx: number): readonly MapRect[] {\n if (!byFloor.split) return NO_GAPS;\n const lowest = byFloor.lowest;\n // Every gap shows, a pixel wide at the least.\n const need = Number.isFinite(minPx) && minPx > 1 ? Math.ceil(minPx) : 1;\n const mapW = Math.max(1, Math.floor(layout.width));\n const mapH = Math.max(1, Math.floor(layout.height));\n /** Rectangles still open for joining, by their columns, with the floor\n * they last reached. */\n const open = new Map<number, { rect: { x: number; y: number; w: number; h: number }; floor: number }>();\n const out: MapRect[] = [];\n for (let row = 0; row < byFloor.rows.length; row++) {\n const spans = byFloor.rows[row];\n // A gap needs two spans; one span is one building.\n if (!spans || spans.length < 4) continue;\n const count = joinSpans(spans);\n const floor = row + lowest;\n const top = Math.round(lineToMapY(layout, floor));\n const bottom = Math.round(lineToMapY(layout, floor - 1));\n if (bottom <= 0 || top >= mapH) continue;\n const y0 = Math.max(0, top);\n const y1 = Math.min(mapH, Math.max(bottom, y0 + 1));\n for (let i = 2; i < count; i += 2) {\n // In whole map pixels: the building on the left, the gap, the building\n // on the right, each rounded the way the draw list rounds a block.\n const leftStart = Math.round(tileToMapX(layout, spans[i - 2]));\n const gapStart = Math.round(tileToMapX(layout, spans[i - 1]));\n const gapEnd = Math.round(tileToMapX(layout, spans[i]));\n const rightEnd = Math.round(tileToMapX(layout, spans[i + 1]));\n const short = Math.max(0, need - (gapEnd - gapStart));\n // A building gives at most what leaves it a pixel even when gaps on both\n // of its sides take their share.\n const leftSpare = Math.max(0, Math.floor((gapStart - leftStart - 1) / 2));\n const rightSpare = Math.max(0, Math.floor((rightEnd - gapEnd - 1) / 2));\n let fromRight = Math.min(Math.floor(short / 2), rightSpare);\n const fromLeft = Math.min(short - fromRight, leftSpare);\n fromRight = Math.min(short - fromLeft, rightSpare);\n const left = Math.max(0, gapStart - fromLeft);\n const right = Math.min(mapW, gapEnd + fromRight);\n if (right <= left) continue;\n const key = left * (mapW + 1) + right;\n const held = open.get(key);\n // Floors go bottom to top. The floor under this one held the same\n // columns: grow that rectangle up over this row instead of starting\n // another.\n if (held && held.floor === floor - 1 && held.rect.y === y1) {\n held.rect.h += held.rect.y - y0;\n held.rect.y = y0;\n held.floor = floor;\n continue;\n }\n const rect = { x: left, y: y0, w: right - left, h: y1 - y0 };\n open.set(key, { rect, floor });\n out.push(rect);\n }\n }\n return out;\n}\n"],"names":[],"mappings":";;;;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BG;AAKH;AAC+C;AACxC,MAAM,kBAAkB,GAAG;AAElC;AACA,MAAM,OAAO,GAAuB,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC;AAKrD;;;;AAIa;AACb,SAAS,SAAS,CAAC,IAAc,EAAA;AA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C,GAAG,EAAE;AAC/B,gBAAA,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE;AAChB,gBAAA,IAAI,CAAC,KAAK,GAAG,KAAK;gBAClB;YACF;YACA,MAAM,IAAI,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,KAAK,GAAG,IAAI,EAAE,CAAC,EAAE,EAAE,GAAG,EAAE,EAAE;YAC5D,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;AAC9B,YAAA,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC;QAChB;IACF;AACA,IAAA,OAAO,GAAG;AACZ;;"}
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
/** The map's bottom edge, as floor lines counted down from `minFloor` (the
|
|
2
|
+
* lowest floor's top edge is line `minFloor`, its bottom edge `minFloor - 1`).
|
|
3
|
+
* The value 2 matches the bottom clamp in `clampCameraY` (`cameraBounds.ts`,
|
|
4
|
+
* `-(minFloor - 2) * floorPx`) and leaves one floor of ground under the
|
|
5
|
+
* lowest floor. */
|
|
6
|
+
export declare const MAP_LINES_BELOW_LOWEST_FLOOR = 2;
|
|
7
|
+
/** The world the map covers: the lot's width and its buildable floor range. */
|
|
8
|
+
export interface MapWorld {
|
|
9
|
+
readonly lotWidth: number;
|
|
10
|
+
readonly minFloor: number;
|
|
11
|
+
readonly maxFloor: number;
|
|
12
|
+
}
|
|
13
|
+
/** What the map spans, in world units: `width` tiles across from the tile
|
|
14
|
+
* `leftTile` at its left edge (below 0 when the map leaves a margin beside the
|
|
15
|
+
* lot), and `topLine` and `bottomLine` are floor lines (the top edge of floor
|
|
16
|
+
* `n` is line `n`). */
|
|
17
|
+
export interface MapExtent {
|
|
18
|
+
readonly leftTile: number;
|
|
19
|
+
readonly width: number;
|
|
20
|
+
readonly topLine: number;
|
|
21
|
+
readonly bottomLine: number;
|
|
22
|
+
}
|
|
23
|
+
/** A layout: the extent plus the pixels per tile and per floor, and the size in
|
|
24
|
+
* pixels those scales give. */
|
|
25
|
+
export interface MapLayout {
|
|
26
|
+
readonly extent: MapExtent;
|
|
27
|
+
readonly pxPerTile: number;
|
|
28
|
+
readonly pxPerFloor: number;
|
|
29
|
+
readonly width: number;
|
|
30
|
+
readonly height: number;
|
|
31
|
+
}
|
|
32
|
+
/** A rectangle in map pixels. */
|
|
33
|
+
export interface MapRect {
|
|
34
|
+
readonly x: number;
|
|
35
|
+
readonly y: number;
|
|
36
|
+
readonly w: number;
|
|
37
|
+
readonly h: number;
|
|
38
|
+
}
|
|
39
|
+
/** The camera as the renderer holds it: world-pixel center, zoom, and the
|
|
40
|
+
* viewport size in screen pixels. */
|
|
41
|
+
export interface MapCamera {
|
|
42
|
+
readonly posX: number;
|
|
43
|
+
readonly posY: number;
|
|
44
|
+
readonly zoom: number;
|
|
45
|
+
readonly viewWidth: number;
|
|
46
|
+
readonly viewHeight: number;
|
|
47
|
+
}
|
|
48
|
+
/** A camera center in the units the save stores. */
|
|
49
|
+
export interface MapCameraCenter {
|
|
50
|
+
readonly tile: number;
|
|
51
|
+
readonly floor: number;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* The extent the map spans for a world. `skyFloors` is the camera's sky
|
|
55
|
+
* headroom above the top floor (`SKY_HEADROOM_FLOORS` in `cameraBounds.ts`); it
|
|
56
|
+
* is a parameter so this module imports no sprite code.
|
|
57
|
+
*/
|
|
58
|
+
export declare function mapExtent(world: MapWorld, skyFloors: number): MapExtent;
|
|
59
|
+
/** Floors the extent spans from top to bottom. Always at least 1. */
|
|
60
|
+
export declare function extentFloors(extent: MapExtent): number;
|
|
61
|
+
/**
|
|
62
|
+
* A layout that fills a box of `boxWidth` by `boxHeight` pixels exactly, with
|
|
63
|
+
* the tile and floor scales set independently (the map is a schematic with its
|
|
64
|
+
* own proportions). A non-finite or non-positive box falls back to 1 pixel so
|
|
65
|
+
* the scales stay finite and positive.
|
|
66
|
+
*/
|
|
67
|
+
export declare function fitLayout(extent: MapExtent, boxWidth: number, boxHeight: number): MapLayout;
|
|
68
|
+
/** Map x of a tile's left edge (tiles may be fractional: the camera's center is). */
|
|
69
|
+
export declare function tileToMapX(layout: MapLayout, tile: number): number;
|
|
70
|
+
/** Map y of a floor line: the top edge of floor `line` (a floor's bottom edge is
|
|
71
|
+
* `line - 1`). */
|
|
72
|
+
export declare function lineToMapY(layout: MapLayout, line: number): number;
|
|
73
|
+
/** The tile a map x falls on, as a fractional tile (not rounded or clamped). */
|
|
74
|
+
export declare function mapXToTile(layout: MapLayout, x: number): number;
|
|
75
|
+
/** The floor line a map y falls on (not rounded or clamped). */
|
|
76
|
+
export declare function mapYToLine(layout: MapLayout, y: number): number;
|
|
77
|
+
/** The map rectangle of a block: `x` and `width` in tiles, `floor` its lowest
|
|
78
|
+
* floor, `floors` how many floors tall it is (at least 1). */
|
|
79
|
+
export declare function blockRect(layout: MapLayout, x: number, width: number, floor: number, floors?: number): MapRect;
|
|
80
|
+
/**
|
|
81
|
+
* The map rectangle of a block, snapped to whole pixels for painting, or null
|
|
82
|
+
* when the block cannot be drawn: any input is not a finite number, the width
|
|
83
|
+
* or floor count is not positive, or the block lies wholly off the map.
|
|
84
|
+
*
|
|
85
|
+
* Both edges of each axis come from the same tile or floor line, so two blocks
|
|
86
|
+
* that share an edge round it the same way and leave no seam. A block is never
|
|
87
|
+
* thinner than one pixel and is clamped into the map, so a narrow shaft in the
|
|
88
|
+
* last column or the bottom row still shows.
|
|
89
|
+
*/
|
|
90
|
+
export declare function snappedBlock(layout: MapLayout, x: number, width: number, floor: number, floors: number): MapRect | null;
|
|
91
|
+
/**
|
|
92
|
+
* The visible area on the map, in map pixels, from the camera's world-pixel
|
|
93
|
+
* center and the viewport. It is clipped to the map, so a camera that sees past
|
|
94
|
+
* the lot edge (or past the sky) shows the part that is on the map. A
|
|
95
|
+
* non-positive zoom reads as 1, as `clampCameraY` reads it.
|
|
96
|
+
*/
|
|
97
|
+
export declare function viewportRect(layout: MapLayout, cam: MapCamera): MapRect;
|
|
98
|
+
/** Whether two rectangles are the same to within `eps` map pixels (half a
|
|
99
|
+
* device pixel by default), so the window can skip a repaint when the camera
|
|
100
|
+
* has not visibly moved. */
|
|
101
|
+
export declare function sameRect(a: MapRect | null, b: MapRect | null, eps?: number): boolean;
|
|
102
|
+
/**
|
|
103
|
+
* The camera center for a point on the map, in the units `setCamera` and the
|
|
104
|
+
* save use. The point is clamped onto the map first, so a click or drag that
|
|
105
|
+
* leaves the map edge aims at the edge. A point in the margin beside the lot
|
|
106
|
+
* returns a tile in the margin (below 0, or past the lot's width). The
|
|
107
|
+
* renderer's own clamp still applies when the camera moves, and may keep the
|
|
108
|
+
* center further in than the point asks for: the camera cannot show past the
|
|
109
|
+
* sky or the ground, and `clamp` in `towerInputCamera.ts` holds its center
|
|
110
|
+
* between tile 0 and the lot's width, so a center asked for in the margin
|
|
111
|
+
* lands on the lot's nearer edge.
|
|
112
|
+
*/
|
|
113
|
+
export declare function mapPointToCenter(layout: MapLayout, mx: number, my: number): MapCameraCenter;
|
|
114
|
+
/**
|
|
115
|
+
* The camera center while the viewport rectangle is dragged. `start` is the
|
|
116
|
+
* camera's center when the drag began (the real camera; the rectangle is
|
|
117
|
+
* clipped to the map), `grab` is where on the map the pointer went
|
|
118
|
+
* down. The center moves by the pointer's travel since then, so the rectangle
|
|
119
|
+
* does not jump to the pointer when the drag starts. The result is kept on the
|
|
120
|
+
* map, except that a start outside it (a camera above the crop) is never
|
|
121
|
+
* pulled in or pushed further out by the drag: it moves only by the travel back
|
|
122
|
+
* toward the map. A non-finite grab or pointer reads as "no travel" on that axis.
|
|
123
|
+
*
|
|
124
|
+
* The renderer clamps the camera after each move, so at a clamp edge the
|
|
125
|
+
* rectangle can stop short of the pointer. The caller reads the camera again
|
|
126
|
+
* for each move instead of accumulating from `start` forever if it wants the
|
|
127
|
+
* rectangle to follow the pointer back off the edge.
|
|
128
|
+
*/
|
|
129
|
+
export declare function dragCenter(layout: MapLayout, start: MapCameraCenter, grab: {
|
|
130
|
+
readonly x: number;
|
|
131
|
+
readonly y: number;
|
|
132
|
+
}, pointer: {
|
|
133
|
+
readonly x: number;
|
|
134
|
+
readonly y: number;
|
|
135
|
+
}): MapCameraCenter;
|
|
136
|
+
/** Whether a map point lies inside a rectangle (edges included). An empty
|
|
137
|
+
* rectangle (no width or no height) contains nothing; the caller widens a
|
|
138
|
+
* small rectangle for touch before asking. */
|
|
139
|
+
export declare function rectContains(rect: MapRect, x: number, y: number): boolean;
|