@verticopolis/components 0.0.0-stage → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ASSETS-LICENSE.md +49 -0
- package/LICENSE +21 -0
- package/README.md +121 -2
- package/lib/audio/Audio.d.ts +110 -0
- package/lib/audio/Audio.js +199 -0
- package/lib/audio/Audio.js.map +1 -0
- package/lib/audio/ToneAudioEngine.d.ts +125 -0
- package/lib/audio/ToneAudioEngine.js +452 -0
- package/lib/audio/ToneAudioEngine.js.map +1 -0
- package/lib/audio/audioAssets.d.ts +25 -0
- package/lib/audio/audioAssets.js +28 -0
- package/lib/audio/audioAssets.js.map +1 -0
- package/lib/audio/awayWatch.d.ts +17 -0
- package/lib/audio/awayWatch.js +33 -0
- package/lib/audio/awayWatch.js.map +1 -0
- package/lib/audio/firstCueLatch.d.ts +18 -0
- package/lib/audio/firstCueLatch.js +34 -0
- package/lib/audio/firstCueLatch.js.map +1 -0
- package/lib/audio/lightEnvelope.d.ts +64 -0
- package/lib/audio/lightEnvelope.js +124 -0
- package/lib/audio/lightEnvelope.js.map +1 -0
- package/lib/audio/lightSynth.d.ts +125 -0
- package/lib/audio/lightSynth.js +203 -0
- package/lib/audio/lightSynth.js.map +1 -0
- package/lib/audio/toneContext.d.ts +30 -0
- package/lib/audio/toneContext.js +79 -0
- package/lib/audio/toneContext.js.map +1 -0
- package/lib/audio/toneCrowd.d.ts +62 -0
- package/lib/audio/toneCrowd.js +429 -0
- package/lib/audio/toneCrowd.js.map +1 -0
- package/lib/audio/toneCrowdData.d.ts +144 -0
- package/lib/audio/toneCrowdData.js +317 -0
- package/lib/audio/toneCrowdData.js.map +1 -0
- package/lib/audio/toneCrowdPrograms.d.ts +71 -0
- package/lib/audio/toneCrowdPrograms.js +273 -0
- package/lib/audio/toneCrowdPrograms.js.map +1 -0
- package/lib/audio/toneCrowdVoices.d.ts +49 -0
- package/lib/audio/toneCrowdVoices.js +212 -0
- package/lib/audio/toneCrowdVoices.js.map +1 -0
- package/lib/audio/toneMusicVoices.d.ts +11 -0
- package/lib/audio/toneMusicVoices.js +31 -0
- package/lib/audio/toneMusicVoices.js.map +1 -0
- package/lib/audio/tonePercussion.d.ts +45 -0
- package/lib/audio/tonePercussion.js +97 -0
- package/lib/audio/tonePercussion.js.map +1 -0
- package/lib/audio/toneRain.d.ts +23 -0
- package/lib/audio/toneRain.js +39 -0
- package/lib/audio/toneRain.js.map +1 -0
- package/lib/audio/toneRecordingMock.d.ts +89 -0
- package/lib/audio/toneRecordingMock.js +145 -0
- package/lib/audio/toneRecordingMock.js.map +1 -0
- package/lib/audio/toneRoomTone.d.ts +11 -0
- package/lib/audio/toneRoomTone.js +27 -0
- package/lib/audio/toneRoomTone.js.map +1 -0
- package/lib/audio/toneScenes.d.ts +57 -0
- package/lib/audio/toneScenes.js +208 -0
- package/lib/audio/toneScenes.js.map +1 -0
- package/lib/audio/toneTracks.d.ts +50 -0
- package/lib/audio/toneTracks.js +356 -0
- package/lib/audio/toneTracks.js.map +1 -0
- package/lib/audio/toneVoices.d.ts +57 -0
- package/lib/audio/toneVoices.js +208 -0
- package/lib/audio/toneVoices.js.map +1 -0
- package/lib/catalog/catalogTypes.d.ts +428 -0
- package/lib/catalog/catalogTypes.js +102 -0
- package/lib/catalog/catalogTypes.js.map +1 -0
- package/lib/catalog/skyBridgeTypes.d.ts +25 -0
- package/lib/catalog/skyBridgeTypes.js +7 -0
- package/lib/catalog/skyBridgeTypes.js.map +1 -0
- package/lib/catalog/starDutyTypes.d.ts +22 -0
- package/lib/catalog/starDutyTypes.js +7 -0
- package/lib/catalog/starDutyTypes.js.map +1 -0
- package/lib/catalog/towerCatalog.d.ts +32 -0
- package/lib/catalog/towerCatalog.js +44 -0
- package/lib/catalog/towerCatalog.js.map +1 -0
- package/lib/engineBinding/binding.d.ts +36 -0
- package/lib/engineBinding/binding.js +90 -0
- package/lib/engineBinding/binding.js.map +1 -0
- package/lib/engineBinding/catalog.d.ts +24 -0
- package/lib/engineBinding/catalog.js +267 -0
- package/lib/engineBinding/catalog.js.map +1 -0
- package/lib/engineBinding/engine.d.ts +866 -0
- package/lib/engineBinding/exportTiers.d.ts +289 -0
- package/lib/engineBinding/exportTiers.js +283 -0
- package/lib/engineBinding/exportTiers.js.map +1 -0
- package/lib/engineBinding/toolingMethods.d.ts +12 -0
- package/lib/engineBinding/toolingMethods.js +20 -0
- package/lib/engineBinding/toolingMethods.js.map +1 -0
- package/lib/events/gameplayCatalog.d.ts +57 -0
- package/lib/events/gameplayCatalog.js +214 -0
- package/lib/events/gameplayCatalog.js.map +1 -0
- package/lib/events/gameplayEventRules.d.ts +4 -0
- package/lib/events/gameplayEventRules.js +32 -0
- package/lib/events/gameplayEventRules.js.map +1 -0
- package/lib/events/gameplayEvents.d.ts +284 -0
- package/lib/presentation/clockText.d.ts +28 -0
- package/lib/presentation/clockText.js +38 -0
- package/lib/presentation/clockText.js.map +1 -0
- package/lib/presentation/facilityPresentation.d.ts +20 -0
- package/lib/presentation/facilityPresentation.js +164 -0
- package/lib/presentation/facilityPresentation.js.map +1 -0
- package/lib/presentation/statsCopy.d.ts +20 -0
- package/lib/presentation/statsCopy.js +37 -0
- package/lib/presentation/statsCopy.js.map +1 -0
- package/lib/presentation/traffic.d.ts +75 -0
- package/lib/presentation/traffic.js +79 -0
- package/lib/presentation/traffic.js.map +1 -0
- package/lib/presentation/viewKinds.d.ts +33 -0
- package/lib/presentation/viewKinds.js +88 -0
- package/lib/presentation/viewKinds.js.map +1 -0
- package/lib/presentation/viewWorld.d.ts +29 -0
- package/lib/presentation/viewWorld.js +31 -0
- package/lib/presentation/viewWorld.js.map +1 -0
- package/lib/render/atlas/archive.d.ts +78 -0
- package/lib/render/atlas/archive.js +427 -0
- package/lib/render/atlas/archive.js.map +1 -0
- package/lib/render/atlas/bake.d.ts +132 -0
- package/lib/render/atlas/bake.js +331 -0
- package/lib/render/atlas/bake.js.map +1 -0
- package/lib/render/atlas/bakeAdditions.d.ts +24 -0
- package/lib/render/atlas/bakeAdditions.js +46 -0
- package/lib/render/atlas/bakeAdditions.js.map +1 -0
- package/lib/render/atlas/browserEntry.d.ts +12 -0
- package/lib/render/atlas/browserEntry.js +222 -0
- package/lib/render/atlas/browserEntry.js.map +1 -0
- package/lib/render/atlas/catalog.d.ts +118 -0
- package/lib/render/atlas/catalog.js +253 -0
- package/lib/render/atlas/catalog.js.map +1 -0
- package/lib/render/atlas/catalogExtras.d.ts +45 -0
- package/lib/render/atlas/catalogExtras.js +217 -0
- package/lib/render/atlas/catalogExtras.js.map +1 -0
- package/lib/render/atlas/compose.d.ts +30 -0
- package/lib/render/atlas/compose.js +125 -0
- package/lib/render/atlas/compose.js.map +1 -0
- package/lib/render/atlas/cycles.d.ts +25 -0
- package/lib/render/atlas/cycles.js +41 -0
- package/lib/render/atlas/cycles.js.map +1 -0
- package/lib/render/atlas/lookup.d.ts +65 -0
- package/lib/render/atlas/lookup.js +83 -0
- package/lib/render/atlas/lookup.js.map +1 -0
- package/lib/render/atlas/pack.d.ts +23 -0
- package/lib/render/atlas/pack.js +50 -0
- package/lib/render/atlas/pack.js.map +1 -0
- package/lib/render/atlas/paint.d.ts +120 -0
- package/lib/render/atlas/paint.js +154 -0
- package/lib/render/atlas/paint.js.map +1 -0
- package/lib/render/atlas/pixels.d.ts +46 -0
- package/lib/render/atlas/pixels.js +158 -0
- package/lib/render/atlas/pixels.js.map +1 -0
- package/lib/render/atlas/png.d.ts +3 -0
- package/lib/render/atlas/png.js +102 -0
- package/lib/render/atlas/png.js.map +1 -0
- package/lib/render/atlas/raster.d.ts +34 -0
- package/lib/render/atlas/raster.js +114 -0
- package/lib/render/atlas/raster.js.map +1 -0
- package/lib/render/atlas/recyclingFill.d.ts +5 -0
- package/lib/render/atlas/recyclingFill.js +65 -0
- package/lib/render/atlas/recyclingFill.js.map +1 -0
- package/lib/render/atlas/samples.d.ts +24 -0
- package/lib/render/atlas/samples.js +75 -0
- package/lib/render/atlas/samples.js.map +1 -0
- package/lib/render/atlas/scenery.d.ts +230 -0
- package/lib/render/atlas/scenery.js +242 -0
- package/lib/render/atlas/scenery.js.map +1 -0
- package/lib/render/atlas/schema.d.ts +189 -0
- package/lib/render/atlas/schema.js +31 -0
- package/lib/render/atlas/schema.js.map +1 -0
- package/lib/render/atlas/shellMarks.d.ts +16 -0
- package/lib/render/atlas/shellMarks.js +72 -0
- package/lib/render/atlas/shellMarks.js.map +1 -0
- package/lib/render/atlas/store.d.ts +75 -0
- package/lib/render/atlas/store.js +127 -0
- package/lib/render/atlas/store.js.map +1 -0
- package/lib/render/atlas/verify.d.ts +43 -0
- package/lib/render/atlas/verify.js +87 -0
- package/lib/render/atlas/verify.js.map +1 -0
- package/lib/render/atlas/verifyExtras.d.ts +19 -0
- package/lib/render/atlas/verifyExtras.js +310 -0
- package/lib/render/atlas/verifyExtras.js.map +1 -0
- package/lib/render/cameraBounds.d.ts +71 -0
- package/lib/render/cameraBounds.js +107 -0
- package/lib/render/cameraBounds.js.map +1 -0
- package/lib/render/carIndicator.d.ts +41 -0
- package/lib/render/carIndicator.js +45 -0
- package/lib/render/carIndicator.js.map +1 -0
- package/lib/render/carMotion.d.ts +33 -0
- package/lib/render/carMotion.js +42 -0
- package/lib/render/carMotion.js.map +1 -0
- package/lib/render/catalogScale.d.ts +40 -0
- package/lib/render/catalogScale.js +33 -0
- package/lib/render/catalogScale.js.map +1 -0
- package/lib/render/climbPath.d.ts +59 -0
- package/lib/render/climbPath.js +115 -0
- package/lib/render/climbPath.js.map +1 -0
- package/lib/render/depthPlanes.d.ts +55 -0
- package/lib/render/depthPlanes.js +58 -0
- package/lib/render/depthPlanes.js.map +1 -0
- package/lib/render/excalibur/TowerEngine.d.ts +348 -0
- package/lib/render/excalibur/TowerEngine.js +415 -0
- package/lib/render/excalibur/TowerEngine.js.map +1 -0
- package/lib/render/excalibur/cabGraphics.d.ts +75 -0
- package/lib/render/excalibur/cabGraphics.js +108 -0
- package/lib/render/excalibur/cabGraphics.js.map +1 -0
- package/lib/render/excalibur/cabParts.d.ts +32 -0
- package/lib/render/excalibur/cabParts.js +79 -0
- package/lib/render/excalibur/cabParts.js.map +1 -0
- package/lib/render/excalibur/cabRiders.d.ts +72 -0
- package/lib/render/excalibur/cabRiders.js +176 -0
- package/lib/render/excalibur/cabRiders.js.map +1 -0
- package/lib/render/excalibur/crowdCull.d.ts +34 -0
- package/lib/render/excalibur/crowdCull.js +72 -0
- package/lib/render/excalibur/crowdCull.js.map +1 -0
- package/lib/render/excalibur/crowdFigure.d.ts +42 -0
- package/lib/render/excalibur/crowdFigure.js +99 -0
- package/lib/render/excalibur/crowdFigure.js.map +1 -0
- package/lib/render/excalibur/crowdLook.d.ts +137 -0
- package/lib/render/excalibur/crowdLook.js +186 -0
- package/lib/render/excalibur/crowdLook.js.map +1 -0
- package/lib/render/excalibur/frameHold.d.ts +23 -0
- package/lib/render/excalibur/frameHold.js +30 -0
- package/lib/render/excalibur/frameHold.js.map +1 -0
- package/lib/render/excalibur/guardPosition.d.ts +17 -0
- package/lib/render/excalibur/guardPosition.js +37 -0
- package/lib/render/excalibur/guardPosition.js.map +1 -0
- package/lib/render/excalibur/keyboardHost.d.ts +15 -0
- package/lib/render/excalibur/keyboardHost.js +22 -0
- package/lib/render/excalibur/keyboardHost.js.map +1 -0
- package/lib/render/excalibur/longPress.d.ts +16 -0
- package/lib/render/excalibur/longPress.js +71 -0
- package/lib/render/excalibur/longPress.js.map +1 -0
- package/lib/render/excalibur/peopleGfx.d.ts +16 -0
- package/lib/render/excalibur/peopleGfx.js +46 -0
- package/lib/render/excalibur/peopleGfx.js.map +1 -0
- package/lib/render/excalibur/peopleWindow.d.ts +35 -0
- package/lib/render/excalibur/peopleWindow.js +38 -0
- package/lib/render/excalibur/peopleWindow.js.map +1 -0
- package/lib/render/excalibur/personFocus.d.ts +36 -0
- package/lib/render/excalibur/personFocus.js +169 -0
- package/lib/render/excalibur/personFocus.js.map +1 -0
- package/lib/render/excalibur/pointerButtonGuard.d.ts +35 -0
- package/lib/render/excalibur/pointerButtonGuard.js +86 -0
- package/lib/render/excalibur/pointerButtonGuard.js.map +1 -0
- package/lib/render/excalibur/pressLifecycle.d.ts +26 -0
- package/lib/render/excalibur/pressLifecycle.js +66 -0
- package/lib/render/excalibur/pressLifecycle.js.map +1 -0
- package/lib/render/excalibur/rainShelter.d.ts +16 -0
- package/lib/render/excalibur/rainShelter.js +94 -0
- package/lib/render/excalibur/rainShelter.js.map +1 -0
- package/lib/render/excalibur/roomSignature.d.ts +30 -0
- package/lib/render/excalibur/roomSignature.js +49 -0
- package/lib/render/excalibur/roomSignature.js.map +1 -0
- package/lib/render/excalibur/sceneBake.d.ts +9 -0
- package/lib/render/excalibur/sceneBake.js +12 -0
- package/lib/render/excalibur/sceneBake.js.map +1 -0
- package/lib/render/excalibur/thiefSpan.d.ts +18 -0
- package/lib/render/excalibur/thiefSpan.js +51 -0
- package/lib/render/excalibur/thiefSpan.js.map +1 -0
- package/lib/render/excalibur/towerBridgeTiles.d.ts +30 -0
- package/lib/render/excalibur/towerBridgeTiles.js +43 -0
- package/lib/render/excalibur/towerBridgeTiles.js.map +1 -0
- package/lib/render/excalibur/towerCrowd.d.ts +73 -0
- package/lib/render/excalibur/towerCrowd.js +464 -0
- package/lib/render/excalibur/towerCrowd.js.map +1 -0
- package/lib/render/excalibur/towerCrowdLayout.d.ts +40 -0
- package/lib/render/excalibur/towerCrowdLayout.js +77 -0
- package/lib/render/excalibur/towerCrowdLayout.js.map +1 -0
- package/lib/render/excalibur/towerFireResponse.d.ts +25 -0
- package/lib/render/excalibur/towerFireResponse.js +89 -0
- package/lib/render/excalibur/towerFireResponse.js.map +1 -0
- package/lib/render/excalibur/towerFrame.d.ts +8 -0
- package/lib/render/excalibur/towerFrame.js +57 -0
- package/lib/render/excalibur/towerFrame.js.map +1 -0
- package/lib/render/excalibur/towerGhostLabel.d.ts +9 -0
- package/lib/render/excalibur/towerGhostLabel.js +37 -0
- package/lib/render/excalibur/towerGhostLabel.js.map +1 -0
- package/lib/render/excalibur/towerHallDoors.d.ts +42 -0
- package/lib/render/excalibur/towerHallDoors.js +129 -0
- package/lib/render/excalibur/towerHallDoors.js.map +1 -0
- package/lib/render/excalibur/towerHaloRings.d.ts +34 -0
- package/lib/render/excalibur/towerHaloRings.js +45 -0
- package/lib/render/excalibur/towerHaloRings.js.map +1 -0
- package/lib/render/excalibur/towerInputCamera.d.ts +90 -0
- package/lib/render/excalibur/towerInputCamera.js +480 -0
- package/lib/render/excalibur/towerInputCamera.js.map +1 -0
- package/lib/render/excalibur/towerMetro.d.ts +31 -0
- package/lib/render/excalibur/towerMetro.js +115 -0
- package/lib/render/excalibur/towerMetro.js.map +1 -0
- package/lib/render/excalibur/towerNoiseReach.d.ts +32 -0
- package/lib/render/excalibur/towerNoiseReach.js +75 -0
- package/lib/render/excalibur/towerNoiseReach.js.map +1 -0
- package/lib/render/excalibur/towerOverlay.d.ts +59 -0
- package/lib/render/excalibur/towerOverlay.js +453 -0
- package/lib/render/excalibur/towerOverlay.js.map +1 -0
- package/lib/render/excalibur/towerReconcile.d.ts +17 -0
- package/lib/render/excalibur/towerReconcile.js +404 -0
- package/lib/render/excalibur/towerReconcile.js.map +1 -0
- package/lib/render/excalibur/towerRegions.d.ts +61 -0
- package/lib/render/excalibur/towerRegions.js +193 -0
- package/lib/render/excalibur/towerRegions.js.map +1 -0
- package/lib/render/excalibur/towerScene.d.ts +66 -0
- package/lib/render/excalibur/towerScene.js +443 -0
- package/lib/render/excalibur/towerScene.js.map +1 -0
- package/lib/render/excalibur/towerScenery.d.ts +12 -0
- package/lib/render/excalibur/towerScenery.js +299 -0
- package/lib/render/excalibur/towerScenery.js.map +1 -0
- package/lib/render/excalibur/towerSceneryDraw.d.ts +86 -0
- package/lib/render/excalibur/towerSceneryDraw.js +288 -0
- package/lib/render/excalibur/towerSceneryDraw.js.map +1 -0
- package/lib/render/excalibur/towerShaftNumbers.d.ts +23 -0
- package/lib/render/excalibur/towerShaftNumbers.js +90 -0
- package/lib/render/excalibur/towerShaftNumbers.js.map +1 -0
- package/lib/render/excalibur/towerStructTiles.d.ts +56 -0
- package/lib/render/excalibur/towerStructTiles.js +238 -0
- package/lib/render/excalibur/towerStructTiles.js.map +1 -0
- package/lib/render/excalibur/towerSyncSchedule.d.ts +84 -0
- package/lib/render/excalibur/towerSyncSchedule.js +137 -0
- package/lib/render/excalibur/towerSyncSchedule.js.map +1 -0
- package/lib/render/excalibur/towerWalkerBuild.d.ts +30 -0
- package/lib/render/excalibur/towerWalkerBuild.js +126 -0
- package/lib/render/excalibur/towerWalkerBuild.js.map +1 -0
- package/lib/render/excalibur/trafficSpotlight.d.ts +29 -0
- package/lib/render/excalibur/trafficSpotlight.js +64 -0
- package/lib/render/excalibur/trafficSpotlight.js.map +1 -0
- package/lib/render/facadeGeometry.d.ts +50 -0
- package/lib/render/facadeGeometry.js +79 -0
- package/lib/render/facadeGeometry.js.map +1 -0
- package/lib/render/groundEntrances.d.ts +44 -0
- package/lib/render/groundEntrances.js +118 -0
- package/lib/render/groundEntrances.js.map +1 -0
- package/lib/render/lateNight.d.ts +14 -0
- package/lib/render/lateNight.js +18 -0
- package/lib/render/lateNight.js.map +1 -0
- package/lib/render/lobbyHalls.d.ts +44 -0
- package/lib/render/lobbyHalls.js +63 -0
- package/lib/render/lobbyHalls.js.map +1 -0
- package/lib/render/metroTrainSchedule.d.ts +20 -0
- package/lib/render/metroTrainSchedule.js +65 -0
- package/lib/render/metroTrainSchedule.js.map +1 -0
- package/lib/render/overviewMap/drawList.d.ts +67 -0
- package/lib/render/overviewMap/drawList.js +103 -0
- package/lib/render/overviewMap/drawList.js.map +1 -0
- package/lib/render/overviewMap/extent.d.ts +70 -0
- package/lib/render/overviewMap/extent.js +155 -0
- package/lib/render/overviewMap/extent.js.map +1 -0
- package/lib/render/overviewMap/floorSpans.d.ts +27 -0
- package/lib/render/overviewMap/floorSpans.js +32 -0
- package/lib/render/overviewMap/floorSpans.js.map +1 -0
- package/lib/render/overviewMap/gaps.d.ts +48 -0
- package/lib/render/overviewMap/gaps.js +148 -0
- package/lib/render/overviewMap/gaps.js.map +1 -0
- package/lib/render/overviewMap/geometry.d.ts +139 -0
- package/lib/render/overviewMap/geometry.js +245 -0
- package/lib/render/overviewMap/geometry.js.map +1 -0
- package/lib/render/overviewMap/heatView.d.ts +91 -0
- package/lib/render/overviewMap/heatView.js +143 -0
- package/lib/render/overviewMap/heatView.js.map +1 -0
- package/lib/render/overviewMap/hotelView.d.ts +82 -0
- package/lib/render/overviewMap/hotelView.js +136 -0
- package/lib/render/overviewMap/hotelView.js.map +1 -0
- package/lib/render/overviewMap/model.d.ts +97 -0
- package/lib/render/overviewMap/model.js +116 -0
- package/lib/render/overviewMap/model.js.map +1 -0
- package/lib/render/overviewMap/paint.d.ts +63 -0
- package/lib/render/overviewMap/paint.js +168 -0
- package/lib/render/overviewMap/paint.js.map +1 -0
- package/lib/render/overviewMap/style.d.ts +46 -0
- package/lib/render/overviewMap/style.js +117 -0
- package/lib/render/overviewMap/style.js.map +1 -0
- package/lib/render/overviewMap/tierView.d.ts +103 -0
- package/lib/render/overviewMap/tierView.js +209 -0
- package/lib/render/overviewMap/tierView.js.map +1 -0
- package/lib/render/overviewMap/viewMark.d.ts +69 -0
- package/lib/render/overviewMap/viewMark.js +103 -0
- package/lib/render/overviewMap/viewMark.js.map +1 -0
- package/lib/render/overviewMap/views.d.ts +24 -0
- package/lib/render/overviewMap/views.js +29 -0
- package/lib/render/overviewMap/views.js.map +1 -0
- package/lib/render/pinchTracker.d.ts +91 -0
- package/lib/render/pinchTracker.js +145 -0
- package/lib/render/pinchTracker.js.map +1 -0
- package/lib/render/pixelSprites/amusements.d.ts +32 -0
- package/lib/render/pixelSprites/amusements.js +243 -0
- package/lib/render/pixelSprites/amusements.js.map +1 -0
- package/lib/render/pixelSprites/artScale.d.ts +97 -0
- package/lib/render/pixelSprites/artScale.js +151 -0
- package/lib/render/pixelSprites/artScale.js.map +1 -0
- package/lib/render/pixelSprites/boutique.d.ts +30 -0
- package/lib/render/pixelSprites/boutique.js +244 -0
- package/lib/render/pixelSprites/boutique.js.map +1 -0
- package/lib/render/pixelSprites/clinic.d.ts +30 -0
- package/lib/render/pixelSprites/clinic.js +184 -0
- package/lib/render/pixelSprites/clinic.js.map +1 -0
- package/lib/render/pixelSprites/common.d.ts +185 -0
- package/lib/render/pixelSprites/common.js +449 -0
- package/lib/render/pixelSprites/common.js.map +1 -0
- package/lib/render/pixelSprites/daycare.d.ts +3 -0
- package/lib/render/pixelSprites/daycare.js +99 -0
- package/lib/render/pixelSprites/daycare.js.map +1 -0
- package/lib/render/pixelSprites/dollhouse.d.ts +45 -0
- package/lib/render/pixelSprites/dollhouse.js +110 -0
- package/lib/render/pixelSprites/dollhouse.js.map +1 -0
- package/lib/render/pixelSprites/fitness.d.ts +30 -0
- package/lib/render/pixelSprites/fitness.js +176 -0
- package/lib/render/pixelSprites/fitness.js.map +1 -0
- package/lib/render/pixelSprites/food.d.ts +27 -0
- package/lib/render/pixelSprites/food.interiors.d.ts +38 -0
- package/lib/render/pixelSprites/food.interiors.js +516 -0
- package/lib/render/pixelSprites/food.interiors.js.map +1 -0
- package/lib/render/pixelSprites/food.js +36 -0
- package/lib/render/pixelSprites/food.js.map +1 -0
- package/lib/render/pixelSprites/food.kit.d.ts +50 -0
- package/lib/render/pixelSprites/food.kit.js +140 -0
- package/lib/render/pixelSprites/food.kit.js.map +1 -0
- package/lib/render/pixelSprites/food.looks.d.ts +45 -0
- package/lib/render/pixelSprites/food.looks.js +56 -0
- package/lib/render/pixelSprites/food.looks.js.map +1 -0
- package/lib/render/pixelSprites/layers.d.ts +49 -0
- package/lib/render/pixelSprites/layers.js +61 -0
- package/lib/render/pixelSprites/layers.js.map +1 -0
- package/lib/render/pixelSprites/nightclub.d.ts +3 -0
- package/lib/render/pixelSprites/nightclub.js +108 -0
- package/lib/render/pixelSprites/nightclub.js.map +1 -0
- package/lib/render/pixelSprites/people.d.ts +168 -0
- package/lib/render/pixelSprites/people.js +431 -0
- package/lib/render/pixelSprites/people.js.map +1 -0
- package/lib/render/pixelSprites/residential.d.ts +5 -0
- package/lib/render/pixelSprites/residential.js +506 -0
- package/lib/render/pixelSprites/residential.js.map +1 -0
- package/lib/render/pixelSprites/residential.looks.d.ts +40 -0
- package/lib/render/pixelSprites/residential.looks.js +43 -0
- package/lib/render/pixelSprites/residential.looks.js.map +1 -0
- package/lib/render/pixelSprites/residential.roaches.d.ts +38 -0
- package/lib/render/pixelSprites/residential.roaches.js +88 -0
- package/lib/render/pixelSprites/residential.roaches.js.map +1 -0
- package/lib/render/pixelSprites/residentialRentalSprites.d.ts +11 -0
- package/lib/render/pixelSprites/residentialRentalSprites.js +19 -0
- package/lib/render/pixelSprites/residentialRentalSprites.js.map +1 -0
- package/lib/render/pixelSprites/shop.d.ts +14 -0
- package/lib/render/pixelSprites/shop.interiors.d.ts +50 -0
- package/lib/render/pixelSprites/shop.interiors.js +382 -0
- package/lib/render/pixelSprites/shop.interiors.js.map +1 -0
- package/lib/render/pixelSprites/shop.js +72 -0
- package/lib/render/pixelSprites/shop.js.map +1 -0
- package/lib/render/pixelSprites/shop.looks.d.ts +17 -0
- package/lib/render/pixelSprites/shop.looks.js +24 -0
- package/lib/render/pixelSprites/shop.looks.js.map +1 -0
- package/lib/render/pixelSprites/skyBar.d.ts +11 -0
- package/lib/render/pixelSprites/skyBar.js +125 -0
- package/lib/render/pixelSprites/skyBar.js.map +1 -0
- package/lib/render/pixelSprites/spa.d.ts +3 -0
- package/lib/render/pixelSprites/spa.js +88 -0
- package/lib/render/pixelSprites/spa.js.map +1 -0
- package/lib/render/pixelSprites.d.ts +33 -0
- package/lib/render/pixelSprites.js +167 -0
- package/lib/render/pixelSprites.js.map +1 -0
- package/lib/render/regionGrid.d.ts +49 -0
- package/lib/render/regionGrid.js +82 -0
- package/lib/render/regionGrid.js.map +1 -0
- package/lib/render/regionPaint.d.ts +15 -0
- package/lib/render/regionPaint.js +33 -0
- package/lib/render/regionPaint.js.map +1 -0
- package/lib/render/renderSim.d.ts +104 -0
- package/lib/render/renderSim.js +2 -0
- package/lib/render/renderSim.js.map +1 -0
- package/lib/render/roomPortrait.d.ts +35 -0
- package/lib/render/roomPortrait.js +142 -0
- package/lib/render/roomPortrait.js.map +1 -0
- package/lib/render/roomShading.d.ts +29 -0
- package/lib/render/roomShading.js +43 -0
- package/lib/render/roomShading.js.map +1 -0
- package/lib/render/scale.d.ts +31 -0
- package/lib/render/scale.js +34 -0
- package/lib/render/scale.js.map +1 -0
- package/lib/render/sceneryLayout.d.ts +234 -0
- package/lib/render/sceneryLayout.js +199 -0
- package/lib/render/sceneryLayout.js.map +1 -0
- package/lib/render/sprites/common.d.ts +41 -0
- package/lib/render/sprites/common.js +46 -0
- package/lib/render/sprites/common.js.map +1 -0
- package/lib/render/sprites/escalator.d.ts +27 -0
- package/lib/render/sprites/escalator.js +156 -0
- package/lib/render/sprites/escalator.js.map +1 -0
- package/lib/render/sprites/events.d.ts +56 -0
- package/lib/render/sprites/events.js +280 -0
- package/lib/render/sprites/events.js.map +1 -0
- package/lib/render/sprites/facilities/garage.d.ts +23 -0
- package/lib/render/sprites/facilities/garage.js +230 -0
- package/lib/render/sprites/facilities/garage.js.map +1 -0
- package/lib/render/sprites/facilities/recycling.d.ts +3 -0
- package/lib/render/sprites/facilities/recycling.js +210 -0
- package/lib/render/sprites/facilities/recycling.js.map +1 -0
- package/lib/render/sprites/facilities/recyclingLook.d.ts +49 -0
- package/lib/render/sprites/facilities/recyclingLook.js +52 -0
- package/lib/render/sprites/facilities/recyclingLook.js.map +1 -0
- package/lib/render/sprites/facilities/service.d.ts +14 -0
- package/lib/render/sprites/facilities/service.js +437 -0
- package/lib/render/sprites/facilities/service.js.map +1 -0
- package/lib/render/sprites/facilities/serviceKit.d.ts +61 -0
- package/lib/render/sprites/facilities/serviceKit.js +113 -0
- package/lib/render/sprites/facilities/serviceKit.js.map +1 -0
- package/lib/render/sprites/facilities/vehicles.d.ts +38 -0
- package/lib/render/sprites/facilities/vehicles.js +276 -0
- package/lib/render/sprites/facilities/vehicles.js.map +1 -0
- package/lib/render/sprites/facilities/venue.d.ts +28 -0
- package/lib/render/sprites/facilities/venue.js +211 -0
- package/lib/render/sprites/facilities/venue.js.map +1 -0
- package/lib/render/sprites/facilities/weddingHall.d.ts +9 -0
- package/lib/render/sprites/facilities/weddingHall.js +410 -0
- package/lib/render/sprites/facilities/weddingHall.js.map +1 -0
- package/lib/render/sprites/facilities.d.ts +22 -0
- package/lib/render/sprites/facilities.js +24 -0
- package/lib/render/sprites/facilities.js.map +1 -0
- package/lib/render/sprites/helicopter.d.ts +11 -0
- package/lib/render/sprites/helicopter.js +60 -0
- package/lib/render/sprites/helicopter.js.map +1 -0
- package/lib/render/sprites/sky.d.ts +67 -0
- package/lib/render/sprites/sky.js +85 -0
- package/lib/render/sprites/sky.js.map +1 -0
- package/lib/render/sprites/spiralStair.d.ts +19 -0
- package/lib/render/sprites/spiralStair.js +111 -0
- package/lib/render/sprites/spiralStair.js.map +1 -0
- package/lib/render/sprites/structure/entrance.d.ts +35 -0
- package/lib/render/sprites/structure/entrance.js +347 -0
- package/lib/render/sprites/structure/entrance.js.map +1 -0
- package/lib/render/sprites/structure/lobby.d.ts +88 -0
- package/lib/render/sprites/structure/lobby.js +350 -0
- package/lib/render/sprites/structure/lobby.js.map +1 -0
- package/lib/render/sprites/structure/revolvingDoor.d.ts +53 -0
- package/lib/render/sprites/structure/revolvingDoor.js +184 -0
- package/lib/render/sprites/structure/revolvingDoor.js.map +1 -0
- package/lib/render/sprites/structure/rooftop.d.ts +93 -0
- package/lib/render/sprites/structure/rooftop.js +302 -0
- package/lib/render/sprites/structure/rooftop.js.map +1 -0
- package/lib/render/sprites/structure/shell.d.ts +19 -0
- package/lib/render/sprites/structure/shell.js +142 -0
- package/lib/render/sprites/structure/shell.js.map +1 -0
- package/lib/render/sprites/structure/skyBridge.d.ts +28 -0
- package/lib/render/sprites/structure/skyBridge.js +259 -0
- package/lib/render/sprites/structure/skyBridge.js.map +1 -0
- package/lib/render/sprites/structure/tallLobby.d.ts +8 -0
- package/lib/render/sprites/structure/tallLobby.js +166 -0
- package/lib/render/sprites/structure/tallLobby.js.map +1 -0
- package/lib/render/sprites/structure/tallLobbyPieces.d.ts +18 -0
- package/lib/render/sprites/structure/tallLobbyPieces.js +82 -0
- package/lib/render/sprites/structure/tallLobbyPieces.js.map +1 -0
- package/lib/render/sprites/structure.d.ts +15 -0
- package/lib/render/sprites/structure.js +16 -0
- package/lib/render/sprites/structure.js.map +1 -0
- package/lib/render/sprites/transport.d.ts +30 -0
- package/lib/render/sprites/transport.js +376 -0
- package/lib/render/sprites/transport.js.map +1 -0
- package/lib/render/sprites.d.ts +16 -0
- package/lib/render/sprites.js +108 -0
- package/lib/render/sprites.js.map +1 -0
- package/lib/render/venueFlights.d.ts +61 -0
- package/lib/render/venueFlights.js +50 -0
- package/lib/render/venueFlights.js.map +1 -0
- package/lib/shared/engineTypes.d.ts +256 -0
- package/lib/shared/engineTypes.js +8 -0
- package/lib/shared/engineTypes.js.map +1 -0
- package/lib/shared/floorRuns.d.ts +22 -0
- package/lib/shared/floorRuns.js +39 -0
- package/lib/shared/floorRuns.js.map +1 -0
- package/lib/shared/inputEvents.d.ts +18 -0
- package/lib/shared/inputEvents.js +23 -0
- package/lib/shared/inputEvents.js.map +1 -0
- package/lib/shared/serializedGame.d.ts +142 -0
- package/lib/shared/serializedGame.js +2 -0
- package/lib/shared/serializedGame.js.map +1 -0
- package/lib/shared/types.d.ts +298 -0
- package/lib/shared/types.js +47 -0
- package/lib/shared/types.js.map +1 -0
- package/lib/shared/unitState.d.ts +36 -0
- package/lib/shared/unitState.js +42 -0
- package/lib/shared/unitState.js.map +1 -0
- package/lib/shared/vacateReasonText.d.ts +20 -0
- package/lib/shared/vacateReasonText.js +23 -0
- package/lib/shared/vacateReasonText.js.map +1 -0
- package/lib/shared/viewZoom.d.ts +14 -0
- package/lib/shared/viewZoom.js +17 -0
- package/lib/shared/viewZoom.js.map +1 -0
- package/lib/shared/wellFormed.d.ts +14 -0
- package/lib/shared/wellFormed.js +19 -0
- package/lib/shared/wellFormed.js.map +1 -0
- package/lib/simport/cards.d.ts +26 -0
- package/lib/simport/cards.js +138 -0
- package/lib/simport/cards.js.map +1 -0
- package/lib/simport/clockView.d.ts +24 -0
- package/lib/simport/clockView.js +43 -0
- package/lib/simport/clockView.js.map +1 -0
- package/lib/simport/commands.d.ts +215 -0
- package/lib/simport/commands.js +2 -0
- package/lib/simport/commands.js.map +1 -0
- package/lib/simport/emergencyReads.d.ts +19 -0
- package/lib/simport/emergencyReads.js +47 -0
- package/lib/simport/emergencyReads.js.map +1 -0
- package/lib/simport/enginePort.d.ts +433 -0
- package/lib/simport/enginePort.js +11 -0
- package/lib/simport/enginePort.js.map +1 -0
- package/lib/simport/fixtures/catalog.classic.json +2137 -0
- package/lib/simport/fixtures/catalog.modern.json +2515 -0
- package/lib/simport/fixtures/viewLayout.json +927 -0
- package/lib/simport/headerClock.d.ts +31 -0
- package/lib/simport/headerClock.js +29 -0
- package/lib/simport/headerClock.js.map +1 -0
- package/lib/simport/panels.d.ts +243 -0
- package/lib/simport/panels.js +2 -0
- package/lib/simport/panels.js.map +1 -0
- package/lib/simport/personCards.d.ts +63 -0
- package/lib/simport/personCards.js +55 -0
- package/lib/simport/personCards.js.map +1 -0
- package/lib/simport/portCodes.d.ts +41 -0
- package/lib/simport/portCodes.js +49 -0
- package/lib/simport/portCodes.js.map +1 -0
- package/lib/simport/portEvents.d.ts +39 -0
- package/lib/simport/portEvents.js +43 -0
- package/lib/simport/portEvents.js.map +1 -0
- package/lib/simport/portRenderSim.d.ts +70 -0
- package/lib/simport/portRenderSim.js +129 -0
- package/lib/simport/portRenderSim.js.map +1 -0
- package/lib/simport/queries.d.ts +64 -0
- package/lib/simport/queries.js +30 -0
- package/lib/simport/queries.js.map +1 -0
- package/lib/simport/recyclingPort.d.ts +13 -0
- package/lib/simport/recyclingPort.js +2 -0
- package/lib/simport/recyclingPort.js.map +1 -0
- package/lib/simport/request.d.ts +44 -0
- package/lib/simport/request.js +214 -0
- package/lib/simport/request.js.map +1 -0
- package/lib/simport/roomTiers.d.ts +102 -0
- package/lib/simport/roomTiers.js +122 -0
- package/lib/simport/roomTiers.js.map +1 -0
- package/lib/simport/scheduleSlots.d.ts +19 -0
- package/lib/simport/scheduleSlots.js +87 -0
- package/lib/simport/scheduleSlots.js.map +1 -0
- package/lib/simport/skyBridgePort.d.ts +20 -0
- package/lib/simport/skyBridgePort.js +2 -0
- package/lib/simport/skyBridgePort.js.map +1 -0
- package/lib/simport/skyBridgeView.d.ts +15 -0
- package/lib/simport/skyBridgeView.js +42 -0
- package/lib/simport/skyBridgeView.js.map +1 -0
- package/lib/simport/statsSheet.d.ts +15 -0
- package/lib/simport/statsSheet.js +101 -0
- package/lib/simport/statsSheet.js.map +1 -0
- package/lib/simport/tdtRecords.d.ts +9 -0
- package/lib/simport/tdtRecords.js +112 -0
- package/lib/simport/tdtRecords.js.map +1 -0
- package/lib/simport/tdtReportFacts.d.ts +110 -0
- package/lib/simport/tdtReportFacts.js +8 -0
- package/lib/simport/tdtReportFacts.js.map +1 -0
- package/lib/simport/trafficPort.d.ts +22 -0
- package/lib/simport/trafficPort.js +2 -0
- package/lib/simport/trafficPort.js.map +1 -0
- package/lib/simport/view.d.ts +275 -0
- package/lib/simport/view.js +2 -0
- package/lib/simport/view.js.map +1 -0
- package/lib/simport/viewReader.d.ts +89 -0
- package/lib/simport/viewReader.js +426 -0
- package/lib/simport/viewReader.js.map +1 -0
- package/lib/styles/game/appearance.css +108 -0
- package/lib/styles/game/base.css +68 -0
- package/lib/styles/game/components.css +69 -0
- package/lib/styles/game/desk-title.css +183 -0
- package/lib/styles/game/desk.css +487 -0
- package/lib/styles/game/dialogs.css +360 -0
- package/lib/styles/game/editor-sidebar.css +116 -0
- package/lib/styles/game/elevator-schedule.css +217 -0
- package/lib/styles/game/file-dialog.css +470 -0
- package/lib/styles/game/help.css +141 -0
- package/lib/styles/game/launch-fireworks.css +17 -0
- package/lib/styles/game/media-landscape.css +333 -0
- package/lib/styles/game/media-phone.css +303 -0
- package/lib/styles/game/media-tablet-touch.css +177 -0
- package/lib/styles/game/menubar.css +158 -0
- package/lib/styles/game/new-tower.css +219 -0
- package/lib/styles/game/onboarding.css +32 -0
- package/lib/styles/game/screen-saver.css +85 -0
- package/lib/styles/game/splash.css +413 -0
- package/lib/styles/game/stats-saves.css +106 -0
- package/lib/styles/game/tools-stage.css +340 -0
- package/lib/styles/game/topbar.css +191 -0
- package/lib/styles/menu-bar.css +108 -0
- package/lib/styles/not-found.css +335 -0
- package/lib/styles/overview-map-views.css +88 -0
- package/lib/styles/overview-map.css +195 -0
- package/lib/styles/retro-components.css +179 -0
- package/lib/styles/retro-page.css +254 -0
- package/lib/styles/retro-tokens.css +122 -0
- package/lib/styles/schemes/high-contrast.css +173 -0
- package/lib/styles/schemes/skyline.css +134 -0
- package/lib/styles.css +66 -0
- package/lib/ui/desk/deskGeometry.d.ts +59 -0
- package/lib/ui/desk/deskGeometry.js +106 -0
- package/lib/ui/desk/deskGeometry.js.map +1 -0
- package/lib/ui/desk/deskWindow.d.ts +90 -0
- package/lib/ui/desk/deskWindow.js +253 -0
- package/lib/ui/desk/deskWindow.js.map +1 -0
- package/lib/ui/desk/deskWindowMenu.d.ts +55 -0
- package/lib/ui/desk/deskWindowMenu.js +143 -0
- package/lib/ui/desk/deskWindowMenu.js.map +1 -0
- package/lib/ui/escape.d.ts +1 -0
- package/lib/ui/escape.js +14 -0
- package/lib/ui/escape.js.map +1 -0
- package/lib/ui/format.d.ts +14 -0
- package/lib/ui/format.js +36 -0
- package/lib/ui/format.js.map +1 -0
- package/lib/ui/iconPaths.generated.d.ts +4 -0
- package/lib/ui/iconPaths.generated.js +68 -0
- package/lib/ui/iconPaths.generated.js.map +1 -0
- package/lib/ui/icons.d.ts +83 -0
- package/lib/ui/icons.js +156 -0
- package/lib/ui/icons.js.map +1 -0
- package/lib/ui/menuBar.d.ts +94 -0
- package/lib/ui/menuBar.js +361 -0
- package/lib/ui/menuBar.js.map +1 -0
- package/lib/ui/modalPrecedence.d.ts +108 -0
- package/lib/ui/modalPrecedence.js +165 -0
- package/lib/ui/modalPrecedence.js.map +1 -0
- package/lib/ui/movableWindow.d.ts +124 -0
- package/lib/ui/movableWindow.js +247 -0
- package/lib/ui/movableWindow.js.map +1 -0
- package/lib/ui/overviewMapInput.d.ts +109 -0
- package/lib/ui/overviewMapInput.js +135 -0
- package/lib/ui/overviewMapInput.js.map +1 -0
- package/lib/ui/uiModal.d.ts +38 -0
- package/lib/ui/uiModal.js +70 -0
- package/lib/ui/uiModal.js.map +1 -0
- package/lib/wasmhost/buildSection.d.ts +54 -0
- package/lib/wasmhost/buildSection.js +143 -0
- package/lib/wasmhost/buildSection.js.map +1 -0
- package/lib/wasmhost/catalogCheck.d.ts +11 -0
- package/lib/wasmhost/catalogCheck.js +43 -0
- package/lib/wasmhost/catalogCheck.js.map +1 -0
- package/lib/wasmhost/engineAssets.d.ts +57 -0
- package/lib/wasmhost/engineAssets.js +63 -0
- package/lib/wasmhost/engineAssets.js.map +1 -0
- package/lib/wasmhost/engineBoot.d.ts +165 -0
- package/lib/wasmhost/engineBoot.js +254 -0
- package/lib/wasmhost/engineBoot.js.map +1 -0
- package/lib/wasmhost/engineChoice.d.ts +6 -0
- package/lib/wasmhost/engineChoice.js +2 -0
- package/lib/wasmhost/engineChoice.js.map +1 -0
- package/lib/wasmhost/engineDiagnostics.d.ts +66 -0
- package/lib/wasmhost/engineDiagnostics.js +189 -0
- package/lib/wasmhost/engineDiagnostics.js.map +1 -0
- package/lib/wasmhost/engineDiagnosticsLive.d.ts +15 -0
- package/lib/wasmhost/engineDiagnosticsLive.js +31 -0
- package/lib/wasmhost/engineDiagnosticsLive.js.map +1 -0
- package/lib/wasmhost/engineIdentity.d.ts +30 -0
- package/lib/wasmhost/engineIdentity.js +59 -0
- package/lib/wasmhost/engineIdentity.js.map +1 -0
- package/lib/wasmhost/engineLabel.d.ts +40 -0
- package/lib/wasmhost/engineLabel.js +50 -0
- package/lib/wasmhost/engineLabel.js.map +1 -0
- package/lib/wasmhost/engineLoad.d.ts +48 -0
- package/lib/wasmhost/engineLoad.js +53 -0
- package/lib/wasmhost/engineLoad.js.map +1 -0
- package/lib/wasmhost/enginePackageCheck.d.ts +77 -0
- package/lib/wasmhost/enginePackageCheck.js +274 -0
- package/lib/wasmhost/enginePackageCheck.js.map +1 -0
- package/lib/wasmhost/enginePackageNames.d.ts +25 -0
- package/lib/wasmhost/enginePackageNames.js +28 -0
- package/lib/wasmhost/enginePackageNames.js.map +1 -0
- package/lib/wasmhost/enginePackageRecord.d.ts +78 -0
- package/lib/wasmhost/enginePackageRecord.js +108 -0
- package/lib/wasmhost/enginePackageRecord.js.map +1 -0
- package/lib/wasmhost/engineRepair.d.ts +55 -0
- package/lib/wasmhost/engineRepair.js +183 -0
- package/lib/wasmhost/engineRepair.js.map +1 -0
- package/lib/wasmhost/frameView.d.ts +87 -0
- package/lib/wasmhost/frameView.js +133 -0
- package/lib/wasmhost/frameView.js.map +1 -0
- package/lib/wasmhost/hostFault.d.ts +40 -0
- package/lib/wasmhost/hostFault.js +94 -0
- package/lib/wasmhost/hostFault.js.map +1 -0
- package/lib/wasmhost/loadEngineModule.d.ts +79 -0
- package/lib/wasmhost/loadEngineModule.js +66 -0
- package/lib/wasmhost/loadEngineModule.js.map +1 -0
- package/lib/wasmhost/packageHash.d.ts +48 -0
- package/lib/wasmhost/packageHash.js +436 -0
- package/lib/wasmhost/packageHash.js.map +1 -0
- package/lib/wasmhost/rustEngine.d.ts +49 -0
- package/lib/wasmhost/rustEngine.js +63 -0
- package/lib/wasmhost/rustEngine.js.map +1 -0
- package/lib/wasmhost/slotPopulation.d.ts +19 -0
- package/lib/wasmhost/slotPopulation.js +69 -0
- package/lib/wasmhost/slotPopulation.js.map +1 -0
- package/lib/wasmhost/telemetry.d.ts +31 -0
- package/lib/wasmhost/telemetry.js +13 -0
- package/lib/wasmhost/telemetry.js.map +1 -0
- package/package.json +80 -4
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"revolvingDoor.js","sources":["../../../../src/render/sprites/structure/revolvingDoor.ts"],"sourcesContent":["/**\n * The wooden revolving door between two lobby halls of different heights\n * (#2068). Four wooden wings with glass in the upper panels turn on a center\n * post inside a drum, under a wooden canopy with brass trim. The drum straddles\n * the wall between the halls; the wall runs from the taller hall's ceiling down\n * to the canopy.\n *\n * The door turns one way only: seen from the street side, its front half moves\n * to the right. So a person walking right passes through the front of the drum\n * and a person walking left passes through the back, and two people can cross\n * in opposite directions at the same time, each in their own compartment.\n *\n * Draw order, so each person sits in the right compartment:\n * 1. `drawRevolvingDoorBack`: the wall, the drum's back, the back wings.\n * 2. The people walking left (they pass behind the center post).\n * 3. `drawRevolvingDoorMiddle`: the center post and the front wings.\n * 4. The people walking right.\n * 5. `drawRevolvingDoorFront`: the drum's front glass, its posts and canopy.\n *\n * Every piece keys on `angle` and `lit` only. Integer pixels.\n */\n\n\n/** The drum's radius in world pixels: wide enough for one walker (7 px) per\n * compartment with room to push. */\nexport const DOOR_RADIUS = 12;\n/** The height of the wings and the drum, under the canopy. */\nexport const DOOR_HEIGHT = 30;\n/** The canopy's thickness above the drum. */\nconst CANOPY = 4;\n/** A quarter turn: four wings, so the door looks the same every quarter. */\nexport const QUARTER_TURN = Math.PI / 2;\n\ninterface DoorColors {\n inside: string;\n woodFront: string;\n woodFace: string;\n woodBack: string;\n glassFront: string;\n glassBack: string;\n canopy: string;\n brass: string;\n wall: string;\n wallEdge: string;\n drumGlass: string;\n}\n\nconst DAY: DoorColors = {\n inside: \"#3A2614\",\n woodFront: \"#74492A\",\n woodFace: \"#8A5A34\",\n woodBack: \"#4E3220\",\n glassFront: \"rgba(190,215,225,0.55)\",\n glassBack: \"rgba(120,140,150,0.55)\",\n canopy: \"#6B4426\",\n brass: \"#C9A24B\",\n wall: \"#D8CDB6\",\n wallEdge: \"#A89878\",\n drumGlass: \"rgba(205,228,238,0.16)\",\n};\n\nconst NIGHT: DoorColors = {\n inside: \"#4A3018\",\n woodFront: \"#6A4024\",\n woodFace: \"#7E5230\",\n woodBack: \"#3E2818\",\n glassFront: \"rgba(255,214,150,0.38)\",\n glassBack: \"rgba(150,120,80,0.45)\",\n canopy: \"#5E3A20\",\n brass: \"#E2BC5C\",\n wall: \"#C8BBA0\",\n wallEdge: \"#968766\",\n drumGlass: \"rgba(255,220,160,0.12)\",\n};\n\nfunction colors(lit: boolean): DoorColors {\n return lit ? NIGHT : DAY;\n}\n\ninterface Wing {\n /** The wing tip's x offset from the center post. */\n tipX: number;\n /** Toward the viewer (positive) or away (negative), from -1 to 1. */\n depth: number;\n}\n\n/** The four wings at `angle`. Angle 0 points a wing straight at the viewer;\n * a rising angle moves the front wing to the right. */\nfunction wings(angle: number): Wing[] {\n const out: Wing[] = [];\n for (let k = 0; k < 4; k++) {\n const a = angle + k * QUARTER_TURN;\n out.push({ tipX: Math.sin(a) * DOOR_RADIUS, depth: Math.cos(a) });\n }\n return out.sort((p, q) => p.depth - q.depth);\n}\n\n/** One wing, seen from the side: a panel from the center post out to its tip,\n * wood below, glass above, a brass push bar across the middle. A wing that\n * points at the viewer (or away) shows only its edge. */\nfunction drawWing(ctx: CanvasRenderingContext2D, cx: number, top: number, w: Wing, c: DoorColors): void {\n const front = w.depth >= 0;\n const tip = Math.round(cx + w.tipX);\n const x0 = Math.min(cx, tip);\n const span = Math.abs(tip - cx);\n const h = DOOR_HEIGHT - 2;\n const y = top + 1;\n // A near wing turned broadside to the viewer catches the light on its face.\n const broadside = Math.abs(w.tipX) > DOOR_RADIUS * 0.7;\n let wood = c.woodBack;\n if (front) wood = broadside ? c.woodFace : c.woodFront;\n if (span < 2) {\n ctx.fillStyle = wood; // edge on: just the stile\n ctx.fillRect(tip, y, 1, h);\n return;\n }\n const glassH = Math.round(h * 0.42);\n ctx.fillStyle = wood;\n ctx.fillRect(x0, y, span + 1, 2); // top rail\n ctx.fillStyle = front ? c.glassFront : c.glassBack;\n ctx.fillRect(x0, y + 2, span + 1, glassH); // glass in the upper panel\n ctx.fillStyle = wood;\n ctx.fillRect(x0, y + 2 + glassH, span + 1, h - 2 - glassH); // wooden lower panel\n ctx.fillRect(tip, y, 1, h); // the stile at the tip\n if (front) {\n ctx.fillStyle = c.brass; // push bar\n ctx.fillRect(x0 + 1, y + 2 + glassH + 2, Math.max(1, span - 1), 1);\n }\n}\n\n/** Where the shorter hall's ceiling meets the wall: above `y` the wall\n * stands on the taller hall's side alone (`side` -1 left, 1 right), so it\n * never covers what is built over the shorter hall. */\nexport interface WallStep {\n y: number;\n side: -1 | 1;\n}\n\n/** One stretch of the marble wall, `w` wide from `x0`, with darker edges. */\nfunction wallStrip(ctx: CanvasRenderingContext2D, c: DoorColors, x0: number, w: number, y0: number, y1: number): void {\n if (y1 <= y0) return;\n ctx.fillStyle = c.wall;\n ctx.fillRect(x0, y0, w, y1 - y0);\n ctx.fillStyle = c.wallEdge;\n ctx.fillRect(x0, y0, 1, y1 - y0);\n ctx.fillRect(x0 + w - 1, y0, 1, y1 - y0);\n}\n\n/** The wall over the door, the drum's dark back and floor plate, and the\n * wings on the far side of the center post. `wallTop` is the taller hall's\n * ceiling; `foot` is the line people stand on; `step`, where the halls'\n * ceilings differ, is the shorter one's. */\nexport function drawRevolvingDoorBack(\n ctx: CanvasRenderingContext2D,\n cx: number,\n foot: number,\n wallTop: number,\n angle: number,\n lit: boolean,\n step?: WallStep,\n): void {\n const c = colors(lit);\n const x = Math.round(cx);\n const top = Math.round(foot) - DOOR_HEIGHT;\n const wallBottom = top - CANOPY;\n const stepY = step ? Math.max(Math.round(wallTop), Math.min(wallBottom, Math.round(step.y))) : Math.round(wallTop);\n if (step) wallStrip(ctx, c, step.side < 0 ? x - 2 : x, 3, Math.round(wallTop), stepY); // the taller hall's side\n wallStrip(ctx, c, x - 2, 5, stepY, wallBottom); // marble wall between the halls\n ctx.fillStyle = c.inside; // the dark inside of the drum\n ctx.fillRect(x - DOOR_RADIUS, top, 2 * DOOR_RADIUS + 1, DOOR_HEIGHT);\n ctx.fillStyle = c.canopy; // the round floor plate\n ctx.fillRect(x - DOOR_RADIUS, Math.round(foot) - 1, 2 * DOOR_RADIUS + 1, 1);\n for (const w of wings(angle)) if (w.depth < 0) drawWing(ctx, x, top, w, c);\n}\n\n/** The center post and the wings on the near side of it. People walking left\n * are drawn before this, people walking right after it. */\nexport function drawRevolvingDoorMiddle(ctx: CanvasRenderingContext2D, cx: number, foot: number, angle: number, lit: boolean): void {\n const c = colors(lit);\n const x = Math.round(cx);\n const top = Math.round(foot) - DOOR_HEIGHT;\n ctx.fillStyle = \"#2A1C10\"; // center post\n ctx.fillRect(x, top, 1, DOOR_HEIGHT);\n for (const w of wings(angle)) if (w.depth >= 0) drawWing(ctx, x, top, w, c);\n}\n\n/** The drum's curved front glass, its two wooden posts, and the wooden\n * canopy with its brass trim. */\nexport function drawRevolvingDoorFront(ctx: CanvasRenderingContext2D, cx: number, foot: number, lit: boolean): void {\n const c = colors(lit);\n const x = Math.round(cx);\n const top = Math.round(foot) - DOOR_HEIGHT;\n const left = x - DOOR_RADIUS - 1;\n const width = 2 * DOOR_RADIUS + 3;\n ctx.fillStyle = c.drumGlass; // the curved glass, with one highlight where it turns\n ctx.fillRect(x - DOOR_RADIUS, top, 2 * DOOR_RADIUS + 1, DOOR_HEIGHT);\n ctx.fillStyle = \"rgba(255,255,255,0.18)\";\n ctx.fillRect(x - DOOR_RADIUS + 3, top + 2, 1, DOOR_HEIGHT - 6);\n ctx.fillStyle = c.canopy;\n ctx.fillRect(left, top - CANOPY, width, CANOPY); // wooden canopy\n ctx.fillRect(left, top, 1, DOOR_HEIGHT); // drum posts\n ctx.fillRect(left + width - 1, top, 1, DOOR_HEIGHT);\n ctx.fillStyle = c.brass;\n ctx.fillRect(left, top - CANOPY, width, 1); // brass trim, top and bottom of the canopy\n ctx.fillRect(left, top - 1, width, 1);\n ctx.fillRect(left, Math.round(foot) - 1, 1, 1); // brass shoes on the posts\n ctx.fillRect(left + width - 1, Math.round(foot) - 1, 1, 1);\n}\n\n/** True while a person standing at `personX` (their left edge, `width` wide)\n * is inside the drum centered at `cx`. */\nexport function insideDrum(cx: number, personX: number, width: number): boolean {\n const mid = personX + width / 2;\n return Math.abs(mid - cx) <= DOOR_RADIUS;\n}\n\n/** The door's next angle. It turns only while someone is inside, at the pace\n * of a person walking `speed` world pixels a second pushing a wing at its\n * tip, always the same way, and stops the moment the drum is empty. */\nexport function turnDoor(angle: number, occupied: boolean, speed: number, dt: number): number {\n if (!occupied) return angle;\n return (angle + (Math.abs(speed) * dt) / DOOR_RADIUS) % (4 * QUARTER_TURN);\n}\n"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;AAoBG;AAGH;AACqC;AAC9B,MAAM,WAAW,GAAG;AAC3B;AACO,MAAM,WAAW,GAAG;AAC3B;AACA,MAAM,MAAM,GAAG,CAAC;AAChB;MACa,YAAY,GAAG,IAAI,CAAC,EAAE,GAAG;AAgBtC,MAAM,GAAG,GAAe;AACtB,IAAA,MAAM,EAAE,SAAS;AACjB,IAAA,SAAS,EAAE,SAAS;AACpB,IAAA,QAAQ,EAAE,SAAS;AACnB,IAAA,QAAQ,EAAE,SAAS;AACnB,IAAA,UAAU,EAAE,wBAAwB;AACpC,IAAA,SAAS,EAAE,wBAAwB;AACnC,IAAA,MAAM,EAAE,SAAS;AACjB,IAAA,KAAK,EAAE,SAAS;AAChB,IAAA,IAAI,EAAE,SAAS;AACf,IAAA,QAAQ,EAAE,SAAS;AACnB,IAAA,SAAS,EAAE,wBAAwB;CACpC;AAED,MAAM,KAAK,GAAe;AACxB,IAAA,MAAM,EAAE,SAAS;AACjB,IAAA,SAAS,EAAE,SAAS;AACpB,IAAA,QAAQ,EAAE,SAAS;AACnB,IAAA,QAAQ,EAAE,SAAS;AACnB,IAAA,UAAU,EAAE,wBAAwB;AACpC,IAAA,SAAS,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AAAE,QAAA,OAAO,KAAK;IAC3B,OAAO,CAAC,KAAK,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,EAAE,IAAI,WAAW,KAAK,CAAC,GAAG,YAAY,CAAC;AAC5E;;"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The tower's exterior-facade family: the rooftop tower crane, the exterior
|
|
3
|
+
* fire-escape stairs that clad the floors, and the ground-floor entrance
|
|
4
|
+
* awning. Extracted from `structure.ts` (and since grown the crane scale
|
|
5
|
+
* constants); all pure ctx-only draws.
|
|
6
|
+
*/
|
|
7
|
+
/** How much the base raster is blown up when rendered. The base crane stands
|
|
8
|
+
* 1.7 floors tall, which reads fine against an empty sky but collapses next
|
|
9
|
+
* to the city skyline (10-36 floor buildings) and the street-level plaza:
|
|
10
|
+
* a real tower crane rises 4-8 floors above the roof it builds. The scale
|
|
11
|
+
* keeps the crane a fixed size (it never grows with the tower; the skyline
|
|
12
|
+
* only calibrates the scene if everything obeys it). */
|
|
13
|
+
export declare const CRANE_SCALE = 3;
|
|
14
|
+
/** Canvas size of the rooftop tower-crane graphic (scaled). */
|
|
15
|
+
export declare const CRANE_W: number;
|
|
16
|
+
export declare const CRANE_H: number;
|
|
17
|
+
/** The mast's x in the scaled crane graphic, as a share of its width: the
|
|
18
|
+
* crane actor's anchor, so the mast (not the middle of the jib) stands over
|
|
19
|
+
* the roof it is perched on. */
|
|
20
|
+
export declare const CRANE_MAST_ANCHOR_X: number;
|
|
21
|
+
/** The narrowest roof, in tiles, the crane's pad fits on. A narrower top (a
|
|
22
|
+
* spire, a one-tile column) has no room for a crane, so none is shown. */
|
|
23
|
+
export declare const CRANE_MIN_ROOF_TILES: number;
|
|
24
|
+
/**
|
|
25
|
+
* Where to perch the rooftop crane along the top floor, in world-tile units
|
|
26
|
+
* (the mid-tile of the widest run of built tiles). Anchoring to the plain
|
|
27
|
+
* (min,max) midpoint floats the crane over open sky when the top floor is
|
|
28
|
+
* built in disjoint blocks (a setback, or a partly-leased top office row),
|
|
29
|
+
* because the midpoint then lands in the gap between blocks. Centering on the
|
|
30
|
+
* widest CONTIGUOUS run keeps the crane over actual structure; for a
|
|
31
|
+
* fully-built row the widest run IS the whole span, so the result is the same
|
|
32
|
+
* midpoint as before. Ties keep the leftmost run. `builtTiles` must be
|
|
33
|
+
* non-empty (callers only invoke this for a floor that has structure); it may
|
|
34
|
+
* repeat indices; duplicates are collapsed so a repeated tile can't be read
|
|
35
|
+
* as a one-wide gap that splits a run.
|
|
36
|
+
*/
|
|
37
|
+
export declare function craneAnchorTile(builtTiles: Iterable<number>): number;
|
|
38
|
+
/** The widest run of `builtTiles` (see {@link craneAnchorTile}): its center
|
|
39
|
+
* in world-tile units and its width in tiles, which says whether the
|
|
40
|
+
* crane's pad fits on it ({@link CRANE_MIN_ROOF_TILES}). */
|
|
41
|
+
export declare function craneRoof(builtTiles: Iterable<number>): {
|
|
42
|
+
center: number;
|
|
43
|
+
width: number;
|
|
44
|
+
};
|
|
45
|
+
/** How far the drawing reaches left of the mast (the counter-jib's end) and
|
|
46
|
+
* right of it (the jib's tip and the canvas edge), in tiles. */
|
|
47
|
+
export declare const CRANE_REACH_LEFT_TILES: number;
|
|
48
|
+
export declare const CRANE_REACH_RIGHT_TILES: number;
|
|
49
|
+
/**
|
|
50
|
+
* Where the crane's mast stands, in world-tile units, on `roof` (from
|
|
51
|
+
* {@link craneRoof}) in a lot `lotWidth` tiles wide. It is the roof's center,
|
|
52
|
+
* moved along the roof only when the jib or the counter-jib would otherwise
|
|
53
|
+
* reach past the lot's edge (a narrow top flush to an edge, #334). The pad
|
|
54
|
+
* always stays on the roof: when the lot can't hold the whole drawing, the
|
|
55
|
+
* mast keeps the pad's end at the roof's edge and lets the arm overhang.
|
|
56
|
+
*/
|
|
57
|
+
export declare function craneMastTile(roof: {
|
|
58
|
+
center: number;
|
|
59
|
+
width: number;
|
|
60
|
+
}, lotWidth: number): number;
|
|
61
|
+
/**
|
|
62
|
+
* The rooftop tower crane that crowns the build while the tower is still
|
|
63
|
+
* climbing (it comes down once the 100th floor caps the tower, as in the
|
|
64
|
+
* original). Drawn fresh each frame into a CRANE_W×CRANE_H rect: the trolley
|
|
65
|
+
* rides the jib, the hook reels a girder up and down, and a red aircraft
|
|
66
|
+
* beacon blinks at the apex after dark, all on the decorative clock, so
|
|
67
|
+
* pause/reduced-motion freezes it with everything else.
|
|
68
|
+
*/
|
|
69
|
+
export declare function drawCrane(ctx: CanvasRenderingContext2D, t: number, lit: boolean): void;
|
|
70
|
+
/** Width in px of one exterior fire-escape segment. */
|
|
71
|
+
export declare const ESCAPE_W = 14;
|
|
72
|
+
/**
|
|
73
|
+
* One floor-tall segment of the exterior escape stairs that cling to both
|
|
74
|
+
* sides of the tower (a canon staple of the original's silhouette). `side` is
|
|
75
|
+
* which outside wall it hangs off; the flight's diagonal flips with floor
|
|
76
|
+
* parity so stacked segments read as one continuous zigzag down the facade.
|
|
77
|
+
*/
|
|
78
|
+
export declare function drawEscapeStairs(ctx: CanvasRenderingContext2D, side: "left" | "right", parity: 0 | 1, floorH: number): void;
|
|
79
|
+
/** Width in px of one ground-floor entrance awning. Noticeably wider than a
|
|
80
|
+
* fire-escape segment ({@link ESCAPE_W}) so the canopy reads as a projecting
|
|
81
|
+
* storefront shade rather than a ladder rail. */
|
|
82
|
+
export declare const AWNING_W = 24;
|
|
83
|
+
/**
|
|
84
|
+
* A prestige entrance marquee over the ground-floor frontage, standing in for
|
|
85
|
+
* the fire escape on floor 1. Deep green with gilded trim so it reads as a grand
|
|
86
|
+
* lobby canopy, not a storefront: the street level wears these instead of the
|
|
87
|
+
* exterior stairs that clad the floors above, so we swap them in on the ground
|
|
88
|
+
* row. `side` is the wall the canopy juts out from: it mounts flush to that wall
|
|
89
|
+
* and slopes down and outward. Painted into a floor-tall canvas (only the upper
|
|
90
|
+
* strip is used) so it shares the escape segment's top-left anchor and
|
|
91
|
+
* edge-following geometry.
|
|
92
|
+
*/
|
|
93
|
+
export declare function drawAwning(ctx: CanvasRenderingContext2D, side: "left" | "right", floorH: number): void;
|
|
@@ -0,0 +1,302 @@
|
|
|
1
|
+
import { TILE } from '../../scale.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The tower's exterior-facade family: the rooftop tower crane, the exterior
|
|
5
|
+
* fire-escape stairs that clad the floors, and the ground-floor entrance
|
|
6
|
+
* awning. Extracted from `structure.ts` (and since grown the crane scale
|
|
7
|
+
* constants); all pure ctx-only draws.
|
|
8
|
+
*/
|
|
9
|
+
/** The hand-tuned base raster of the crane drawing (every coordinate in
|
|
10
|
+
* drawCrane is authored against this grid; scale, never retune). */
|
|
11
|
+
const CRANE_BASE_W = 128;
|
|
12
|
+
const CRANE_BASE_H = 76;
|
|
13
|
+
/** How much the base raster is blown up when rendered. The base crane stands
|
|
14
|
+
* 1.7 floors tall, which reads fine against an empty sky but collapses next
|
|
15
|
+
* to the city skyline (10-36 floor buildings) and the street-level plaza:
|
|
16
|
+
* a real tower crane rises 4-8 floors above the roof it builds. The scale
|
|
17
|
+
* keeps the crane a fixed size (it never grows with the tower; the skyline
|
|
18
|
+
* only calibrates the scene if everything obeys it). */
|
|
19
|
+
const CRANE_SCALE = 3;
|
|
20
|
+
/** Canvas size of the rooftop tower-crane graphic (scaled). */
|
|
21
|
+
const CRANE_W = CRANE_BASE_W * CRANE_SCALE;
|
|
22
|
+
const CRANE_H = CRANE_BASE_H * CRANE_SCALE;
|
|
23
|
+
/** Where the mast stands across the base raster, and the width of the roof
|
|
24
|
+
* pad under it, in base pixels. The jib reaches right, so the mast is left
|
|
25
|
+
* of the drawing's middle. */
|
|
26
|
+
const CRANE_BASE_MAST_X = 56;
|
|
27
|
+
const CRANE_BASE_PAD_W = 14;
|
|
28
|
+
/** How far the counter-jib reaches left of the mast on the base grid. */
|
|
29
|
+
const CRANE_BASE_COUNTER_JIB = 26;
|
|
30
|
+
/** The mast's x in the scaled crane graphic, as a share of its width: the
|
|
31
|
+
* crane actor's anchor, so the mast (not the middle of the jib) stands over
|
|
32
|
+
* the roof it is perched on. */
|
|
33
|
+
const CRANE_MAST_ANCHOR_X = CRANE_BASE_MAST_X / CRANE_BASE_W;
|
|
34
|
+
/** The narrowest roof, in tiles, the crane's pad fits on. A narrower top (a
|
|
35
|
+
* spire, a one-tile column) has no room for a crane, so none is shown. */
|
|
36
|
+
const CRANE_MIN_ROOF_TILES = Math.ceil((CRANE_BASE_PAD_W * CRANE_SCALE) / TILE);
|
|
37
|
+
/**
|
|
38
|
+
* Where to perch the rooftop crane along the top floor, in world-tile units
|
|
39
|
+
* (the mid-tile of the widest run of built tiles). Anchoring to the plain
|
|
40
|
+
* (min,max) midpoint floats the crane over open sky when the top floor is
|
|
41
|
+
* built in disjoint blocks (a setback, or a partly-leased top office row),
|
|
42
|
+
* because the midpoint then lands in the gap between blocks. Centering on the
|
|
43
|
+
* widest CONTIGUOUS run keeps the crane over actual structure; for a
|
|
44
|
+
* fully-built row the widest run IS the whole span, so the result is the same
|
|
45
|
+
* midpoint as before. Ties keep the leftmost run. `builtTiles` must be
|
|
46
|
+
* non-empty (callers only invoke this for a floor that has structure); it may
|
|
47
|
+
* repeat indices; duplicates are collapsed so a repeated tile can't be read
|
|
48
|
+
* as a one-wide gap that splits a run.
|
|
49
|
+
*/
|
|
50
|
+
function craneAnchorTile(builtTiles) {
|
|
51
|
+
return craneRoof(builtTiles).center;
|
|
52
|
+
}
|
|
53
|
+
/** The widest run of `builtTiles` (see {@link craneAnchorTile}): its center
|
|
54
|
+
* in world-tile units and its width in tiles, which says whether the
|
|
55
|
+
* crane's pad fits on it ({@link CRANE_MIN_ROOF_TILES}). */
|
|
56
|
+
function craneRoof(builtTiles) {
|
|
57
|
+
const xs = [...new Set(builtTiles)].sort((a, b) => a - b);
|
|
58
|
+
let bestStart = xs[0];
|
|
59
|
+
let bestEnd = xs[0];
|
|
60
|
+
let runStart = xs[0];
|
|
61
|
+
for (let i = 1; i <= xs.length; i++) {
|
|
62
|
+
// A break in the run (or the end of the list) closes the current run.
|
|
63
|
+
if (i === xs.length || xs[i] !== xs[i - 1] + 1) {
|
|
64
|
+
if (xs[i - 1] - runStart > bestEnd - bestStart) {
|
|
65
|
+
bestStart = runStart;
|
|
66
|
+
bestEnd = xs[i - 1];
|
|
67
|
+
}
|
|
68
|
+
if (i < xs.length)
|
|
69
|
+
runStart = xs[i];
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
// bestEnd is the last tile index (inclusive); its right edge is bestEnd + 1.
|
|
73
|
+
return { center: (bestStart + bestEnd + 1) / 2, width: bestEnd + 1 - bestStart };
|
|
74
|
+
}
|
|
75
|
+
/** How far the drawing reaches left of the mast (the counter-jib's end) and
|
|
76
|
+
* right of it (the jib's tip and the canvas edge), in tiles. */
|
|
77
|
+
const CRANE_REACH_LEFT_TILES = (CRANE_BASE_COUNTER_JIB * CRANE_SCALE) / TILE;
|
|
78
|
+
const CRANE_REACH_RIGHT_TILES = ((CRANE_BASE_W - CRANE_BASE_MAST_X) * CRANE_SCALE) / TILE;
|
|
79
|
+
/**
|
|
80
|
+
* Where the crane's mast stands, in world-tile units, on `roof` (from
|
|
81
|
+
* {@link craneRoof}) in a lot `lotWidth` tiles wide. It is the roof's center,
|
|
82
|
+
* moved along the roof only when the jib or the counter-jib would otherwise
|
|
83
|
+
* reach past the lot's edge (a narrow top flush to an edge, #334). The pad
|
|
84
|
+
* always stays on the roof: when the lot can't hold the whole drawing, the
|
|
85
|
+
* mast keeps the pad's end at the roof's edge and lets the arm overhang.
|
|
86
|
+
*/
|
|
87
|
+
function craneMastTile(roof, lotWidth) {
|
|
88
|
+
const padHalf = (CRANE_BASE_PAD_W * CRANE_SCALE) / TILE / 2;
|
|
89
|
+
const onRoofLo = roof.center - roof.width / 2 + padHalf;
|
|
90
|
+
const onRoofHi = roof.center + roof.width / 2 - padHalf;
|
|
91
|
+
const inLot = Math.min(Math.max(roof.center, CRANE_REACH_LEFT_TILES), lotWidth - CRANE_REACH_RIGHT_TILES);
|
|
92
|
+
return Math.min(Math.max(inLot, onRoofLo), onRoofHi);
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* The rooftop tower crane that crowns the build while the tower is still
|
|
96
|
+
* climbing (it comes down once the 100th floor caps the tower, as in the
|
|
97
|
+
* original). Drawn fresh each frame into a CRANE_W×CRANE_H rect: the trolley
|
|
98
|
+
* rides the jib, the hook reels a girder up and down, and a red aircraft
|
|
99
|
+
* beacon blinks at the apex after dark, all on the decorative clock, so
|
|
100
|
+
* pause/reduced-motion freezes it with everything else.
|
|
101
|
+
*/
|
|
102
|
+
function drawCrane(ctx, t, lit) {
|
|
103
|
+
// Every coordinate below is authored on the 128x76 base grid; the scale
|
|
104
|
+
// transform blows the whole drawing up uniformly, line widths included. An
|
|
105
|
+
// INTEGER scale keeps every edge on the pixel grid (fully chunky-crisp); a
|
|
106
|
+
// fractional scale like 2.5 lands odd base coordinates on half-pixels,
|
|
107
|
+
// which Canvas2D anti-aliases into the cached raster, a slight softness
|
|
108
|
+
// accepted knowingly when the owner picks a non-integer size (the engine
|
|
109
|
+
// renders pixelArt, so integer scales are preferred when the size works).
|
|
110
|
+
ctx.save();
|
|
111
|
+
ctx.scale(CRANE_SCALE, CRANE_SCALE);
|
|
112
|
+
const baseY = CRANE_BASE_H; // canvas bottom sits on the roof line
|
|
113
|
+
const mx = CRANE_BASE_MAST_X; // mast center
|
|
114
|
+
const jibY = 18; // jib chord height
|
|
115
|
+
const steel = "#e0a83c";
|
|
116
|
+
const dark = "#9a6f1e";
|
|
117
|
+
// Roof pad under the mast.
|
|
118
|
+
ctx.fillStyle = "#6b6f78";
|
|
119
|
+
ctx.fillRect(mx - CRANE_BASE_PAD_W / 2, baseY - 3, CRANE_BASE_PAD_W, 3);
|
|
120
|
+
// Lattice mast: two chords with X-bracing.
|
|
121
|
+
ctx.fillStyle = steel;
|
|
122
|
+
ctx.fillRect(mx - 3, jibY, 2, baseY - 3 - jibY);
|
|
123
|
+
ctx.fillRect(mx + 1, jibY, 2, baseY - 3 - jibY);
|
|
124
|
+
ctx.strokeStyle = dark;
|
|
125
|
+
ctx.lineWidth = 1;
|
|
126
|
+
ctx.beginPath();
|
|
127
|
+
for (let yy = jibY + 2; yy < baseY - 8; yy += 6) {
|
|
128
|
+
ctx.moveTo(mx - 2, yy);
|
|
129
|
+
ctx.lineTo(mx + 2, yy + 6);
|
|
130
|
+
ctx.moveTo(mx + 2, yy);
|
|
131
|
+
ctx.lineTo(mx - 2, yy + 6);
|
|
132
|
+
}
|
|
133
|
+
ctx.stroke();
|
|
134
|
+
// Jib out to the right, counter-jib to the left.
|
|
135
|
+
const jibEnd = CRANE_BASE_W - 4;
|
|
136
|
+
const cjEnd = mx - CRANE_BASE_COUNTER_JIB;
|
|
137
|
+
ctx.fillStyle = steel;
|
|
138
|
+
ctx.fillRect(cjEnd, jibY, jibEnd - cjEnd, 2);
|
|
139
|
+
ctx.fillRect(mx + 3, jibY + 4, jibEnd - mx - 6, 1);
|
|
140
|
+
ctx.strokeStyle = dark;
|
|
141
|
+
ctx.beginPath();
|
|
142
|
+
for (let xx = mx + 6; xx < jibEnd - 4; xx += 7) {
|
|
143
|
+
ctx.moveTo(xx, jibY + 2);
|
|
144
|
+
ctx.lineTo(xx + 4, jibY + 4);
|
|
145
|
+
}
|
|
146
|
+
ctx.stroke();
|
|
147
|
+
// Apex with tie bars holding both arms.
|
|
148
|
+
ctx.fillStyle = steel;
|
|
149
|
+
ctx.fillRect(mx - 1, jibY - 12, 2, 12);
|
|
150
|
+
ctx.strokeStyle = steel;
|
|
151
|
+
ctx.beginPath();
|
|
152
|
+
ctx.moveTo(mx, jibY - 10);
|
|
153
|
+
ctx.lineTo(jibEnd - 8, jibY);
|
|
154
|
+
ctx.moveTo(mx, jibY - 10);
|
|
155
|
+
ctx.lineTo(cjEnd + 3, jibY);
|
|
156
|
+
ctx.stroke();
|
|
157
|
+
// Counterweight block.
|
|
158
|
+
ctx.fillStyle = "#7d838d";
|
|
159
|
+
ctx.fillRect(cjEnd, jibY + 2, 7, 7);
|
|
160
|
+
ctx.fillStyle = "rgba(255,255,255,0.25)";
|
|
161
|
+
ctx.fillRect(cjEnd, jibY + 2, 7, 1);
|
|
162
|
+
// Operator cab, window lit in the evening.
|
|
163
|
+
ctx.fillStyle = "#5a636e";
|
|
164
|
+
ctx.fillRect(mx + 2, jibY + 2, 7, 6);
|
|
165
|
+
ctx.fillStyle = lit ? "#ffe27a" : "#9fc0ff";
|
|
166
|
+
ctx.fillRect(mx + 4, jibY + 3, 4, 3);
|
|
167
|
+
// Trolley slides along the jib; the hook line reels a girder up and down.
|
|
168
|
+
const span = jibEnd - (mx + 14) - 6;
|
|
169
|
+
const trolleyX = mx + 14 + (Math.sin(t * 0.45) * 0.5 + 0.5) * span;
|
|
170
|
+
const drop = 10 + (Math.sin(t * 0.27 + 2.1) * 0.5 + 0.5) * (CRANE_BASE_H - jibY - 28);
|
|
171
|
+
ctx.fillStyle = dark;
|
|
172
|
+
ctx.fillRect(trolleyX - 2, jibY + 4, 5, 3);
|
|
173
|
+
ctx.strokeStyle = "#3c3f45";
|
|
174
|
+
ctx.beginPath();
|
|
175
|
+
ctx.moveTo(trolleyX + 0.5, jibY + 7);
|
|
176
|
+
ctx.lineTo(trolleyX + 0.5, jibY + 7 + drop);
|
|
177
|
+
ctx.stroke();
|
|
178
|
+
ctx.fillStyle = "#d8dce2";
|
|
179
|
+
ctx.fillRect(trolleyX - 1.5, jibY + 7 + drop, 4, 2);
|
|
180
|
+
ctx.fillStyle = "#8f4f2f"; // the girder riding the hook
|
|
181
|
+
ctx.fillRect(trolleyX - 6, jibY + 9 + drop, 13, 2);
|
|
182
|
+
// Aircraft-warning beacon at the apex, blinking after dark.
|
|
183
|
+
ctx.fillStyle = lit && Math.sin(t * 3.2) > 0 ? "#ff5a4a" : "#8a2f26";
|
|
184
|
+
ctx.fillRect(mx - 1, jibY - 14, 2, 2);
|
|
185
|
+
ctx.restore();
|
|
186
|
+
}
|
|
187
|
+
/** Width in px of one exterior fire-escape segment. */
|
|
188
|
+
const ESCAPE_W = 14;
|
|
189
|
+
/**
|
|
190
|
+
* One floor-tall segment of the exterior escape stairs that cling to both
|
|
191
|
+
* sides of the tower (a canon staple of the original's silhouette). `side` is
|
|
192
|
+
* which outside wall it hangs off; the flight's diagonal flips with floor
|
|
193
|
+
* parity so stacked segments read as one continuous zigzag down the facade.
|
|
194
|
+
*/
|
|
195
|
+
function drawEscapeStairs(ctx, side, parity, floorH) {
|
|
196
|
+
const w = ESCAPE_W;
|
|
197
|
+
const rail = "#4e5866";
|
|
198
|
+
const railHi = "#7b8694";
|
|
199
|
+
// Outer support rail, hung clear of the wall.
|
|
200
|
+
const outX = side === "left" ? 0 : w - 1;
|
|
201
|
+
ctx.fillStyle = rail;
|
|
202
|
+
ctx.fillRect(outX, 1, 1, floorH - 1);
|
|
203
|
+
// Landing deck at the floor line, with guard rail above it.
|
|
204
|
+
ctx.fillStyle = "#39414e";
|
|
205
|
+
ctx.fillRect(0, floorH - 4, w, 3);
|
|
206
|
+
ctx.fillStyle = railHi;
|
|
207
|
+
ctx.fillRect(0, floorH - 4, w, 1);
|
|
208
|
+
ctx.fillStyle = rail;
|
|
209
|
+
ctx.fillRect(0, floorH - 12, w, 1);
|
|
210
|
+
for (const px of [1, Math.floor(w / 2), w - 2])
|
|
211
|
+
ctx.fillRect(px, floorH - 12, 1, 8);
|
|
212
|
+
// The flight itself, zigzagging with floor parity.
|
|
213
|
+
const x0 = parity === 0 ? 1 : w - 2;
|
|
214
|
+
const x1 = parity === 0 ? w - 2 : 1;
|
|
215
|
+
ctx.strokeStyle = railHi;
|
|
216
|
+
ctx.lineWidth = 1;
|
|
217
|
+
ctx.beginPath();
|
|
218
|
+
ctx.moveTo(x0 + 0.5, 2);
|
|
219
|
+
ctx.lineTo(x1 + 0.5, floorH - 4);
|
|
220
|
+
ctx.stroke();
|
|
221
|
+
ctx.fillStyle = "#5d6875";
|
|
222
|
+
const steps = 6;
|
|
223
|
+
for (let s = 1; s < steps; s++) {
|
|
224
|
+
const sx = x0 + ((x1 - x0) * s) / steps;
|
|
225
|
+
const sy = 2 + ((floorH - 6) * s) / steps;
|
|
226
|
+
ctx.fillRect(Math.round(sx) - 1, Math.round(sy), 3, 1);
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
/** Width in px of one ground-floor entrance awning. Noticeably wider than a
|
|
230
|
+
* fire-escape segment ({@link ESCAPE_W}) so the canopy reads as a projecting
|
|
231
|
+
* storefront shade rather than a ladder rail. */
|
|
232
|
+
const AWNING_W = 24;
|
|
233
|
+
/**
|
|
234
|
+
* A prestige entrance marquee over the ground-floor frontage, standing in for
|
|
235
|
+
* the fire escape on floor 1. Deep green with gilded trim so it reads as a grand
|
|
236
|
+
* lobby canopy, not a storefront: the street level wears these instead of the
|
|
237
|
+
* exterior stairs that clad the floors above, so we swap them in on the ground
|
|
238
|
+
* row. `side` is the wall the canopy juts out from: it mounts flush to that wall
|
|
239
|
+
* and slopes down and outward. Painted into a floor-tall canvas (only the upper
|
|
240
|
+
* strip is used) so it shares the escape segment's top-left anchor and
|
|
241
|
+
* edge-following geometry.
|
|
242
|
+
*/
|
|
243
|
+
function drawAwning(ctx, side, floorH) {
|
|
244
|
+
const w = AWNING_W;
|
|
245
|
+
ctx.save();
|
|
246
|
+
// Draw in one canonical frame (wall at x = 0, canopy projecting right to
|
|
247
|
+
// x = w), then mirror it for a left wall so both corners share the recipe.
|
|
248
|
+
if (side === "left") {
|
|
249
|
+
ctx.translate(w, 0);
|
|
250
|
+
ctx.scale(-1, 1);
|
|
251
|
+
}
|
|
252
|
+
const topY = Math.round(floorH * 0.1); // just under the lobby cornice
|
|
253
|
+
// A prestige marquee: a solid deep hunter-green canopy with gilded piping
|
|
254
|
+
// and a scalloped arch fringe that echo the lobby's gold cornice, sconces
|
|
255
|
+
// and chandeliers.
|
|
256
|
+
const green = "#234b39";
|
|
257
|
+
const greenHi = "#2f6149";
|
|
258
|
+
const greenLo = "#173324";
|
|
259
|
+
const gold = "#c9a94c";
|
|
260
|
+
const goldHi = "#e6cf82";
|
|
261
|
+
// How far the canopy top edge drops from the wall to the outer lip. Scaled to
|
|
262
|
+
// the projection (a wider awning juts out and down more) so the slope stays
|
|
263
|
+
// proportional at any width instead of flattening out.
|
|
264
|
+
const topDrop = Math.round(w * 0.28);
|
|
265
|
+
const bodyH = 8; // solid canopy thickness, filled top rail to fringe
|
|
266
|
+
const archR = 3; // how far each scallop arch bulges below the body
|
|
267
|
+
const archP = 6; // pixels per arch
|
|
268
|
+
// The canopy is filled solid from the gilded top rail down to a bottom edge
|
|
269
|
+
// that swings through a row of arches (a classic scalloped valance). Each
|
|
270
|
+
// column drops to `arch`, the semicircular dip of the scallop it sits in;
|
|
271
|
+
// dividing by `archP - 1` (not `archP`) forces each scallop to close back to
|
|
272
|
+
// 0 on its rightmost column, so consecutive arches meet flush at 0 instead of
|
|
273
|
+
// stair-stepping through a `~archR/2` seam.
|
|
274
|
+
for (let cx = 0; cx < w; cx++) {
|
|
275
|
+
const t = cx / (w - 1);
|
|
276
|
+
const top = topY + Math.round(t * topDrop);
|
|
277
|
+
const arch = Math.round(Math.sin((Math.PI * (cx % archP)) / (archP - 1)) * archR);
|
|
278
|
+
const base = top + bodyH; // flat underside of the solid body
|
|
279
|
+
const bottom = base + arch; // ...dipping through the scallop
|
|
280
|
+
ctx.fillStyle = green; // solid fill
|
|
281
|
+
ctx.fillRect(cx, top, 1, bottom - top);
|
|
282
|
+
ctx.fillStyle = greenHi; // sheen just under the rail
|
|
283
|
+
ctx.fillRect(cx, top + 1, 1, 1);
|
|
284
|
+
ctx.fillStyle = greenLo; // shaded belly above the fringe
|
|
285
|
+
ctx.fillRect(cx, base - 1, 1, 1);
|
|
286
|
+
ctx.fillStyle = goldHi; // gilded top rail
|
|
287
|
+
ctx.fillRect(cx, top, 1, 1);
|
|
288
|
+
ctx.fillStyle = gold; // gilded edge tracing each arch
|
|
289
|
+
ctx.fillRect(cx, bottom - 1, 1, 1);
|
|
290
|
+
}
|
|
291
|
+
// Gilded outer lip down the projecting edge, and a brass bracket bolting the
|
|
292
|
+
// canopy to the wall.
|
|
293
|
+
const lipTop = topY + topDrop;
|
|
294
|
+
ctx.fillStyle = gold;
|
|
295
|
+
ctx.fillRect(w - 1, lipTop, 1, bodyH);
|
|
296
|
+
ctx.fillStyle = "#8a7430";
|
|
297
|
+
ctx.fillRect(0, topY, 1, bodyH + topDrop);
|
|
298
|
+
ctx.restore();
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
export { AWNING_W, CRANE_H, CRANE_MAST_ANCHOR_X, CRANE_MIN_ROOF_TILES, CRANE_REACH_LEFT_TILES, CRANE_REACH_RIGHT_TILES, CRANE_SCALE, CRANE_W, ESCAPE_W, craneAnchorTile, craneMastTile, craneRoof, drawAwning, drawCrane, drawEscapeStairs };
|
|
302
|
+
//# sourceMappingURL=rooftop.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rooftop.js","sources":["../../../../src/render/sprites/structure/rooftop.ts"],"sourcesContent":["/**\n * The tower's exterior-facade family: the rooftop tower crane, the exterior\n * fire-escape stairs that clad the floors, and the ground-floor entrance\n * awning. Extracted from `structure.ts` (and since grown the crane scale\n * constants); all pure ctx-only draws.\n */\n\nimport { TILE } from \"../../scale\";\n\n/** The hand-tuned base raster of the crane drawing (every coordinate in\n * drawCrane is authored against this grid; scale, never retune). */\nconst CRANE_BASE_W = 128;\nconst CRANE_BASE_H = 76;\n/** How much the base raster is blown up when rendered. The base crane stands\n * 1.7 floors tall, which reads fine against an empty sky but collapses next\n * to the city skyline (10-36 floor buildings) and the street-level plaza:\n * a real tower crane rises 4-8 floors above the roof it builds. The scale\n * keeps the crane a fixed size (it never grows with the tower; the skyline\n * only calibrates the scene if everything obeys it). */\nexport const CRANE_SCALE = 3;\n/** Canvas size of the rooftop tower-crane graphic (scaled). */\nexport const CRANE_W = CRANE_BASE_W * CRANE_SCALE;\nexport const CRANE_H = CRANE_BASE_H * CRANE_SCALE;\n/** Where the mast stands across the base raster, and the width of the roof\n * pad under it, in base pixels. The jib reaches right, so the mast is left\n * of the drawing's middle. */\nconst CRANE_BASE_MAST_X = 56;\nconst CRANE_BASE_PAD_W = 14;\n/** How far the counter-jib reaches left of the mast on the base grid. */\nconst CRANE_BASE_COUNTER_JIB = 26;\n/** The mast's x in the scaled crane graphic, as a share of its width: the\n * crane actor's anchor, so the mast (not the middle of the jib) stands over\n * the roof it is perched on. */\nexport const CRANE_MAST_ANCHOR_X = CRANE_BASE_MAST_X / CRANE_BASE_W;\n/** The narrowest roof, in tiles, the crane's pad fits on. A narrower top (a\n * spire, a one-tile column) has no room for a crane, so none is shown. */\nexport const CRANE_MIN_ROOF_TILES = Math.ceil((CRANE_BASE_PAD_W * CRANE_SCALE) / TILE);\n\n/**\n * Where to perch the rooftop crane along the top floor, in world-tile units\n * (the mid-tile of the widest run of built tiles). Anchoring to the plain\n * (min,max) midpoint floats the crane over open sky when the top floor is\n * built in disjoint blocks (a setback, or a partly-leased top office row),\n * because the midpoint then lands in the gap between blocks. Centering on the\n * widest CONTIGUOUS run keeps the crane over actual structure; for a\n * fully-built row the widest run IS the whole span, so the result is the same\n * midpoint as before. Ties keep the leftmost run. `builtTiles` must be\n * non-empty (callers only invoke this for a floor that has structure); it may\n * repeat indices; duplicates are collapsed so a repeated tile can't be read\n * as a one-wide gap that splits a run.\n */\nexport function craneAnchorTile(builtTiles: Iterable<number>): number {\n return craneRoof(builtTiles).center;\n}\n\n/** The widest run of `builtTiles` (see {@link craneAnchorTile}): its center\n * in world-tile units and its width in tiles, which says whether the\n * crane's pad fits on it ({@link CRANE_MIN_ROOF_TILES}). */\nexport function craneRoof(builtTiles: Iterable<number>): { center: number; width: number } {\n const xs = [...new Set(builtTiles)].sort((a, b) => a - b);\n let bestStart = xs[0];\n let bestEnd = xs[0];\n let runStart = xs[0];\n for (let i = 1; i <= xs.length; i++) {\n // A break in the run (or the end of the list) closes the current run.\n if (i === xs.length || xs[i] !== xs[i - 1] + 1) {\n if (xs[i - 1] - runStart > bestEnd - bestStart) {\n bestStart = runStart;\n bestEnd = xs[i - 1];\n }\n if (i < xs.length) runStart = xs[i];\n }\n }\n // bestEnd is the last tile index (inclusive); its right edge is bestEnd + 1.\n return { center: (bestStart + bestEnd + 1) / 2, width: bestEnd + 1 - bestStart };\n}\n\n/** How far the drawing reaches left of the mast (the counter-jib's end) and\n * right of it (the jib's tip and the canvas edge), in tiles. */\nexport const CRANE_REACH_LEFT_TILES = (CRANE_BASE_COUNTER_JIB * CRANE_SCALE) / TILE;\nexport const CRANE_REACH_RIGHT_TILES = ((CRANE_BASE_W - CRANE_BASE_MAST_X) * CRANE_SCALE) / TILE;\n\n/**\n * Where the crane's mast stands, in world-tile units, on `roof` (from\n * {@link craneRoof}) in a lot `lotWidth` tiles wide. It is the roof's center,\n * moved along the roof only when the jib or the counter-jib would otherwise\n * reach past the lot's edge (a narrow top flush to an edge, #334). The pad\n * always stays on the roof: when the lot can't hold the whole drawing, the\n * mast keeps the pad's end at the roof's edge and lets the arm overhang.\n */\nexport function craneMastTile(roof: { center: number; width: number }, lotWidth: number): number {\n const padHalf = (CRANE_BASE_PAD_W * CRANE_SCALE) / TILE / 2;\n const onRoofLo = roof.center - roof.width / 2 + padHalf;\n const onRoofHi = roof.center + roof.width / 2 - padHalf;\n const inLot = Math.min(Math.max(roof.center, CRANE_REACH_LEFT_TILES), lotWidth - CRANE_REACH_RIGHT_TILES);\n return Math.min(Math.max(inLot, onRoofLo), onRoofHi);\n}\n\n/**\n * The rooftop tower crane that crowns the build while the tower is still\n * climbing (it comes down once the 100th floor caps the tower, as in the\n * original). Drawn fresh each frame into a CRANE_W×CRANE_H rect: the trolley\n * rides the jib, the hook reels a girder up and down, and a red aircraft\n * beacon blinks at the apex after dark, all on the decorative clock, so\n * pause/reduced-motion freezes it with everything else.\n */\nexport function drawCrane(ctx: CanvasRenderingContext2D, t: number, lit: boolean): void {\n // Every coordinate below is authored on the 128x76 base grid; the scale\n // transform blows the whole drawing up uniformly, line widths included. An\n // INTEGER scale keeps every edge on the pixel grid (fully chunky-crisp); a\n // fractional scale like 2.5 lands odd base coordinates on half-pixels,\n // which Canvas2D anti-aliases into the cached raster, a slight softness\n // accepted knowingly when the owner picks a non-integer size (the engine\n // renders pixelArt, so integer scales are preferred when the size works).\n ctx.save();\n ctx.scale(CRANE_SCALE, CRANE_SCALE);\n const baseY = CRANE_BASE_H; // canvas bottom sits on the roof line\n const mx = CRANE_BASE_MAST_X; // mast center\n const jibY = 18; // jib chord height\n const steel = \"#e0a83c\";\n const dark = \"#9a6f1e\";\n // Roof pad under the mast.\n ctx.fillStyle = \"#6b6f78\";\n ctx.fillRect(mx - CRANE_BASE_PAD_W / 2, baseY - 3, CRANE_BASE_PAD_W, 3);\n // Lattice mast: two chords with X-bracing.\n ctx.fillStyle = steel;\n ctx.fillRect(mx - 3, jibY, 2, baseY - 3 - jibY);\n ctx.fillRect(mx + 1, jibY, 2, baseY - 3 - jibY);\n ctx.strokeStyle = dark;\n ctx.lineWidth = 1;\n ctx.beginPath();\n for (let yy = jibY + 2; yy < baseY - 8; yy += 6) {\n ctx.moveTo(mx - 2, yy);\n ctx.lineTo(mx + 2, yy + 6);\n ctx.moveTo(mx + 2, yy);\n ctx.lineTo(mx - 2, yy + 6);\n }\n ctx.stroke();\n // Jib out to the right, counter-jib to the left.\n const jibEnd = CRANE_BASE_W - 4;\n const cjEnd = mx - CRANE_BASE_COUNTER_JIB;\n ctx.fillStyle = steel;\n ctx.fillRect(cjEnd, jibY, jibEnd - cjEnd, 2);\n ctx.fillRect(mx + 3, jibY + 4, jibEnd - mx - 6, 1);\n ctx.strokeStyle = dark;\n ctx.beginPath();\n for (let xx = mx + 6; xx < jibEnd - 4; xx += 7) {\n ctx.moveTo(xx, jibY + 2);\n ctx.lineTo(xx + 4, jibY + 4);\n }\n ctx.stroke();\n // Apex with tie bars holding both arms.\n ctx.fillStyle = steel;\n ctx.fillRect(mx - 1, jibY - 12, 2, 12);\n ctx.strokeStyle = steel;\n ctx.beginPath();\n ctx.moveTo(mx, jibY - 10);\n ctx.lineTo(jibEnd - 8, jibY);\n ctx.moveTo(mx, jibY - 10);\n ctx.lineTo(cjEnd + 3, jibY);\n ctx.stroke();\n // Counterweight block.\n ctx.fillStyle = \"#7d838d\";\n ctx.fillRect(cjEnd, jibY + 2, 7, 7);\n ctx.fillStyle = \"rgba(255,255,255,0.25)\";\n ctx.fillRect(cjEnd, jibY + 2, 7, 1);\n // Operator cab, window lit in the evening.\n ctx.fillStyle = \"#5a636e\";\n ctx.fillRect(mx + 2, jibY + 2, 7, 6);\n ctx.fillStyle = lit ? \"#ffe27a\" : \"#9fc0ff\";\n ctx.fillRect(mx + 4, jibY + 3, 4, 3);\n // Trolley slides along the jib; the hook line reels a girder up and down.\n const span = jibEnd - (mx + 14) - 6;\n const trolleyX = mx + 14 + (Math.sin(t * 0.45) * 0.5 + 0.5) * span;\n const drop = 10 + (Math.sin(t * 0.27 + 2.1) * 0.5 + 0.5) * (CRANE_BASE_H - jibY - 28);\n ctx.fillStyle = dark;\n ctx.fillRect(trolleyX - 2, jibY + 4, 5, 3);\n ctx.strokeStyle = \"#3c3f45\";\n ctx.beginPath();\n ctx.moveTo(trolleyX + 0.5, jibY + 7);\n ctx.lineTo(trolleyX + 0.5, jibY + 7 + drop);\n ctx.stroke();\n ctx.fillStyle = \"#d8dce2\";\n ctx.fillRect(trolleyX - 1.5, jibY + 7 + drop, 4, 2);\n ctx.fillStyle = \"#8f4f2f\"; // the girder riding the hook\n ctx.fillRect(trolleyX - 6, jibY + 9 + drop, 13, 2);\n // Aircraft-warning beacon at the apex, blinking after dark.\n ctx.fillStyle = lit && Math.sin(t * 3.2) > 0 ? \"#ff5a4a\" : \"#8a2f26\";\n ctx.fillRect(mx - 1, jibY - 14, 2, 2);\n ctx.restore();\n}\n\n/** Width in px of one exterior fire-escape segment. */\nexport const ESCAPE_W = 14;\n\n/**\n * One floor-tall segment of the exterior escape stairs that cling to both\n * sides of the tower (a canon staple of the original's silhouette). `side` is\n * which outside wall it hangs off; the flight's diagonal flips with floor\n * parity so stacked segments read as one continuous zigzag down the facade.\n */\nexport function drawEscapeStairs(\n ctx: CanvasRenderingContext2D,\n side: \"left\" | \"right\",\n parity: 0 | 1,\n floorH: number,\n): void {\n const w = ESCAPE_W;\n const rail = \"#4e5866\";\n const railHi = \"#7b8694\";\n // Outer support rail, hung clear of the wall.\n const outX = side === \"left\" ? 0 : w - 1;\n ctx.fillStyle = rail;\n ctx.fillRect(outX, 1, 1, floorH - 1);\n // Landing deck at the floor line, with guard rail above it.\n ctx.fillStyle = \"#39414e\";\n ctx.fillRect(0, floorH - 4, w, 3);\n ctx.fillStyle = railHi;\n ctx.fillRect(0, floorH - 4, w, 1);\n ctx.fillStyle = rail;\n ctx.fillRect(0, floorH - 12, w, 1);\n for (const px of [1, Math.floor(w / 2), w - 2]) ctx.fillRect(px, floorH - 12, 1, 8);\n // The flight itself, zigzagging with floor parity.\n const x0 = parity === 0 ? 1 : w - 2;\n const x1 = parity === 0 ? w - 2 : 1;\n ctx.strokeStyle = railHi;\n ctx.lineWidth = 1;\n ctx.beginPath();\n ctx.moveTo(x0 + 0.5, 2);\n ctx.lineTo(x1 + 0.5, floorH - 4);\n ctx.stroke();\n ctx.fillStyle = \"#5d6875\";\n const steps = 6;\n for (let s = 1; s < steps; s++) {\n const sx = x0 + ((x1 - x0) * s) / steps;\n const sy = 2 + ((floorH - 6) * s) / steps;\n ctx.fillRect(Math.round(sx) - 1, Math.round(sy), 3, 1);\n }\n}\n\n/** Width in px of one ground-floor entrance awning. Noticeably wider than a\n * fire-escape segment ({@link ESCAPE_W}) so the canopy reads as a projecting\n * storefront shade rather than a ladder rail. */\nexport const AWNING_W = 24;\n\n/**\n * A prestige entrance marquee over the ground-floor frontage, standing in for\n * the fire escape on floor 1. Deep green with gilded trim so it reads as a grand\n * lobby canopy, not a storefront: the street level wears these instead of the\n * exterior stairs that clad the floors above, so we swap them in on the ground\n * row. `side` is the wall the canopy juts out from: it mounts flush to that wall\n * and slopes down and outward. Painted into a floor-tall canvas (only the upper\n * strip is used) so it shares the escape segment's top-left anchor and\n * edge-following geometry.\n */\nexport function drawAwning(ctx: CanvasRenderingContext2D, side: \"left\" | \"right\", floorH: number): void {\n const w = AWNING_W;\n ctx.save();\n // Draw in one canonical frame (wall at x = 0, canopy projecting right to\n // x = w), then mirror it for a left wall so both corners share the recipe.\n if (side === \"left\") {\n ctx.translate(w, 0);\n ctx.scale(-1, 1);\n }\n const topY = Math.round(floorH * 0.1); // just under the lobby cornice\n // A prestige marquee: a solid deep hunter-green canopy with gilded piping\n // and a scalloped arch fringe that echo the lobby's gold cornice, sconces\n // and chandeliers.\n const green = \"#234b39\";\n const greenHi = \"#2f6149\";\n const greenLo = \"#173324\";\n const gold = \"#c9a94c\";\n const goldHi = \"#e6cf82\";\n // How far the canopy top edge drops from the wall to the outer lip. Scaled to\n // the projection (a wider awning juts out and down more) so the slope stays\n // proportional at any width instead of flattening out.\n const topDrop = Math.round(w * 0.28);\n const bodyH = 8; // solid canopy thickness, filled top rail to fringe\n const archR = 3; // how far each scallop arch bulges below the body\n const archP = 6; // pixels per arch\n // The canopy is filled solid from the gilded top rail down to a bottom edge\n // that swings through a row of arches (a classic scalloped valance). Each\n // column drops to `arch`, the semicircular dip of the scallop it sits in;\n // dividing by `archP - 1` (not `archP`) forces each scallop to close back to\n // 0 on its rightmost column, so consecutive arches meet flush at 0 instead of\n // stair-stepping through a `~archR/2` seam.\n for (let cx = 0; cx < w; cx++) {\n const t = cx / (w - 1);\n const top = topY + Math.round(t * topDrop);\n const arch = Math.round(Math.sin((Math.PI * (cx % archP)) / (archP - 1)) * archR);\n const base = top + bodyH; // flat underside of the solid body\n const bottom = base + arch; // ...dipping through the scallop\n ctx.fillStyle = green; // solid fill\n ctx.fillRect(cx, top, 1, bottom - top);\n ctx.fillStyle = greenHi; // sheen just under the rail\n ctx.fillRect(cx, top + 1, 1, 1);\n ctx.fillStyle = greenLo; // shaded belly above the fringe\n ctx.fillRect(cx, base - 1, 1, 1);\n ctx.fillStyle = goldHi; // gilded top rail\n ctx.fillRect(cx, top, 1, 1);\n ctx.fillStyle = gold; // gilded edge tracing each arch\n ctx.fillRect(cx, bottom - 1, 1, 1);\n }\n // Gilded outer lip down the projecting edge, and a brass bracket bolting the\n // canopy to the wall.\n const lipTop = topY + topDrop;\n ctx.fillStyle = gold;\n ctx.fillRect(w - 1, lipTop, 1, bodyH);\n ctx.fillStyle = \"#8a7430\";\n ctx.fillRect(0, topY, 1, bodyH + topDrop);\n ctx.restore();\n}\n"],"names":[],"mappings":";;AAAA;;;;;AAKG;AAIH;AACqE;AACrE,MAAM,YAAY,GAAG,GAAG;AACxB,MAAM,YAAY,GAAG,EAAE;AACvB;;;;;AAKyD;AAClD,MAAM,WAAW,GAAG;AAC3B;AACO,MAAM,OAAO,GAAG,YAAY,GAAG;AAC/B,MAAM,OAAO,GAAG,YAAY,GAAG;AACtC;;AAE+B;AAC/B,MAAM,iBAAiB,GAAG,EAAE;AAC5B,MAAM,gBAAgB,GAAG,EAAE;AAC3B;AACA,MAAM,sBAAsB,GAAG,EAAE;AACjC;;AAEiC;AAC1B,MAAM,mBAAmB,GAAG,iBAAiB,GAAG;AACvD;AAC2E;AACpE,MAAM,oBAAoB,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,gBAAgB,GAAG,WAAW,IAAI,IAAI;AAErF;;;;;;;;;;;;AAYG;AACG,SAAU,eAAe,CAAC,UAA4B,EAAA;AAC1D,IAAA,OAAO,SAAS,CAAC,UAAU,CAAC,CAAC,MAAM;AACrC;AAEA;;AAE6D;AACvD,SAAU,SAAS,CAAC,UAA4B,EAAA;IACpD,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;AAC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,GAAG,CAAC,SAAS,GAAG,OAAO,CAAC;AACxB,QAAA,GAAG,CAAC,QAAQ,CAAC,EAAE,EAAE,GAAG,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;AAC/B,QAAA,GAAG,CAAC,SAAS,GAAG,OAAO,CAAC;AACxB,QAAA,GAAG,CAAC,QAAQ,CAAC,EAAE,EAAE,IAAI,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;AAChC,QAAA,GAAG,CAAC,SAAS,GAAG,MAAM,CAAC;QACvB,GAAG,CAAC,QAAQ,CAAC,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC,CAAC;AAC3B,QAAA,GAAG,CAAC,SAAS,GAAG,IAAI,CAAC;AACrB,QAAA,GAAG,CAAC,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;IACpC;;;AAGA,IAAA,MAAM,MAAM,GAAG,IAAI,GAAG,OAAO;AAC7B,IAAA,GAAG,CAAC,SAAS,GAAG,IAAI;AACpB,IAAA,GAAG,CAAC,QAAQ,CAAC,CAAC,GAAG,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,KAAK,CAAC;AACrC,IAAA,GAAG,CAAC,SAAS,GAAG,SAAS;AACzB,IAAA,GAAG,CAAC,QAAQ,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,GAAG,OAAO,CAAC;IACzC,GAAG,CAAC,OAAO,EAAE;AACf;;"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { DrawCtx } from "../common";
|
|
2
|
+
/**
|
|
3
|
+
* Raw structural and damage shells: the bare floor slab, the under-construction
|
|
4
|
+
* scaffold, and the burned-out shell and flames. Extracted verbatim from
|
|
5
|
+
* `structure.ts`.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* The bare deck of a built-but-empty floor or corridor: a warm banded slab
|
|
9
|
+
* (dark ceiling strip up top, a mid slab band, a dark base band) with faint
|
|
10
|
+
* grout ticks, ported from page-05's `floorTile`. Drawn in horizontal strips
|
|
11
|
+
* so a mobile GPU never sees one full-height fill on a tall run, and keyed on
|
|
12
|
+
* nothing but the rect (baked `cache: true` into `floorGfx`). Integer pixels.
|
|
13
|
+
*/
|
|
14
|
+
export declare function drawFloor(ctx: CanvasRenderingContext2D, x: number, y: number, w: number, h: number): void;
|
|
15
|
+
export declare function drawConstruction(d: DrawCtx, x: number, y: number, w: number, h: number): void;
|
|
16
|
+
/** Charred interior behind the flames of a burning unit. */
|
|
17
|
+
export declare function drawBurntShell(ctx: CanvasRenderingContext2D, x: number, y: number, w: number, h: number): void;
|
|
18
|
+
/** Animated flames licking up from the floor of a burning unit. */
|
|
19
|
+
export declare function drawFlames(d: DrawCtx, x: number, y: number, w: number, h: number): void;
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import { shade } from '../common.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Raw structural and damage shells: the bare floor slab, the under-construction
|
|
5
|
+
* scaffold, and the burned-out shell and flames. Extracted verbatim from
|
|
6
|
+
* `structure.ts`.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* The bare deck of a built-but-empty floor or corridor: a warm banded slab
|
|
10
|
+
* (dark ceiling strip up top, a mid slab band, a dark base band) with faint
|
|
11
|
+
* grout ticks, ported from page-05's `floorTile`. Drawn in horizontal strips
|
|
12
|
+
* so a mobile GPU never sees one full-height fill on a tall run, and keyed on
|
|
13
|
+
* nothing but the rect (baked `cache: true` into `floorGfx`). Integer pixels.
|
|
14
|
+
*/
|
|
15
|
+
function drawFloor(ctx, x, y, w, h) {
|
|
16
|
+
const x0 = Math.round(x);
|
|
17
|
+
const y0 = Math.round(y);
|
|
18
|
+
const ww = Math.max(1, Math.round(w));
|
|
19
|
+
const hh = Math.max(1, Math.round(h));
|
|
20
|
+
// Warm base wash for the whole tile (a small per-tile fill, not a monolith).
|
|
21
|
+
ctx.fillStyle = "#B7B0A0";
|
|
22
|
+
ctx.fillRect(x0, y0, ww, hh);
|
|
23
|
+
// Ceiling strip and its seam along the top band. Bounded to the tile height
|
|
24
|
+
// so a degenerate (very short) rect never paints past the tile.
|
|
25
|
+
const ceil = Math.min(hh, Math.max(3, Math.round(hh * 0.11)));
|
|
26
|
+
ctx.fillStyle = "#8A8478";
|
|
27
|
+
ctx.fillRect(x0, y0, ww, ceil);
|
|
28
|
+
ctx.fillStyle = "#6E6A60";
|
|
29
|
+
if (ceil < hh)
|
|
30
|
+
ctx.fillRect(x0, y0 + ceil, ww, 1); // seam only when it lands inside the tile
|
|
31
|
+
// Faint ceiling texture ticks.
|
|
32
|
+
ctx.fillStyle = "#7A7468";
|
|
33
|
+
for (let px = x0; px < x0 + ww; px += 8)
|
|
34
|
+
ctx.fillRect(px, y0 + 1, 2, Math.min(3, ceil - 1));
|
|
35
|
+
// Floor slab band across the bottom, with a polished top edge and dark base.
|
|
36
|
+
// Bounded to the tile height so `fy` can never rise above `y0`.
|
|
37
|
+
const slabH = Math.min(hh, Math.max(4, Math.round(hh * 0.23)));
|
|
38
|
+
const fy = y0 + hh - slabH;
|
|
39
|
+
const slab = "#9A9486";
|
|
40
|
+
ctx.fillStyle = slab;
|
|
41
|
+
ctx.fillRect(x0, fy, ww, slabH);
|
|
42
|
+
ctx.fillStyle = shade(slab, 18);
|
|
43
|
+
ctx.fillRect(x0, fy, ww, 1);
|
|
44
|
+
ctx.fillStyle = shade(slab, -24);
|
|
45
|
+
ctx.fillRect(x0, y0 + hh - 1, ww, 1);
|
|
46
|
+
// Baseboard band where the wall meets the slab, with wall-base ticks above
|
|
47
|
+
// it. Only when there is room above the slab, so the band and its ticks stay
|
|
48
|
+
// inside the tile on a short rect.
|
|
49
|
+
if (fy - 4 >= y0) {
|
|
50
|
+
ctx.fillStyle = "#8A8478";
|
|
51
|
+
ctx.fillRect(x0, fy - 2, ww, 2);
|
|
52
|
+
ctx.fillStyle = "#7E786C";
|
|
53
|
+
for (let px = x0 + 4; px < x0 + ww; px += 12)
|
|
54
|
+
ctx.fillRect(px, fy - 4, 2, 4);
|
|
55
|
+
}
|
|
56
|
+
// Faint grout ticks down the slab so the deck reads tiled, not poured.
|
|
57
|
+
ctx.fillStyle = "rgba(0,0,0,0.06)";
|
|
58
|
+
const groutH = Math.max(0, slabH - 2); // never negative on a degenerate short rect
|
|
59
|
+
for (let gx = x0 + 5; gx < x0 + ww; gx += 9)
|
|
60
|
+
ctx.fillRect(gx, fy + 1, 1, groutH);
|
|
61
|
+
}
|
|
62
|
+
function drawConstruction(d, x, y, w, h) {
|
|
63
|
+
const ctx = d.ctx;
|
|
64
|
+
// Bare concrete shell.
|
|
65
|
+
ctx.fillStyle = "#6f6a5e";
|
|
66
|
+
ctx.fillRect(x, y, w, h);
|
|
67
|
+
ctx.fillStyle = "#5c574c";
|
|
68
|
+
ctx.fillRect(x, y, w, 2);
|
|
69
|
+
// Yellow/black hazard band along the floor.
|
|
70
|
+
for (let hx = x; hx < x + w; hx += 8) {
|
|
71
|
+
ctx.fillStyle = (Math.floor(hx / 8) % 2) === 0 ? "#e8c14a" : "#2a2a2a";
|
|
72
|
+
ctx.fillRect(hx, y + h - 4, 4, 4);
|
|
73
|
+
}
|
|
74
|
+
// Scaffolding poles and cross-braces.
|
|
75
|
+
ctx.strokeStyle = "rgba(220,220,230,0.55)";
|
|
76
|
+
ctx.lineWidth = 1;
|
|
77
|
+
for (let sx = x + 6; sx < x + w - 2; sx += 14) {
|
|
78
|
+
ctx.beginPath();
|
|
79
|
+
ctx.moveTo(sx, y + 2);
|
|
80
|
+
ctx.lineTo(sx, y + h - 4);
|
|
81
|
+
ctx.moveTo(sx, y + h - 4);
|
|
82
|
+
ctx.lineTo(sx + 14, y + 2);
|
|
83
|
+
ctx.stroke();
|
|
84
|
+
}
|
|
85
|
+
ctx.strokeStyle = "rgba(220,220,230,0.4)";
|
|
86
|
+
ctx.beginPath();
|
|
87
|
+
ctx.moveTo(x + 2, y + h / 2);
|
|
88
|
+
ctx.lineTo(x + w - 2, y + h / 2);
|
|
89
|
+
ctx.stroke();
|
|
90
|
+
// A little crane hook swinging on the global clock.
|
|
91
|
+
const hookX = x + 8 + (Math.sin(d.anim) * 0.5 + 0.5) * Math.max(0, w - 16);
|
|
92
|
+
ctx.strokeStyle = "#caa84a";
|
|
93
|
+
ctx.lineWidth = 1;
|
|
94
|
+
ctx.beginPath();
|
|
95
|
+
ctx.moveTo(hookX, y - 2);
|
|
96
|
+
ctx.lineTo(hookX, y + h * 0.4);
|
|
97
|
+
ctx.stroke();
|
|
98
|
+
ctx.fillStyle = "#caa84a";
|
|
99
|
+
ctx.fillRect(hookX - 2, y + h * 0.4, 4, 3);
|
|
100
|
+
}
|
|
101
|
+
/** Charred interior behind the flames of a burning unit. */
|
|
102
|
+
function drawBurntShell(ctx, x, y, w, h) {
|
|
103
|
+
ctx.fillStyle = "#241c18";
|
|
104
|
+
ctx.fillRect(x, y, w, h);
|
|
105
|
+
ctx.fillStyle = "#3a2a20";
|
|
106
|
+
ctx.fillRect(x, y + h - 4, w, 4);
|
|
107
|
+
// Smoke smudges up the back wall.
|
|
108
|
+
ctx.fillStyle = "rgba(20,16,14,0.55)";
|
|
109
|
+
for (let sx = x + 3; sx < x + w - 2; sx += 11)
|
|
110
|
+
ctx.fillRect(sx, y, 5, h - 4);
|
|
111
|
+
}
|
|
112
|
+
/** Animated flames licking up from the floor of a burning unit. */
|
|
113
|
+
function drawFlames(d, x, y, w, h) {
|
|
114
|
+
const ctx = d.ctx;
|
|
115
|
+
const base = y + h - 3;
|
|
116
|
+
for (let fx = x + 2; fx < x + w - 2; fx += 6) {
|
|
117
|
+
const phase = d.anim * 6 + fx * 0.7;
|
|
118
|
+
const flame = (Math.sin(phase) * 0.5 + 0.5) * (h * 0.55) + h * 0.3;
|
|
119
|
+
// Outer orange tongue.
|
|
120
|
+
ctx.fillStyle = "#e8631e";
|
|
121
|
+
ctx.beginPath();
|
|
122
|
+
ctx.moveTo(fx, base);
|
|
123
|
+
ctx.lineTo(fx + 3, base - flame);
|
|
124
|
+
ctx.lineTo(fx + 6, base);
|
|
125
|
+
ctx.closePath();
|
|
126
|
+
ctx.fill();
|
|
127
|
+
// Inner yellow core.
|
|
128
|
+
ctx.fillStyle = "#ffd23a";
|
|
129
|
+
ctx.beginPath();
|
|
130
|
+
ctx.moveTo(fx + 1.5, base);
|
|
131
|
+
ctx.lineTo(fx + 3, base - flame * 0.6);
|
|
132
|
+
ctx.lineTo(fx + 4.5, base);
|
|
133
|
+
ctx.closePath();
|
|
134
|
+
ctx.fill();
|
|
135
|
+
}
|
|
136
|
+
// Ember glow wash.
|
|
137
|
+
ctx.fillStyle = "rgba(232,99,30,0.18)";
|
|
138
|
+
ctx.fillRect(x, y, w, h);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
export { drawBurntShell, drawConstruction, drawFlames, drawFloor };
|
|
142
|
+
//# sourceMappingURL=shell.js.map
|