@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,43 @@
|
|
|
1
|
+
import { FACILITY_PRESENTATION } from '../presentation/facilityPresentation.js';
|
|
2
|
+
|
|
3
|
+
/** The world fields the view is sized from (`viewWorld.ts`). */
|
|
4
|
+
const VIEW_WORLD_FIELDS = ["lotWidth", "minFloor", "maxFloor"];
|
|
5
|
+
/** The facility kinds this build draws: the ones the UI has a color and a
|
|
6
|
+
* description for. */
|
|
7
|
+
const DRAWN_KINDS = new Set(Object.keys(FACILITY_PRESENTATION));
|
|
8
|
+
/** Refuses binding catalogs this build cannot draw. Each mode's catalog must
|
|
9
|
+
* list exactly the facility kinds the UI has a color and a description for
|
|
10
|
+
* (`FACILITY_PRESENTATION`), and lay the ground floor with one of them; and
|
|
11
|
+
* the two modes must state the same lot and floor range, because the view
|
|
12
|
+
* binds one world for the page's life (`viewWorld.ts`) while a new game can
|
|
13
|
+
* change the mode. The error names the kinds or the field that differ. The
|
|
14
|
+
* check reads only what the frontend draws, so the shipped game carries
|
|
15
|
+
* none of the TypeScript engine's tables (#921). */
|
|
16
|
+
function refuseForeignCatalogs(catalogs) {
|
|
17
|
+
for (const c of Object.values(catalogs))
|
|
18
|
+
refuseUndrawnKinds(c);
|
|
19
|
+
for (const field of VIEW_WORLD_FIELDS) {
|
|
20
|
+
if (catalogs.classic.world[field] !== catalogs.modern.world[field]) {
|
|
21
|
+
throw new Error(`the Rust engine's classic and modern catalogs state different worlds (${field}), and the view draws one world for the page`);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
/** Refuses a catalog that lists other kinds than this build draws, or lays
|
|
26
|
+
* the ground floor with one it does not. `readCatalog` already refuses a
|
|
27
|
+
* kind listed twice. */
|
|
28
|
+
function refuseUndrawnKinds(c) {
|
|
29
|
+
const keys = c.facilities.map((f) => f.key);
|
|
30
|
+
const listed = new Set(keys);
|
|
31
|
+
const extra = keys.filter((k) => !DRAWN_KINDS.has(k));
|
|
32
|
+
const missing = [...DRAWN_KINDS].filter((k) => !listed.has(k));
|
|
33
|
+
if (extra.length > 0 || missing.length > 0) {
|
|
34
|
+
const parts = [extra.length > 0 ? `unknown ${extra.join(", ")}` : "", missing.length > 0 ? `missing ${missing.join(", ")}` : ""];
|
|
35
|
+
throw new Error(`the Rust engine's ${c.mode} catalog lists other facility kinds than this build draws (${parts.filter(Boolean).join("; ")})`);
|
|
36
|
+
}
|
|
37
|
+
if (!DRAWN_KINDS.has(c.world.groundFloorStructure)) {
|
|
38
|
+
throw new Error(`the Rust engine's ${c.mode} catalog lays the ground floor with a kind this build does not draw (${c.world.groundFloorStructure})`);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export { refuseForeignCatalogs };
|
|
43
|
+
//# sourceMappingURL=catalogCheck.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"catalogCheck.js","sources":["../../src/wasmhost/catalogCheck.ts"],"sourcesContent":["import type { Catalog } from \"../catalog/catalogTypes\";\nimport type { GameMode } from \"../shared/types\";\nimport { FACILITY_PRESENTATION } from \"../presentation/facilityPresentation\";\nimport type { ViewWorld } from \"../presentation/viewWorld\";\n\n/** The world fields the view is sized from (`viewWorld.ts`). */\nconst VIEW_WORLD_FIELDS: readonly (keyof ViewWorld)[] = [\"lotWidth\", \"minFloor\", \"maxFloor\"];\n\n/** The facility kinds this build draws: the ones the UI has a color and a\n * description for. */\nconst DRAWN_KINDS: ReadonlySet<string> = new Set(Object.keys(FACILITY_PRESENTATION));\n\n/** Refuses binding catalogs this build cannot draw. Each mode's catalog must\n * list exactly the facility kinds the UI has a color and a description for\n * (`FACILITY_PRESENTATION`), and lay the ground floor with one of them; and\n * the two modes must state the same lot and floor range, because the view\n * binds one world for the page's life (`viewWorld.ts`) while a new game can\n * change the mode. The error names the kinds or the field that differ. The\n * check reads only what the frontend draws, so the shipped game carries\n * none of the TypeScript engine's tables (#921). */\nexport function refuseForeignCatalogs(catalogs: Readonly<Record<GameMode, Catalog>>): void {\n for (const c of Object.values(catalogs)) refuseUndrawnKinds(c);\n for (const field of VIEW_WORLD_FIELDS) {\n if (catalogs.classic.world[field] !== catalogs.modern.world[field]) {\n throw new Error(`the Rust engine's classic and modern catalogs state different worlds (${field}), and the view draws one world for the page`);\n }\n }\n}\n\n/** Refuses a catalog that lists other kinds than this build draws, or lays\n * the ground floor with one it does not. `readCatalog` already refuses a\n * kind listed twice. */\nfunction refuseUndrawnKinds(c: Catalog): void {\n const keys = c.facilities.map((f) => f.key);\n const listed = new Set<string>(keys);\n const extra = keys.filter((k) => !DRAWN_KINDS.has(k));\n const missing = [...DRAWN_KINDS].filter((k) => !listed.has(k));\n if (extra.length > 0 || missing.length > 0) {\n const parts = [extra.length > 0 ? `unknown ${extra.join(\", \")}` : \"\", missing.length > 0 ? `missing ${missing.join(\", \")}` : \"\"];\n throw new Error(`the Rust engine's ${c.mode} catalog lists other facility kinds than this build draws (${parts.filter(Boolean).join(\"; \")})`);\n }\n if (!DRAWN_KINDS.has(c.world.groundFloorStructure)) {\n throw new Error(`the Rust engine's ${c.mode} catalog lays the ground floor with a kind this build does not draw (${c.world.groundFloorStructure})`);\n }\n}\n"],"names":[],"mappings":";;AAKA;AACA,MAAM,iBAAiB,GAAiC,CAAC,UAAU,EAAE,UAAU,EAAE,UAAU,CAAC;AAE5F;AACuB;AACvB,MAAM,WAAW,GAAwB,IAAI,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC;AAEpF;;;;;;;AAOqD;AAC/C,SAAU,qBAAqB,CAAC,QAA6C,EAAA;IACjF,KAAK,MAAM,CAAC,IAAI,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC;QAAE,kBAAkB,CAAC,CAAC,CAAC;AAC9D,IAAA,KAAK,MAAM,KAAK,IAAI,iBAAiB,EAAE;AACrC,QAAA,IAAI,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE;AAClE,YAAA,MAAM,IAAI,KAAK,CAAC,yEAAyE,KAAK,CAAA,4CAAA,CAA8C,CAAC;QAC/I;IACF;AACF;AAEA;;AAEyB;AACzB,SAAS,kBAAkB,CAAC,CAAU,EAAA;AACpC,IAAA,MAAM,IAAI,GAAG,CAAC,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC;AAC3C,IAAA,MAAM,MAAM,GAAG,IAAI,GAAG,CAAS,IAAI,CAAC;AACpC,IAAA,MAAM,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IACrD,MAAM,OAAO,GAAG,CAAC,GAAG,WAAW,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AAC9D,IAAA,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE;QAC1C,MAAM,KAAK,GAAG,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,GAAG,CAAA,QAAA,EAAW,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA,CAAE,GAAG,EAAE,EAAE,OAAO,CAAC,MAAM,GAAG,CAAC,GAAG,CAAA,QAAA,EAAW,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA,CAAE,GAAG,EAAE,CAAC;QAChI,MAAM,IAAI,KAAK,CAAC,CAAA,kBAAA,EAAqB,CAAC,CAAC,IAAI,8DAA8D,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA,CAAA,CAAG,CAAC;IAC/I;AACA,IAAA,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,oBAAoB,CAAC,EAAE;AAClD,QAAA,MAAM,IAAI,KAAK,CAAC,CAAA,kBAAA,EAAqB,CAAC,CAAC,IAAI,CAAA,qEAAA,EAAwE,CAAC,CAAC,KAAK,CAAC,oBAAoB,CAAA,CAAA,CAAG,CAAC;IACrJ;AACF;;"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Every file the engine package build writes into `src/public/engine/` (and so
|
|
3
|
+
* into `dist/engine/`), each marked by whether the game fetches it at run
|
|
4
|
+
* time. The audio layer has the same list in src/audio/audioAssets.ts.
|
|
5
|
+
*
|
|
6
|
+
* An installed game must start the engine offline (#945, #985), so every
|
|
7
|
+
* `runtime` file has to be in the service worker's precache:
|
|
8
|
+
* scripts/verify-precache.ts fails the build when one is missing from the
|
|
9
|
+
* manifest, when a file in `dist/engine/` is not in this list, when the glue
|
|
10
|
+
* fetches a file this list does not mark `runtime`, and when a file marked
|
|
11
|
+
* `runtime: false` is precached anyway. engineAssets.test.ts fails when the
|
|
12
|
+
* app source or the package build names an engine file this list lacks.
|
|
13
|
+
*
|
|
14
|
+
* Today the game fetches three files, all through the verified loader
|
|
15
|
+
* (loadEngineModule.ts, #985's criterion 5): the glue (enginePackageUrl in
|
|
16
|
+
* rustEngine.ts names it), the binary beside it, and `BUILD.json`, whose
|
|
17
|
+
* record the loader checks both against. The loader hashes the bytes, compiles
|
|
18
|
+
* the binary itself (reading its build section, engineLoad.ts, #963) and hands
|
|
19
|
+
* the compiled module to the glue's `init`, so the glue never fetches the
|
|
20
|
+
* binary itself.
|
|
21
|
+
* `THIRD-PARTY.json` is read only at
|
|
22
|
+
* build and test time (the notices in src/build/rustNotices.ts), so it stays
|
|
23
|
+
* out of the precache. Each run-time file is listed in the workbox glob by its
|
|
24
|
+
* own path where the pattern matches no `.json` (see the note in
|
|
25
|
+
* vite.config.ts).
|
|
26
|
+
*
|
|
27
|
+
* Keep this file ERASABLE (type-only TypeScript syntax, no enums or
|
|
28
|
+
* namespaces; the rule is spelled out in scripts/screenshot-env.ts): the
|
|
29
|
+
* build scripts import it under plain `node`, which strips types. The app
|
|
30
|
+
* imports the bare names from enginePackageNames.ts instead, so this list and
|
|
31
|
+
* its notes stay out of the player's bundle.
|
|
32
|
+
*/
|
|
33
|
+
import { ENGINE_BUILD_RECORD, ENGINE_DIR, ENGINE_GLUE, ENGINE_THIRD_PARTY_RECORD, ENGINE_WASM } from "./enginePackageNames.ts";
|
|
34
|
+
export { ENGINE_BUILD_RECORD, ENGINE_DIR, ENGINE_GLUE, ENGINE_THIRD_PARTY_RECORD, ENGINE_WASM };
|
|
35
|
+
/** One file of the served engine package. */
|
|
36
|
+
export interface EngineFile {
|
|
37
|
+
/** Its name inside `engine/`. */
|
|
38
|
+
name: string;
|
|
39
|
+
/** Whether the game fetches it at run time, and so must precache it. */
|
|
40
|
+
runtime: boolean;
|
|
41
|
+
/** Who reads it, and when. */
|
|
42
|
+
readBy: string;
|
|
43
|
+
}
|
|
44
|
+
/** Every file the package build leaves in `src/public/engine/`. Add a new
|
|
45
|
+
* one here in the same change that writes it. */
|
|
46
|
+
export declare const ENGINE_PACKAGE: readonly EngineFile[];
|
|
47
|
+
/** The engine files fetched at run time, as paths under the site base. */
|
|
48
|
+
export declare const ENGINE_RUNTIME_FILES: readonly string[];
|
|
49
|
+
/** The engine files the game never fetches, as paths under the site base. */
|
|
50
|
+
export declare const ENGINE_BUILD_ONLY_FILES: readonly string[];
|
|
51
|
+
/**
|
|
52
|
+
* The files the glue loads relative to itself: `new URL("x", import.meta.url)`
|
|
53
|
+
* and static or dynamic imports of `./x`, as names inside `engine/`.
|
|
54
|
+
* wasm-bindgen's web target loads the binary this way, and puts inline
|
|
55
|
+
* JavaScript snippets in `snippets/` imported the same way.
|
|
56
|
+
*/
|
|
57
|
+
export declare function glueLoads(glue: string): string[];
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { ENGINE_GLUE, ENGINE_WASM, ENGINE_BUILD_RECORD, ENGINE_THIRD_PARTY_RECORD, ENGINE_DIR } from './enginePackageNames.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Every file the engine package build writes into `src/public/engine/` (and so
|
|
5
|
+
* into `dist/engine/`), each marked by whether the game fetches it at run
|
|
6
|
+
* time. The audio layer has the same list in src/audio/audioAssets.ts.
|
|
7
|
+
*
|
|
8
|
+
* An installed game must start the engine offline (#945, #985), so every
|
|
9
|
+
* `runtime` file has to be in the service worker's precache:
|
|
10
|
+
* scripts/verify-precache.ts fails the build when one is missing from the
|
|
11
|
+
* manifest, when a file in `dist/engine/` is not in this list, when the glue
|
|
12
|
+
* fetches a file this list does not mark `runtime`, and when a file marked
|
|
13
|
+
* `runtime: false` is precached anyway. engineAssets.test.ts fails when the
|
|
14
|
+
* app source or the package build names an engine file this list lacks.
|
|
15
|
+
*
|
|
16
|
+
* Today the game fetches three files, all through the verified loader
|
|
17
|
+
* (loadEngineModule.ts, #985's criterion 5): the glue (enginePackageUrl in
|
|
18
|
+
* rustEngine.ts names it), the binary beside it, and `BUILD.json`, whose
|
|
19
|
+
* record the loader checks both against. The loader hashes the bytes, compiles
|
|
20
|
+
* the binary itself (reading its build section, engineLoad.ts, #963) and hands
|
|
21
|
+
* the compiled module to the glue's `init`, so the glue never fetches the
|
|
22
|
+
* binary itself.
|
|
23
|
+
* `THIRD-PARTY.json` is read only at
|
|
24
|
+
* build and test time (the notices in src/build/rustNotices.ts), so it stays
|
|
25
|
+
* out of the precache. Each run-time file is listed in the workbox glob by its
|
|
26
|
+
* own path where the pattern matches no `.json` (see the note in
|
|
27
|
+
* vite.config.ts).
|
|
28
|
+
*
|
|
29
|
+
* Keep this file ERASABLE (type-only TypeScript syntax, no enums or
|
|
30
|
+
* namespaces; the rule is spelled out in scripts/screenshot-env.ts): the
|
|
31
|
+
* build scripts import it under plain `node`, which strips types. The app
|
|
32
|
+
* imports the bare names from enginePackageNames.ts instead, so this list and
|
|
33
|
+
* its notes stay out of the player's bundle.
|
|
34
|
+
*/
|
|
35
|
+
/** Every file the package build leaves in `src/public/engine/`. Add a new
|
|
36
|
+
* one here in the same change that writes it. */
|
|
37
|
+
const ENGINE_PACKAGE = [
|
|
38
|
+
{ name: ENGINE_GLUE, runtime: true, readBy: "the WASM host and the engine worker, through the verified loader (loadEngineModule.ts), which imports the checked bytes" },
|
|
39
|
+
{ name: ENGINE_WASM, runtime: true, readBy: "the verified loader (loadEngineModule.ts), which fetches and hashes it and passes the bytes to the glue's init" },
|
|
40
|
+
{ name: ENGINE_BUILD_RECORD, runtime: true, readBy: "the verified loader (enginePackageCheck.ts hashes the glue and binary against this record); also the build, CI's package cache and packageHash.test.ts" },
|
|
41
|
+
{ name: ENGINE_THIRD_PARTY_RECORD, runtime: false, readBy: "the third-party notices build (scripts/gen-third-party-notices.ts)" },
|
|
42
|
+
];
|
|
43
|
+
/** The engine files fetched at run time, as paths under the site base. */
|
|
44
|
+
const ENGINE_RUNTIME_FILES = ENGINE_PACKAGE.filter((f) => f.runtime).map((f) => ENGINE_DIR + f.name);
|
|
45
|
+
/** The engine files the game never fetches, as paths under the site base. */
|
|
46
|
+
const ENGINE_BUILD_ONLY_FILES = ENGINE_PACKAGE.filter((f) => !f.runtime).map((f) => ENGINE_DIR + f.name);
|
|
47
|
+
/**
|
|
48
|
+
* The files the glue loads relative to itself: `new URL("x", import.meta.url)`
|
|
49
|
+
* and static or dynamic imports of `./x`, as names inside `engine/`.
|
|
50
|
+
* wasm-bindgen's web target loads the binary this way, and puts inline
|
|
51
|
+
* JavaScript snippets in `snippets/` imported the same way.
|
|
52
|
+
*/
|
|
53
|
+
function glueLoads(glue) {
|
|
54
|
+
const found = new Set();
|
|
55
|
+
for (const m of glue.matchAll(/new URL\(\s*["'`]([^"'`]+)["'`]\s*,\s*import\.meta\.url/g))
|
|
56
|
+
found.add(m[1].replace(/^\.\//, ""));
|
|
57
|
+
for (const m of glue.matchAll(/(?:\bfrom|\bimport)\s*\(?\s*["'`](\.\/[^"'`]+)["'`]/g))
|
|
58
|
+
found.add(m[1].slice(2));
|
|
59
|
+
return [...found].sort();
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export { ENGINE_BUILD_ONLY_FILES, ENGINE_BUILD_RECORD, ENGINE_DIR, ENGINE_GLUE, ENGINE_PACKAGE, ENGINE_RUNTIME_FILES, ENGINE_THIRD_PARTY_RECORD, ENGINE_WASM, glueLoads };
|
|
63
|
+
//# sourceMappingURL=engineAssets.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"engineAssets.js","sources":["../../src/wasmhost/engineAssets.ts"],"sourcesContent":["/**\n * Every file the engine package build writes into `src/public/engine/` (and so\n * into `dist/engine/`), each marked by whether the game fetches it at run\n * time. The audio layer has the same list in src/audio/audioAssets.ts.\n *\n * An installed game must start the engine offline (#945, #985), so every\n * `runtime` file has to be in the service worker's precache:\n * scripts/verify-precache.ts fails the build when one is missing from the\n * manifest, when a file in `dist/engine/` is not in this list, when the glue\n * fetches a file this list does not mark `runtime`, and when a file marked\n * `runtime: false` is precached anyway. engineAssets.test.ts fails when the\n * app source or the package build names an engine file this list lacks.\n *\n * Today the game fetches three files, all through the verified loader\n * (loadEngineModule.ts, #985's criterion 5): the glue (enginePackageUrl in\n * rustEngine.ts names it), the binary beside it, and `BUILD.json`, whose\n * record the loader checks both against. The loader hashes the bytes, compiles\n * the binary itself (reading its build section, engineLoad.ts, #963) and hands\n * the compiled module to the glue's `init`, so the glue never fetches the\n * binary itself.\n * `THIRD-PARTY.json` is read only at\n * build and test time (the notices in src/build/rustNotices.ts), so it stays\n * out of the precache. Each run-time file is listed in the workbox glob by its\n * own path where the pattern matches no `.json` (see the note in\n * vite.config.ts).\n *\n * Keep this file ERASABLE (type-only TypeScript syntax, no enums or\n * namespaces; the rule is spelled out in scripts/screenshot-env.ts): the\n * build scripts import it under plain `node`, which strips types. The app\n * imports the bare names from enginePackageNames.ts instead, so this list and\n * its notes stay out of the player's bundle.\n */\n\nimport { ENGINE_BUILD_RECORD, ENGINE_DIR, ENGINE_GLUE, ENGINE_THIRD_PARTY_RECORD, ENGINE_WASM } from \"./enginePackageNames.ts\";\n\nexport { ENGINE_BUILD_RECORD, ENGINE_DIR, ENGINE_GLUE, ENGINE_THIRD_PARTY_RECORD, ENGINE_WASM };\n\n/** One file of the served engine package. */\nexport interface EngineFile {\n /** Its name inside `engine/`. */\n name: string;\n /** Whether the game fetches it at run time, and so must precache it. */\n runtime: boolean;\n /** Who reads it, and when. */\n readBy: string;\n}\n\n/** Every file the package build leaves in `src/public/engine/`. Add a new\n * one here in the same change that writes it. */\nexport const ENGINE_PACKAGE: readonly EngineFile[] = [\n { name: ENGINE_GLUE, runtime: true, readBy: \"the WASM host and the engine worker, through the verified loader (loadEngineModule.ts), which imports the checked bytes\" },\n { name: ENGINE_WASM, runtime: true, readBy: \"the verified loader (loadEngineModule.ts), which fetches and hashes it and passes the bytes to the glue's init\" },\n { name: ENGINE_BUILD_RECORD, runtime: true, readBy: \"the verified loader (enginePackageCheck.ts hashes the glue and binary against this record); also the build, CI's package cache and packageHash.test.ts\" },\n { name: ENGINE_THIRD_PARTY_RECORD, runtime: false, readBy: \"the third-party notices build (scripts/gen-third-party-notices.ts)\" },\n];\n\n/** The engine files fetched at run time, as paths under the site base. */\nexport const ENGINE_RUNTIME_FILES: readonly string[] = ENGINE_PACKAGE.filter((f) => f.runtime).map((f) => ENGINE_DIR + f.name);\n\n/** The engine files the game never fetches, as paths under the site base. */\nexport const ENGINE_BUILD_ONLY_FILES: readonly string[] = ENGINE_PACKAGE.filter((f) => !f.runtime).map((f) => ENGINE_DIR + f.name);\n\n/**\n * The files the glue loads relative to itself: `new URL(\"x\", import.meta.url)`\n * and static or dynamic imports of `./x`, as names inside `engine/`.\n * wasm-bindgen's web target loads the binary this way, and puts inline\n * JavaScript snippets in `snippets/` imported the same way.\n */\nexport function glueLoads(glue: string): string[] {\n const found = new Set<string>();\n for (const m of glue.matchAll(/new URL\\(\\s*[\"'`]([^\"'`]+)[\"'`]\\s*,\\s*import\\.meta\\.url/g)) found.add(m[1].replace(/^\\.\\//, \"\"));\n for (const m of glue.matchAll(/(?:\\bfrom|\\bimport)\\s*\\(?\\s*[\"'`](\\.\\/[^\"'`]+)[\"'`]/g)) found.add(m[1].slice(2));\n return [...found].sort();\n}\n"],"names":[],"mappings":";;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BG;AAgBH;AACkD;AAC3C,MAAM,cAAc,GAA0B;IACnD,EAAE,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,yHAAyH,EAAE;IACvK,EAAE,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,gHAAgH,EAAE;IAC9J,EAAE,IAAI,EAAE,mBAAmB,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,wJAAwJ,EAAE;IAC9M,EAAE,IAAI,EAAE,yBAAyB,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,oEAAoE,EAAE;;AAGnI;AACO,MAAM,oBAAoB,GAAsB,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,UAAU,GAAG,CAAC,CAAC,IAAI;AAE7H;AACO,MAAM,uBAAuB,GAAsB,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,UAAU,GAAG,CAAC,CAAC,IAAI;AAEjI;;;;;AAKG;AACG,SAAU,SAAS,CAAC,IAAY,EAAA;AACpC,IAAA,MAAM,KAAK,GAAG,IAAI,GAAG,EAAU;IAC/B,KAAK,MAAM,CAAC,IAAI,IAAI,CAAC,QAAQ,CAAC,0DAA0D,CAAC;AAAE,QAAA,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;IAC/H,KAAK,MAAM,CAAC,IAAI,IAAI,CAAC,QAAQ,CAAC,sDAAsD,CAAC;AAAE,QAAA,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AAC/G,IAAA,OAAO,CAAC,GAAG,KAAK,CAAC,CAAC,IAAI,EAAE;AAC1B;;"}
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
import type { WasmModule } from "../engineBinding/binding";
|
|
2
|
+
import { type PackageFailureDetail, type PackageFailureKind } from "./enginePackageCheck";
|
|
3
|
+
import type { BuildMetadataResult } from "./buildSection";
|
|
4
|
+
/**
|
|
5
|
+
* How boot gets its engine. Boot always loads the WASM package, and a package
|
|
6
|
+
* that fails to load or lacks a part the game needs is a failure that stops
|
|
7
|
+
* boot: there is no other engine to fall back to.
|
|
8
|
+
*
|
|
9
|
+
* The result is published on `window.__vcEngineBoot` so a tester, the e2e
|
|
10
|
+
* suites and a support session can read which build this is, which engine it
|
|
11
|
+
* runs and why it stopped, without a console handle into the sim.
|
|
12
|
+
*/
|
|
13
|
+
export type BootEngine = "wasm" | "ts" | "none";
|
|
14
|
+
export type BootStage = "load" | "start" | "host";
|
|
15
|
+
/**
|
|
16
|
+
* Why the engine fell back (or, in a wasm-only build, stopped), as a code from
|
|
17
|
+
* a closed list. The code is what analytics and the host status report
|
|
18
|
+
* (`engine_status`, `docs/analytics-data-map.md`); the message beside it stays
|
|
19
|
+
* on the console and the boot state and is never put in that event, since an
|
|
20
|
+
* engine message can quote a tower name or a path.
|
|
21
|
+
*
|
|
22
|
+
* Boot sends the first six, plus `other` for a boot step outside the engine
|
|
23
|
+
* that failed after the host took the tower (the host is let go). The
|
|
24
|
+
* runtime fallback (#874) sends the trap codes for a running engine's fault
|
|
25
|
+
* in a command (the undo capture's save just before an edit included), a
|
|
26
|
+
* tick, a frame sync or the event drain, or an undo or redo, and `other` for
|
|
27
|
+
* a save or the reads when a tower is let go. A trap in the engine's save
|
|
28
|
+
* writer (#1205) is `trap-save`, and one in the slot census that loads a save
|
|
29
|
+
* into a short-lived engine (#1612) is `trap-census`.
|
|
30
|
+
*/
|
|
31
|
+
export declare const FALLBACK_REASONS: readonly ["none", "boot-timeout", "boot-error", "package-mismatch", "unverifiable", "attach-refused", "trap-command", "trap-tick", "trap-undo", "trap-save", "trap-census", "other"];
|
|
32
|
+
export type FallbackReason = (typeof FALLBACK_REASONS)[number];
|
|
33
|
+
/** Where a fallback happened: loading the package, starting the host on the
|
|
34
|
+
* first tower, or a later tower the host was handed (a load or a new game,
|
|
35
|
+
* or an undo restore). Closed like {@link FALLBACK_REASONS}. A running
|
|
36
|
+
* engine's fault (#874) takes the stage of how its tower was hosted, so the
|
|
37
|
+
* trap code says which path failed and the stage on which kind of tower. */
|
|
38
|
+
export declare const FALLBACK_STAGES: readonly ["none", "load", "start", "adopt", "undo"];
|
|
39
|
+
export type FallbackStage = (typeof FALLBACK_STAGES)[number];
|
|
40
|
+
/** Why the byte check refused the engine package, as plain data (so a worker
|
|
41
|
+
* can send it): the kind, the file, both package ids and whether a service
|
|
42
|
+
* worker controlled the page (#985). Hex ids and codes only; the boot state
|
|
43
|
+
* carries it for tooling and support, and analytics never does. */
|
|
44
|
+
export type PackageFailure = PackageFailureDetail & {
|
|
45
|
+
kind: PackageFailureKind;
|
|
46
|
+
};
|
|
47
|
+
export interface EngineBootFailure {
|
|
48
|
+
stage: BootStage;
|
|
49
|
+
/** The code analytics reports; never derived from `message`. */
|
|
50
|
+
reason: FallbackReason;
|
|
51
|
+
message: string;
|
|
52
|
+
/** Set when the byte check refused the package. */
|
|
53
|
+
package?: PackageFailure;
|
|
54
|
+
/** Set for a cause with no code of its own in the closed list, so the
|
|
55
|
+
* screen can word it without reading `message`. */
|
|
56
|
+
cause?: "no-save-writer";
|
|
57
|
+
}
|
|
58
|
+
/** A boot failure that already knows its code: the load's time limit, a
|
|
59
|
+
* package that does not match this shell. Anything else on the way to a
|
|
60
|
+
* running engine is `boot-error` (see {@link bootFailureReason}). */
|
|
61
|
+
export declare class EngineBootError extends Error {
|
|
62
|
+
readonly reason: FallbackReason;
|
|
63
|
+
readonly package?: PackageFailure;
|
|
64
|
+
constructor(reason: FallbackReason, message: string, pkg?: PackageFailure);
|
|
65
|
+
}
|
|
66
|
+
/** The codes a failed load can carry: the rest of the closed list is for a
|
|
67
|
+
* fault in a running engine or for no fault at all. */
|
|
68
|
+
export declare const LOAD_FAILURE_REASONS: readonly FallbackReason[];
|
|
69
|
+
/** A package detail that came across a worker message, rebuilt from known
|
|
70
|
+
* values only: the kind and file from their lists, the ids as 12 hex digits.
|
|
71
|
+
* Anything else is dropped, so the boot state never carries free text from a
|
|
72
|
+
* message. Undefined when there is no usable kind. */
|
|
73
|
+
export declare function cleanPackageFailure(raw: unknown): PackageFailure | undefined;
|
|
74
|
+
/** A worker's account of the binary's build section, rebuilt from known
|
|
75
|
+
* values (a state from the list, a 64-digit hash, a short reason), so the
|
|
76
|
+
* boot state never carries free text from a message. Undefined for anything
|
|
77
|
+
* else. */
|
|
78
|
+
export declare function cleanBuildMetadata(raw: unknown): BuildMetadataResult | undefined;
|
|
79
|
+
/** The code for a refused package. A set that disagrees with the shell is a
|
|
80
|
+
* mismatch, a browser that cannot hash the files is `unverifiable` (the files
|
|
81
|
+
* may be fine; neither sits in the fault rate), and files that did not arrive
|
|
82
|
+
* are a `boot-error`. */
|
|
83
|
+
export declare function packageFailureReason(kind: PackageFailureKind): FallbackReason;
|
|
84
|
+
/** The code for a failure on the way to a running engine. A glue and binary
|
|
85
|
+
* from different builds fail to link: that is a package mismatch, and the
|
|
86
|
+
* engine itself may be sound. Every other untyped failure is `boot-error`. */
|
|
87
|
+
export declare function bootFailureReason(e: unknown): FallbackReason;
|
|
88
|
+
/** The package detail of a failure, when the byte check refused the package. */
|
|
89
|
+
export declare function packageFailureOf(e: unknown): PackageFailure | undefined;
|
|
90
|
+
/** A boot failure built from what was thrown. */
|
|
91
|
+
export declare function bootFailure(stage: BootStage, e: unknown): EngineBootFailure;
|
|
92
|
+
export interface EngineBootState {
|
|
93
|
+
build: "wasm-only" | "switchable";
|
|
94
|
+
/** The engine boot settled on: "none" once a wasm-only build has failed. */
|
|
95
|
+
engine: BootEngine;
|
|
96
|
+
failure: EngineBootFailure | null;
|
|
97
|
+
/** Set once the engine save writer has turned itself off this page life
|
|
98
|
+
* (`vctowerWriter.ts`); absent until then. */
|
|
99
|
+
writerLatched?: true;
|
|
100
|
+
/** The engine's identity record as the loaded package reports it
|
|
101
|
+
* (`engineIdentity()`, #963), for About and Copy Diagnostics. Absent when
|
|
102
|
+
* no engine loaded or the package has no such call, and until the record
|
|
103
|
+
* is read after boot (`settleEngineIdentity`, #1254). */
|
|
104
|
+
identity?: string;
|
|
105
|
+
/** What the engine binary's `verticopolis.build` section said (#963): the
|
|
106
|
+
* hash of the Rust sources it was built from, `missing` or `malformed`.
|
|
107
|
+
* Absent when the binary was never read (a TypeScript boot, or a load that
|
|
108
|
+
* failed before the binary compiled). Read even when the engine then
|
|
109
|
+
* failed to link, so About can say which build the failed binary was. */
|
|
110
|
+
binary?: BuildMetadataResult;
|
|
111
|
+
}
|
|
112
|
+
export interface EngineBootOptions {
|
|
113
|
+
/** Loads the engine. The signal fires at the time limit; the loader checks
|
|
114
|
+
* it after each step and drops a result that arrives later. `onBuild` gets
|
|
115
|
+
* the binary's build metadata as soon as it is read, so a failure later in
|
|
116
|
+
* the load still reports it. */
|
|
117
|
+
load: (signal: AbortSignal, onBuild: (build: BuildMetadataResult) => void) => Promise<WasmModule>;
|
|
118
|
+
log?: Pick<Console, "error">;
|
|
119
|
+
/** How long the load may take before boot gives up on it (ms). */
|
|
120
|
+
timeoutMs?: number;
|
|
121
|
+
}
|
|
122
|
+
/** The load's limit when the caller sets none. Generous: a first visit on a
|
|
123
|
+
* slow connection downloads the whole engine; an installed game reads it
|
|
124
|
+
* from the precache in milliseconds. Without a limit, a stalled fetch would
|
|
125
|
+
* leave a wasm-only boot on a blank page with no message. */
|
|
126
|
+
export declare const ENGINE_LOAD_TIMEOUT_MS = 90000;
|
|
127
|
+
export interface EngineBootResult {
|
|
128
|
+
module: WasmModule | null;
|
|
129
|
+
state: EngineBootState;
|
|
130
|
+
}
|
|
131
|
+
/** Load the WASM engine for boot. Never throws: a failure is in the state. */
|
|
132
|
+
export declare function loadBootEngine(opts: EngineBootOptions): Promise<EngineBootResult>;
|
|
133
|
+
/** Leave the engine's identity record (#963) for later (#1254). Reading it
|
|
134
|
+
* hashes both catalogs inside the engine, a cost the boot used to pay before
|
|
135
|
+
* the title screen. Boot hands the loaded module over here instead, and the
|
|
136
|
+
* record is read once: when About, Settings or Copy Diagnostics first asks
|
|
137
|
+
* for it (`settleEngineIdentity`), or after the first frame. */
|
|
138
|
+
export declare function deferEngineIdentity(mod: Pick<WasmModule, "engineIdentity">): void;
|
|
139
|
+
/** Read the deferred identity record if it has not been read, and publish it
|
|
140
|
+
* on the boot state. Does nothing once read, or when no engine loaded. */
|
|
141
|
+
export declare function settleEngineIdentity(g?: {
|
|
142
|
+
__vcEngineBoot?: EngineBootState;
|
|
143
|
+
}): void;
|
|
144
|
+
/** Mark a boot that loaded its engine but could not start or keep it. */
|
|
145
|
+
export declare function failBoot(state: EngineBootState, stage: BootStage, reason: FallbackReason, message: string): EngineBootState;
|
|
146
|
+
/** Publish the boot state for tooling, tests and support, with the engine's
|
|
147
|
+
* identity record once it has been read (`settleEngineIdentity`). */
|
|
148
|
+
export declare function publishBootState(state: EngineBootState, g?: {
|
|
149
|
+
__vcEngineBoot?: EngineBootState;
|
|
150
|
+
}): void;
|
|
151
|
+
/** What the player is told when a wasm-only build cannot run its engine: what
|
|
152
|
+
* happened, the reason, and what to try, in order. Plain data, so the boot
|
|
153
|
+
* overlay renders it and the tests read it. */
|
|
154
|
+
export interface EngineFailureCopy {
|
|
155
|
+
headline: string;
|
|
156
|
+
reason: string;
|
|
157
|
+
steps: string[];
|
|
158
|
+
}
|
|
159
|
+
/** What the stop screen knows beyond the failure: whether the page is on a
|
|
160
|
+
* secure connection, and whether it offers Repair engine files. */
|
|
161
|
+
export interface EngineFailureContext {
|
|
162
|
+
secure?: boolean;
|
|
163
|
+
repair?: boolean;
|
|
164
|
+
}
|
|
165
|
+
export declare function engineFailureCopy(failure: EngineBootFailure, online: boolean, context?: EngineFailureContext): EngineFailureCopy;
|
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
import { EnginePackageError } from './enginePackageCheck.js';
|
|
2
|
+
import { readEngineIdentity } from './engineIdentity.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Why the engine fell back (or, in a wasm-only build, stopped), as a code from
|
|
6
|
+
* a closed list. The code is what analytics and the host status report
|
|
7
|
+
* (`engine_status`, `docs/analytics-data-map.md`); the message beside it stays
|
|
8
|
+
* on the console and the boot state and is never put in that event, since an
|
|
9
|
+
* engine message can quote a tower name or a path.
|
|
10
|
+
*
|
|
11
|
+
* Boot sends the first six, plus `other` for a boot step outside the engine
|
|
12
|
+
* that failed after the host took the tower (the host is let go). The
|
|
13
|
+
* runtime fallback (#874) sends the trap codes for a running engine's fault
|
|
14
|
+
* in a command (the undo capture's save just before an edit included), a
|
|
15
|
+
* tick, a frame sync or the event drain, or an undo or redo, and `other` for
|
|
16
|
+
* a save or the reads when a tower is let go. A trap in the engine's save
|
|
17
|
+
* writer (#1205) is `trap-save`, and one in the slot census that loads a save
|
|
18
|
+
* into a short-lived engine (#1612) is `trap-census`.
|
|
19
|
+
*/
|
|
20
|
+
const FALLBACK_REASONS = ["none", "boot-timeout", "boot-error", "package-mismatch", "unverifiable", "attach-refused", "trap-command", "trap-tick", "trap-undo", "trap-save", "trap-census", "other"];
|
|
21
|
+
/** Where a fallback happened: loading the package, starting the host on the
|
|
22
|
+
* first tower, or a later tower the host was handed (a load or a new game,
|
|
23
|
+
* or an undo restore). Closed like {@link FALLBACK_REASONS}. A running
|
|
24
|
+
* engine's fault (#874) takes the stage of how its tower was hosted, so the
|
|
25
|
+
* trap code says which path failed and the stage on which kind of tower. */
|
|
26
|
+
const FALLBACK_STAGES = ["none", "load", "start", "adopt", "undo"];
|
|
27
|
+
/** A boot failure that already knows its code: the load's time limit, a
|
|
28
|
+
* package that does not match this shell. Anything else on the way to a
|
|
29
|
+
* running engine is `boot-error` (see {@link bootFailureReason}). */
|
|
30
|
+
class EngineBootError extends Error {
|
|
31
|
+
constructor(reason, message, pkg) {
|
|
32
|
+
super(message);
|
|
33
|
+
this.name = "EngineBootError";
|
|
34
|
+
this.reason = reason;
|
|
35
|
+
if (pkg)
|
|
36
|
+
this.package = pkg;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
/** The message a wasm-only build logs and records when the package has no
|
|
40
|
+
* save writer. It reads as a developer note, so the screen words the cause
|
|
41
|
+
* from the failure's `cause` instead. */
|
|
42
|
+
const NO_SAVE_WRITER_MESSAGE = "the engine package has no save writer (encodeVctower); rebuild it";
|
|
43
|
+
/** The codes a failed load can carry: the rest of the closed list is for a
|
|
44
|
+
* fault in a running engine or for no fault at all. */
|
|
45
|
+
const LOAD_FAILURE_REASONS = ["boot-error", "package-mismatch", "unverifiable", "boot-timeout"];
|
|
46
|
+
const PACKAGE_KINDS = ["mismatch", "load-failed", "unverifiable"];
|
|
47
|
+
const PACKAGE_FILES = ["glue", "wasm", "build-record"];
|
|
48
|
+
const hexId = (v) => (typeof v === "string" && /^[0-9a-f]{12}$/.test(v) ? v : null);
|
|
49
|
+
/** A package detail that came across a worker message, rebuilt from known
|
|
50
|
+
* values only: the kind and file from their lists, the ids as 12 hex digits.
|
|
51
|
+
* Anything else is dropped, so the boot state never carries free text from a
|
|
52
|
+
* message. Undefined when there is no usable kind. */
|
|
53
|
+
function cleanPackageFailure(raw) {
|
|
54
|
+
if (typeof raw !== "object" || raw === null)
|
|
55
|
+
return undefined;
|
|
56
|
+
const p = raw;
|
|
57
|
+
if (typeof p.kind !== "string" || !PACKAGE_KINDS.includes(p.kind))
|
|
58
|
+
return undefined;
|
|
59
|
+
return {
|
|
60
|
+
kind: p.kind,
|
|
61
|
+
file: typeof p.file === "string" && PACKAGE_FILES.includes(p.file) ? p.file : null,
|
|
62
|
+
expected: hexId(p.expected),
|
|
63
|
+
found: hexId(p.found),
|
|
64
|
+
expectedPackage: hexId(p.expectedPackage),
|
|
65
|
+
servedPackage: hexId(p.servedPackage),
|
|
66
|
+
controlled: p.controlled === true,
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
/** A worker's account of the binary's build section, rebuilt from known
|
|
70
|
+
* values (a state from the list, a 64-digit hash, a short reason), so the
|
|
71
|
+
* boot state never carries free text from a message. Undefined for anything
|
|
72
|
+
* else. */
|
|
73
|
+
function cleanBuildMetadata(raw) {
|
|
74
|
+
if (typeof raw !== "object" || raw === null)
|
|
75
|
+
return undefined;
|
|
76
|
+
const b = raw;
|
|
77
|
+
if (b.state === "missing")
|
|
78
|
+
return { state: "missing" };
|
|
79
|
+
if (b.state === "ok")
|
|
80
|
+
return typeof b.sourceHash === "string" && /^[0-9a-f]{64}$/.test(b.sourceHash) ? { state: "ok", sourceHash: b.sourceHash } : undefined;
|
|
81
|
+
if (b.state === "malformed")
|
|
82
|
+
return { state: "malformed", why: typeof b.why === "string" ? b.why.slice(0, 120) : "" };
|
|
83
|
+
return undefined;
|
|
84
|
+
}
|
|
85
|
+
/** The code for a refused package. A set that disagrees with the shell is a
|
|
86
|
+
* mismatch, a browser that cannot hash the files is `unverifiable` (the files
|
|
87
|
+
* may be fine; neither sits in the fault rate), and files that did not arrive
|
|
88
|
+
* are a `boot-error`. */
|
|
89
|
+
function packageFailureReason(kind) {
|
|
90
|
+
if (kind === "mismatch")
|
|
91
|
+
return "package-mismatch";
|
|
92
|
+
return kind === "unverifiable" ? "unverifiable" : "boot-error";
|
|
93
|
+
}
|
|
94
|
+
/** The code for a failure on the way to a running engine. A glue and binary
|
|
95
|
+
* from different builds fail to link: that is a package mismatch, and the
|
|
96
|
+
* engine itself may be sound. Every other untyped failure is `boot-error`. */
|
|
97
|
+
function bootFailureReason(e) {
|
|
98
|
+
if (e instanceof EngineBootError)
|
|
99
|
+
return e.reason;
|
|
100
|
+
if (e instanceof EnginePackageError)
|
|
101
|
+
return packageFailureReason(e.kind);
|
|
102
|
+
if (typeof WebAssembly !== "undefined" && e instanceof WebAssembly.LinkError)
|
|
103
|
+
return "package-mismatch";
|
|
104
|
+
return "boot-error";
|
|
105
|
+
}
|
|
106
|
+
/** The package detail of a failure, when the byte check refused the package. */
|
|
107
|
+
function packageFailureOf(e) {
|
|
108
|
+
if (e instanceof EnginePackageError)
|
|
109
|
+
return { kind: e.kind, ...e.detail };
|
|
110
|
+
if (e instanceof EngineBootError)
|
|
111
|
+
return e.package;
|
|
112
|
+
return undefined;
|
|
113
|
+
}
|
|
114
|
+
const messageOf = (e) => (e instanceof Error ? e.message : String(e));
|
|
115
|
+
/** A boot failure built from what was thrown. */
|
|
116
|
+
function bootFailure(stage, e) {
|
|
117
|
+
const pkg = packageFailureOf(e);
|
|
118
|
+
return { stage, reason: bootFailureReason(e), message: messageOf(e), ...(pkg ? { package: pkg } : {}) };
|
|
119
|
+
}
|
|
120
|
+
/** The load's limit when the caller sets none. Generous: a first visit on a
|
|
121
|
+
* slow connection downloads the whole engine; an installed game reads it
|
|
122
|
+
* from the precache in milliseconds. Without a limit, a stalled fetch would
|
|
123
|
+
* leave a wasm-only boot on a blank page with no message. */
|
|
124
|
+
const ENGINE_LOAD_TIMEOUT_MS = 90000;
|
|
125
|
+
function withTimeout(work, ms, expire) {
|
|
126
|
+
return new Promise((done, fail) => {
|
|
127
|
+
const seconds = Math.round(ms / 1000);
|
|
128
|
+
const timer = setTimeout(() => {
|
|
129
|
+
// The attempt is terminal before the timeout is published.
|
|
130
|
+
expire();
|
|
131
|
+
fail(new EngineBootError("boot-timeout", `the engine package did not load within ${seconds} ${seconds === 1 ? "second" : "seconds"}`));
|
|
132
|
+
}, ms);
|
|
133
|
+
work.then((v) => {
|
|
134
|
+
clearTimeout(timer);
|
|
135
|
+
done(v);
|
|
136
|
+
}, (e) => {
|
|
137
|
+
clearTimeout(timer);
|
|
138
|
+
fail(e);
|
|
139
|
+
});
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
/** Load the WASM engine for boot. Never throws: a failure is in the state. */
|
|
143
|
+
async function loadBootEngine(opts) {
|
|
144
|
+
const log = opts.log ?? console;
|
|
145
|
+
const build = "wasm-only";
|
|
146
|
+
let mod;
|
|
147
|
+
let binary;
|
|
148
|
+
const binaryField = () => (binary === undefined ? {} : { binary });
|
|
149
|
+
try {
|
|
150
|
+
const attempt = new AbortController();
|
|
151
|
+
mod = await withTimeout(opts.load(attempt.signal, (b) => (binary = b)), opts.timeoutMs ?? ENGINE_LOAD_TIMEOUT_MS, () => attempt.abort());
|
|
152
|
+
}
|
|
153
|
+
catch (e) {
|
|
154
|
+
log.error("[wasm] the engine package did not load, and this build has no other engine:", e);
|
|
155
|
+
return { module: null, state: { build, engine: "none", failure: bootFailure("load", e), ...binaryField() } };
|
|
156
|
+
}
|
|
157
|
+
// Saves go through the engine's own writer (#935), so a package without one
|
|
158
|
+
// cannot run the game.
|
|
159
|
+
if (!mod.encodeVctower) {
|
|
160
|
+
const message = NO_SAVE_WRITER_MESSAGE;
|
|
161
|
+
log.error(`[wasm] ${message}`);
|
|
162
|
+
return { module: null, state: { build, engine: "none", failure: { stage: "load", reason: "package-mismatch", message, cause: "no-save-writer" }, ...binaryField() } };
|
|
163
|
+
}
|
|
164
|
+
return { module: mod, state: { build, engine: "wasm", failure: null, ...binaryField() } };
|
|
165
|
+
}
|
|
166
|
+
/** The loaded engine's identity read, until it runs (`deferEngineIdentity`). */
|
|
167
|
+
let pendingIdentity = null;
|
|
168
|
+
/** The identity record once read; publishBootState carries it from then on. */
|
|
169
|
+
let settledIdentity;
|
|
170
|
+
/** Leave the engine's identity record (#963) for later (#1254). Reading it
|
|
171
|
+
* hashes both catalogs inside the engine, a cost the boot used to pay before
|
|
172
|
+
* the title screen. Boot hands the loaded module over here instead, and the
|
|
173
|
+
* record is read once: when About, Settings or Copy Diagnostics first asks
|
|
174
|
+
* for it (`settleEngineIdentity`), or after the first frame. */
|
|
175
|
+
function deferEngineIdentity(mod) {
|
|
176
|
+
pendingIdentity = () => readEngineIdentity(mod);
|
|
177
|
+
settledIdentity = undefined;
|
|
178
|
+
}
|
|
179
|
+
/** Read the deferred identity record if it has not been read, and publish it
|
|
180
|
+
* on the boot state. Does nothing once read, or when no engine loaded. */
|
|
181
|
+
function settleEngineIdentity(g = globalThis) {
|
|
182
|
+
const read = pendingIdentity;
|
|
183
|
+
if (!read)
|
|
184
|
+
return;
|
|
185
|
+
pendingIdentity = null;
|
|
186
|
+
settledIdentity = read();
|
|
187
|
+
if (g.__vcEngineBoot)
|
|
188
|
+
publishBootState(g.__vcEngineBoot, g);
|
|
189
|
+
}
|
|
190
|
+
/** Mark a boot that loaded its engine but could not start or keep it. */
|
|
191
|
+
function failBoot(state, stage, reason, message) {
|
|
192
|
+
return { ...state, engine: "none", failure: { stage, reason, message } };
|
|
193
|
+
}
|
|
194
|
+
/** Publish the boot state for tooling, tests and support, with the engine's
|
|
195
|
+
* identity record once it has been read (`settleEngineIdentity`). */
|
|
196
|
+
function publishBootState(state, g = globalThis) {
|
|
197
|
+
g.__vcEngineBoot = settledIdentity === undefined || state.identity !== undefined ? state : { ...state, identity: settledIdentity };
|
|
198
|
+
}
|
|
199
|
+
const FILE_LABEL = { glue: "the engine glue file", wasm: "the engine binary", "build-record": "the build record" };
|
|
200
|
+
/** The sentence the player reads for a refused or failed engine load (#985),
|
|
201
|
+
* one per cause, from the failure's code, cause and package detail. Every
|
|
202
|
+
* failure at the load stage has one; a start or host failure has none and
|
|
203
|
+
* its message stands. */
|
|
204
|
+
function loadFailureSentence(failure, online, secure) {
|
|
205
|
+
if (failure.stage !== "load")
|
|
206
|
+
return null;
|
|
207
|
+
const pkg = failure.package;
|
|
208
|
+
if (failure.cause === "no-save-writer")
|
|
209
|
+
return "The engine cannot save towers. Reload after the game is updated.";
|
|
210
|
+
if (failure.reason === "boot-timeout")
|
|
211
|
+
return "The engine took too long to load. Try Reload when your connection is ready.";
|
|
212
|
+
if (failure.reason === "unverifiable" || pkg?.kind === "unverifiable") {
|
|
213
|
+
return secure ? "This browser could not check the engine files. Try Reload, or try another browser." : "This browser connection cannot verify the engine files. Open the game using HTTPS.";
|
|
214
|
+
}
|
|
215
|
+
if (failure.reason === "package-mismatch" && pkg?.kind !== "load-failed") {
|
|
216
|
+
const id = (v) => v ?? "unavailable";
|
|
217
|
+
// The same package id on both sides means one file differs from the record.
|
|
218
|
+
const detail = pkg?.expectedPackage && pkg.expectedPackage === pkg.servedPackage
|
|
219
|
+
? `${FILE_LABEL[pkg.file ?? ""] ?? "an engine file"} differs from the record`
|
|
220
|
+
: `expected ${id(pkg?.expectedPackage)}, found ${id(pkg?.servedPackage)}`;
|
|
221
|
+
return `The engine files do not match this version of the game. The engine was not started. (${detail})`;
|
|
222
|
+
}
|
|
223
|
+
if (pkg?.kind === "load-failed" && pkg.expectedPackage === null) {
|
|
224
|
+
return "The engine files could not be loaded. This version of the game was published without them, so a corrected deployment is needed.";
|
|
225
|
+
}
|
|
226
|
+
return online ? "The engine files could not be loaded. Try Reload." : "The engine files could not be loaded. Connect to the internet and try Reload.";
|
|
227
|
+
}
|
|
228
|
+
function engineFailureCopy(failure, online, context = {}) {
|
|
229
|
+
const { secure = true, repair = false } = context;
|
|
230
|
+
const host = failure.stage === "host";
|
|
231
|
+
const headline = host ? "The game engine stopped running this tower, so the game has stopped." : "The game engine could not start, so the game cannot run.";
|
|
232
|
+
const sentence = loadFailureSentence(failure, online, secure);
|
|
233
|
+
// Over an insecure connection a reload cannot help; the first step is HTTPS.
|
|
234
|
+
const insecure = failure.stage === "load" && !secure && (failure.reason === "unverifiable" || failure.package?.kind === "unverifiable");
|
|
235
|
+
let first = "Reload the page to try again. Your saved towers stay in this browser.";
|
|
236
|
+
if (host)
|
|
237
|
+
first = "Reload the page to continue from your last save. Changes since that save may be lost.";
|
|
238
|
+
else if (insecure)
|
|
239
|
+
first = "Open the game using HTTPS, then reload. Your saved towers stay in this browser.";
|
|
240
|
+
const steps = [first];
|
|
241
|
+
if (repair) {
|
|
242
|
+
steps.push(online
|
|
243
|
+
? "If Reload does not help, press Repair engine files to download a fresh copy, then reload."
|
|
244
|
+
: "Connect to the internet before repairing engine files. Then press Repair engine files and reload.");
|
|
245
|
+
}
|
|
246
|
+
if (!online && !insecure) {
|
|
247
|
+
steps.push("You appear to be offline. If the game was updated since this device last opened it, connect to the internet and reload once so the new engine can download.");
|
|
248
|
+
}
|
|
249
|
+
steps.push("If it keeps happening, update your browser or try another one.");
|
|
250
|
+
return { headline, reason: sentence ?? failure.message, steps };
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
export { ENGINE_LOAD_TIMEOUT_MS, EngineBootError, FALLBACK_REASONS, FALLBACK_STAGES, LOAD_FAILURE_REASONS, bootFailure, bootFailureReason, cleanBuildMetadata, cleanPackageFailure, deferEngineIdentity, engineFailureCopy, failBoot, loadBootEngine, packageFailureOf, packageFailureReason, publishBootState, settleEngineIdentity };
|
|
254
|
+
//# sourceMappingURL=engineBoot.js.map
|