@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,109 @@
|
|
|
1
|
+
import type { MapCamera, MapCameraCenter, MapExtent, MapLayout, MapRect } from "../render/overviewMap/geometry";
|
|
2
|
+
/** An element's box on screen, as `getBoundingClientRect` gives it. */
|
|
3
|
+
export interface ClientBox {
|
|
4
|
+
readonly left: number;
|
|
5
|
+
readonly top: number;
|
|
6
|
+
readonly width: number;
|
|
7
|
+
readonly height: number;
|
|
8
|
+
}
|
|
9
|
+
/** A press on the map. Past the tap slop, one on the view mark drags the view
|
|
10
|
+
* by its travel and one elsewhere keeps the view centered under it; one that
|
|
11
|
+
* never travels is a tap that centers the view where it lifts. */
|
|
12
|
+
export interface MapPress {
|
|
13
|
+
readonly pointerId: number;
|
|
14
|
+
readonly pointerType: string;
|
|
15
|
+
readonly onMark: boolean;
|
|
16
|
+
start: {
|
|
17
|
+
x: number;
|
|
18
|
+
y: number;
|
|
19
|
+
};
|
|
20
|
+
last: {
|
|
21
|
+
x: number;
|
|
22
|
+
y: number;
|
|
23
|
+
};
|
|
24
|
+
/** The layout `start` and `last` are measured on; a rebuilt layout rebases
|
|
25
|
+
* both. */
|
|
26
|
+
layout: MapLayout;
|
|
27
|
+
traveled: boolean;
|
|
28
|
+
}
|
|
29
|
+
/** A canvas's backing store, in map (device) pixels. */
|
|
30
|
+
export interface BackingSize {
|
|
31
|
+
readonly width: number;
|
|
32
|
+
readonly height: number;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* A pointer's position in map pixels: its offset in the canvas's box, scaled
|
|
36
|
+
* from CSS pixels to the backing store. A box with no size reads as a scale
|
|
37
|
+
* of 1, so a canvas mid-layout never yields NaN.
|
|
38
|
+
*/
|
|
39
|
+
export declare function clientToMap(box: ClientBox, backing: BackingSize, clientX: number, clientY: number): {
|
|
40
|
+
x: number;
|
|
41
|
+
y: number;
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* The area that grabs the camera rectangle: the rectangle grown about its
|
|
45
|
+
* center to at least `minSide` map pixels each way, so a small rectangle (a
|
|
46
|
+
* zoomed-in view) is still easy to drag with a finger. An empty or non-finite
|
|
47
|
+
* rectangle stays as it is, so it grabs nothing.
|
|
48
|
+
*/
|
|
49
|
+
export declare function grabRect(rect: MapRect, minSide: number): MapRect;
|
|
50
|
+
/** A touch target's least side, in CSS pixels (CAP-5). */
|
|
51
|
+
export declare const MAP_TOUCH_TARGET_CSS = 44;
|
|
52
|
+
/** The least side a mouse grabs the view mark by, in CSS pixels. */
|
|
53
|
+
export declare const MAP_MOUSE_TARGET_CSS = 12;
|
|
54
|
+
/** How far a press may travel, in CSS pixels, and still count as a tap that
|
|
55
|
+
* centers the view. */
|
|
56
|
+
export declare const MAP_TAP_SLOP_CSS = 8;
|
|
57
|
+
/** Whether a press moved past the tap slop, at `px` backing pixels per CSS pixel. */
|
|
58
|
+
export declare function pastTapSlop(start: {
|
|
59
|
+
x: number;
|
|
60
|
+
y: number;
|
|
61
|
+
}, p: {
|
|
62
|
+
x: number;
|
|
63
|
+
y: number;
|
|
64
|
+
}, px: number): boolean;
|
|
65
|
+
/** The window's device pixel ratio, or 1 where it is missing or not a positive number. */
|
|
66
|
+
export declare function pixelRatio(win: {
|
|
67
|
+
devicePixelRatio?: number;
|
|
68
|
+
} | null): number;
|
|
69
|
+
/** The keys the map answers, by name. */
|
|
70
|
+
export declare const MAP_KEY: {
|
|
71
|
+
readonly left: "ArrowLeft";
|
|
72
|
+
readonly right: "ArrowRight";
|
|
73
|
+
readonly up: "ArrowUp";
|
|
74
|
+
readonly down: "ArrowDown";
|
|
75
|
+
readonly top: "Home";
|
|
76
|
+
readonly bottom: "End";
|
|
77
|
+
readonly close: "Escape";
|
|
78
|
+
};
|
|
79
|
+
/** Game keys that still work with the map focused: zoom, the speed digits,
|
|
80
|
+
* Tab, and Space, which the world holds as its pan key (the game reads the
|
|
81
|
+
* map as a control, so Space never commits the build cursor from it).
|
|
82
|
+
* Everything else the game binds (building, bulldozing, the build cursor) is
|
|
83
|
+
* kept by the map, so nothing changes in the world behind it. */
|
|
84
|
+
export declare const MAP_PASS_KEYS: ReadonlySet<string>;
|
|
85
|
+
/** Whether a key pressed on the focused map goes on to the game: a key the
|
|
86
|
+
* map lets through, or any shortcut held with Ctrl, Cmd or Alt (undo among
|
|
87
|
+
* them). */
|
|
88
|
+
export declare function passesMapKey(e: Pick<KeyboardEvent, "key" | "ctrlKey" | "metaKey" | "altKey">): boolean;
|
|
89
|
+
/** Whether a press is with the primary (left) button. */
|
|
90
|
+
export declare function isPrimaryPress(e: Pick<PointerEvent, "button">): boolean;
|
|
91
|
+
/** Whether no button is held during a move (`buttons` is a set of held
|
|
92
|
+
* buttons; empty reads as 0). */
|
|
93
|
+
export declare function noButtonHeld(e: Pick<PointerEvent, "buttons">): boolean;
|
|
94
|
+
/** Whether a click came from the keyboard (Enter or Space on a button),
|
|
95
|
+
* which reports no click count. */
|
|
96
|
+
export declare function isKeyboardClick(e: Pick<MouseEvent, "detail">): boolean;
|
|
97
|
+
/** How much of the visible span one arrow press moves the camera; Shift moves
|
|
98
|
+
* the whole span. */
|
|
99
|
+
export declare const MAP_KEY_STEP_SHARE = 0.25;
|
|
100
|
+
/** The camera's center in the units `applyView` takes. A position that is not
|
|
101
|
+
* finite reads as 0, as `viewportRect` reads it. */
|
|
102
|
+
export declare function cameraCenter(cam: MapCamera): MapCameraCenter;
|
|
103
|
+
/**
|
|
104
|
+
* Where a key moves the camera, or null for a key the map does not answer.
|
|
105
|
+
* An arrow moves it a quarter of the visible span (the whole span with
|
|
106
|
+
* Shift), Home goes to the top of the map and End to the bottom. The result
|
|
107
|
+
* is not clamped: the caller moves the camera through the renderer's clamp.
|
|
108
|
+
*/
|
|
109
|
+
export declare function keyTarget(key: string, shift: boolean, cam: MapCamera, extent: MapExtent): MapCameraCenter | null;
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import { FLOOR, TILE } from '../render/scale.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Pointer and keyboard rules for the overview MAP window (#343, CAP-3 and
|
|
5
|
+
* CAP-5), with no DOM: the window hands in a pointer's client position or a
|
|
6
|
+
* key, and gets back a map point or a camera center. Unit-tested on its own.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* A pointer's position in map pixels: its offset in the canvas's box, scaled
|
|
10
|
+
* from CSS pixels to the backing store. A box with no size reads as a scale
|
|
11
|
+
* of 1, so a canvas mid-layout never yields NaN.
|
|
12
|
+
*/
|
|
13
|
+
function clientToMap(box, backing, clientX, clientY) {
|
|
14
|
+
const sx = box.width > 0 && backing.width > 0 ? backing.width / box.width : 1;
|
|
15
|
+
const sy = box.height > 0 && backing.height > 0 ? backing.height / box.height : 1;
|
|
16
|
+
return { x: (clientX - box.left) * sx, y: (clientY - box.top) * sy };
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* The area that grabs the camera rectangle: the rectangle grown about its
|
|
20
|
+
* center to at least `minSide` map pixels each way, so a small rectangle (a
|
|
21
|
+
* zoomed-in view) is still easy to drag with a finger. An empty or non-finite
|
|
22
|
+
* rectangle stays as it is, so it grabs nothing.
|
|
23
|
+
*/
|
|
24
|
+
function grabRect(rect, minSide) {
|
|
25
|
+
if (!(rect.w > 0) || !(rect.h > 0))
|
|
26
|
+
return rect;
|
|
27
|
+
const side = Number.isFinite(minSide) && minSide > 0 ? minSide : 0;
|
|
28
|
+
const w = Math.max(rect.w, side);
|
|
29
|
+
const h = Math.max(rect.h, side);
|
|
30
|
+
return { x: rect.x + rect.w / 2 - w / 2, y: rect.y + rect.h / 2 - h / 2, w, h };
|
|
31
|
+
}
|
|
32
|
+
/** A touch target's least side, in CSS pixels (CAP-5). */
|
|
33
|
+
const MAP_TOUCH_TARGET_CSS = 44;
|
|
34
|
+
/** The least side a mouse grabs the view mark by, in CSS pixels. */
|
|
35
|
+
const MAP_MOUSE_TARGET_CSS = 12;
|
|
36
|
+
/** How far a press may travel, in CSS pixels, and still count as a tap that
|
|
37
|
+
* centers the view. */
|
|
38
|
+
const MAP_TAP_SLOP_CSS = 8;
|
|
39
|
+
/** Whether a press moved past the tap slop, at `px` backing pixels per CSS pixel. */
|
|
40
|
+
function pastTapSlop(start, p, px) {
|
|
41
|
+
return Math.hypot(p.x - start.x, p.y - start.y) > MAP_TAP_SLOP_CSS * px;
|
|
42
|
+
}
|
|
43
|
+
/** The window's device pixel ratio, or 1 where it is missing or not a positive number. */
|
|
44
|
+
function pixelRatio(win) {
|
|
45
|
+
const ratio = win?.devicePixelRatio ?? 1;
|
|
46
|
+
return Number.isFinite(ratio) && ratio > 0 ? ratio : 1;
|
|
47
|
+
}
|
|
48
|
+
/** The keys the map answers, by name. */
|
|
49
|
+
const MAP_KEY = {
|
|
50
|
+
left: "ArrowLeft",
|
|
51
|
+
right: "ArrowRight",
|
|
52
|
+
up: "ArrowUp",
|
|
53
|
+
down: "ArrowDown",
|
|
54
|
+
top: "Home",
|
|
55
|
+
bottom: "End",
|
|
56
|
+
close: "Escape",
|
|
57
|
+
};
|
|
58
|
+
/** Game keys that still work with the map focused: zoom, the speed digits,
|
|
59
|
+
* Tab, and Space, which the world holds as its pan key (the game reads the
|
|
60
|
+
* map as a control, so Space never commits the build cursor from it).
|
|
61
|
+
* Everything else the game binds (building, bulldozing, the build cursor) is
|
|
62
|
+
* kept by the map, so nothing changes in the world behind it. */
|
|
63
|
+
const MAP_PASS_KEYS = new Set(["+", "=", "-", "_", "0", "1", "2", "3", "Tab", " ", "Spacebar"]);
|
|
64
|
+
/** Whether a key pressed on the focused map goes on to the game: a key the
|
|
65
|
+
* map lets through, or any shortcut held with Ctrl, Cmd or Alt (undo among
|
|
66
|
+
* them). */
|
|
67
|
+
function passesMapKey(e) {
|
|
68
|
+
return e.ctrlKey || e.metaKey || e.altKey || MAP_PASS_KEYS.has(e.key);
|
|
69
|
+
}
|
|
70
|
+
/** `PointerEvent.button` for the primary (left) button. */
|
|
71
|
+
const PRIMARY_BUTTON = 0;
|
|
72
|
+
/** Whether a press is with the primary (left) button. */
|
|
73
|
+
function isPrimaryPress(e) {
|
|
74
|
+
return e.button === PRIMARY_BUTTON;
|
|
75
|
+
}
|
|
76
|
+
/** Whether no button is held during a move (`buttons` is a set of held
|
|
77
|
+
* buttons; empty reads as 0). */
|
|
78
|
+
function noButtonHeld(e) {
|
|
79
|
+
return e.buttons === 0;
|
|
80
|
+
}
|
|
81
|
+
/** Whether a click came from the keyboard (Enter or Space on a button),
|
|
82
|
+
* which reports no click count. */
|
|
83
|
+
function isKeyboardClick(e) {
|
|
84
|
+
return e.detail === 0;
|
|
85
|
+
}
|
|
86
|
+
/** How much of the visible span one arrow press moves the camera; Shift moves
|
|
87
|
+
* the whole span. */
|
|
88
|
+
const MAP_KEY_STEP_SHARE = 0.25;
|
|
89
|
+
/** The camera's center in the units `applyView` takes. A position that is not
|
|
90
|
+
* finite reads as 0, as `viewportRect` reads it. */
|
|
91
|
+
function cameraCenter(cam) {
|
|
92
|
+
return {
|
|
93
|
+
tile: Number.isFinite(cam.posX) ? cam.posX / TILE : 0,
|
|
94
|
+
floor: Number.isFinite(cam.posY) ? -cam.posY / FLOOR : 0,
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
/** The visible span in tiles and floors, at least one of each. */
|
|
98
|
+
function visibleSpan(cam) {
|
|
99
|
+
const zoom = Number.isFinite(cam.zoom) && cam.zoom > 0 ? cam.zoom : 1;
|
|
100
|
+
const w = Number.isFinite(cam.viewWidth) && cam.viewWidth > 0 ? cam.viewWidth : 0;
|
|
101
|
+
const h = Number.isFinite(cam.viewHeight) && cam.viewHeight > 0 ? cam.viewHeight : 0;
|
|
102
|
+
return { tiles: Math.max(1, w / zoom / TILE), floors: Math.max(1, h / zoom / FLOOR) };
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Where a key moves the camera, or null for a key the map does not answer.
|
|
106
|
+
* An arrow moves it a quarter of the visible span (the whole span with
|
|
107
|
+
* Shift), Home goes to the top of the map and End to the bottom. The result
|
|
108
|
+
* is not clamped: the caller moves the camera through the renderer's clamp.
|
|
109
|
+
*/
|
|
110
|
+
function keyTarget(key, shift, cam, extent) {
|
|
111
|
+
const here = cameraCenter(cam);
|
|
112
|
+
const span = visibleSpan(cam);
|
|
113
|
+
const share = shift ? 1 : MAP_KEY_STEP_SHARE;
|
|
114
|
+
const dx = Math.max(1, span.tiles * share);
|
|
115
|
+
const dy = Math.max(1, span.floors * share);
|
|
116
|
+
switch (key) {
|
|
117
|
+
case MAP_KEY.left:
|
|
118
|
+
return { tile: here.tile - dx, floor: here.floor };
|
|
119
|
+
case MAP_KEY.right:
|
|
120
|
+
return { tile: here.tile + dx, floor: here.floor };
|
|
121
|
+
case MAP_KEY.up:
|
|
122
|
+
return { tile: here.tile, floor: here.floor + dy };
|
|
123
|
+
case MAP_KEY.down:
|
|
124
|
+
return { tile: here.tile, floor: here.floor - dy };
|
|
125
|
+
case MAP_KEY.top:
|
|
126
|
+
return { tile: here.tile, floor: extent.topLine };
|
|
127
|
+
case MAP_KEY.bottom:
|
|
128
|
+
return { tile: here.tile, floor: extent.bottomLine };
|
|
129
|
+
default:
|
|
130
|
+
return null;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
export { MAP_KEY, MAP_KEY_STEP_SHARE, MAP_MOUSE_TARGET_CSS, MAP_PASS_KEYS, MAP_TAP_SLOP_CSS, MAP_TOUCH_TARGET_CSS, cameraCenter, clientToMap, grabRect, isKeyboardClick, isPrimaryPress, keyTarget, noButtonHeld, passesMapKey, pastTapSlop, pixelRatio };
|
|
135
|
+
//# sourceMappingURL=overviewMapInput.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"overviewMapInput.js","sources":["../../src/ui/overviewMapInput.ts"],"sourcesContent":["/**\n * Pointer and keyboard rules for the overview MAP window (#343, CAP-3 and\n * CAP-5), with no DOM: the window hands in a pointer's client position or a\n * key, and gets back a map point or a camera center. Unit-tested on its own.\n */\nimport { FLOOR, TILE } from \"../render/scale\";\nimport type { MapCamera, MapCameraCenter, MapExtent, MapLayout, MapRect } from \"../render/overviewMap/geometry\";\n\n/** An element's box on screen, as `getBoundingClientRect` gives it. */\nexport interface ClientBox {\n readonly left: number;\n readonly top: number;\n readonly width: number;\n readonly height: number;\n}\n\n/** A press on the map. Past the tap slop, one on the view mark drags the view\n * by its travel and one elsewhere keeps the view centered under it; one that\n * never travels is a tap that centers the view where it lifts. */\nexport interface MapPress {\n readonly pointerId: number;\n readonly pointerType: string;\n readonly onMark: boolean;\n start: { x: number; y: number };\n last: { x: number; y: number };\n /** The layout `start` and `last` are measured on; a rebuilt layout rebases\n * both. */\n layout: MapLayout;\n traveled: boolean;\n}\n\n/** A canvas's backing store, in map (device) pixels. */\nexport interface BackingSize {\n readonly width: number;\n readonly height: number;\n}\n\n/**\n * A pointer's position in map pixels: its offset in the canvas's box, scaled\n * from CSS pixels to the backing store. A box with no size reads as a scale\n * of 1, so a canvas mid-layout never yields NaN.\n */\nexport function clientToMap(box: ClientBox, backing: BackingSize, clientX: number, clientY: number): { x: number; y: number } {\n const sx = box.width > 0 && backing.width > 0 ? backing.width / box.width : 1;\n const sy = box.height > 0 && backing.height > 0 ? backing.height / box.height : 1;\n return { x: (clientX - box.left) * sx, y: (clientY - box.top) * sy };\n}\n\n/**\n * The area that grabs the camera rectangle: the rectangle grown about its\n * center to at least `minSide` map pixels each way, so a small rectangle (a\n * zoomed-in view) is still easy to drag with a finger. An empty or non-finite\n * rectangle stays as it is, so it grabs nothing.\n */\nexport function grabRect(rect: MapRect, minSide: number): MapRect {\n if (!(rect.w > 0) || !(rect.h > 0)) return rect;\n const side = Number.isFinite(minSide) && minSide > 0 ? minSide : 0;\n const w = Math.max(rect.w, side);\n const h = Math.max(rect.h, side);\n return { x: rect.x + rect.w / 2 - w / 2, y: rect.y + rect.h / 2 - h / 2, w, h };\n}\n\n/** A touch target's least side, in CSS pixels (CAP-5). */\nexport const MAP_TOUCH_TARGET_CSS = 44;\n\n/** The least side a mouse grabs the view mark by, in CSS pixels. */\nexport const MAP_MOUSE_TARGET_CSS = 12;\n\n/** How far a press may travel, in CSS pixels, and still count as a tap that\n * centers the view. */\nexport const MAP_TAP_SLOP_CSS = 8;\n\n/** Whether a press moved past the tap slop, at `px` backing pixels per CSS pixel. */\nexport function pastTapSlop(start: { x: number; y: number }, p: { x: number; y: number }, px: number): boolean {\n return Math.hypot(p.x - start.x, p.y - start.y) > MAP_TAP_SLOP_CSS * px;\n}\n\n/** The window's device pixel ratio, or 1 where it is missing or not a positive number. */\nexport function pixelRatio(win: { devicePixelRatio?: number } | null): number {\n const ratio = win?.devicePixelRatio ?? 1;\n return Number.isFinite(ratio) && ratio > 0 ? ratio : 1;\n}\n\n/** The keys the map answers, by name. */\nexport const MAP_KEY = {\n left: \"ArrowLeft\",\n right: \"ArrowRight\",\n up: \"ArrowUp\",\n down: \"ArrowDown\",\n top: \"Home\",\n bottom: \"End\",\n close: \"Escape\",\n} as const;\n\n/** Game keys that still work with the map focused: zoom, the speed digits,\n * Tab, and Space, which the world holds as its pan key (the game reads the\n * map as a control, so Space never commits the build cursor from it).\n * Everything else the game binds (building, bulldozing, the build cursor) is\n * kept by the map, so nothing changes in the world behind it. */\nexport const MAP_PASS_KEYS: ReadonlySet<string> = new Set([\"+\", \"=\", \"-\", \"_\", \"0\", \"1\", \"2\", \"3\", \"Tab\", \" \", \"Spacebar\"]);\n\n/** Whether a key pressed on the focused map goes on to the game: a key the\n * map lets through, or any shortcut held with Ctrl, Cmd or Alt (undo among\n * them). */\nexport function passesMapKey(e: Pick<KeyboardEvent, \"key\" | \"ctrlKey\" | \"metaKey\" | \"altKey\">): boolean {\n return e.ctrlKey || e.metaKey || e.altKey || MAP_PASS_KEYS.has(e.key);\n}\n\n/** `PointerEvent.button` for the primary (left) button. */\nconst PRIMARY_BUTTON = 0;\n\n/** Whether a press is with the primary (left) button. */\nexport function isPrimaryPress(e: Pick<PointerEvent, \"button\">): boolean {\n return e.button === PRIMARY_BUTTON;\n}\n\n/** Whether no button is held during a move (`buttons` is a set of held\n * buttons; empty reads as 0). */\nexport function noButtonHeld(e: Pick<PointerEvent, \"buttons\">): boolean {\n return e.buttons === 0;\n}\n\n/** Whether a click came from the keyboard (Enter or Space on a button),\n * which reports no click count. */\nexport function isKeyboardClick(e: Pick<MouseEvent, \"detail\">): boolean {\n return e.detail === 0;\n}\n\n/** How much of the visible span one arrow press moves the camera; Shift moves\n * the whole span. */\nexport const MAP_KEY_STEP_SHARE = 0.25;\n\n/** The camera's center in the units `applyView` takes. A position that is not\n * finite reads as 0, as `viewportRect` reads it. */\nexport function cameraCenter(cam: MapCamera): MapCameraCenter {\n return {\n tile: Number.isFinite(cam.posX) ? cam.posX / TILE : 0,\n floor: Number.isFinite(cam.posY) ? -cam.posY / FLOOR : 0,\n };\n}\n\n/** The visible span in tiles and floors, at least one of each. */\nfunction visibleSpan(cam: MapCamera): { tiles: number; floors: number } {\n const zoom = Number.isFinite(cam.zoom) && cam.zoom > 0 ? cam.zoom : 1;\n const w = Number.isFinite(cam.viewWidth) && cam.viewWidth > 0 ? cam.viewWidth : 0;\n const h = Number.isFinite(cam.viewHeight) && cam.viewHeight > 0 ? cam.viewHeight : 0;\n return { tiles: Math.max(1, w / zoom / TILE), floors: Math.max(1, h / zoom / FLOOR) };\n}\n\n/**\n * Where a key moves the camera, or null for a key the map does not answer.\n * An arrow moves it a quarter of the visible span (the whole span with\n * Shift), Home goes to the top of the map and End to the bottom. The result\n * is not clamped: the caller moves the camera through the renderer's clamp.\n */\nexport function keyTarget(key: string, shift: boolean, cam: MapCamera, extent: MapExtent): MapCameraCenter | null {\n const here = cameraCenter(cam);\n const span = visibleSpan(cam);\n const share = shift ? 1 : MAP_KEY_STEP_SHARE;\n const dx = Math.max(1, span.tiles * share);\n const dy = Math.max(1, span.floors * share);\n switch (key) {\n case MAP_KEY.left:\n return { tile: here.tile - dx, floor: here.floor };\n case MAP_KEY.right:\n return { tile: here.tile + dx, floor: here.floor };\n case MAP_KEY.up:\n return { tile: here.tile, floor: here.floor + dy };\n case MAP_KEY.down:\n return { tile: here.tile, floor: here.floor - dy };\n case MAP_KEY.top:\n return { tile: here.tile, floor: extent.topLine };\n case MAP_KEY.bottom:\n return { tile: here.tile, floor: extent.bottomLine };\n default:\n return null;\n }\n}\n"],"names":[],"mappings":";;AAAA;;;;AAIG;AAiCH;;;;AAIG;AACG,SAAU,WAAW,CAAC,GAAc,EAAE,OAAoB,EAAE,OAAe,EAAE,OAAe,EAAA;IAChG,MAAM,EAAE,GAAG,GAAG,CAAC,KAAK,GAAG,CAAC,IAAI,OAAO,CAAC,KAAK,GAAG,CAAC,GAAG,OAAO,CAAC,KAAK,GAAG,GAAG,CAAC,KAAK,GAAG,CAAC;IAC7E,MAAM,EAAE,GAAG,GAAG,CAAC,MAAM,GAAG,CAAC,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,GAAG,OAAO,CAAC,MAAM,GAAG,GAAG,CAAC,MAAM,GAAG,CAAC;IACjF,OAAO,EAAE,CAAC,EAAE,CAAC,OAAO,GAAG,GAAG,CAAC,IAAI,IAAI,EAAE,EAAE,CAAC,EAAE,CAAC,OAAO,GAAG,GAAG,CAAC,GAAG,IAAI,EAAE,EAAE;AACtE;AAEA;;;;;AAKG;AACG,SAAU,QAAQ,CAAC,IAAa,EAAE,OAAe,EAAA;AACrD,IAAA,IAAI,EAAE,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;AAAE,QAAA,OAAO,IAAI;IAC/C,MAAM,IAAI,GAAG,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,OAAO,GAAG,CAAC,GAAG,OAAO,GAAG,CAAC;AAClE,IAAA,MAAM,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC;AA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E,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,GAAG,EAAE,EAAE;QACpD,KAAK,OAAO,CAAC,IAAI;AACf,YAAA,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,GAAG,EAAE,EAAE;QACpD,KAAK,OAAO,CAAC,GAAG;AACd,YAAA,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,MAAM,CAAC,OAAO,EAAE;QACnD,KAAK,OAAO,CAAC,MAAM;AACjB,YAAA,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,MAAM,CAAC,UAAU,EAAE;AACtD,QAAA;AACE,YAAA,OAAO,IAAI;;AAEjB;;"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The shared window grammar every modal is finished with: title-bar skinning,
|
|
3
|
+
* the accessible-name wiring, the ✕, and the dismissal handlers. Extracted from
|
|
4
|
+
* `UI` so that class stays under the file-size ceiling and so the grammar reads
|
|
5
|
+
* as one thing rather than as a private method halfway down a 500-line class.
|
|
6
|
+
*/
|
|
7
|
+
/** Id stamped on the shared modal's title-TEXT span so `#modal` can point
|
|
8
|
+
* `aria-labelledby` at it. It lives on a span wrapping only the title text,
|
|
9
|
+
* never on the h2 itself: the h2 also holds the ✕ as a sibling, and labeling
|
|
10
|
+
* the h2 would fold the ✕'s accessible name ("Close") into the dialog's. The
|
|
11
|
+
* dialog's DOM is fully replaced on every open and only one modal is ever
|
|
12
|
+
* live, so this constant can never collide with itself. */
|
|
13
|
+
export declare const MODAL_TITLE_ID = "verticopolis-modal-title";
|
|
14
|
+
/** What the grammar needs from `UI`, passed in rather than reached for. */
|
|
15
|
+
export interface ModalDeps {
|
|
16
|
+
titleBarClose(className: string, onClick: () => void): HTMLButtonElement;
|
|
17
|
+
closeModal(): void;
|
|
18
|
+
drainNotice(box: HTMLElement): void;
|
|
19
|
+
/** A wasm-only engine-failure message is up (`isEngineStopped`,
|
|
20
|
+
* `game/interactionState.ts`), so no modal may open over it. */
|
|
21
|
+
engineStopped(): boolean;
|
|
22
|
+
}
|
|
23
|
+
/** The grammar `UI.openModalTemplate` finishes every modal with: skin the
|
|
24
|
+
* top-level h2 as the title bar (`:scope > h2` so a nested h2 is never
|
|
25
|
+
* skinned), wrap its title text alone in a span carrying the shared
|
|
26
|
+
* {@link MODAL_TITLE_ID} and point the dialog's `aria-labelledby` at that SPAN
|
|
27
|
+
* (never at the h2 itself, since the h2 also ends up holding the ✕ below;
|
|
28
|
+
* labeling the h2 would fold the ✕'s own accessible name, "Close", into the
|
|
29
|
+
* announced title), show the dialog (unless a wasm-only engine-failure
|
|
30
|
+
* message is up; see the gate below), then append the win-style ✕ into the h2
|
|
31
|
+
* as a sibling of the span so it stays excluded from the accessible name.
|
|
32
|
+
* Cleared when a modal renders no top-level h2, so the reference is never
|
|
33
|
+
* left dangling. The ✕ routes through the dialog's cancel path (same as Esc)
|
|
34
|
+
* rather than closeModal() directly, so modals that override oncancel to
|
|
35
|
+
* resolve a pending choice still resolve. It is appended AFTER showModal() so
|
|
36
|
+
* it is not the first focusable element (keyboard users land on the primary
|
|
37
|
+
* action, not the ✕). Backdrop click and Esc/cancel close. */
|
|
38
|
+
export declare function finishModal(dialog: HTMLDialogElement, box: HTMLElement, deps: ModalDeps): HTMLElement;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The shared window grammar every modal is finished with: title-bar skinning,
|
|
3
|
+
* the accessible-name wiring, the ✕, and the dismissal handlers. Extracted from
|
|
4
|
+
* `UI` so that class stays under the file-size ceiling and so the grammar reads
|
|
5
|
+
* as one thing rather than as a private method halfway down a 500-line class.
|
|
6
|
+
*/
|
|
7
|
+
/** Id stamped on the shared modal's title-TEXT span so `#modal` can point
|
|
8
|
+
* `aria-labelledby` at it. It lives on a span wrapping only the title text,
|
|
9
|
+
* never on the h2 itself: the h2 also holds the ✕ as a sibling, and labeling
|
|
10
|
+
* the h2 would fold the ✕'s accessible name ("Close") into the dialog's. The
|
|
11
|
+
* dialog's DOM is fully replaced on every open and only one modal is ever
|
|
12
|
+
* live, so this constant can never collide with itself. */
|
|
13
|
+
const MODAL_TITLE_ID = "verticopolis-modal-title";
|
|
14
|
+
/** The grammar `UI.openModalTemplate` finishes every modal with: skin the
|
|
15
|
+
* top-level h2 as the title bar (`:scope > h2` so a nested h2 is never
|
|
16
|
+
* skinned), wrap its title text alone in a span carrying the shared
|
|
17
|
+
* {@link MODAL_TITLE_ID} and point the dialog's `aria-labelledby` at that SPAN
|
|
18
|
+
* (never at the h2 itself, since the h2 also ends up holding the ✕ below;
|
|
19
|
+
* labeling the h2 would fold the ✕'s own accessible name, "Close", into the
|
|
20
|
+
* announced title), show the dialog (unless a wasm-only engine-failure
|
|
21
|
+
* message is up; see the gate below), then append the win-style ✕ into the h2
|
|
22
|
+
* as a sibling of the span so it stays excluded from the accessible name.
|
|
23
|
+
* Cleared when a modal renders no top-level h2, so the reference is never
|
|
24
|
+
* left dangling. The ✕ routes through the dialog's cancel path (same as Esc)
|
|
25
|
+
* rather than closeModal() directly, so modals that override oncancel to
|
|
26
|
+
* resolve a pending choice still resolve. It is appended AFTER showModal() so
|
|
27
|
+
* it is not the first focusable element (keyboard users land on the primary
|
|
28
|
+
* action, not the ✕). Backdrop click and Esc/cancel close. */
|
|
29
|
+
function finishModal(dialog, box, deps) {
|
|
30
|
+
const h2 = box.querySelector(":scope > h2");
|
|
31
|
+
h2?.classList.add("win-title");
|
|
32
|
+
if (h2) {
|
|
33
|
+
// Move the title CONTENTS into their own span and label the dialog at
|
|
34
|
+
// THAT span, not the h2 (see MODAL_TITLE_ID); a caller-supplied h2.id is
|
|
35
|
+
// never touched. Idempotent: reuse an existing span rather than nesting
|
|
36
|
+
// a new one, and never sweep the ✕ (.modal-x) into it, so a repeat call
|
|
37
|
+
// can't nest spans or fold "Close" into the accessible name.
|
|
38
|
+
let titleSpan = h2.querySelector(`#${MODAL_TITLE_ID}`);
|
|
39
|
+
if (!titleSpan) {
|
|
40
|
+
titleSpan = document.createElement("span");
|
|
41
|
+
titleSpan.id = MODAL_TITLE_ID;
|
|
42
|
+
const close = h2.querySelector(".modal-x");
|
|
43
|
+
while (h2.firstChild && h2.firstChild !== close)
|
|
44
|
+
titleSpan.appendChild(h2.firstChild);
|
|
45
|
+
h2.appendChild(titleSpan);
|
|
46
|
+
}
|
|
47
|
+
dialog.setAttribute("aria-labelledby", titleSpan.id);
|
|
48
|
+
}
|
|
49
|
+
else {
|
|
50
|
+
dialog.removeAttribute("aria-labelledby");
|
|
51
|
+
}
|
|
52
|
+
// Behind a wasm-only engine-failure message a late modal (an import
|
|
53
|
+
// report that finished after the stop) would sit in the top layer and
|
|
54
|
+
// cover the message's Reload button, so it never opens there.
|
|
55
|
+
if (!dialog.open && !deps.engineStopped())
|
|
56
|
+
dialog.showModal();
|
|
57
|
+
if (h2 && !h2.querySelector(".modal-x")) {
|
|
58
|
+
h2.appendChild(deps.titleBarClose("modal-x btn xs", () => dialog.dispatchEvent(new Event("cancel", { cancelable: true }))));
|
|
59
|
+
}
|
|
60
|
+
dialog.onclick = (e) => {
|
|
61
|
+
if (e.target === dialog)
|
|
62
|
+
deps.closeModal();
|
|
63
|
+
};
|
|
64
|
+
dialog.oncancel = () => deps.closeModal(); // Esc key
|
|
65
|
+
deps.drainNotice(box); // a notice raised mid-build lands here
|
|
66
|
+
return box;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export { MODAL_TITLE_ID, finishModal };
|
|
70
|
+
//# sourceMappingURL=uiModal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uiModal.js","sources":["../../src/ui/uiModal.ts"],"sourcesContent":["/**\n * The shared window grammar every modal is finished with: title-bar skinning,\n * the accessible-name wiring, the ✕, and the dismissal handlers. Extracted from\n * `UI` so that class stays under the file-size ceiling and so the grammar reads\n * as one thing rather than as a private method halfway down a 500-line class.\n */\n\n/** Id stamped on the shared modal's title-TEXT span so `#modal` can point\n * `aria-labelledby` at it. It lives on a span wrapping only the title text,\n * never on the h2 itself: the h2 also holds the ✕ as a sibling, and labeling\n * the h2 would fold the ✕'s accessible name (\"Close\") into the dialog's. The\n * dialog's DOM is fully replaced on every open and only one modal is ever\n * live, so this constant can never collide with itself. */\nexport const MODAL_TITLE_ID = \"verticopolis-modal-title\";\n\n/** What the grammar needs from `UI`, passed in rather than reached for. */\nexport interface ModalDeps {\n titleBarClose(className: string, onClick: () => void): HTMLButtonElement;\n closeModal(): void;\n drainNotice(box: HTMLElement): void;\n /** A wasm-only engine-failure message is up (`isEngineStopped`,\n * `game/interactionState.ts`), so no modal may open over it. */\n engineStopped(): boolean;\n}\n\n/** The grammar `UI.openModalTemplate` finishes every modal with: skin the\n * top-level h2 as the title bar (`:scope > h2` so a nested h2 is never\n * skinned), wrap its title text alone in a span carrying the shared\n * {@link MODAL_TITLE_ID} and point the dialog's `aria-labelledby` at that SPAN\n * (never at the h2 itself, since the h2 also ends up holding the ✕ below;\n * labeling the h2 would fold the ✕'s own accessible name, \"Close\", into the\n * announced title), show the dialog (unless a wasm-only engine-failure\n * message is up; see the gate below), then append the win-style ✕ into the h2\n * as a sibling of the span so it stays excluded from the accessible name.\n * Cleared when a modal renders no top-level h2, so the reference is never\n * left dangling. The ✕ routes through the dialog's cancel path (same as Esc)\n * rather than closeModal() directly, so modals that override oncancel to\n * resolve a pending choice still resolve. It is appended AFTER showModal() so\n * it is not the first focusable element (keyboard users land on the primary\n * action, not the ✕). Backdrop click and Esc/cancel close. */\nexport function finishModal(dialog: HTMLDialogElement, box: HTMLElement, deps: ModalDeps): HTMLElement {\n const h2 = box.querySelector(\":scope > h2\");\n h2?.classList.add(\"win-title\");\n if (h2) {\n // Move the title CONTENTS into their own span and label the dialog at\n // THAT span, not the h2 (see MODAL_TITLE_ID); a caller-supplied h2.id is\n // never touched. Idempotent: reuse an existing span rather than nesting\n // a new one, and never sweep the ✕ (.modal-x) into it, so a repeat call\n // can't nest spans or fold \"Close\" into the accessible name.\n let titleSpan = h2.querySelector<HTMLSpanElement>(`#${MODAL_TITLE_ID}`);\n if (!titleSpan) {\n titleSpan = document.createElement(\"span\");\n titleSpan.id = MODAL_TITLE_ID;\n const close = h2.querySelector(\".modal-x\");\n while (h2.firstChild && h2.firstChild !== close) titleSpan.appendChild(h2.firstChild);\n h2.appendChild(titleSpan);\n }\n dialog.setAttribute(\"aria-labelledby\", titleSpan.id);\n } else {\n dialog.removeAttribute(\"aria-labelledby\");\n }\n // Behind a wasm-only engine-failure message a late modal (an import\n // report that finished after the stop) would sit in the top layer and\n // cover the message's Reload button, so it never opens there.\n if (!dialog.open && !deps.engineStopped()) dialog.showModal();\n if (h2 && !h2.querySelector(\".modal-x\")) {\n h2.appendChild(\n deps.titleBarClose(\"modal-x btn xs\", () => dialog.dispatchEvent(new Event(\"cancel\", { cancelable: true }))),\n );\n }\n dialog.onclick = (e) => {\n if (e.target === dialog) deps.closeModal();\n };\n dialog.oncancel = () => deps.closeModal(); // Esc key\n deps.drainNotice(box); // a notice raised mid-build lands here\n return box;\n}\n"],"names":[],"mappings":"AAAA;;;;;AAKG;AAEH;;;;;AAK4D;AACrD,MAAM,cAAc,GAAG;AAY9B;;;;;;;;;;;;;;AAc+D;SAC/C,WAAW,CAAC,MAAyB,EAAE,GAAgB,EAAE,IAAe,EAAA;IACtF,MAAM,EAAE,GAAG,GAAG,CAAC,aAAa,CAAC,aAAa,CAAC;AAC3C,IAAA,EAAE,EAAE,SAAS,CAAC,GAAG,CAAC,WAAW,CAAC;IAC9B,IAAI,EAAE,EAAE;;;;;;QAMN,IAAI,SAAS,GAAG,EAAE,CAAC,aAAa,CAAkB,CAAA,CAAA,EAAI,cAAc,CAAA,CAAE,CAAC;QACvE,IAAI,CAAC,SAAS,EAAE;AACd,YAAA,SAAS,GAAG,QAAQ,CAAC,aAAa,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plied by the packaging and never by the engine. The core engine
|
|
4
|
+
* reads none of it and requires none of it (a hash of the sources cannot be
|
|
5
|
+
* compiled into them without a build script, which `engine-rs/tests/
|
|
6
|
+
* independence.rs` bans). The record is
|
|
7
|
+
*
|
|
8
|
+
* { "schema": 1, "sourceHash": "<64 lowercase hex digits>" }
|
|
9
|
+
*
|
|
10
|
+
* and a web build writes it, as UTF-8 JSON, into a WebAssembly custom section
|
|
11
|
+
* named `verticopolis.build` (`scripts/wasm-build.ts`, after wasm-bindgen and
|
|
12
|
+
* before any file digest is taken). A native Rust or Godot host supplies the
|
|
13
|
+
* same object by its own means (see engine-rs/API.md, "Build metadata").
|
|
14
|
+
*
|
|
15
|
+
* `sourceHash` is `engineSourceHash` (packageHash.ts): a hash of sources. It is
|
|
16
|
+
* not the SHA-256 of the binary, which is a separate fact (the package id in
|
|
17
|
+
* `BUILD.json`). The section never holds a digest of the file it sits in, so
|
|
18
|
+
* stamping it creates no circular dependency.
|
|
19
|
+
*
|
|
20
|
+
* Keep this file ERASABLE (type-only TypeScript syntax; the rule is spelled
|
|
21
|
+
* out in scripts/screenshot-env.ts): the build script imports it under plain
|
|
22
|
+
* `node`. It has no imports.
|
|
23
|
+
*/
|
|
24
|
+
/** The custom section's name. */
|
|
25
|
+
export declare const BUILD_SECTION = "verticopolis.build";
|
|
26
|
+
/** What the host learns about a binary's build metadata. */
|
|
27
|
+
export type BuildMetadataResult = {
|
|
28
|
+
state: "ok";
|
|
29
|
+
sourceHash: string;
|
|
30
|
+
} | {
|
|
31
|
+
state: "missing";
|
|
32
|
+
} | {
|
|
33
|
+
state: "malformed";
|
|
34
|
+
why: string;
|
|
35
|
+
};
|
|
36
|
+
/** The section's payload for a source hash. */
|
|
37
|
+
export declare function encodeBuildMetadata(sourceHash: string): Uint8Array;
|
|
38
|
+
/**
|
|
39
|
+
* Read the metadata from the payloads of every custom section with the
|
|
40
|
+
* section's name (`WebAssembly.Module.customSections` in a page, or
|
|
41
|
+
* {@link customSectionsOf} on bytes). No section is `missing`; more than one,
|
|
42
|
+
* text that is not JSON, another schema or a bad hash is `malformed`, with a
|
|
43
|
+
* reason. Unknown keys are ignored so a later field does not strand an older
|
|
44
|
+
* shell.
|
|
45
|
+
*/
|
|
46
|
+
export declare function parseBuildMetadata(payloads: ArrayLike<ArrayBuffer | Uint8Array>): BuildMetadataResult;
|
|
47
|
+
/** The payload of every custom section called `name`, in file order. */
|
|
48
|
+
export declare function customSectionsOf(wasm: Uint8Array, name: string): Uint8Array[];
|
|
49
|
+
/**
|
|
50
|
+
* The binary with the build metadata section appended. A custom section may
|
|
51
|
+
* sit anywhere in a module, so appending leaves every other byte as it was.
|
|
52
|
+
* Refuses a binary that already has one: stamping twice is a build bug.
|
|
53
|
+
*/
|
|
54
|
+
export declare function stampBuildSection(wasm: Uint8Array, sourceHash: string): Uint8Array;
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The engine's build metadata (#963): which Rust sources a binary was built
|
|
3
|
+
* from, supplied by the packaging and never by the engine. The core engine
|
|
4
|
+
* reads none of it and requires none of it (a hash of the sources cannot be
|
|
5
|
+
* compiled into them without a build script, which `engine-rs/tests/
|
|
6
|
+
* independence.rs` bans). The record is
|
|
7
|
+
*
|
|
8
|
+
* { "schema": 1, "sourceHash": "<64 lowercase hex digits>" }
|
|
9
|
+
*
|
|
10
|
+
* and a web build writes it, as UTF-8 JSON, into a WebAssembly custom section
|
|
11
|
+
* named `verticopolis.build` (`scripts/wasm-build.ts`, after wasm-bindgen and
|
|
12
|
+
* before any file digest is taken). A native Rust or Godot host supplies the
|
|
13
|
+
* same object by its own means (see engine-rs/API.md, "Build metadata").
|
|
14
|
+
*
|
|
15
|
+
* `sourceHash` is `engineSourceHash` (packageHash.ts): a hash of sources. It is
|
|
16
|
+
* not the SHA-256 of the binary, which is a separate fact (the package id in
|
|
17
|
+
* `BUILD.json`). The section never holds a digest of the file it sits in, so
|
|
18
|
+
* stamping it creates no circular dependency.
|
|
19
|
+
*
|
|
20
|
+
* Keep this file ERASABLE (type-only TypeScript syntax; the rule is spelled
|
|
21
|
+
* out in scripts/screenshot-env.ts): the build script imports it under plain
|
|
22
|
+
* `node`. It has no imports.
|
|
23
|
+
*/
|
|
24
|
+
/** The custom section's name. */
|
|
25
|
+
const BUILD_SECTION = "verticopolis.build";
|
|
26
|
+
const HEX64 = /^[0-9a-f]{64}$/;
|
|
27
|
+
/** The section's payload for a source hash. */
|
|
28
|
+
function encodeBuildMetadata(sourceHash) {
|
|
29
|
+
if (!HEX64.test(sourceHash))
|
|
30
|
+
throw new Error("the source hash is not 64 lowercase hex digits");
|
|
31
|
+
return new TextEncoder().encode(JSON.stringify({ schema: 1, sourceHash }));
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Read the metadata from the payloads of every custom section with the
|
|
35
|
+
* section's name (`WebAssembly.Module.customSections` in a page, or
|
|
36
|
+
* {@link customSectionsOf} on bytes). No section is `missing`; more than one,
|
|
37
|
+
* text that is not JSON, another schema or a bad hash is `malformed`, with a
|
|
38
|
+
* reason. Unknown keys are ignored so a later field does not strand an older
|
|
39
|
+
* shell.
|
|
40
|
+
*/
|
|
41
|
+
function parseBuildMetadata(payloads) {
|
|
42
|
+
if (payloads.length === 0)
|
|
43
|
+
return { state: "missing" };
|
|
44
|
+
if (payloads.length > 1)
|
|
45
|
+
return {
|
|
46
|
+
state: "malformed",
|
|
47
|
+
why: `${payloads.length} ${BUILD_SECTION} sections`,
|
|
48
|
+
};
|
|
49
|
+
let v;
|
|
50
|
+
try {
|
|
51
|
+
v = JSON.parse(new TextDecoder("utf-8", { fatal: true }).decode(payloads[0]));
|
|
52
|
+
}
|
|
53
|
+
catch {
|
|
54
|
+
return { state: "malformed", why: "not JSON" };
|
|
55
|
+
}
|
|
56
|
+
if (typeof v !== "object" || v === null || Array.isArray(v))
|
|
57
|
+
return { state: "malformed", why: "not an object" };
|
|
58
|
+
const r = v;
|
|
59
|
+
if (r.schema !== 1)
|
|
60
|
+
return { state: "malformed", why: "not schema 1" };
|
|
61
|
+
if (typeof r.sourceHash !== "string" || !HEX64.test(r.sourceHash))
|
|
62
|
+
return { state: "malformed", why: "bad source hash" };
|
|
63
|
+
return { state: "ok", sourceHash: r.sourceHash };
|
|
64
|
+
}
|
|
65
|
+
function leb(n) {
|
|
66
|
+
const out = [];
|
|
67
|
+
do {
|
|
68
|
+
let b = n & 0x7f;
|
|
69
|
+
n >>>= 7;
|
|
70
|
+
if (n !== 0)
|
|
71
|
+
b |= 0x80;
|
|
72
|
+
out.push(b);
|
|
73
|
+
} while (n !== 0);
|
|
74
|
+
return out;
|
|
75
|
+
}
|
|
76
|
+
/** The module's header: `\0asm` and version 1. */
|
|
77
|
+
const HEADER = [0x00, 0x61, 0x73, 0x6d, 0x01, 0x00, 0x00, 0x00];
|
|
78
|
+
function checkHeader(wasm) {
|
|
79
|
+
if (wasm.length < HEADER.length || HEADER.some((b, i) => wasm[i] !== b))
|
|
80
|
+
throw new Error("not a WebAssembly binary");
|
|
81
|
+
}
|
|
82
|
+
function readLeb(wasm, at) {
|
|
83
|
+
let value = 0;
|
|
84
|
+
let shift = 0;
|
|
85
|
+
for (let i = at; i < wasm.length && shift < 35; i++, shift += 7) {
|
|
86
|
+
value += (wasm[i] & 0x7f) * 2 ** shift;
|
|
87
|
+
if ((wasm[i] & 0x80) === 0)
|
|
88
|
+
return { value, next: i + 1 };
|
|
89
|
+
}
|
|
90
|
+
throw new Error("malformed WebAssembly binary (section length)");
|
|
91
|
+
}
|
|
92
|
+
/** The payload of every custom section called `name`, in file order. */
|
|
93
|
+
function customSectionsOf(wasm, name) {
|
|
94
|
+
checkHeader(wasm);
|
|
95
|
+
const want = new TextEncoder().encode(name);
|
|
96
|
+
const found = [];
|
|
97
|
+
let at = HEADER.length;
|
|
98
|
+
while (at < wasm.length) {
|
|
99
|
+
const id = wasm[at];
|
|
100
|
+
const size = readLeb(wasm, at + 1);
|
|
101
|
+
const end = size.next + size.value;
|
|
102
|
+
if (end > wasm.length)
|
|
103
|
+
throw new Error("malformed WebAssembly binary (section past the end)");
|
|
104
|
+
if (id === 0) {
|
|
105
|
+
const len = readLeb(wasm, size.next);
|
|
106
|
+
const nameEnd = len.next + len.value;
|
|
107
|
+
if (nameEnd > end)
|
|
108
|
+
throw new Error("malformed WebAssembly binary (custom section name)");
|
|
109
|
+
const sectionName = wasm.subarray(len.next, nameEnd);
|
|
110
|
+
if (sectionName.length === want.length &&
|
|
111
|
+
want.every((b, i) => sectionName[i] === b))
|
|
112
|
+
found.push(wasm.subarray(nameEnd, end));
|
|
113
|
+
}
|
|
114
|
+
at = end;
|
|
115
|
+
}
|
|
116
|
+
return found;
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* The binary with the build metadata section appended. A custom section may
|
|
120
|
+
* sit anywhere in a module, so appending leaves every other byte as it was.
|
|
121
|
+
* Refuses a binary that already has one: stamping twice is a build bug.
|
|
122
|
+
*/
|
|
123
|
+
function stampBuildSection(wasm, sourceHash) {
|
|
124
|
+
if (customSectionsOf(wasm, BUILD_SECTION).length > 0)
|
|
125
|
+
throw new Error(`the binary already has a ${BUILD_SECTION} section`);
|
|
126
|
+
const name = new TextEncoder().encode(BUILD_SECTION);
|
|
127
|
+
const payload = encodeBuildMetadata(sourceHash);
|
|
128
|
+
const body = [...leb(name.length), ...name];
|
|
129
|
+
const size = leb(body.length + payload.length);
|
|
130
|
+
const out = new Uint8Array(wasm.length + 1 + size.length + body.length + payload.length);
|
|
131
|
+
out.set(wasm, 0);
|
|
132
|
+
let at = wasm.length;
|
|
133
|
+
out[at++] = 0;
|
|
134
|
+
out.set(size, at);
|
|
135
|
+
at += size.length;
|
|
136
|
+
out.set(body, at);
|
|
137
|
+
at += body.length;
|
|
138
|
+
out.set(payload, at);
|
|
139
|
+
return out;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
export { BUILD_SECTION, customSectionsOf, encodeBuildMetadata, parseBuildMetadata, stampBuildSection };
|
|
143
|
+
//# sourceMappingURL=buildSection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"buildSection.js","sources":["../../src/wasmhost/buildSection.ts"],"sourcesContent":["/**\n * The engine's build metadata (#963): which Rust sources a binary was built\n * from, supplied by the packaging and never by the engine. The core engine\n * reads none of it and requires none of it (a hash of the sources cannot be\n * compiled into them without a build script, which `engine-rs/tests/\n * independence.rs` bans). The record is\n *\n * { \"schema\": 1, \"sourceHash\": \"<64 lowercase hex digits>\" }\n *\n * and a web build writes it, as UTF-8 JSON, into a WebAssembly custom section\n * named `verticopolis.build` (`scripts/wasm-build.ts`, after wasm-bindgen and\n * before any file digest is taken). A native Rust or Godot host supplies the\n * same object by its own means (see engine-rs/API.md, \"Build metadata\").\n *\n * `sourceHash` is `engineSourceHash` (packageHash.ts): a hash of sources. It is\n * not the SHA-256 of the binary, which is a separate fact (the package id in\n * `BUILD.json`). The section never holds a digest of the file it sits in, so\n * stamping it creates no circular dependency.\n *\n * Keep this file ERASABLE (type-only TypeScript syntax; the rule is spelled\n * out in scripts/screenshot-env.ts): the build script imports it under plain\n * `node`. It has no imports.\n */\n\n/** The custom section's name. */\nexport const BUILD_SECTION = \"verticopolis.build\";\n\n/** What the host learns about a binary's build metadata. */\nexport type BuildMetadataResult =\n | { state: \"ok\"; sourceHash: string }\n | { state: \"missing\" }\n | { state: \"malformed\"; why: string };\n\nconst HEX64 = /^[0-9a-f]{64}$/;\n\n/** The section's payload for a source hash. */\nexport function encodeBuildMetadata(sourceHash: string): Uint8Array {\n if (!HEX64.test(sourceHash))\n throw new Error(\"the source hash is not 64 lowercase hex digits\");\n return new TextEncoder().encode(JSON.stringify({ schema: 1, sourceHash }));\n}\n\n/**\n * Read the metadata from the payloads of every custom section with the\n * section's name (`WebAssembly.Module.customSections` in a page, or\n * {@link customSectionsOf} on bytes). No section is `missing`; more than one,\n * text that is not JSON, another schema or a bad hash is `malformed`, with a\n * reason. Unknown keys are ignored so a later field does not strand an older\n * shell.\n */\nexport function parseBuildMetadata(\n payloads: ArrayLike<ArrayBuffer | Uint8Array>,\n): BuildMetadataResult {\n if (payloads.length === 0) return { state: \"missing\" };\n if (payloads.length > 1)\n return {\n state: \"malformed\",\n why: `${payloads.length} ${BUILD_SECTION} sections`,\n };\n let v: unknown;\n try {\n v = JSON.parse(\n new TextDecoder(\"utf-8\", { fatal: true }).decode(payloads[0]),\n );\n } catch {\n return { state: \"malformed\", why: \"not JSON\" };\n }\n if (typeof v !== \"object\" || v === null || Array.isArray(v))\n return { state: \"malformed\", why: \"not an object\" };\n const r = v as { schema?: unknown; sourceHash?: unknown };\n if (r.schema !== 1) return { state: \"malformed\", why: \"not schema 1\" };\n if (typeof r.sourceHash !== \"string\" || !HEX64.test(r.sourceHash))\n return { state: \"malformed\", why: \"bad source hash\" };\n return { state: \"ok\", sourceHash: r.sourceHash };\n}\n\nfunction leb(n: number): number[] {\n const out: number[] = [];\n do {\n let b = n & 0x7f;\n n >>>= 7;\n if (n !== 0) b |= 0x80;\n out.push(b);\n } while (n !== 0);\n return out;\n}\n\n/** The module's header: `\\0asm` and version 1. */\nconst HEADER = [0x00, 0x61, 0x73, 0x6d, 0x01, 0x00, 0x00, 0x00];\n\nfunction checkHeader(wasm: Uint8Array): void {\n if (wasm.length < HEADER.length || HEADER.some((b, i) => wasm[i] !== b))\n throw new Error(\"not a WebAssembly binary\");\n}\n\nfunction readLeb(\n wasm: Uint8Array,\n at: number,\n): { value: number; next: number } {\n let value = 0;\n let shift = 0;\n for (let i = at; i < wasm.length && shift < 35; i++, shift += 7) {\n value += (wasm[i] & 0x7f) * 2 ** shift;\n if ((wasm[i] & 0x80) === 0) return { value, next: i + 1 };\n }\n throw new Error(\"malformed WebAssembly binary (section length)\");\n}\n\n/** The payload of every custom section called `name`, in file order. */\nexport function customSectionsOf(wasm: Uint8Array, name: string): Uint8Array[] {\n checkHeader(wasm);\n const want = new TextEncoder().encode(name);\n const found: Uint8Array[] = [];\n let at = HEADER.length;\n while (at < wasm.length) {\n const id = wasm[at];\n const size = readLeb(wasm, at + 1);\n const end = size.next + size.value;\n if (end > wasm.length)\n throw new Error(\"malformed WebAssembly binary (section past the end)\");\n if (id === 0) {\n const len = readLeb(wasm, size.next);\n const nameEnd = len.next + len.value;\n if (nameEnd > end)\n throw new Error(\"malformed WebAssembly binary (custom section name)\");\n const sectionName = wasm.subarray(len.next, nameEnd);\n if (\n sectionName.length === want.length &&\n want.every((b, i) => sectionName[i] === b)\n )\n found.push(wasm.subarray(nameEnd, end));\n }\n at = end;\n }\n return found;\n}\n\n/**\n * The binary with the build metadata section appended. A custom section may\n * sit anywhere in a module, so appending leaves every other byte as it was.\n * Refuses a binary that already has one: stamping twice is a build bug.\n */\nexport function stampBuildSection(\n wasm: Uint8Array,\n sourceHash: string,\n): Uint8Array {\n if (customSectionsOf(wasm, BUILD_SECTION).length > 0)\n throw new Error(`the binary already has a ${BUILD_SECTION} section`);\n const name = new TextEncoder().encode(BUILD_SECTION);\n const payload = encodeBuildMetadata(sourceHash);\n const body = [...leb(name.length), ...name];\n const size = leb(body.length + payload.length);\n const out = new Uint8Array(\n wasm.length + 1 + size.length + body.length + payload.length,\n );\n out.set(wasm, 0);\n let at = wasm.length;\n out[at++] = 0;\n out.set(size, at);\n at += size.length;\n out.set(body, at);\n at += body.length;\n out.set(payload, at);\n return out;\n}\n"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;AAsBG;AAEH;AACO,MAAM,aAAa,GAAG;AAQ7B,MAAM,KAAK,GAAG,gBAAgB;AAE9B;AACM,SAAU,mBAAmB,CAAC,UAAkB,EAAA;AACpD,IAAA,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC;AACzB,QAAA,MAAM,IAAI,KAAK,CAAC,gDAAgD,CAAC;AACnE,IAAA,OAAO,IAAI,WAAW,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC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0,0 +1,11 @@
|
|
|
1
|
+
import type { Catalog } from "../catalog/catalogTypes";
|
|
2
|
+
import type { GameMode } from "../shared/types";
|
|
3
|
+
/** Refuses binding catalogs this build cannot draw. Each mode's catalog must
|
|
4
|
+
* list exactly the facility kinds the UI has a color and a description for
|
|
5
|
+
* (`FACILITY_PRESENTATION`), and lay the ground floor with one of them; and
|
|
6
|
+
* the two modes must state the same lot and floor range, because the view
|
|
7
|
+
* binds one world for the page's life (`viewWorld.ts`) while a new game can
|
|
8
|
+
* change the mode. The error names the kinds or the field that differ. The
|
|
9
|
+
* check reads only what the frontend draws, so the shipped game carries
|
|
10
|
+
* none of the TypeScript engine's tables (#921). */
|
|
11
|
+
export declare function refuseForeignCatalogs(catalogs: Readonly<Record<GameMode, Catalog>>): void;
|