@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,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The first gesture both starts the audio and fires its own cue (a click, a
|
|
3
|
+
* build), but the context only runs once `Tone.start()` settles, so that cue
|
|
4
|
+
* used to be dropped and the very first click was silent (#554). The latch
|
|
5
|
+
* holds the latest cue fired while the unlock is settling and hands it back
|
|
6
|
+
* when it lands. It holds nothing at any other time: a cue dropped by a
|
|
7
|
+
* backgrounded tab must not burst out when the player comes back.
|
|
8
|
+
*/
|
|
9
|
+
export declare class FirstCueLatch<T> {
|
|
10
|
+
private open;
|
|
11
|
+
private cue;
|
|
12
|
+
/** The unlock started. */
|
|
13
|
+
begin(): void;
|
|
14
|
+
/** Keep `cue` while the unlock is settling. */
|
|
15
|
+
hold(cue: T): void;
|
|
16
|
+
/** The unlock settled (or was torn down): close, handing back the held cue. */
|
|
17
|
+
release(): T | null;
|
|
18
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The first gesture both starts the audio and fires its own cue (a click, a
|
|
3
|
+
* build), but the context only runs once `Tone.start()` settles, so that cue
|
|
4
|
+
* used to be dropped and the very first click was silent (#554). The latch
|
|
5
|
+
* holds the latest cue fired while the unlock is settling and hands it back
|
|
6
|
+
* when it lands. It holds nothing at any other time: a cue dropped by a
|
|
7
|
+
* backgrounded tab must not burst out when the player comes back.
|
|
8
|
+
*/
|
|
9
|
+
class FirstCueLatch {
|
|
10
|
+
constructor() {
|
|
11
|
+
this.open = false;
|
|
12
|
+
this.cue = null;
|
|
13
|
+
}
|
|
14
|
+
/** The unlock started. */
|
|
15
|
+
begin() {
|
|
16
|
+
this.open = true;
|
|
17
|
+
this.cue = null;
|
|
18
|
+
}
|
|
19
|
+
/** Keep `cue` while the unlock is settling. */
|
|
20
|
+
hold(cue) {
|
|
21
|
+
if (this.open)
|
|
22
|
+
this.cue = cue;
|
|
23
|
+
}
|
|
24
|
+
/** The unlock settled (or was torn down): close, handing back the held cue. */
|
|
25
|
+
release() {
|
|
26
|
+
const cue = this.cue;
|
|
27
|
+
this.open = false;
|
|
28
|
+
this.cue = null;
|
|
29
|
+
return cue;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export { FirstCueLatch };
|
|
34
|
+
//# sourceMappingURL=firstCueLatch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"firstCueLatch.js","sources":["../../src/audio/firstCueLatch.ts"],"sourcesContent":["/**\n * The first gesture both starts the audio and fires its own cue (a click, a\n * build), but the context only runs once `Tone.start()` settles, so that cue\n * used to be dropped and the very first click was silent (#554). The latch\n * holds the latest cue fired while the unlock is settling and hands it back\n * when it lands. It holds nothing at any other time: a cue dropped by a\n * backgrounded tab must not burst out when the player comes back.\n */\nexport class FirstCueLatch<T> {\n private open = false;\n private cue: T | null = null;\n\n /** The unlock started. */\n begin(): void {\n this.open = true;\n this.cue = null;\n }\n\n /** Keep `cue` while the unlock is settling. */\n hold(cue: T): void {\n if (this.open) this.cue = cue;\n }\n\n /** The unlock settled (or was torn down): close, handing back the held cue. */\n release(): T | null {\n const cue = this.cue;\n this.open = false;\n this.cue = null;\n return cue;\n }\n}\n"],"names":[],"mappings":"AAAA;;;;;;;AAOG;MACU,aAAa,CAAA;AAA1B,IAAA,WAAA,GAAA;QACU,IAAA,CAAA,IAAI,GAAG,KAAK;QACZ,IAAA,CAAA,GAAG,GAAa,IAAI;IAoB9B;;IAjBE,KAAK,GAAA;AACH,QAAA,IAAI,CAAC,IAAI,GAAG,IAAI;AAChB,QAAA,IAAI,CAAC,GAAG,GAAG,IAAI;IACjB;;AAGA,IAAA,IAAI,CAAC,GAAM,EAAA;QACT,IAAI,IAAI,CAAC,IAAI;AAAE,YAAA,IAAI,CAAC,GAAG,GAAG,GAAG;IAC/B;;IAGA,OAAO,GAAA;AACL,QAAA,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG;AACpB,QAAA,IAAI,CAAC,IAAI,GAAG,KAAK;AACjB,QAAA,IAAI,CAAC,GAAG,GAAG,IAAI;AACf,QAAA,OAAO,GAAG;IACZ;AACD;;"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The amplitude envelope of one light note, planned as Web Audio automation
|
|
3
|
+
* events (see `./lightSynth.ts`). Every curve here is the one Tone.js's own
|
|
4
|
+
* Envelope schedules for a fresh note, so a light voice sounds the same as
|
|
5
|
+
* the Tone.Synth it replaced:
|
|
6
|
+
*
|
|
7
|
+
* - attack: a linear ramp from silence to the velocity (or, for the membrane
|
|
8
|
+
* voices, Tone's "exponential" attack: an exponential approach that turns
|
|
9
|
+
* into a short linear ramp for its last tenth);
|
|
10
|
+
* - decay: an exponential approach to `velocity * sustain` whose last tenth is
|
|
11
|
+
* a linear ramp, so it lands exactly;
|
|
12
|
+
* - release: the same approach-then-ramp shape down to zero, starting from
|
|
13
|
+
* wherever the envelope is when the note is let go.
|
|
14
|
+
*
|
|
15
|
+
* Planning the whole note up front (instead of cancelling and re-scheduling
|
|
16
|
+
* at the release, as Tone does) is what lets a note own two native nodes and
|
|
17
|
+
* nothing else. The plan is pure data so it can be checked without audio.
|
|
18
|
+
*/
|
|
19
|
+
/** The envelope curve of a light voice, read when a note starts. */
|
|
20
|
+
export interface EnvelopeShape {
|
|
21
|
+
attack: number;
|
|
22
|
+
decay: number;
|
|
23
|
+
sustain: number;
|
|
24
|
+
release: number;
|
|
25
|
+
/** Tone's attack curve: linear for the synths, exponential for membranes. */
|
|
26
|
+
attackCurve: "linear" | "exponential";
|
|
27
|
+
}
|
|
28
|
+
/** One automation call on an AudioParam, in the order it is made. */
|
|
29
|
+
export type ParamEvent = {
|
|
30
|
+
kind: "set";
|
|
31
|
+
value: number;
|
|
32
|
+
time: number;
|
|
33
|
+
} | {
|
|
34
|
+
kind: "linear";
|
|
35
|
+
value: number;
|
|
36
|
+
time: number;
|
|
37
|
+
} | {
|
|
38
|
+
kind: "target";
|
|
39
|
+
value: number;
|
|
40
|
+
time: number;
|
|
41
|
+
timeConstant: number;
|
|
42
|
+
};
|
|
43
|
+
/** A planned note: the gain automation and when its oscillator stops. */
|
|
44
|
+
export interface NotePlan {
|
|
45
|
+
events: ParamEvent[];
|
|
46
|
+
stopAt: number;
|
|
47
|
+
}
|
|
48
|
+
/** Tone's time constant for an exponential approach lasting `rampTime` s. */
|
|
49
|
+
export declare function approachTimeConstant(rampTime: number): number;
|
|
50
|
+
/** The value a list of events (made by this module) holds at `time`, with
|
|
51
|
+
* Web Audio's rules: a set holds, a linear ramp interpolates from the event
|
|
52
|
+
* before it, and a target decays from the value at its start. */
|
|
53
|
+
export declare function valueAt(events: readonly ParamEvent[], time: number): number;
|
|
54
|
+
/**
|
|
55
|
+
* Plan one note: its gain automation from `start` and the time its
|
|
56
|
+
* oscillator stops. The release begins at `start + duration` from the
|
|
57
|
+
* envelope's level there.
|
|
58
|
+
*
|
|
59
|
+
* The stop time follows Tone's (a voice with no sustain stops when its decay
|
|
60
|
+
* ends) with one deliberate difference: a note let go before its decay ended
|
|
61
|
+
* stops when its release ends. Tone stopped it at the decay's end even when
|
|
62
|
+
* the release tail was still sounding, a small cut that can click.
|
|
63
|
+
*/
|
|
64
|
+
export declare function planNote(env: EnvelopeShape, start: number, duration: number, velocity: number, sampleTime: number): NotePlan;
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The amplitude envelope of one light note, planned as Web Audio automation
|
|
3
|
+
* events (see `./lightSynth.ts`). Every curve here is the one Tone.js's own
|
|
4
|
+
* Envelope schedules for a fresh note, so a light voice sounds the same as
|
|
5
|
+
* the Tone.Synth it replaced:
|
|
6
|
+
*
|
|
7
|
+
* - attack: a linear ramp from silence to the velocity (or, for the membrane
|
|
8
|
+
* voices, Tone's "exponential" attack: an exponential approach that turns
|
|
9
|
+
* into a short linear ramp for its last tenth);
|
|
10
|
+
* - decay: an exponential approach to `velocity * sustain` whose last tenth is
|
|
11
|
+
* a linear ramp, so it lands exactly;
|
|
12
|
+
* - release: the same approach-then-ramp shape down to zero, starting from
|
|
13
|
+
* wherever the envelope is when the note is let go.
|
|
14
|
+
*
|
|
15
|
+
* Planning the whole note up front (instead of cancelling and re-scheduling
|
|
16
|
+
* at the release, as Tone does) is what lets a note own two native nodes and
|
|
17
|
+
* nothing else. The plan is pure data so it can be checked without audio.
|
|
18
|
+
*/
|
|
19
|
+
/** The level a ramp starts from instead of true zero (Tone's minimum output). */
|
|
20
|
+
const SILENT_FLOOR = 1e-7;
|
|
21
|
+
/** The share of an approach spent on the exponential curve before Tone hands
|
|
22
|
+
* over to a linear ramp that lands exactly on the target. */
|
|
23
|
+
const APPROACH_SHARE = 0.9;
|
|
24
|
+
/** Tone's time constant for an exponential approach lasting `rampTime` s. */
|
|
25
|
+
function approachTimeConstant(rampTime) {
|
|
26
|
+
return Math.log(rampTime + 1) / Math.log(200);
|
|
27
|
+
}
|
|
28
|
+
/** Append Tone's exponential approach toward `target`, starting at `time`
|
|
29
|
+
* from the value the events reach there. */
|
|
30
|
+
function approach(events, target, time, rampTime) {
|
|
31
|
+
const timeConstant = approachTimeConstant(rampTime);
|
|
32
|
+
events.push({ kind: "target", value: target, time, timeConstant });
|
|
33
|
+
const handover = time + rampTime * APPROACH_SHARE;
|
|
34
|
+
events.push({ kind: "set", value: valueAt(events, handover), time: handover });
|
|
35
|
+
events.push({ kind: "linear", value: target, time: time + rampTime });
|
|
36
|
+
}
|
|
37
|
+
/** The value a list of events (made by this module) holds at `time`, with
|
|
38
|
+
* Web Audio's rules: a set holds, a linear ramp interpolates from the event
|
|
39
|
+
* before it, and a target decays from the value at its start. */
|
|
40
|
+
function valueAt(events, time) {
|
|
41
|
+
let value = 0;
|
|
42
|
+
let from = 0;
|
|
43
|
+
let fromTime = -Infinity;
|
|
44
|
+
let target = null;
|
|
45
|
+
for (const ev of events) {
|
|
46
|
+
if (ev.time > time) {
|
|
47
|
+
if (ev.kind === "linear") {
|
|
48
|
+
const start = target ? targetValue(target, fromTime) : from;
|
|
49
|
+
const span = ev.time - fromTime;
|
|
50
|
+
return span > 0 ? start + ((ev.value - start) * (time - fromTime)) / span : ev.value;
|
|
51
|
+
}
|
|
52
|
+
break;
|
|
53
|
+
}
|
|
54
|
+
const before = target ? targetValue(target, ev.time) : value;
|
|
55
|
+
if (ev.kind === "target") {
|
|
56
|
+
target = { value: ev.value, time: ev.time, timeConstant: ev.timeConstant, start: before };
|
|
57
|
+
value = before;
|
|
58
|
+
}
|
|
59
|
+
else {
|
|
60
|
+
target = null;
|
|
61
|
+
value = ev.value;
|
|
62
|
+
}
|
|
63
|
+
from = value;
|
|
64
|
+
fromTime = ev.time;
|
|
65
|
+
}
|
|
66
|
+
return target ? targetValue(target, time) : value;
|
|
67
|
+
}
|
|
68
|
+
function targetValue(t, at) {
|
|
69
|
+
return t.value + (t.start - t.value) * Math.exp(-(at - t.time) / t.timeConstant);
|
|
70
|
+
}
|
|
71
|
+
/** The attack and decay of a note started at `start`, before any release. */
|
|
72
|
+
function attackAndDecay(env, start, velocity, sampleTime) {
|
|
73
|
+
const events = [];
|
|
74
|
+
if (env.attack < sampleTime) {
|
|
75
|
+
events.push({ kind: "set", value: velocity, time: start });
|
|
76
|
+
}
|
|
77
|
+
else {
|
|
78
|
+
events.push({ kind: "set", value: SILENT_FLOOR, time: start });
|
|
79
|
+
if (env.attackCurve === "linear")
|
|
80
|
+
events.push({ kind: "linear", value: velocity, time: start + env.attack });
|
|
81
|
+
else
|
|
82
|
+
approach(events, velocity, start, env.attack);
|
|
83
|
+
}
|
|
84
|
+
if (env.decay > 0 && env.sustain < 1)
|
|
85
|
+
approach(events, velocity * env.sustain, start + env.attack, env.decay);
|
|
86
|
+
return events;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Plan one note: its gain automation from `start` and the time its
|
|
90
|
+
* oscillator stops. The release begins at `start + duration` from the
|
|
91
|
+
* envelope's level there.
|
|
92
|
+
*
|
|
93
|
+
* The stop time follows Tone's (a voice with no sustain stops when its decay
|
|
94
|
+
* ends) with one deliberate difference: a note let go before its decay ended
|
|
95
|
+
* stops when its release ends. Tone stopped it at the decay's end even when
|
|
96
|
+
* the release tail was still sounding, a small cut that can click.
|
|
97
|
+
*/
|
|
98
|
+
function planNote(env, start, duration, velocity, sampleTime) {
|
|
99
|
+
const full = attackAndDecay(env, start, velocity, sampleTime);
|
|
100
|
+
const releaseAt = start + Math.max(0, duration);
|
|
101
|
+
const level = valueAt(full, releaseAt);
|
|
102
|
+
// Keep what happens before the release; a ramp the release interrupts ends
|
|
103
|
+
// where the envelope is at that moment, so the curve stays continuous.
|
|
104
|
+
const events = full.filter((ev) => ev.time <= releaseAt);
|
|
105
|
+
const cut = full.find((ev) => ev.time > releaseAt);
|
|
106
|
+
if (cut?.kind === "linear")
|
|
107
|
+
events.push({ kind: "linear", value: level, time: releaseAt });
|
|
108
|
+
if (level <= 0) {
|
|
109
|
+
// Nothing left to let go: the decay already reached silence (or the note
|
|
110
|
+
// never had any level), so the oscillator stops where the sound ended.
|
|
111
|
+
const decayEnd = start + env.attack + env.decay;
|
|
112
|
+
return { events, stopAt: env.sustain === 0 ? Math.min(decayEnd, releaseAt) : releaseAt };
|
|
113
|
+
}
|
|
114
|
+
events.push({ kind: "set", value: level, time: releaseAt });
|
|
115
|
+
if (env.release < sampleTime) {
|
|
116
|
+
events.push({ kind: "set", value: 0, time: releaseAt });
|
|
117
|
+
return { events, stopAt: releaseAt };
|
|
118
|
+
}
|
|
119
|
+
approach(events, 0, releaseAt, env.release);
|
|
120
|
+
return { events, stopAt: releaseAt + env.release };
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
export { approachTimeConstant, planNote, valueAt };
|
|
124
|
+
//# sourceMappingURL=lightEnvelope.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lightEnvelope.js","sources":["../../src/audio/lightEnvelope.ts"],"sourcesContent":["/**\n * The amplitude envelope of one light note, planned as Web Audio automation\n * events (see `./lightSynth.ts`). Every curve here is the one Tone.js's own\n * Envelope schedules for a fresh note, so a light voice sounds the same as\n * the Tone.Synth it replaced:\n *\n * - attack: a linear ramp from silence to the velocity (or, for the membrane\n * voices, Tone's \"exponential\" attack: an exponential approach that turns\n * into a short linear ramp for its last tenth);\n * - decay: an exponential approach to `velocity * sustain` whose last tenth is\n * a linear ramp, so it lands exactly;\n * - release: the same approach-then-ramp shape down to zero, starting from\n * wherever the envelope is when the note is let go.\n *\n * Planning the whole note up front (instead of cancelling and re-scheduling\n * at the release, as Tone does) is what lets a note own two native nodes and\n * nothing else. The plan is pure data so it can be checked without audio.\n */\n\n/** The envelope curve of a light voice, read when a note starts. */\nexport interface EnvelopeShape {\n attack: number;\n decay: number;\n sustain: number;\n release: number;\n /** Tone's attack curve: linear for the synths, exponential for membranes. */\n attackCurve: \"linear\" | \"exponential\";\n}\n\n/** One automation call on an AudioParam, in the order it is made. */\nexport type ParamEvent =\n | { kind: \"set\"; value: number; time: number }\n | { kind: \"linear\"; value: number; time: number }\n | { kind: \"target\"; value: number; time: number; timeConstant: number };\n\n/** A planned note: the gain automation and when its oscillator stops. */\nexport interface NotePlan {\n events: ParamEvent[];\n stopAt: number;\n}\n\n/** The level a ramp starts from instead of true zero (Tone's minimum output). */\nconst SILENT_FLOOR = 1e-7;\n/** The share of an approach spent on the exponential curve before Tone hands\n * over to a linear ramp that lands exactly on the target. */\nconst APPROACH_SHARE = 0.9;\n\n/** Tone's time constant for an exponential approach lasting `rampTime` s. */\nexport function approachTimeConstant(rampTime: number): number {\n return Math.log(rampTime + 1) / Math.log(200);\n}\n\n/** Append Tone's exponential approach toward `target`, starting at `time`\n * from the value the events reach there. */\nfunction approach(events: ParamEvent[], target: number, time: number, rampTime: number): void {\n const timeConstant = approachTimeConstant(rampTime);\n events.push({ kind: \"target\", value: target, time, timeConstant });\n const handover = time + rampTime * APPROACH_SHARE;\n events.push({ kind: \"set\", value: valueAt(events, handover), time: handover });\n events.push({ kind: \"linear\", value: target, time: time + rampTime });\n}\n\n/** The value a list of events (made by this module) holds at `time`, with\n * Web Audio's rules: a set holds, a linear ramp interpolates from the event\n * before it, and a target decays from the value at its start. */\nexport function valueAt(events: readonly ParamEvent[], time: number): number {\n let value = 0;\n let from = 0;\n let fromTime = -Infinity;\n let target: { value: number; time: number; timeConstant: number; start: number } | null = null;\n for (const ev of events) {\n if (ev.time > time) {\n if (ev.kind === \"linear\") {\n const start = target ? targetValue(target, fromTime) : from;\n const span = ev.time - fromTime;\n return span > 0 ? start + ((ev.value - start) * (time - fromTime)) / span : ev.value;\n }\n break;\n }\n const before: number = target ? targetValue(target, ev.time) : value;\n if (ev.kind === \"target\") {\n target = { value: ev.value, time: ev.time, timeConstant: ev.timeConstant, start: before };\n value = before;\n } else {\n target = null;\n value = ev.value;\n }\n from = value;\n fromTime = ev.time;\n }\n return target ? targetValue(target, time) : value;\n}\n\nfunction targetValue(t: { value: number; time: number; timeConstant: number; start: number }, at: number): number {\n return t.value + (t.start - t.value) * Math.exp(-(at - t.time) / t.timeConstant);\n}\n\n/** The attack and decay of a note started at `start`, before any release. */\nfunction attackAndDecay(env: EnvelopeShape, start: number, velocity: number, sampleTime: number): ParamEvent[] {\n const events: ParamEvent[] = [];\n if (env.attack < sampleTime) {\n events.push({ kind: \"set\", value: velocity, time: start });\n } else {\n events.push({ kind: \"set\", value: SILENT_FLOOR, time: start });\n if (env.attackCurve === \"linear\") events.push({ kind: \"linear\", value: velocity, time: start + env.attack });\n else approach(events, velocity, start, env.attack);\n }\n if (env.decay > 0 && env.sustain < 1) approach(events, velocity * env.sustain, start + env.attack, env.decay);\n return events;\n}\n\n/**\n * Plan one note: its gain automation from `start` and the time its\n * oscillator stops. The release begins at `start + duration` from the\n * envelope's level there.\n *\n * The stop time follows Tone's (a voice with no sustain stops when its decay\n * ends) with one deliberate difference: a note let go before its decay ended\n * stops when its release ends. Tone stopped it at the decay's end even when\n * the release tail was still sounding, a small cut that can click.\n */\nexport function planNote(\n env: EnvelopeShape,\n start: number,\n duration: number,\n velocity: number,\n sampleTime: number,\n): NotePlan {\n const full = attackAndDecay(env, start, velocity, sampleTime);\n const releaseAt = start + Math.max(0, duration);\n const level = valueAt(full, releaseAt);\n // Keep what happens before the release; a ramp the release interrupts ends\n // where the envelope is at that moment, so the curve stays continuous.\n const events = full.filter((ev) => ev.time <= releaseAt);\n const cut = full.find((ev) => ev.time > releaseAt);\n if (cut?.kind === \"linear\") events.push({ kind: \"linear\", value: level, time: releaseAt });\n if (level <= 0) {\n // Nothing left to let go: the decay already reached silence (or the note\n // never had any level), so the oscillator stops where the sound ended.\n const decayEnd = start + env.attack + env.decay;\n return { events, stopAt: env.sustain === 0 ? Math.min(decayEnd, releaseAt) : releaseAt };\n }\n events.push({ kind: \"set\", value: level, time: releaseAt });\n if (env.release < sampleTime) {\n events.push({ kind: \"set\", value: 0, time: releaseAt });\n return { events, stopAt: releaseAt };\n }\n approach(events, 0, releaseAt, env.release);\n return { events, stopAt: releaseAt + env.release };\n}\n"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;AAiBG;AAwBH;AACA,MAAM,YAAY,GAAG,IAAI;AACzB;AAC8D;AAC9D,MAAM,cAAc,GAAG,GAAG;AAE1B;AACM,SAAU,oBAAoB,CAAC,QAAgB,EAAA;AACnD,IAAA,OAAO,IAAI,CAAC,GAAG,CAAC,QAAQ,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC;AAC/C;AAEA;AAC6C;AAC7C,SAAS,QAAQ,CAAC,MAAoB,EAAE,MAAc,EAAE,IAAY,EAAE,QAAgB,EAAA;AACpF,IAAA,MAAM,YAAY,GAAG,oBAAoB,CAAC,QAAQ,CAAC;AACnD,IAAA,MAAM,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC;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,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,CAAC,OAAO,KAAK,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE,SAAS,CAAC,GAAG,SAAS,EAAE;IAC1F;AACA,IAAA,MAAM,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;AAC3D,IAAA,IAAI,GAAG,CAAC,OAAO,GAAG,UAAU,EAAE;AAC5B,QAAA,MAAM,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;AACvD,QAAA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE;IACtC;IACA,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,SAAS,EAAE,GAAG,CAAC,OAAO,CAAC;IAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,GAAG,GAAG,CAAC,OAAO,EAAE;AACpD;;"}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import * as Tone from "tone";
|
|
2
|
+
import { type EnvelopeShape } from "./lightEnvelope";
|
|
3
|
+
/**
|
|
4
|
+
* Light voices: drop-in stand-ins for Tone.Synth, Tone.PolySynth(Tone.Synth)
|
|
5
|
+
* and Tone.MembraneSynth that build each note from two native Web Audio nodes
|
|
6
|
+
* (an oscillator and its envelope gain) which stop and are released when the
|
|
7
|
+
* note ends. They play through Tone's context, clock and graph, and their
|
|
8
|
+
* envelopes are Tone's own curves (`./lightEnvelope.ts`), so they sound the
|
|
9
|
+
* same as the voices they replace.
|
|
10
|
+
*
|
|
11
|
+
* Why they exist: the audio crackled. A Tone instrument keeps its whole node
|
|
12
|
+
* graph alive and rendering all the time (every Synth holds around 35 nodes,
|
|
13
|
+
* every PolySynth adds a spare voice, and each sounding voice another set),
|
|
14
|
+
* so the ~25 instruments the music, jingles and venue ambience need cost the
|
|
15
|
+
* audio thread about a sixth of a fast desktop core even in silence. A slower
|
|
16
|
+
* phone or laptop missed its render deadlines, and every missed deadline is a
|
|
17
|
+
* crackle in whatever is playing. A light voice costs nothing while silent.
|
|
18
|
+
*
|
|
19
|
+
* Mono voices keep Tone's one-note-at-a-time feel: a new note fades the
|
|
20
|
+
* sounding one out over a few milliseconds instead of stacking on it.
|
|
21
|
+
*/
|
|
22
|
+
/** Oscillator shapes the voices use (Tone plays these as the native types). */
|
|
23
|
+
export type LightOscType = "sine" | "triangle" | "square" | "sawtooth";
|
|
24
|
+
export interface LightVoiceOptions {
|
|
25
|
+
oscillator?: {
|
|
26
|
+
type?: LightOscType;
|
|
27
|
+
};
|
|
28
|
+
envelope?: Partial<EnvelopeShape>;
|
|
29
|
+
/** Output level in decibels (Tone's `volume`). */
|
|
30
|
+
volume?: number;
|
|
31
|
+
}
|
|
32
|
+
export interface LightPolyOptions extends LightVoiceOptions {
|
|
33
|
+
/** Most notes sounding at once; a note past it is dropped, as in Tone. */
|
|
34
|
+
maxPolyphony?: number;
|
|
35
|
+
}
|
|
36
|
+
export interface LightMembraneOptions extends LightVoiceOptions {
|
|
37
|
+
/** How far above the note the strike starts, as a frequency multiple
|
|
38
|
+
* (Tone's `octaves`: the sweep starts at `freq * octaves`). */
|
|
39
|
+
octaves?: number;
|
|
40
|
+
/** Seconds the strike takes to glide onto the note. */
|
|
41
|
+
pitchDecay?: number;
|
|
42
|
+
}
|
|
43
|
+
interface VoiceDefaults {
|
|
44
|
+
envelope: EnvelopeShape;
|
|
45
|
+
oscillator: LightOscType;
|
|
46
|
+
}
|
|
47
|
+
/** One sounding note: its nodes, and when its oscillator stops. */
|
|
48
|
+
interface LiveNote {
|
|
49
|
+
osc: OscillatorNode;
|
|
50
|
+
env: GainNode;
|
|
51
|
+
/** Mono voices only: a level the next note fades to hand over. */
|
|
52
|
+
handoff: GainNode | null;
|
|
53
|
+
start: number;
|
|
54
|
+
stopAt: number;
|
|
55
|
+
}
|
|
56
|
+
/** Shared note engine: builds, tracks and reaps light notes. */
|
|
57
|
+
declare abstract class LightVoiceBase {
|
|
58
|
+
/** The voice's output; `volume` is its level in decibels. */
|
|
59
|
+
readonly output: Tone.Volume;
|
|
60
|
+
readonly volume: Tone.Param<"decibels">;
|
|
61
|
+
/** The envelope the next note uses (mutable, read at each note's start). */
|
|
62
|
+
readonly envelope: EnvelopeShape;
|
|
63
|
+
protected type: LightOscType;
|
|
64
|
+
protected live: LiveNote[];
|
|
65
|
+
private disposed;
|
|
66
|
+
protected constructor(defaults: VoiceDefaults, opts: LightVoiceOptions);
|
|
67
|
+
connect(dest: Tone.InputNode): this;
|
|
68
|
+
/** Change the envelope for later notes (Tone's `set({ envelope })`). */
|
|
69
|
+
set(opts: {
|
|
70
|
+
envelope?: Partial<EnvelopeShape>;
|
|
71
|
+
}): this;
|
|
72
|
+
/** Play one note: `freq` Hz for `duration`, starting at `time` (Tone's
|
|
73
|
+
* clock; defaults to now), peaking at `velocity`. A note asked for in the
|
|
74
|
+
* past (the main thread stalled past the scheduler's look-ahead) starts
|
|
75
|
+
* now instead: its envelope would otherwise begin partway up the attack,
|
|
76
|
+
* a jump from silence that clicks. */
|
|
77
|
+
triggerAttackRelease(freq: number, duration: Tone.Unit.Time, time?: Tone.Unit.Time, velocity?: number): this;
|
|
78
|
+
/** Whether a note starting at `start` may sound; mono voices hand over. */
|
|
79
|
+
protected abstract admit(start: number): boolean;
|
|
80
|
+
/** True for one-note-at-a-time voices. */
|
|
81
|
+
protected abstract readonly mono: boolean;
|
|
82
|
+
/** Schedule the oscillator pitch for a note (a plain note holds it). The
|
|
83
|
+
* param's resting value is set too: a fresh oscillator otherwise renders
|
|
84
|
+
* its first samples at the 440 Hz default (Chrome reads the value before
|
|
85
|
+
* an event placed at the start), a stray blip at the head of every note. */
|
|
86
|
+
protected pitch(freq: AudioParam, hz: number, start: number): void;
|
|
87
|
+
/** Fade every note still sounding at `at` out over the handoff time. */
|
|
88
|
+
protected handOver(at: number): void;
|
|
89
|
+
/** Drop notes long finished whose `onended` never arrived. */
|
|
90
|
+
private reap;
|
|
91
|
+
private release;
|
|
92
|
+
dispose(): this;
|
|
93
|
+
}
|
|
94
|
+
/** Many notes at once (Tone.PolySynth of Tone.Synth). */
|
|
95
|
+
export declare class LightPolySynth extends LightVoiceBase {
|
|
96
|
+
maxPolyphony: number;
|
|
97
|
+
protected readonly mono = false;
|
|
98
|
+
constructor(opts?: LightPolyOptions);
|
|
99
|
+
protected admit(start: number): boolean;
|
|
100
|
+
}
|
|
101
|
+
/** The pitch of a mono voice's current note, for glides scheduled after the
|
|
102
|
+
* trigger (the bloop's swoop, the tick's knock, the riser): each call lands
|
|
103
|
+
* on the oscillator of the note most recently triggered. */
|
|
104
|
+
export interface GlideControl {
|
|
105
|
+
cancelScheduledValues(time: number): GlideControl;
|
|
106
|
+
setValueAtTime(value: number, time: number): GlideControl;
|
|
107
|
+
linearRampToValueAtTime(value: number, time: number): GlideControl;
|
|
108
|
+
exponentialRampToValueAtTime(value: number, time: number): GlideControl;
|
|
109
|
+
}
|
|
110
|
+
/** One note at a time (Tone.Synth). */
|
|
111
|
+
export declare class LightMonoSynth extends LightVoiceBase {
|
|
112
|
+
protected readonly mono = true;
|
|
113
|
+
readonly frequency: GlideControl;
|
|
114
|
+
constructor(opts?: LightVoiceOptions, defaults?: VoiceDefaults);
|
|
115
|
+
protected admit(start: number): boolean;
|
|
116
|
+
}
|
|
117
|
+
/** A struck membrane (Tone.MembraneSynth): a mono note whose pitch glides
|
|
118
|
+
* from `freq * octaves` onto the note over `pitchDecay` seconds. */
|
|
119
|
+
export declare class LightMembraneSynth extends LightMonoSynth {
|
|
120
|
+
private readonly octaves;
|
|
121
|
+
private readonly pitchDecay;
|
|
122
|
+
constructor(opts?: LightMembraneOptions);
|
|
123
|
+
protected pitch(freq: AudioParam, hz: number, start: number): void;
|
|
124
|
+
}
|
|
125
|
+
export {};
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
import * as Tone from 'tone';
|
|
2
|
+
import { planNote } from './lightEnvelope.js';
|
|
3
|
+
|
|
4
|
+
/** Tone.Synth's defaults (the synth and poly voices start from these). */
|
|
5
|
+
const SYNTH_DEFAULTS = {
|
|
6
|
+
envelope: { attack: 0.005, decay: 0.1, sustain: 0.3, release: 1, attackCurve: "linear" },
|
|
7
|
+
oscillator: "triangle",
|
|
8
|
+
};
|
|
9
|
+
/** Tone.MembraneSynth's defaults. */
|
|
10
|
+
const MEMBRANE_DEFAULTS = {
|
|
11
|
+
envelope: { attack: 0.001, decay: 0.4, sustain: 0.01, release: 1.4, attackCurve: "exponential" },
|
|
12
|
+
oscillator: "sine",
|
|
13
|
+
};
|
|
14
|
+
const MEMBRANE_OCTAVES = 10;
|
|
15
|
+
const MEMBRANE_PITCH_DECAY = 0.05;
|
|
16
|
+
/** Tone.PolySynth's default voice limit. */
|
|
17
|
+
const POLY_MAX = 32;
|
|
18
|
+
/** How long a mono voice takes to fade a note a new one replaces. */
|
|
19
|
+
const MONO_HANDOFF_S = 0.005;
|
|
20
|
+
/** A note this long past its stop is reaped even if `onended` never fired
|
|
21
|
+
* (a suspended context never fires it). */
|
|
22
|
+
const REAP_GRACE_S = 0.5;
|
|
23
|
+
function applyEvents(param, events) {
|
|
24
|
+
for (const ev of events) {
|
|
25
|
+
if (ev.kind === "set")
|
|
26
|
+
param.setValueAtTime(ev.value, ev.time);
|
|
27
|
+
else if (ev.kind === "linear")
|
|
28
|
+
param.linearRampToValueAtTime(ev.value, ev.time);
|
|
29
|
+
else
|
|
30
|
+
param.setTargetAtTime(ev.value, ev.time, ev.timeConstant);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
function seconds(t) {
|
|
34
|
+
return typeof t === "number" ? t : Tone.Time(t).toSeconds();
|
|
35
|
+
}
|
|
36
|
+
/** Shared note engine: builds, tracks and reaps light notes. */
|
|
37
|
+
class LightVoiceBase {
|
|
38
|
+
constructor(defaults, opts) {
|
|
39
|
+
this.live = [];
|
|
40
|
+
this.disposed = false;
|
|
41
|
+
this.output = new Tone.Volume(opts.volume ?? 0);
|
|
42
|
+
this.volume = this.output.volume;
|
|
43
|
+
this.envelope = { ...defaults.envelope, ...opts.envelope };
|
|
44
|
+
this.type = opts.oscillator?.type ?? defaults.oscillator;
|
|
45
|
+
}
|
|
46
|
+
connect(dest) {
|
|
47
|
+
this.output.connect(dest);
|
|
48
|
+
return this;
|
|
49
|
+
}
|
|
50
|
+
/** Change the envelope for later notes (Tone's `set({ envelope })`). */
|
|
51
|
+
set(opts) {
|
|
52
|
+
if (opts.envelope)
|
|
53
|
+
Object.assign(this.envelope, opts.envelope);
|
|
54
|
+
return this;
|
|
55
|
+
}
|
|
56
|
+
/** Play one note: `freq` Hz for `duration`, starting at `time` (Tone's
|
|
57
|
+
* clock; defaults to now), peaking at `velocity`. A note asked for in the
|
|
58
|
+
* past (the main thread stalled past the scheduler's look-ahead) starts
|
|
59
|
+
* now instead: its envelope would otherwise begin partway up the attack,
|
|
60
|
+
* a jump from silence that clicks. */
|
|
61
|
+
triggerAttackRelease(freq, duration, time, velocity = 1) {
|
|
62
|
+
if (this.disposed)
|
|
63
|
+
return this;
|
|
64
|
+
const ctx = Tone.getContext();
|
|
65
|
+
const start = Math.max(time === undefined ? Tone.now() : seconds(time), ctx.currentTime);
|
|
66
|
+
this.reap(ctx.currentTime);
|
|
67
|
+
if (!this.admit(start))
|
|
68
|
+
return this;
|
|
69
|
+
const plan = planNote(this.envelope, start, seconds(duration), velocity, 1 / ctx.sampleRate);
|
|
70
|
+
const osc = ctx.createOscillator();
|
|
71
|
+
const env = ctx.createGain();
|
|
72
|
+
const handoff = this.mono ? ctx.createGain() : null;
|
|
73
|
+
osc.type = this.type;
|
|
74
|
+
this.pitch(osc.frequency, freq, start);
|
|
75
|
+
env.gain.value = 0;
|
|
76
|
+
applyEvents(env.gain, plan.events);
|
|
77
|
+
osc.connect(env);
|
|
78
|
+
if (handoff) {
|
|
79
|
+
env.connect(handoff);
|
|
80
|
+
Tone.connect(handoff, this.output);
|
|
81
|
+
}
|
|
82
|
+
else {
|
|
83
|
+
Tone.connect(env, this.output);
|
|
84
|
+
}
|
|
85
|
+
const note = { osc, env, handoff, start, stopAt: plan.stopAt };
|
|
86
|
+
osc.onended = () => this.release(note);
|
|
87
|
+
osc.start(start);
|
|
88
|
+
osc.stop(plan.stopAt);
|
|
89
|
+
this.live.push(note);
|
|
90
|
+
return this;
|
|
91
|
+
}
|
|
92
|
+
/** Schedule the oscillator pitch for a note (a plain note holds it). The
|
|
93
|
+
* param's resting value is set too: a fresh oscillator otherwise renders
|
|
94
|
+
* its first samples at the 440 Hz default (Chrome reads the value before
|
|
95
|
+
* an event placed at the start), a stray blip at the head of every note. */
|
|
96
|
+
pitch(freq, hz, start) {
|
|
97
|
+
freq.value = hz;
|
|
98
|
+
freq.setValueAtTime(hz, start);
|
|
99
|
+
}
|
|
100
|
+
/** Fade every note still sounding at `at` out over the handoff time. */
|
|
101
|
+
handOver(at) {
|
|
102
|
+
for (const n of this.live) {
|
|
103
|
+
if (n.stopAt <= at || n.start >= at || !n.handoff)
|
|
104
|
+
continue;
|
|
105
|
+
n.handoff.gain.setValueAtTime(1, at);
|
|
106
|
+
n.handoff.gain.linearRampToValueAtTime(0, at + MONO_HANDOFF_S);
|
|
107
|
+
n.stopAt = at + MONO_HANDOFF_S;
|
|
108
|
+
try {
|
|
109
|
+
n.osc.stop(n.stopAt);
|
|
110
|
+
}
|
|
111
|
+
catch {
|
|
112
|
+
/* an older engine that allows one stop: the note ends at its own stop */
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
/** Drop notes long finished whose `onended` never arrived. */
|
|
117
|
+
reap(now) {
|
|
118
|
+
for (let i = this.live.length - 1; i >= 0; i--) {
|
|
119
|
+
const n = this.live[i];
|
|
120
|
+
if (n.stopAt + REAP_GRACE_S < now)
|
|
121
|
+
this.release(n);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
release(note) {
|
|
125
|
+
const i = this.live.indexOf(note);
|
|
126
|
+
if (i >= 0)
|
|
127
|
+
this.live.splice(i, 1);
|
|
128
|
+
note.osc.onended = null;
|
|
129
|
+
for (const node of [note.osc, note.env, note.handoff]) {
|
|
130
|
+
try {
|
|
131
|
+
node?.disconnect();
|
|
132
|
+
}
|
|
133
|
+
catch {
|
|
134
|
+
/* already disconnected */
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
dispose() {
|
|
139
|
+
this.disposed = true;
|
|
140
|
+
for (const n of this.live.slice()) {
|
|
141
|
+
try {
|
|
142
|
+
n.osc.stop();
|
|
143
|
+
}
|
|
144
|
+
catch {
|
|
145
|
+
/* never started or already stopped */
|
|
146
|
+
}
|
|
147
|
+
this.release(n);
|
|
148
|
+
}
|
|
149
|
+
this.output.dispose();
|
|
150
|
+
return this;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
/** Many notes at once (Tone.PolySynth of Tone.Synth). */
|
|
154
|
+
class LightPolySynth extends LightVoiceBase {
|
|
155
|
+
constructor(opts = {}) {
|
|
156
|
+
super(SYNTH_DEFAULTS, opts);
|
|
157
|
+
this.mono = false;
|
|
158
|
+
this.maxPolyphony = opts.maxPolyphony ?? POLY_MAX;
|
|
159
|
+
}
|
|
160
|
+
admit(start) {
|
|
161
|
+
let sounding = 0;
|
|
162
|
+
for (const n of this.live)
|
|
163
|
+
if (n.stopAt > start)
|
|
164
|
+
sounding++;
|
|
165
|
+
return sounding < this.maxPolyphony;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
/** One note at a time (Tone.Synth). */
|
|
169
|
+
class LightMonoSynth extends LightVoiceBase {
|
|
170
|
+
constructor(opts = {}, defaults = SYNTH_DEFAULTS) {
|
|
171
|
+
super(defaults, opts);
|
|
172
|
+
this.mono = true;
|
|
173
|
+
const current = () => this.live[this.live.length - 1]?.osc.frequency ?? null;
|
|
174
|
+
const glide = {
|
|
175
|
+
cancelScheduledValues: (t) => (current()?.cancelScheduledValues(t), glide),
|
|
176
|
+
setValueAtTime: (v, t) => (current()?.setValueAtTime(v, t), glide),
|
|
177
|
+
linearRampToValueAtTime: (v, t) => (current()?.linearRampToValueAtTime(v, t), glide),
|
|
178
|
+
exponentialRampToValueAtTime: (v, t) => (current()?.exponentialRampToValueAtTime(v, t), glide),
|
|
179
|
+
};
|
|
180
|
+
this.frequency = glide;
|
|
181
|
+
}
|
|
182
|
+
admit(start) {
|
|
183
|
+
this.handOver(start);
|
|
184
|
+
return true;
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
/** A struck membrane (Tone.MembraneSynth): a mono note whose pitch glides
|
|
188
|
+
* from `freq * octaves` onto the note over `pitchDecay` seconds. */
|
|
189
|
+
class LightMembraneSynth extends LightMonoSynth {
|
|
190
|
+
constructor(opts = {}) {
|
|
191
|
+
super(opts, MEMBRANE_DEFAULTS);
|
|
192
|
+
this.octaves = opts.octaves ?? MEMBRANE_OCTAVES;
|
|
193
|
+
this.pitchDecay = opts.pitchDecay ?? MEMBRANE_PITCH_DECAY;
|
|
194
|
+
}
|
|
195
|
+
pitch(freq, hz, start) {
|
|
196
|
+
freq.value = hz * this.octaves;
|
|
197
|
+
freq.setValueAtTime(hz * this.octaves, start);
|
|
198
|
+
freq.exponentialRampToValueAtTime(hz, start + this.pitchDecay);
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
export { LightMembraneSynth, LightMonoSynth, LightPolySynth };
|
|
203
|
+
//# sourceMappingURL=lightSynth.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lightSynth.js","sources":["../../src/audio/lightSynth.ts"],"sourcesContent":["import * as Tone from \"tone\";\nimport { planNote, type EnvelopeShape, type ParamEvent } from \"./lightEnvelope\";\n\n/**\n * Light voices: drop-in stand-ins for Tone.Synth, Tone.PolySynth(Tone.Synth)\n * and Tone.MembraneSynth that build each note from two native Web Audio nodes\n * (an oscillator and its envelope gain) which stop and are released when the\n * note ends. They play through Tone's context, clock and graph, and their\n * envelopes are Tone's own curves (`./lightEnvelope.ts`), so they sound the\n * same as the voices they replace.\n *\n * Why they exist: the audio crackled. A Tone instrument keeps its whole node\n * graph alive and rendering all the time (every Synth holds around 35 nodes,\n * every PolySynth adds a spare voice, and each sounding voice another set),\n * so the ~25 instruments the music, jingles and venue ambience need cost the\n * audio thread about a sixth of a fast desktop core even in silence. A slower\n * phone or laptop missed its render deadlines, and every missed deadline is a\n * crackle in whatever is playing. A light voice costs nothing while silent.\n *\n * Mono voices keep Tone's one-note-at-a-time feel: a new note fades the\n * sounding one out over a few milliseconds instead of stacking on it.\n */\n\n/** Oscillator shapes the voices use (Tone plays these as the native types). */\nexport type LightOscType = \"sine\" | \"triangle\" | \"square\" | \"sawtooth\";\n\nexport interface LightVoiceOptions {\n oscillator?: { type?: LightOscType };\n envelope?: Partial<EnvelopeShape>;\n /** Output level in decibels (Tone's `volume`). */\n volume?: number;\n}\n\nexport interface LightPolyOptions extends LightVoiceOptions {\n /** Most notes sounding at once; a note past it is dropped, as in Tone. */\n maxPolyphony?: number;\n}\n\nexport interface LightMembraneOptions extends LightVoiceOptions {\n /** How far above the note the strike starts, as a frequency multiple\n * (Tone's `octaves`: the sweep starts at `freq * octaves`). */\n octaves?: number;\n /** Seconds the strike takes to glide onto the note. */\n pitchDecay?: number;\n}\n\ninterface VoiceDefaults {\n envelope: EnvelopeShape;\n oscillator: LightOscType;\n}\n/** Tone.Synth's defaults (the synth and poly voices start from these). */\nconst SYNTH_DEFAULTS: VoiceDefaults = {\n envelope: { attack: 0.005, decay: 0.1, sustain: 0.3, release: 1, attackCurve: \"linear\" },\n oscillator: \"triangle\",\n};\n/** Tone.MembraneSynth's defaults. */\nconst MEMBRANE_DEFAULTS: VoiceDefaults = {\n envelope: { attack: 0.001, decay: 0.4, sustain: 0.01, release: 1.4, attackCurve: \"exponential\" },\n oscillator: \"sine\",\n};\nconst MEMBRANE_OCTAVES = 10;\nconst MEMBRANE_PITCH_DECAY = 0.05;\n/** Tone.PolySynth's default voice limit. */\nconst POLY_MAX = 32;\n/** How long a mono voice takes to fade a note a new one replaces. */\nconst MONO_HANDOFF_S = 0.005;\n/** A note this long past its stop is reaped even if `onended` never fired\n * (a suspended context never fires it). */\nconst REAP_GRACE_S = 0.5;\n\n/** One sounding note: its nodes, and when its oscillator stops. */\ninterface LiveNote {\n osc: OscillatorNode;\n env: GainNode;\n /** Mono voices only: a level the next note fades to hand over. */\n handoff: GainNode | null;\n start: number;\n stopAt: number;\n}\n\nfunction applyEvents(param: AudioParam, events: readonly ParamEvent[]): void {\n for (const ev of events) {\n if (ev.kind === \"set\") param.setValueAtTime(ev.value, ev.time);\n else if (ev.kind === \"linear\") param.linearRampToValueAtTime(ev.value, ev.time);\n else param.setTargetAtTime(ev.value, ev.time, ev.timeConstant);\n }\n}\n\nfunction seconds(t: Tone.Unit.Time): number {\n return typeof t === \"number\" ? t : Tone.Time(t).toSeconds();\n}\n\n/** Shared note engine: builds, tracks and reaps light notes. */\nabstract class LightVoiceBase {\n /** The voice's output; `volume` is its level in decibels. */\n readonly output: Tone.Volume;\n readonly volume: Tone.Param<\"decibels\">;\n /** The envelope the next note uses (mutable, read at each note's start). */\n readonly envelope: EnvelopeShape;\n protected type: LightOscType;\n protected live: LiveNote[] = [];\n private disposed = false;\n\n protected constructor(defaults: VoiceDefaults, opts: LightVoiceOptions) {\n this.output = new Tone.Volume(opts.volume ?? 0);\n this.volume = this.output.volume;\n this.envelope = { ...defaults.envelope, ...opts.envelope };\n this.type = opts.oscillator?.type ?? defaults.oscillator;\n }\n\n connect(dest: Tone.InputNode): this {\n this.output.connect(dest);\n return this;\n }\n\n /** Change the envelope for later notes (Tone's `set({ envelope })`). */\n set(opts: { envelope?: Partial<EnvelopeShape> }): this {\n if (opts.envelope) Object.assign(this.envelope, opts.envelope);\n return this;\n }\n\n /** Play one note: `freq` Hz for `duration`, starting at `time` (Tone's\n * clock; defaults to now), peaking at `velocity`. A note asked for in the\n * past (the main thread stalled past the scheduler's look-ahead) starts\n * now instead: its envelope would otherwise begin partway up the attack,\n * a jump from silence that clicks. */\n triggerAttackRelease(freq: number, duration: Tone.Unit.Time, time?: Tone.Unit.Time, velocity = 1): this {\n if (this.disposed) return this;\n const ctx = Tone.getContext();\n const start = Math.max(time === undefined ? Tone.now() : seconds(time), ctx.currentTime);\n this.reap(ctx.currentTime);\n if (!this.admit(start)) return this;\n const plan = planNote(this.envelope, start, seconds(duration), velocity, 1 / ctx.sampleRate);\n const osc = ctx.createOscillator();\n const env = ctx.createGain();\n const handoff = this.mono ? ctx.createGain() : null;\n osc.type = this.type;\n this.pitch(osc.frequency, freq, start);\n env.gain.value = 0;\n applyEvents(env.gain, plan.events);\n osc.connect(env);\n if (handoff) {\n env.connect(handoff);\n Tone.connect(handoff, this.output);\n } else {\n Tone.connect(env, this.output);\n }\n const note: LiveNote = { osc, env, handoff, start, stopAt: plan.stopAt };\n osc.onended = () => this.release(note);\n osc.start(start);\n osc.stop(plan.stopAt);\n this.live.push(note);\n return this;\n }\n\n /** Whether a note starting at `start` may sound; mono voices hand over. */\n protected abstract admit(start: number): boolean;\n /** True for one-note-at-a-time voices. */\n protected abstract readonly mono: boolean;\n\n /** Schedule the oscillator pitch for a note (a plain note holds it). The\n * param's resting value is set too: a fresh oscillator otherwise renders\n * its first samples at the 440 Hz default (Chrome reads the value before\n * an event placed at the start), a stray blip at the head of every note. */\n protected pitch(freq: AudioParam, hz: number, start: number): void {\n freq.value = hz;\n freq.setValueAtTime(hz, start);\n }\n\n /** Fade every note still sounding at `at` out over the handoff time. */\n protected handOver(at: number): void {\n for (const n of this.live) {\n if (n.stopAt <= at || n.start >= at || !n.handoff) continue;\n n.handoff.gain.setValueAtTime(1, at);\n n.handoff.gain.linearRampToValueAtTime(0, at + MONO_HANDOFF_S);\n n.stopAt = at + MONO_HANDOFF_S;\n try {\n n.osc.stop(n.stopAt);\n } catch {\n /* an older engine that allows one stop: the note ends at its own stop */\n }\n }\n }\n\n /** Drop notes long finished whose `onended` never arrived. */\n private reap(now: number): void {\n for (let i = this.live.length - 1; i >= 0; i--) {\n const n = this.live[i];\n if (n.stopAt + REAP_GRACE_S < now) this.release(n);\n }\n }\n\n private release(note: LiveNote): void {\n const i = this.live.indexOf(note);\n if (i >= 0) this.live.splice(i, 1);\n note.osc.onended = null;\n for (const node of [note.osc, note.env, note.handoff]) {\n try {\n node?.disconnect();\n } catch {\n /* already disconnected */\n }\n }\n }\n\n dispose(): this {\n this.disposed = true;\n for (const n of this.live.slice()) {\n try {\n n.osc.stop();\n } catch {\n /* never started or already stopped */\n }\n this.release(n);\n }\n this.output.dispose();\n return this;\n }\n}\n\n/** Many notes at once (Tone.PolySynth of Tone.Synth). */\nexport class LightPolySynth extends LightVoiceBase {\n maxPolyphony: number;\n protected readonly mono = false;\n\n constructor(opts: LightPolyOptions = {}) {\n super(SYNTH_DEFAULTS, opts);\n this.maxPolyphony = opts.maxPolyphony ?? POLY_MAX;\n }\n\n protected admit(start: number): boolean {\n let sounding = 0;\n for (const n of this.live) if (n.stopAt > start) sounding++;\n return sounding < this.maxPolyphony;\n }\n}\n\n/** The pitch of a mono voice's current note, for glides scheduled after the\n * trigger (the bloop's swoop, the tick's knock, the riser): each call lands\n * on the oscillator of the note most recently triggered. */\nexport interface GlideControl {\n cancelScheduledValues(time: number): GlideControl;\n setValueAtTime(value: number, time: number): GlideControl;\n linearRampToValueAtTime(value: number, time: number): GlideControl;\n exponentialRampToValueAtTime(value: number, time: number): GlideControl;\n}\n\n/** One note at a time (Tone.Synth). */\nexport class LightMonoSynth extends LightVoiceBase {\n protected readonly mono = true;\n readonly frequency: GlideControl;\n\n constructor(opts: LightVoiceOptions = {}, defaults: VoiceDefaults = SYNTH_DEFAULTS) {\n super(defaults, opts);\n const current = (): AudioParam | null => this.live[this.live.length - 1]?.osc.frequency ?? null;\n const glide: GlideControl = {\n cancelScheduledValues: (t) => (current()?.cancelScheduledValues(t), glide),\n setValueAtTime: (v, t) => (current()?.setValueAtTime(v, t), glide),\n linearRampToValueAtTime: (v, t) => (current()?.linearRampToValueAtTime(v, t), glide),\n exponentialRampToValueAtTime: (v, t) => (current()?.exponentialRampToValueAtTime(v, t), glide),\n };\n this.frequency = glide;\n }\n\n protected admit(start: number): boolean {\n this.handOver(start);\n return true;\n }\n}\n\n/** A struck membrane (Tone.MembraneSynth): a mono note whose pitch glides\n * from `freq * octaves` onto the note over `pitchDecay` seconds. */\nexport class LightMembraneSynth extends LightMonoSynth {\n private readonly octaves: number;\n private readonly pitchDecay: number;\n\n constructor(opts: LightMembraneOptions = {}) {\n super(opts, MEMBRANE_DEFAULTS);\n this.octaves = opts.octaves ?? MEMBRANE_OCTAVES;\n this.pitchDecay = opts.pitchDecay ?? MEMBRANE_PITCH_DECAY;\n }\n\n protected pitch(freq: AudioParam, hz: number, start: number): void {\n freq.value = hz * this.octaves;\n freq.setValueAtTime(hz * this.octaves, start);\n freq.exponentialRampToValueAtTime(hz, start + this.pitchDecay);\n }\n}\n"],"names":[],"mappings":";;;AAkDA;AACA,MAAM,cAAc,GAAkB;IACpC,QAAQ,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC,EAAE,WAAW,EAAE,QAAQ,EAAE;AACxF,IAAA,UAAU,EAAE,UAAU;CACvB;AACD;AACA,MAAM,iBAAiB,GAAkB;IACvC,QAAQ,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,WAAW,EAAE,aAAa,EAAE;AAChG,IAAA,UAAU,EAAE,MAAM;CACnB;AACD,MAAM,gBAAgB,GAAG,EAAE;AAC3B,MAAM,oBAAoB,GAAG,IAAI;AACjC;AACA,MAAM,QAAQ,GAAG,EAAE;AACnB;AACA,MAAM,cAAc,GAAG,KA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