@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,132 @@
|
|
|
1
|
+
import { type BakedCycles } from "./bakeAdditions";
|
|
2
|
+
import type { Job } from "./catalog";
|
|
3
|
+
import type { PaintSpec } from "./paint";
|
|
4
|
+
import { type Image } from "./pixels";
|
|
5
|
+
import { ImageStore, type ImageRef, type PendingRef } from "./store";
|
|
6
|
+
export { ImageStore, type ImageRef, type PendingRef };
|
|
7
|
+
/**
|
|
8
|
+
* Runs the catalog through a renderer: one render per frame, per animation
|
|
9
|
+
* frame and per chain step, then trims, diffs and deduplicates the pixels into
|
|
10
|
+
* a set of unique images plus the records that point at them. Renderer-
|
|
11
|
+
* agnostic: the export runs it in the pinned browser, the unit tests with a
|
|
12
|
+
* fake.
|
|
13
|
+
*/
|
|
14
|
+
export interface Renderer {
|
|
15
|
+
render(spec: PaintSpec, w: number, h: number): Image;
|
|
16
|
+
/**
|
|
17
|
+
* The room's shell picture for a depth-layered frame: the canvas as it stood
|
|
18
|
+
* at the paint's `layerBreak`, with whatever the paint draws after its
|
|
19
|
+
* `layerEnd` drawn over it (`pixelSprites/layers.ts`). Null when the paint
|
|
20
|
+
* marks no break. A renderer without it bakes no depth layers.
|
|
21
|
+
*/
|
|
22
|
+
renderShell?(spec: PaintSpec, w: number, h: number): Image | null;
|
|
23
|
+
/**
|
|
24
|
+
* The room's furniture painted onto a transparent canvas from the paint's
|
|
25
|
+
* `layerBreak` on, so glows and soft shadows keep their own transparency;
|
|
26
|
+
* whatever the paint draws after its `layerEnd` only tints the furniture
|
|
27
|
+
* already there (source-atop), and its `layerShell` art cuts the furniture
|
|
28
|
+
* it covers away (destination-out). Null when the paint marks no break. A
|
|
29
|
+
* renderer without it bakes no soft furniture.
|
|
30
|
+
*/
|
|
31
|
+
renderSoft?(spec: PaintSpec, w: number, h: number): Image | null;
|
|
32
|
+
/**
|
|
33
|
+
* For a frame with a front picture: the canvas at the paint's `layerBreak`
|
|
34
|
+
* (`back`) and at its `layerEnd` (`mid`, the back plus what came between),
|
|
35
|
+
* so what the paint draws after the end is the front. Null when the paint
|
|
36
|
+
* marks no break; with no end, `mid` is the finished paint.
|
|
37
|
+
*/
|
|
38
|
+
renderSplit?(spec: PaintSpec, w: number, h: number): {
|
|
39
|
+
back: Image;
|
|
40
|
+
mid: Image;
|
|
41
|
+
} | null;
|
|
42
|
+
}
|
|
43
|
+
/** A frame's chain split for depth: step `k` of `shell` is what changes on
|
|
44
|
+
* the shell when the input goes from `k - 1` to `k` (a light switching on),
|
|
45
|
+
* step `k` of `furniture` what changes in front of it (the person who sits
|
|
46
|
+
* down). Each list is trimmed on its own; its step 0 is always null. */
|
|
47
|
+
export interface BakedLayerChain {
|
|
48
|
+
shell: (ImageRef | null)[];
|
|
49
|
+
furniture: (ImageRef | null)[];
|
|
50
|
+
/** Steps over the front picture; present along with it. */
|
|
51
|
+
front?: (ImageRef | null)[];
|
|
52
|
+
/** Steps over the soft furniture picture; absent along with it (a
|
|
53
|
+
* translucent pixel that changes, or a failed soft pass). */
|
|
54
|
+
soft?: (ImageRef | null)[];
|
|
55
|
+
}
|
|
56
|
+
/** The frame split for depth. Drawing `shell`, the chain's shell steps,
|
|
57
|
+
* `furniture`, then the chain's furniture steps gives back the frame plus
|
|
58
|
+
* its chain steps exactly, for every input (each list clamped on its own).
|
|
59
|
+
* `soft` is the furniture with its own transparency; over the shell it
|
|
60
|
+
* rounds a step or two away from `furniture`. */
|
|
61
|
+
export interface BakedLayers {
|
|
62
|
+
shell: ImageRef | null;
|
|
63
|
+
furniture: ImageRef | null;
|
|
64
|
+
/** What the paint draws after its furniture that stands in front of it
|
|
65
|
+
* (a cab's door frames, a train's body around its windows): drawn last,
|
|
66
|
+
* over the furniture. Present only for frames that ask for it, which then
|
|
67
|
+
* carry no soft picture. */
|
|
68
|
+
front?: ImageRef | null;
|
|
69
|
+
soft?: ImageRef | null;
|
|
70
|
+
chains?: Record<string, BakedLayerChain>;
|
|
71
|
+
}
|
|
72
|
+
export interface BakedFrame {
|
|
73
|
+
name: string;
|
|
74
|
+
w: number;
|
|
75
|
+
h: number;
|
|
76
|
+
anchor: {
|
|
77
|
+
x: number;
|
|
78
|
+
y: number;
|
|
79
|
+
};
|
|
80
|
+
keys: Record<string, string | number | boolean>;
|
|
81
|
+
image: ImageRef | null;
|
|
82
|
+
/** `alternativeTo` names the chain this one is drawn instead of. */
|
|
83
|
+
chains?: Record<string, {
|
|
84
|
+
input: string;
|
|
85
|
+
steps: (ImageRef | null)[];
|
|
86
|
+
alternativeTo?: string;
|
|
87
|
+
}>;
|
|
88
|
+
overlays?: Record<string, ImageRef | null>;
|
|
89
|
+
/** Looping pictures over the frame (see `StillJob.cycles`); added after
|
|
90
|
+
* the first atlas, so their images are added images. */
|
|
91
|
+
cycles?: BakedCycles;
|
|
92
|
+
/** The frame split for depth (see {@link BakedLayers}). Null pieces are
|
|
93
|
+
* fully transparent. Absent when the paint marks no break. */
|
|
94
|
+
layers?: BakedLayers;
|
|
95
|
+
}
|
|
96
|
+
export interface BakedAnimation {
|
|
97
|
+
name: string;
|
|
98
|
+
dt: number;
|
|
99
|
+
loop: boolean;
|
|
100
|
+
keys: Record<string, string | number | boolean>;
|
|
101
|
+
frames: string[];
|
|
102
|
+
}
|
|
103
|
+
export interface BakeResult {
|
|
104
|
+
/** Unique color images; `normals[i]` is image `i`'s normal map. */
|
|
105
|
+
images: Image[];
|
|
106
|
+
normals: Image[];
|
|
107
|
+
/** Images `0..frameImages - 1` are the ones frames, chains and overlays use,
|
|
108
|
+
* in the order a bake without depth layers stores them; the depth layers'
|
|
109
|
+
* own images come after. The archive packs the two groups apart, so the
|
|
110
|
+
* layers never move a frame image (absent: every image is a frame image). */
|
|
111
|
+
frameImages?: number;
|
|
112
|
+
/** Where the families added after the first atlas begin among the frame
|
|
113
|
+
* images: their new images pack on pages of their own, after the older
|
|
114
|
+
* frame pages, so adding them never moves an older frame image (absent:
|
|
115
|
+
* none). Today that is one group, the scenery; a later family that must
|
|
116
|
+
* not repack it needs a group of its own. The depth layers' pages come
|
|
117
|
+
* last, so those can move when a family is added. */
|
|
118
|
+
groups?: number[];
|
|
119
|
+
/** Images from here on were added to frames that already shipped (an
|
|
120
|
+
* alternative chain, a frame's cycles); the archive packs them after every
|
|
121
|
+
* other page, so they never move an older image (absent: none). */
|
|
122
|
+
addedImages?: number;
|
|
123
|
+
frames: BakedFrame[];
|
|
124
|
+
animations: BakedAnimation[];
|
|
125
|
+
}
|
|
126
|
+
export interface BakeStats {
|
|
127
|
+
/** Layered frames left without soft furniture: an occupant step could not
|
|
128
|
+
* be drawn over it source-over (it would change a translucent pixel), or
|
|
129
|
+
* the soft pass failed or gave no picture. */
|
|
130
|
+
softDropped: string[];
|
|
131
|
+
}
|
|
132
|
+
export declare function bake(jobs: readonly Job[], r: Renderer, onProgress?: (done: number, total: number) => void, stats?: BakeStats): BakeResult;
|
|
@@ -0,0 +1,331 @@
|
|
|
1
|
+
import { bakeCycles, checkCycles } from './bakeAdditions.js';
|
|
2
|
+
import { over, sameImage, diffLayer, LayerError, trim } from './pixels.js';
|
|
3
|
+
import { ImageStore, LayerStore, AddedStore } from './store.js';
|
|
4
|
+
|
|
5
|
+
/** Drop trailing empty steps so `max` is the last step that changes pixels.
|
|
6
|
+
* The catalog sizes each chain to the largest count the engine produces, so
|
|
7
|
+
* steps past `max` look the same as `max`. */
|
|
8
|
+
function trimSteps(steps) {
|
|
9
|
+
let n = steps.length;
|
|
10
|
+
while (n > 1 && steps[n - 1] === null)
|
|
11
|
+
n--;
|
|
12
|
+
return steps.slice(0, n);
|
|
13
|
+
}
|
|
14
|
+
/** The furniture picture for one step of a layered frame: the flat frame's
|
|
15
|
+
* pixels wherever they differ from the shell, kept wherever an earlier
|
|
16
|
+
* step's picture already had a pixel (so a step only ever adds or paints
|
|
17
|
+
* over, which source-over can draw), transparent elsewhere. */
|
|
18
|
+
function furniturePicture(prev, flat, shell) {
|
|
19
|
+
const out = { w: flat.w, h: flat.h, data: new Uint8ClampedArray(flat.data.length) };
|
|
20
|
+
const a = flat.data;
|
|
21
|
+
const b = shell.data;
|
|
22
|
+
for (let i = 0; i < a.length; i += 4) {
|
|
23
|
+
const differs = a[i] !== b[i] || a[i + 1] !== b[i + 1] || a[i + 2] !== b[i + 2] || a[i + 3] !== b[i + 3];
|
|
24
|
+
if (differs || (prev && prev.data[i + 3] !== 0))
|
|
25
|
+
out.data.set(a.subarray(i, i + 4), i);
|
|
26
|
+
}
|
|
27
|
+
return out;
|
|
28
|
+
}
|
|
29
|
+
/** True when `top` drawn source-over onto `under` gives `want` exactly. */
|
|
30
|
+
function composesTo(under, top, want) {
|
|
31
|
+
const out = { w: under.w, h: under.h, data: under.data.slice() };
|
|
32
|
+
over(out, top, 0, 0);
|
|
33
|
+
return sameImage(out, want);
|
|
34
|
+
}
|
|
35
|
+
/** Drop trailing nulls from a depth step list (each list on its own). */
|
|
36
|
+
function trimPending(steps) {
|
|
37
|
+
let n = steps.length;
|
|
38
|
+
while (n > 1 && steps[n - 1] === null)
|
|
39
|
+
n--;
|
|
40
|
+
return steps.slice(0, n);
|
|
41
|
+
}
|
|
42
|
+
function bake(jobs, r, onProgress, stats) {
|
|
43
|
+
const store = new ImageStore();
|
|
44
|
+
const layerStore = new LayerStore(store);
|
|
45
|
+
const added = new AddedStore(store, layerStore.own);
|
|
46
|
+
const withCycles = [];
|
|
47
|
+
const pending = [];
|
|
48
|
+
const frames = [];
|
|
49
|
+
const animations = [];
|
|
50
|
+
const names = new Set();
|
|
51
|
+
const claim = (name) => {
|
|
52
|
+
if (names.has(name))
|
|
53
|
+
throw new Error(`duplicate frame name ${name}`);
|
|
54
|
+
names.add(name);
|
|
55
|
+
};
|
|
56
|
+
/** The split of a frame's own paint: its shell and furniture, stored at
|
|
57
|
+
* once, and (when the soft pass gives one) its soft picture, which the
|
|
58
|
+
* caller stores only once every step has one, so a dropped soft picture
|
|
59
|
+
* leaves nothing on the pages. A soft pass that fails gives none. */
|
|
60
|
+
const splitBase = (spec, w, h, base, shell) => {
|
|
61
|
+
const layers = { shell: layerStore.shell(shell), furniture: layerStore.piece(diffLayer(shell, base), base) };
|
|
62
|
+
let soft = null;
|
|
63
|
+
try {
|
|
64
|
+
soft = r.renderSoft ? r.renderSoft(spec, w, h) : null;
|
|
65
|
+
}
|
|
66
|
+
catch (e) {
|
|
67
|
+
if (!(e instanceof LayerError))
|
|
68
|
+
throw e;
|
|
69
|
+
}
|
|
70
|
+
return { layers, softBase: soft ? { image: soft, piece: trim(soft) } : null };
|
|
71
|
+
};
|
|
72
|
+
const groups = [];
|
|
73
|
+
let ownPages = false;
|
|
74
|
+
jobs.forEach((job, done) => {
|
|
75
|
+
onProgress?.(done, jobs.length);
|
|
76
|
+
// A family on pages of its own starts a new image group whenever its
|
|
77
|
+
// `ownPages` value changes (keep each family's jobs together); one that
|
|
78
|
+
// does not may not come after it, or its images would land in the group.
|
|
79
|
+
if (job.ownPages && job.ownPages !== ownPages)
|
|
80
|
+
groups.push(store.images.length);
|
|
81
|
+
if (ownPages && !job.ownPages)
|
|
82
|
+
throw new Error(`${job.name} comes after a family on pages of its own`);
|
|
83
|
+
if (job.ownPages)
|
|
84
|
+
ownPages = job.ownPages;
|
|
85
|
+
if (job.type === "anim") {
|
|
86
|
+
const frameNames = job.frames.map((spec, i) => {
|
|
87
|
+
const name = `${job.name}/${i}`;
|
|
88
|
+
claim(name);
|
|
89
|
+
const base = r.render(spec, job.w, job.h);
|
|
90
|
+
const frame = { name, w: job.w, h: job.h, anchor: job.anchor, keys: { ...job.keys, frame: i }, image: store.ref(base) };
|
|
91
|
+
// An animation frame splits like a still with no chain.
|
|
92
|
+
try {
|
|
93
|
+
const shell = job.layers && r.renderShell ? r.renderShell(spec, job.w, job.h) : null;
|
|
94
|
+
// Unlike a room (whose vacancy card or shutter paints flat), every
|
|
95
|
+
// frame of an animation that asks for layers must split.
|
|
96
|
+
if (job.layers && r.renderShell && !shell)
|
|
97
|
+
throw new LayerError("marks no layer break");
|
|
98
|
+
if (shell) {
|
|
99
|
+
const { layers, softBase } = splitBase(spec, job.w, job.h, base, shell);
|
|
100
|
+
if (softBase)
|
|
101
|
+
layers.soft = layerStore.piece(softBase.piece, base);
|
|
102
|
+
else if (r.renderSoft)
|
|
103
|
+
stats?.softDropped.push(name);
|
|
104
|
+
pending.push({ frame, layers });
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
catch (e) {
|
|
108
|
+
if (e instanceof LayerError)
|
|
109
|
+
throw new LayerError(`${name}: ${e.message}`);
|
|
110
|
+
throw e;
|
|
111
|
+
}
|
|
112
|
+
frames.push(frame);
|
|
113
|
+
return name;
|
|
114
|
+
});
|
|
115
|
+
animations.push({ name: job.name, dt: job.dt, loop: job.loop, keys: job.keys, frames: frameNames });
|
|
116
|
+
return;
|
|
117
|
+
}
|
|
118
|
+
claim(job.name);
|
|
119
|
+
const base = r.render(job.paint, job.w, job.h);
|
|
120
|
+
const frame = { name: job.name, w: job.w, h: job.h, anchor: job.anchor, keys: job.keys, image: store.ref(base) };
|
|
121
|
+
try {
|
|
122
|
+
// The flat chains, exactly as before; their renders are kept for the
|
|
123
|
+
// depth split below.
|
|
124
|
+
const chainRenders = {};
|
|
125
|
+
for (const [key, chain] of Object.entries(job.chains ?? {})) {
|
|
126
|
+
const steps = [null];
|
|
127
|
+
const renders = [base];
|
|
128
|
+
let prev = base;
|
|
129
|
+
for (let k = 1; k < chain.steps.length; k++) {
|
|
130
|
+
const cur = r.render(chain.steps[k], job.w, job.h);
|
|
131
|
+
// An alternative chain came after the first atlas: added images.
|
|
132
|
+
steps.push(chain.alternativeTo ? added.piece(diffLayer(prev, cur), cur) : store.layer(diffLayer(prev, cur), cur));
|
|
133
|
+
renders.push(cur);
|
|
134
|
+
prev = cur;
|
|
135
|
+
}
|
|
136
|
+
(frame.chains ?? (frame.chains = {}))[key] = { input: chain.input, steps: trimSteps(steps), ...(chain.alternativeTo ? { alternativeTo: chain.alternativeTo } : {}) };
|
|
137
|
+
chainRenders[key] = renders;
|
|
138
|
+
}
|
|
139
|
+
for (const [key, spec] of Object.entries(job.overlays ?? {})) {
|
|
140
|
+
const next = r.render(spec, job.w, job.h);
|
|
141
|
+
(frame.overlays ?? (frame.overlays = {}))[key] = store.layer(diffLayer(base, next), next);
|
|
142
|
+
}
|
|
143
|
+
const cycles = bakeCycles(job, base, r, added);
|
|
144
|
+
if (cycles) {
|
|
145
|
+
frame.cycles = cycles;
|
|
146
|
+
withCycles.push(job);
|
|
147
|
+
}
|
|
148
|
+
// A vehicle splits three ways: the back (the interior seen through its
|
|
149
|
+
// windows), the riders, then the front (the body and frames around
|
|
150
|
+
// them), each what differs from the picture before it.
|
|
151
|
+
if (job.front && !job.layers)
|
|
152
|
+
throw new LayerError("a front picture needs layers");
|
|
153
|
+
// A renderer that splits for depth must split a vehicle three ways.
|
|
154
|
+
if (job.front && r.renderShell && !r.renderSplit)
|
|
155
|
+
throw new LayerError("the renderer cannot split a front picture");
|
|
156
|
+
const split3 = job.front && r.renderSplit ? r.renderSplit(job.paint, job.w, job.h) : null;
|
|
157
|
+
if (job.front && r.renderSplit && !split3)
|
|
158
|
+
throw new LayerError("marks no layer break");
|
|
159
|
+
if (split3) {
|
|
160
|
+
if (primaryChains(job) > 1)
|
|
161
|
+
throw new LayerError("depth layers need at most one chain");
|
|
162
|
+
// The three-way split walks one chain from the base; an alternative
|
|
163
|
+
// would start from the first chain's last step.
|
|
164
|
+
if (Object.values(job.chains ?? {}).some((c) => c.alternativeTo))
|
|
165
|
+
throw new LayerError("a vehicle cannot carry an alternative chain");
|
|
166
|
+
const three = (prev, flat, s) => {
|
|
167
|
+
const furniture = furniturePicture(prev?.furniture ?? null, s.mid, s.back);
|
|
168
|
+
const front = furniturePicture(prev?.front ?? null, flat, s.mid);
|
|
169
|
+
if (!composesTo(s.back, furniture, s.mid) || !composesTo(s.mid, front, flat))
|
|
170
|
+
throw new LayerError("back, furniture and front do not compose to the frame");
|
|
171
|
+
return { back: s.back, furniture, front };
|
|
172
|
+
};
|
|
173
|
+
let prev = three(null, base, split3);
|
|
174
|
+
// A vehicle's front is never empty (its frames or body); one would mean
|
|
175
|
+
// its paint ends the furniture after drawing them.
|
|
176
|
+
if (trim(prev.front) === null)
|
|
177
|
+
throw new LayerError("a vehicle with an empty front");
|
|
178
|
+
const layers = { shell: layerStore.shell(prev.back), furniture: layerStore.piece(trim(prev.furniture), base), front: layerStore.piece(trim(prev.front), base) };
|
|
179
|
+
for (const [key, chain] of Object.entries(job.chains ?? {})) {
|
|
180
|
+
const renders = chainRenders[key];
|
|
181
|
+
const depth = chain.alternativeTo ? added : layerStore;
|
|
182
|
+
const out = { shell: [null], furniture: [null], front: [null] };
|
|
183
|
+
for (let k = 1; k < chain.steps.length; k++) {
|
|
184
|
+
const sk = r.renderSplit(chain.steps[k], job.w, job.h);
|
|
185
|
+
if (!sk)
|
|
186
|
+
throw new LayerError(`chain ${key} step ${k} marks no layer break`);
|
|
187
|
+
const next = three(prev, renders[k], sk);
|
|
188
|
+
out.shell.push(depth.piece(diffLayer(prev.back, next.back), next.back));
|
|
189
|
+
out.furniture.push(depth.piece(diffLayer(prev.furniture, next.furniture), renders[k]));
|
|
190
|
+
out.front.push(depth.piece(diffLayer(prev.front, next.front), renders[k]));
|
|
191
|
+
prev = next;
|
|
192
|
+
}
|
|
193
|
+
(layers.chains ?? (layers.chains = {}))[key] = { shell: trimPending(out.shell), furniture: trimPending(out.furniture), front: trimPending(out.front) };
|
|
194
|
+
}
|
|
195
|
+
pending.push({ frame, layers });
|
|
196
|
+
frames.push(frame);
|
|
197
|
+
return;
|
|
198
|
+
}
|
|
199
|
+
// The depth split: the furniture is what differs from the shell, so the
|
|
200
|
+
// shell plus the furniture gives back `base` exactly (diffLayer refuses
|
|
201
|
+
// any pixel source-over could not reproduce).
|
|
202
|
+
const shell = job.layers && r.renderShell ? r.renderShell(job.paint, job.w, job.h) : null;
|
|
203
|
+
if (shell) {
|
|
204
|
+
// At most one chain: the draw order the manifest documents (and the
|
|
205
|
+
// checks that prove it) covers one; overlays draw last, in front.
|
|
206
|
+
if (primaryChains(job) > 1)
|
|
207
|
+
throw new LayerError("depth layers need at most one chain");
|
|
208
|
+
const { layers, softBase } = splitBase(job.paint, job.w, job.h, base, shell);
|
|
209
|
+
const soft0 = softBase?.image ?? null;
|
|
210
|
+
let softOk = softBase !== null;
|
|
211
|
+
const softSteps = {};
|
|
212
|
+
// Each chain step splits the same way: what changes on the shell (a
|
|
213
|
+
// light that switches on with the first occupant) and what changes in
|
|
214
|
+
// front of it (the occupant).
|
|
215
|
+
for (const [key, chain] of Object.entries(job.chains ?? {})) {
|
|
216
|
+
const renders = chainRenders[key];
|
|
217
|
+
const depth = chain.alternativeTo ? added : layerStore;
|
|
218
|
+
const split = { shell: [null], furniture: [null] };
|
|
219
|
+
let prevShell = shell;
|
|
220
|
+
let prevFurniture = furniturePicture(null, base, shell);
|
|
221
|
+
let prevSoft = soft0;
|
|
222
|
+
const softList = (softSteps[key] = []);
|
|
223
|
+
for (let k = 1; k < chain.steps.length; k++) {
|
|
224
|
+
const cur = renders[k];
|
|
225
|
+
const shellK = r.renderShell(chain.steps[k], job.w, job.h);
|
|
226
|
+
if (!shellK)
|
|
227
|
+
throw new LayerError(`chain ${key} step ${k} marks no layer break`);
|
|
228
|
+
const furnitureK = furniturePicture(prevFurniture, cur, shellK);
|
|
229
|
+
if (!composesTo(shellK, furnitureK, cur))
|
|
230
|
+
throw new LayerError(`chain ${key} step ${k}: shell and furniture do not compose to the frame`);
|
|
231
|
+
split.shell.push(depth.piece(diffLayer(prevShell, shellK), shellK));
|
|
232
|
+
split.furniture.push(depth.piece(diffLayer(prevFurniture, furnitureK), cur));
|
|
233
|
+
if (softOk && prevSoft) {
|
|
234
|
+
try {
|
|
235
|
+
const softK = r.renderSoft(chain.steps[k], job.w, job.h);
|
|
236
|
+
if (!softK)
|
|
237
|
+
throw new LayerError("no soft picture");
|
|
238
|
+
softList.push({ piece: diffLayer(prevSoft, softK), next: cur });
|
|
239
|
+
prevSoft = softK;
|
|
240
|
+
}
|
|
241
|
+
catch (e) {
|
|
242
|
+
if (!(e instanceof LayerError))
|
|
243
|
+
throw e;
|
|
244
|
+
// An alternative came after the frame shipped: letting it drop
|
|
245
|
+
// the frame's soft furniture would change older data.
|
|
246
|
+
if (chain.alternativeTo)
|
|
247
|
+
throw new LayerError(`chain ${key} step ${k}: an alternative chain's soft step fails (${e.message})`);
|
|
248
|
+
softOk = false;
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
prevShell = shellK;
|
|
252
|
+
prevFurniture = furnitureK;
|
|
253
|
+
}
|
|
254
|
+
(layers.chains ?? (layers.chains = {}))[key] = { shell: trimPending(split.shell), furniture: trimPending(split.furniture) };
|
|
255
|
+
}
|
|
256
|
+
if (softOk && softBase) {
|
|
257
|
+
layers.soft = layerStore.piece(softBase.piece, base);
|
|
258
|
+
for (const [key, list] of Object.entries(softSteps)) {
|
|
259
|
+
const depth = job.chains?.[key].alternativeTo ? added : layerStore;
|
|
260
|
+
layers.chains[key].soft = trimPending([null, ...list.map((s) => depth.piece(s.piece, s.next))]);
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
else if (r.renderSoft) {
|
|
264
|
+
// A soft picture without composable steps would mislead; drop it.
|
|
265
|
+
stats?.softDropped.push(job.name);
|
|
266
|
+
}
|
|
267
|
+
pending.push({ frame, layers });
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
catch (e) {
|
|
271
|
+
if (e instanceof LayerError)
|
|
272
|
+
throw new LayerError(`${job.name}: ${e.message}`);
|
|
273
|
+
throw e;
|
|
274
|
+
}
|
|
275
|
+
frames.push(frame);
|
|
276
|
+
});
|
|
277
|
+
onProgress?.(jobs.length, jobs.length);
|
|
278
|
+
// The layer store's own images go after the frame images, and the added
|
|
279
|
+
// images after those.
|
|
280
|
+
const frameImages = store.images.length;
|
|
281
|
+
added.finish(frameImages, layerStore.own.images.length);
|
|
282
|
+
// The added flat references are final now; keep them plain like the rest.
|
|
283
|
+
const plain = (ref) => (ref ? { id: ref.id, dx: ref.dx, dy: ref.dy } : null);
|
|
284
|
+
for (const f of frames) {
|
|
285
|
+
for (const c of Object.values(f.chains ?? {}))
|
|
286
|
+
if (c.alternativeTo)
|
|
287
|
+
c.steps = c.steps.map(plain);
|
|
288
|
+
for (const c of Object.values(f.cycles ?? {}))
|
|
289
|
+
c.steps = c.steps.map(plain);
|
|
290
|
+
}
|
|
291
|
+
const resolve = (ref) => (ref ? { id: ref.own ? ref.id + frameImages : ref.id, dx: ref.dx, dy: ref.dy } : null);
|
|
292
|
+
for (const { frame, layers: p } of pending) {
|
|
293
|
+
const layers = { shell: resolve(p.shell), furniture: resolve(p.furniture) };
|
|
294
|
+
if ("soft" in p)
|
|
295
|
+
layers.soft = resolve(p.soft ?? null);
|
|
296
|
+
if ("front" in p)
|
|
297
|
+
layers.front = resolve(p.front ?? null);
|
|
298
|
+
if (p.chains) {
|
|
299
|
+
layers.chains = {};
|
|
300
|
+
for (const [key, c] of Object.entries(p.chains)) {
|
|
301
|
+
const out = { shell: c.shell.map(resolve), furniture: c.furniture.map(resolve) };
|
|
302
|
+
if (c.soft)
|
|
303
|
+
out.soft = c.soft.map(resolve);
|
|
304
|
+
if (c.front)
|
|
305
|
+
out.front = c.front.map(resolve);
|
|
306
|
+
layers.chains[key] = out;
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
frame.layers = layers;
|
|
310
|
+
}
|
|
311
|
+
const addedImages = frameImages + layerStore.own.images.length;
|
|
312
|
+
const result = {
|
|
313
|
+
images: [...store.images, ...layerStore.own.images, ...added.own.images],
|
|
314
|
+
normals: [...store.normals, ...layerStore.own.normals, ...added.own.normals],
|
|
315
|
+
frameImages,
|
|
316
|
+
...(groups.length > 0 ? { groups } : {}),
|
|
317
|
+
...(added.own.images.length > 0 ? { addedImages } : {}),
|
|
318
|
+
frames,
|
|
319
|
+
animations,
|
|
320
|
+
};
|
|
321
|
+
checkCycles(result, r, withCycles);
|
|
322
|
+
return result;
|
|
323
|
+
}
|
|
324
|
+
/** The job's chains that are not alternatives to another; a depth split
|
|
325
|
+
* covers one (each alternative splits the same way, on its own). */
|
|
326
|
+
function primaryChains(job) {
|
|
327
|
+
return Object.values(job.chains ?? {}).filter((c) => !c.alternativeTo).length;
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
export { ImageStore, bake };
|
|
331
|
+
//# sourceMappingURL=bake.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bake.js","sources":["../../../src/render/atlas/bake.ts"],"sourcesContent":["import { bakeCycles, checkCycles, type BakedCycles } from \"./bakeAdditions\";\nimport type { Job, StillJob } from \"./catalog\";\nimport type { PaintSpec } from \"./paint\";\nimport { LayerError, diffLayer, over, sameImage, trim, type Image, type Piece } from \"./pixels\";\nimport { AddedStore, ImageStore, LayerStore, type ImageRef, type PendingRef } from \"./store\";\n\nexport { ImageStore, type ImageRef, type PendingRef };\n\n/**\n * Runs the catalog through a renderer: one render per frame, per animation\n * frame and per chain step, then trims, diffs and deduplicates the pixels into\n * a set of unique images plus the records that point at them. Renderer-\n * agnostic: the export runs it in the pinned browser, the unit tests with a\n * fake.\n */\n\nexport interface Renderer {\n render(spec: PaintSpec, w: number, h: number): Image;\n /**\n * The room's shell picture for a depth-layered frame: the canvas as it stood\n * at the paint's `layerBreak`, with whatever the paint draws after its\n * `layerEnd` drawn over it (`pixelSprites/layers.ts`). Null when the paint\n * marks no break. A renderer without it bakes no depth layers.\n */\n renderShell?(spec: PaintSpec, w: number, h: number): Image | null;\n /**\n * The room's furniture painted onto a transparent canvas from the paint's\n * `layerBreak` on, so glows and soft shadows keep their own transparency;\n * whatever the paint draws after its `layerEnd` only tints the furniture\n * already there (source-atop), and its `layerShell` art cuts the furniture\n * it covers away (destination-out). Null when the paint marks no break. A\n * renderer without it bakes no soft furniture.\n */\n renderSoft?(spec: PaintSpec, w: number, h: number): Image | null;\n /**\n * For a frame with a front picture: the canvas at the paint's `layerBreak`\n * (`back`) and at its `layerEnd` (`mid`, the back plus what came between),\n * so what the paint draws after the end is the front. Null when the paint\n * marks no break; with no end, `mid` is the finished paint.\n */\n renderSplit?(spec: PaintSpec, w: number, h: number): { back: Image; mid: Image } | null;\n}\n\n/** A frame's chain split for depth: step `k` of `shell` is what changes on\n * the shell when the input goes from `k - 1` to `k` (a light switching on),\n * step `k` of `furniture` what changes in front of it (the person who sits\n * down). Each list is trimmed on its own; its step 0 is always null. */\nexport interface BakedLayerChain {\n shell: (ImageRef | null)[];\n furniture: (ImageRef | null)[];\n /** Steps over the front picture; present along with it. */\n front?: (ImageRef | null)[];\n /** Steps over the soft furniture picture; absent along with it (a\n * translucent pixel that changes, or a failed soft pass). */\n soft?: (ImageRef | null)[];\n}\n\n/** The frame split for depth. Drawing `shell`, the chain's shell steps,\n * `furniture`, then the chain's furniture steps gives back the frame plus\n * its chain steps exactly, for every input (each list clamped on its own).\n * `soft` is the furniture with its own transparency; over the shell it\n * rounds a step or two away from `furniture`. */\nexport interface BakedLayers {\n shell: ImageRef | null;\n furniture: ImageRef | null;\n /** What the paint draws after its furniture that stands in front of it\n * (a cab's door frames, a train's body around its windows): drawn last,\n * over the furniture. Present only for frames that ask for it, which then\n * carry no soft picture. */\n front?: ImageRef | null;\n soft?: ImageRef | null;\n chains?: Record<string, BakedLayerChain>;\n}\n\nexport interface BakedFrame {\n name: string;\n w: number;\n h: number;\n anchor: { x: number; y: number };\n keys: Record<string, string | number | boolean>;\n image: ImageRef | null;\n /** `alternativeTo` names the chain this one is drawn instead of. */\n chains?: Record<string, { input: string; steps: (ImageRef | null)[]; alternativeTo?: string }>;\n overlays?: Record<string, ImageRef | null>;\n /** Looping pictures over the frame (see `StillJob.cycles`); added after\n * the first atlas, so their images are added images. */\n cycles?: BakedCycles;\n /** The frame split for depth (see {@link BakedLayers}). Null pieces are\n * fully transparent. Absent when the paint marks no break. */\n layers?: BakedLayers;\n}\n\nexport interface BakedAnimation {\n name: string;\n dt: number;\n loop: boolean;\n keys: Record<string, string | number | boolean>;\n frames: string[];\n}\n\nexport interface BakeResult {\n /** Unique color images; `normals[i]` is image `i`'s normal map. */\n images: Image[];\n normals: Image[];\n /** Images `0..frameImages - 1` are the ones frames, chains and overlays use,\n * in the order a bake without depth layers stores them; the depth layers'\n * own images come after. The archive packs the two groups apart, so the\n * layers never move a frame image (absent: every image is a frame image). */\n frameImages?: number;\n /** Where the families added after the first atlas begin among the frame\n * images: their new images pack on pages of their own, after the older\n * frame pages, so adding them never moves an older frame image (absent:\n * none). Today that is one group, the scenery; a later family that must\n * not repack it needs a group of its own. The depth layers' pages come\n * last, so those can move when a family is added. */\n groups?: number[];\n /** Images from here on were added to frames that already shipped (an\n * alternative chain, a frame's cycles); the archive packs them after every\n * other page, so they never move an older image (absent: none). */\n addedImages?: number;\n frames: BakedFrame[];\n animations: BakedAnimation[];\n}\n\n/** Drop trailing empty steps so `max` is the last step that changes pixels.\n * The catalog sizes each chain to the largest count the engine produces, so\n * steps past `max` look the same as `max`. */\nfunction trimSteps(steps: (ImageRef | null)[]): (ImageRef | null)[] {\n let n = steps.length;\n while (n > 1 && steps[n - 1] === null) n--;\n return steps.slice(0, n);\n}\n\n/** The furniture picture for one step of a layered frame: the flat frame's\n * pixels wherever they differ from the shell, kept wherever an earlier\n * step's picture already had a pixel (so a step only ever adds or paints\n * over, which source-over can draw), transparent elsewhere. */\nfunction furniturePicture(prev: Image | null, flat: Image, shell: Image): Image {\n const out: Image = { w: flat.w, h: flat.h, data: new Uint8ClampedArray(flat.data.length) };\n const a = flat.data;\n const b = shell.data;\n for (let i = 0; i < a.length; i += 4) {\n const differs = a[i] !== b[i] || a[i + 1] !== b[i + 1] || a[i + 2] !== b[i + 2] || a[i + 3] !== b[i + 3];\n if (differs || (prev && prev.data[i + 3] !== 0)) out.data.set(a.subarray(i, i + 4), i);\n }\n return out;\n}\n\n/** True when `top` drawn source-over onto `under` gives `want` exactly. */\nfunction composesTo(under: Image, top: Image, want: Image): boolean {\n const out = { w: under.w, h: under.h, data: under.data.slice() };\n over(out, top, 0, 0);\n return sameImage(out, want);\n}\n\n/** Pieces still waiting for their final image ids. */\ntype PendingLayers = {\n shell: PendingRef | null;\n furniture: PendingRef | null;\n soft?: PendingRef | null;\n front?: PendingRef | null;\n chains?: Record<string, { shell: (PendingRef | null)[]; furniture: (PendingRef | null)[]; soft?: (PendingRef | null)[]; front?: (PendingRef | null)[] }>;\n};\n\n/** Drop trailing nulls from a depth step list (each list on its own). */\nfunction trimPending(steps: (PendingRef | null)[]): (PendingRef | null)[] {\n let n = steps.length;\n while (n > 1 && steps[n - 1] === null) n--;\n return steps.slice(0, n);\n}\n\nexport interface BakeStats {\n /** Layered frames left without soft furniture: an occupant step could not\n * be drawn over it source-over (it would change a translucent pixel), or\n * the soft pass failed or gave no picture. */\n softDropped: string[];\n}\n\nexport function bake(jobs: readonly Job[], r: Renderer, onProgress?: (done: number, total: number) => void, stats?: BakeStats): BakeResult {\n const store = new ImageStore();\n const layerStore = new LayerStore(store);\n const added = new AddedStore(store, layerStore.own);\n const withCycles: StillJob[] = [];\n const pending: { frame: BakedFrame; layers: PendingLayers }[] = [];\n const frames: BakedFrame[] = [];\n const animations: BakedAnimation[] = [];\n const names = new Set<string>();\n const claim = (name: string) => {\n if (names.has(name)) throw new Error(`duplicate frame name ${name}`);\n names.add(name);\n };\n /** The split of a frame's own paint: its shell and furniture, stored at\n * once, and (when the soft pass gives one) its soft picture, which the\n * caller stores only once every step has one, so a dropped soft picture\n * leaves nothing on the pages. A soft pass that fails gives none. */\n const splitBase = (spec: PaintSpec, w: number, h: number, base: Image, shell: Image) => {\n const layers: PendingLayers = { shell: layerStore.shell(shell), furniture: layerStore.piece(diffLayer(shell, base), base) };\n let soft: Image | null = null;\n try {\n soft = r.renderSoft ? r.renderSoft(spec, w, h) : null;\n } catch (e) {\n if (!(e instanceof LayerError)) throw e;\n }\n return { layers, softBase: soft ? { image: soft, piece: trim(soft) } : null };\n };\n const groups: number[] = [];\n let ownPages: boolean | string = false;\n jobs.forEach((job, done) => {\n onProgress?.(done, jobs.length);\n // A family on pages of its own starts a new image group whenever its\n // `ownPages` value changes (keep each family's jobs together); one that\n // does not may not come after it, or its images would land in the group.\n if (job.ownPages && job.ownPages !== ownPages) groups.push(store.images.length);\n if (ownPages && !job.ownPages) throw new Error(`${job.name} comes after a family on pages of its own`);\n if (job.ownPages) ownPages = job.ownPages;\n if (job.type === \"anim\") {\n const frameNames = job.frames.map((spec, i) => {\n const name = `${job.name}/${i}`;\n claim(name);\n const base = r.render(spec, job.w, job.h);\n const frame: BakedFrame = { name, w: job.w, h: job.h, anchor: job.anchor, keys: { ...job.keys, frame: i }, image: store.ref(base) };\n // An animation frame splits like a still with no chain.\n try {\n const shell = job.layers && r.renderShell ? r.renderShell(spec, job.w, job.h) : null;\n // Unlike a room (whose vacancy card or shutter paints flat), every\n // frame of an animation that asks for layers must split.\n if (job.layers && r.renderShell && !shell) throw new LayerError(\"marks no layer break\");\n if (shell) {\n const { layers, softBase } = splitBase(spec, job.w, job.h, base, shell);\n if (softBase) layers.soft = layerStore.piece(softBase.piece, base);\n else if (r.renderSoft) stats?.softDropped.push(name);\n pending.push({ frame, layers });\n }\n } catch (e) {\n if (e instanceof LayerError) throw new LayerError(`${name}: ${e.message}`);\n throw e;\n }\n frames.push(frame);\n return name;\n });\n animations.push({ name: job.name, dt: job.dt, loop: job.loop, keys: job.keys, frames: frameNames });\n return;\n }\n claim(job.name);\n const base = r.render(job.paint, job.w, job.h);\n const frame: BakedFrame = { name: job.name, w: job.w, h: job.h, anchor: job.anchor, keys: job.keys, image: store.ref(base) };\n try {\n // The flat chains, exactly as before; their renders are kept for the\n // depth split below.\n const chainRenders: Record<string, Image[]> = {};\n for (const [key, chain] of Object.entries(job.chains ?? {})) {\n const steps: (ImageRef | null)[] = [null];\n const renders: Image[] = [base];\n let prev = base;\n for (let k = 1; k < chain.steps.length; k++) {\n const cur = r.render(chain.steps[k], job.w, job.h);\n // An alternative chain came after the first atlas: added images.\n steps.push(chain.alternativeTo ? added.piece(diffLayer(prev, cur), cur) : store.layer(diffLayer(prev, cur), cur));\n renders.push(cur);\n prev = cur;\n }\n (frame.chains ??= {})[key] = { input: chain.input, steps: trimSteps(steps), ...(chain.alternativeTo ? { alternativeTo: chain.alternativeTo } : {}) };\n chainRenders[key] = renders;\n }\n for (const [key, spec] of Object.entries(job.overlays ?? {})) {\n const next = r.render(spec, job.w, job.h);\n (frame.overlays ??= {})[key] = store.layer(diffLayer(base, next), next);\n }\n const cycles = bakeCycles(job, base, r, added);\n if (cycles) {\n frame.cycles = cycles;\n withCycles.push(job);\n }\n // A vehicle splits three ways: the back (the interior seen through its\n // windows), the riders, then the front (the body and frames around\n // them), each what differs from the picture before it.\n if (job.front && !job.layers) throw new LayerError(\"a front picture needs layers\");\n // A renderer that splits for depth must split a vehicle three ways.\n if (job.front && r.renderShell && !r.renderSplit) throw new LayerError(\"the renderer cannot split a front picture\");\n const split3 = job.front && r.renderSplit ? r.renderSplit(job.paint, job.w, job.h) : null;\n if (job.front && r.renderSplit && !split3) throw new LayerError(\"marks no layer break\");\n if (split3) {\n if (primaryChains(job) > 1) throw new LayerError(\"depth layers need at most one chain\");\n // The three-way split walks one chain from the base; an alternative\n // would start from the first chain's last step.\n if (Object.values(job.chains ?? {}).some((c) => c.alternativeTo)) throw new LayerError(\"a vehicle cannot carry an alternative chain\");\n const three = (prev: { back: Image; furniture: Image; front: Image } | null, flat: Image, s: { back: Image; mid: Image }) => {\n const furniture = furniturePicture(prev?.furniture ?? null, s.mid, s.back);\n const front = furniturePicture(prev?.front ?? null, flat, s.mid);\n if (!composesTo(s.back, furniture, s.mid) || !composesTo(s.mid, front, flat)) throw new LayerError(\"back, furniture and front do not compose to the frame\");\n return { back: s.back, furniture, front };\n };\n let prev = three(null, base, split3);\n // A vehicle's front is never empty (its frames or body); one would mean\n // its paint ends the furniture after drawing them.\n if (trim(prev.front) === null) throw new LayerError(\"a vehicle with an empty front\");\n const layers: PendingLayers = { shell: layerStore.shell(prev.back), furniture: layerStore.piece(trim(prev.furniture), base), front: layerStore.piece(trim(prev.front), base) };\n for (const [key, chain] of Object.entries(job.chains ?? {})) {\n const renders = chainRenders[key];\n const depth = chain.alternativeTo ? added : layerStore;\n const out = { shell: [null] as (PendingRef | null)[], furniture: [null] as (PendingRef | null)[], front: [null] as (PendingRef | null)[] };\n for (let k = 1; k < chain.steps.length; k++) {\n const sk = r.renderSplit!(chain.steps[k], job.w, job.h);\n if (!sk) throw new LayerError(`chain ${key} step ${k} marks no layer break`);\n const next = three(prev, renders[k], sk);\n out.shell.push(depth.piece(diffLayer(prev.back, next.back), next.back));\n out.furniture.push(depth.piece(diffLayer(prev.furniture, next.furniture), renders[k]));\n out.front.push(depth.piece(diffLayer(prev.front, next.front), renders[k]));\n prev = next;\n }\n (layers.chains ??= {})[key] = { shell: trimPending(out.shell), furniture: trimPending(out.furniture), front: trimPending(out.front) };\n }\n pending.push({ frame, layers });\n frames.push(frame);\n return;\n }\n // The depth split: the furniture is what differs from the shell, so the\n // shell plus the furniture gives back `base` exactly (diffLayer refuses\n // any pixel source-over could not reproduce).\n const shell = job.layers && r.renderShell ? r.renderShell(job.paint, job.w, job.h) : null;\n if (shell) {\n // At most one chain: the draw order the manifest documents (and the\n // checks that prove it) covers one; overlays draw last, in front.\n if (primaryChains(job) > 1) throw new LayerError(\"depth layers need at most one chain\");\n const { layers, softBase } = splitBase(job.paint, job.w, job.h, base, shell);\n const soft0 = softBase?.image ?? null;\n let softOk = softBase !== null;\n const softSteps: Record<string, { piece: Piece | null; next: Image }[]> = {};\n // Each chain step splits the same way: what changes on the shell (a\n // light that switches on with the first occupant) and what changes in\n // front of it (the occupant).\n for (const [key, chain] of Object.entries(job.chains ?? {})) {\n const renders = chainRenders[key];\n const depth = chain.alternativeTo ? added : layerStore;\n const split = { shell: [null] as (PendingRef | null)[], furniture: [null] as (PendingRef | null)[] };\n let prevShell = shell;\n let prevFurniture = furniturePicture(null, base, shell);\n let prevSoft = soft0;\n const softList: { piece: Piece | null; next: Image }[] = (softSteps[key] = []);\n for (let k = 1; k < chain.steps.length; k++) {\n const cur = renders[k];\n const shellK = r.renderShell!(chain.steps[k], job.w, job.h);\n if (!shellK) throw new LayerError(`chain ${key} step ${k} marks no layer break`);\n const furnitureK = furniturePicture(prevFurniture, cur, shellK);\n if (!composesTo(shellK, furnitureK, cur)) throw new LayerError(`chain ${key} step ${k}: shell and furniture do not compose to the frame`);\n split.shell.push(depth.piece(diffLayer(prevShell, shellK), shellK));\n split.furniture.push(depth.piece(diffLayer(prevFurniture, furnitureK), cur));\n if (softOk && prevSoft) {\n try {\n const softK = r.renderSoft!(chain.steps[k], job.w, job.h);\n if (!softK) throw new LayerError(\"no soft picture\");\n softList.push({ piece: diffLayer(prevSoft, softK), next: cur });\n prevSoft = softK;\n } catch (e) {\n if (!(e instanceof LayerError)) throw e;\n // An alternative came after the frame shipped: letting it drop\n // the frame's soft furniture would change older data.\n if (chain.alternativeTo) throw new LayerError(`chain ${key} step ${k}: an alternative chain's soft step fails (${e.message})`);\n softOk = false;\n }\n }\n prevShell = shellK;\n prevFurniture = furnitureK;\n }\n (layers.chains ??= {})[key] = { shell: trimPending(split.shell), furniture: trimPending(split.furniture) };\n }\n if (softOk && softBase) {\n layers.soft = layerStore.piece(softBase.piece, base);\n for (const [key, list] of Object.entries(softSteps)) {\n const depth = job.chains?.[key].alternativeTo ? added : layerStore;\n layers.chains![key].soft = trimPending([null, ...list.map((s) => depth.piece(s.piece, s.next))]);\n }\n } else if (r.renderSoft) {\n // A soft picture without composable steps would mislead; drop it.\n stats?.softDropped.push(job.name);\n }\n pending.push({ frame, layers });\n }\n } catch (e) {\n if (e instanceof LayerError) throw new LayerError(`${job.name}: ${e.message}`);\n throw e;\n }\n frames.push(frame);\n });\n onProgress?.(jobs.length, jobs.length);\n // The layer store's own images go after the frame images, and the added\n // images after those.\n const frameImages = store.images.length;\n added.finish(frameImages, layerStore.own.images.length);\n // The added flat references are final now; keep them plain like the rest.\n const plain = (ref: ImageRef | null): ImageRef | null => (ref ? { id: ref.id, dx: ref.dx, dy: ref.dy } : null);\n for (const f of frames) {\n for (const c of Object.values(f.chains ?? {})) if (c.alternativeTo) c.steps = c.steps.map(plain);\n for (const c of Object.values(f.cycles ?? {})) c.steps = c.steps.map(plain);\n }\n const resolve = (ref: PendingRef | null): ImageRef | null => (ref ? { id: ref.own ? ref.id + frameImages : ref.id, dx: ref.dx, dy: ref.dy } : null);\n for (const { frame, layers: p } of pending) {\n const layers: BakedLayers = { shell: resolve(p.shell), furniture: resolve(p.furniture) };\n if (\"soft\" in p) layers.soft = resolve(p.soft ?? null);\n if (\"front\" in p) layers.front = resolve(p.front ?? null);\n if (p.chains) {\n layers.chains = {};\n for (const [key, c] of Object.entries(p.chains)) {\n const out: BakedLayerChain = { shell: c.shell.map(resolve), furniture: c.furniture.map(resolve) };\n if (c.soft) out.soft = c.soft.map(resolve);\n if (c.front) out.front = c.front.map(resolve);\n layers.chains[key] = out;\n }\n }\n frame.layers = layers;\n }\n const addedImages = frameImages + layerStore.own.images.length;\n const result: BakeResult = {\n images: [...store.images, ...layerStore.own.images, ...added.own.images],\n normals: [...store.normals, ...layerStore.own.normals, ...added.own.normals],\n frameImages,\n ...(groups.length > 0 ? { groups } : {}),\n ...(added.own.images.length > 0 ? { addedImages } : {}),\n frames,\n animations,\n };\n checkCycles(result, r, withCycles);\n return result;\n}\n\n/** The job's chains that are not alternatives to another; a depth split\n * covers one (each alternative splits the same way, on its own). */\nfunction primaryChains(job: StillJob): number {\n return Object.values(job.chains ?? {}).filter((c) => !c.alternativeTo).length;\n}\n"],"names":[],"mappings":";;;;AA4HA;;AAE+C;AAC/C,SAAS,SAAS,CAAC,KAA0B,EAAA;AAC3C,IAAA,IAAI,CAAC,GAAG,KAAK,CAAC,MAAM;IACpB,OAAO,CAAC,GAAG,CAAC,IAAI,KAAK,CAAC,CAAC,GAAG,CAA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CAAC,MAAM,CAAC,MAAM;AAC9D,IAAA,MAAM,MAAM,GAAe;QACzB,MAAM,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,GAAG,UAAU,CAAC,GAAG,CAAC,MAAM,EAAE,GAAG,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC;QACxE,OAAO,EAAE,CAAC,GAAG,KAAK,CAAC,OAAO,EAAE,GAAG,UAAU,CAAC,GAAG,CAAC,OAAO,EAAE,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC;QAC5E,WAAW;AACX,QAAA,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;QACxC,IAAI,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,GAAG,EAAE,WAAW,EAAE,GAAG,EAAE,CAAC;QACvD,MAAM;QACN,UAAU;KACX;AACD,IAAA,WAAW,CAAC,MAAM,EAAE,CAAC,EAAE,UAAU,CAAC;AAClC,IAAA,OAAO,MAAM;AACf;AAEA;AACqE;AACrE,SAAS,aAAa,CAAC,GAAa,EAAA;IAClC,OAAO,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,MAAM;AAC/E;;"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { BakeResult, Renderer } from "./bake";
|
|
2
|
+
import type { StillJob } from "./catalog";
|
|
3
|
+
import { type Image } from "./pixels";
|
|
4
|
+
import type { AddedStore, ImageRef } from "./store";
|
|
5
|
+
/**
|
|
6
|
+
* The bake's handling of data added to frames that already shipped: a frame's
|
|
7
|
+
* cycles (the cinema's marquee and screen) and the check that they compose.
|
|
8
|
+
* Their images go to the {@link AddedStore}, which the archive packs after
|
|
9
|
+
* every older page.
|
|
10
|
+
*/
|
|
11
|
+
export type BakedCycles = Record<string, {
|
|
12
|
+
rate: number;
|
|
13
|
+
steps: (ImageRef | null)[];
|
|
14
|
+
}>;
|
|
15
|
+
/** The frame's cycles (`StillJob.cycles`): step `k` of each is what changes
|
|
16
|
+
* from the frame's own paint to that cycle's picture `k`. A cycle whose
|
|
17
|
+
* pictures all equal the frame (a closed or gutted cinema) is left out, and
|
|
18
|
+
* so is the field when none is left. */
|
|
19
|
+
export declare function bakeCycles(job: StillJob, base: Image, r: Renderer, added: AddedStore): BakedCycles | undefined;
|
|
20
|
+
/** Recompose every frame that kept cycles at each of its checks
|
|
21
|
+
* (`StillJob.cycleChecks`), flat and through its depth layers, and require
|
|
22
|
+
* the frame's own paint at that moment. Throws a LayerError naming the first
|
|
23
|
+
* that differs. Runs on the finished bake, once every id is final. */
|
|
24
|
+
export declare function checkCycles(result: BakeResult, r: Renderer, jobs: readonly StillJob[]): void;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { composeFrame, composeLayered, compareImages } from './compose.js';
|
|
2
|
+
import { diffLayer, LayerError } from './pixels.js';
|
|
3
|
+
|
|
4
|
+
/** The frame's cycles (`StillJob.cycles`): step `k` of each is what changes
|
|
5
|
+
* from the frame's own paint to that cycle's picture `k`. A cycle whose
|
|
6
|
+
* pictures all equal the frame (a closed or gutted cinema) is left out, and
|
|
7
|
+
* so is the field when none is left. */
|
|
8
|
+
function bakeCycles(job, base, r, added) {
|
|
9
|
+
let out;
|
|
10
|
+
for (const [key, cycle] of Object.entries(job.cycles ?? {})) {
|
|
11
|
+
const steps = [null];
|
|
12
|
+
for (let k = 1; k < cycle.steps.length; k++) {
|
|
13
|
+
const cur = r.render(cycle.steps[k], job.w, job.h);
|
|
14
|
+
steps.push(added.piece(diffLayer(base, cur), cur));
|
|
15
|
+
}
|
|
16
|
+
if (steps.some((s) => s !== null))
|
|
17
|
+
(out ?? (out = {}))[key] = { rate: cycle.rate, steps };
|
|
18
|
+
}
|
|
19
|
+
return out;
|
|
20
|
+
}
|
|
21
|
+
/** Recompose every frame that kept cycles at each of its checks
|
|
22
|
+
* (`StillJob.cycleChecks`), flat and through its depth layers, and require
|
|
23
|
+
* the frame's own paint at that moment. Throws a LayerError naming the first
|
|
24
|
+
* that differs. Runs on the finished bake, once every id is final. */
|
|
25
|
+
function checkCycles(result, r, jobs) {
|
|
26
|
+
const byName = new Map(result.frames.map((f) => [f.name, f]));
|
|
27
|
+
for (const job of jobs) {
|
|
28
|
+
const rec = byName.get(job.name);
|
|
29
|
+
if (!rec?.cycles)
|
|
30
|
+
continue;
|
|
31
|
+
for (const check of job.cycleChecks ?? []) {
|
|
32
|
+
const want = r.render(check.paint, job.w, job.h);
|
|
33
|
+
const pictures = [composeFrame(result, rec, check.chains, [], check.at)];
|
|
34
|
+
if (rec.layers)
|
|
35
|
+
pictures.push(composeLayered(result, rec, check.chains, [], false, check.at));
|
|
36
|
+
for (const p of pictures) {
|
|
37
|
+
const cmp = compareImages(want, p);
|
|
38
|
+
if (cmp.mismatches > 0)
|
|
39
|
+
throw new LayerError(`${job.name}: cycles ${JSON.stringify(check.at)} with chains ${JSON.stringify(check.chains)} miss ${cmp.mismatches} pixels`);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export { bakeCycles, checkCycles };
|
|
46
|
+
//# sourceMappingURL=bakeAdditions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bakeAdditions.js","sources":["../../../src/render/atlas/bakeAdditions.ts"],"sourcesContent":["import type { BakeResult, Renderer } from \"./bake\";\nimport type { StillJob } from \"./catalog\";\nimport { compareImages, composeFrame, composeLayered } from \"./compose\";\nimport { LayerError, diffLayer, type Image } from \"./pixels\";\nimport type { AddedStore, ImageRef } from \"./store\";\n\n/**\n * The bake's handling of data added to frames that already shipped: a frame's\n * cycles (the cinema's marquee and screen) and the check that they compose.\n * Their images go to the {@link AddedStore}, which the archive packs after\n * every older page.\n */\n\nexport type BakedCycles = Record<string, { rate: number; steps: (ImageRef | null)[] }>;\n\n/** The frame's cycles (`StillJob.cycles`): step `k` of each is what changes\n * from the frame's own paint to that cycle's picture `k`. A cycle whose\n * pictures all equal the frame (a closed or gutted cinema) is left out, and\n * so is the field when none is left. */\nexport function bakeCycles(job: StillJob, base: Image, r: Renderer, added: AddedStore): BakedCycles | undefined {\n let out: BakedCycles | undefined;\n for (const [key, cycle] of Object.entries(job.cycles ?? {})) {\n const steps: (ImageRef | null)[] = [null];\n for (let k = 1; k < cycle.steps.length; k++) {\n const cur = r.render(cycle.steps[k], job.w, job.h);\n steps.push(added.piece(diffLayer(base, cur), cur));\n }\n if (steps.some((s) => s !== null)) (out ??= {})[key] = { rate: cycle.rate, steps };\n }\n return out;\n}\n\n/** Recompose every frame that kept cycles at each of its checks\n * (`StillJob.cycleChecks`), flat and through its depth layers, and require\n * the frame's own paint at that moment. Throws a LayerError naming the first\n * that differs. Runs on the finished bake, once every id is final. */\nexport function checkCycles(result: BakeResult, r: Renderer, jobs: readonly StillJob[]): void {\n const byName = new Map(result.frames.map((f) => [f.name, f]));\n for (const job of jobs) {\n const rec = byName.get(job.name);\n if (!rec?.cycles) continue;\n for (const check of job.cycleChecks ?? []) {\n const want = r.render(check.paint, job.w, job.h);\n const pictures = [composeFrame(result, rec, check.chains, [], check.at)];\n if (rec.layers) pictures.push(composeLayered(result, rec, check.chains, [], false, check.at));\n for (const p of pictures) {\n const cmp = compareImages(want, p);\n if (cmp.mismatches > 0) throw new LayerError(`${job.name}: cycles ${JSON.stringify(check.at)} with chains ${JSON.stringify(check.chains)} miss ${cmp.mismatches} pixels`);\n }\n }\n }\n}\n"],"names":[],"mappings":";;;AAeA;;;AAGyC;AACnC,SAAU,UAAU,CAAC,GAAa,EAAE,IAAW,EAAE,CAAW,EAAE,KAAiB,EAAA;AACnF,IAAA,IAAI,GAA4B;AAChC,IAAA,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,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AC,KAAK,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC;YAChD,MAAM,QAAQ,GAAG,CAAC,YAAY,CAAC,MAAM,EAAE,GAAG,EAAE,KAAK,CAAC,MAAM,EAAE,EAAE,EAAE,KAAK,CAAC,EAAE,CAAC,CAAC;YACxE,IAAI,GAAG,CAAC,MAAM;gBAAE,QAAQ,CAAC,IAAI,CAAC,cAAc,CAAC,MAAM,EAAE,GAAG,EAAE,KAAK,CAAC,MAAM,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,CAAC;AAC7F,YAAA,KAAK,MAAM,CAAC,IAAI,QAAQ,EAAE;gBACxB,MAAM,GAAG,GAAG,aAAa,CAAC,IAAI,EAAE,CAAC,CAAC;AAClC,gBAAA,IAAI,GAAG,CAAC,UAAU,GAAG,CAAC;AAAE,oBAAA,MAAM,IAAI,UAAU,CAAC,CAAA,EAAG,GAAG,CAAC,IAAI,CAAA,SAAA,EAAY,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE,CAAC,CAAA,aAAA,EAAgB,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,MAAM,CAAC,CAAA,MAAA,EAAS,GAAG,CAAC,UAAU,CAAA,OAAA,CAAS,CAAC;YAC3K;QACF;IACF;AACF;;"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type Renderer } from "./bake";
|
|
2
|
+
import { type Job } from "./catalog";
|
|
3
|
+
/**
|
|
4
|
+
* The atlas bake's browser half, bundled by `scripts/export-atlas.ts` and run
|
|
5
|
+
* inside the pinned Playwright Chromium. It renders every catalog job through
|
|
6
|
+
* a real 2D canvas set up the way Excalibur's `Raster` sets up the web game's
|
|
7
|
+
* bake canvases, and hands the unique images back to Node in chunks.
|
|
8
|
+
*/
|
|
9
|
+
/** Every job the atlas bakes, in a fixed order. */
|
|
10
|
+
export declare function allJobs(): Job[];
|
|
11
|
+
/** A fresh canvas per render, prepared like an Excalibur raster. */
|
|
12
|
+
export declare function canvasRenderer(doc: Document): Renderer;
|