@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.
Files changed (791) hide show
  1. package/ASSETS-LICENSE.md +49 -0
  2. package/LICENSE +21 -0
  3. package/README.md +121 -2
  4. package/lib/audio/Audio.d.ts +110 -0
  5. package/lib/audio/Audio.js +199 -0
  6. package/lib/audio/Audio.js.map +1 -0
  7. package/lib/audio/ToneAudioEngine.d.ts +125 -0
  8. package/lib/audio/ToneAudioEngine.js +452 -0
  9. package/lib/audio/ToneAudioEngine.js.map +1 -0
  10. package/lib/audio/audioAssets.d.ts +25 -0
  11. package/lib/audio/audioAssets.js +28 -0
  12. package/lib/audio/audioAssets.js.map +1 -0
  13. package/lib/audio/awayWatch.d.ts +17 -0
  14. package/lib/audio/awayWatch.js +33 -0
  15. package/lib/audio/awayWatch.js.map +1 -0
  16. package/lib/audio/firstCueLatch.d.ts +18 -0
  17. package/lib/audio/firstCueLatch.js +34 -0
  18. package/lib/audio/firstCueLatch.js.map +1 -0
  19. package/lib/audio/lightEnvelope.d.ts +64 -0
  20. package/lib/audio/lightEnvelope.js +124 -0
  21. package/lib/audio/lightEnvelope.js.map +1 -0
  22. package/lib/audio/lightSynth.d.ts +125 -0
  23. package/lib/audio/lightSynth.js +203 -0
  24. package/lib/audio/lightSynth.js.map +1 -0
  25. package/lib/audio/toneContext.d.ts +30 -0
  26. package/lib/audio/toneContext.js +79 -0
  27. package/lib/audio/toneContext.js.map +1 -0
  28. package/lib/audio/toneCrowd.d.ts +62 -0
  29. package/lib/audio/toneCrowd.js +429 -0
  30. package/lib/audio/toneCrowd.js.map +1 -0
  31. package/lib/audio/toneCrowdData.d.ts +144 -0
  32. package/lib/audio/toneCrowdData.js +317 -0
  33. package/lib/audio/toneCrowdData.js.map +1 -0
  34. package/lib/audio/toneCrowdPrograms.d.ts +71 -0
  35. package/lib/audio/toneCrowdPrograms.js +273 -0
  36. package/lib/audio/toneCrowdPrograms.js.map +1 -0
  37. package/lib/audio/toneCrowdVoices.d.ts +49 -0
  38. package/lib/audio/toneCrowdVoices.js +212 -0
  39. package/lib/audio/toneCrowdVoices.js.map +1 -0
  40. package/lib/audio/toneMusicVoices.d.ts +11 -0
  41. package/lib/audio/toneMusicVoices.js +31 -0
  42. package/lib/audio/toneMusicVoices.js.map +1 -0
  43. package/lib/audio/tonePercussion.d.ts +45 -0
  44. package/lib/audio/tonePercussion.js +97 -0
  45. package/lib/audio/tonePercussion.js.map +1 -0
  46. package/lib/audio/toneRain.d.ts +23 -0
  47. package/lib/audio/toneRain.js +39 -0
  48. package/lib/audio/toneRain.js.map +1 -0
  49. package/lib/audio/toneRecordingMock.d.ts +89 -0
  50. package/lib/audio/toneRecordingMock.js +145 -0
  51. package/lib/audio/toneRecordingMock.js.map +1 -0
  52. package/lib/audio/toneRoomTone.d.ts +11 -0
  53. package/lib/audio/toneRoomTone.js +27 -0
  54. package/lib/audio/toneRoomTone.js.map +1 -0
  55. package/lib/audio/toneScenes.d.ts +57 -0
  56. package/lib/audio/toneScenes.js +208 -0
  57. package/lib/audio/toneScenes.js.map +1 -0
  58. package/lib/audio/toneTracks.d.ts +50 -0
  59. package/lib/audio/toneTracks.js +356 -0
  60. package/lib/audio/toneTracks.js.map +1 -0
  61. package/lib/audio/toneVoices.d.ts +57 -0
  62. package/lib/audio/toneVoices.js +208 -0
  63. package/lib/audio/toneVoices.js.map +1 -0
  64. package/lib/catalog/catalogTypes.d.ts +428 -0
  65. package/lib/catalog/catalogTypes.js +102 -0
  66. package/lib/catalog/catalogTypes.js.map +1 -0
  67. package/lib/catalog/skyBridgeTypes.d.ts +25 -0
  68. package/lib/catalog/skyBridgeTypes.js +7 -0
  69. package/lib/catalog/skyBridgeTypes.js.map +1 -0
  70. package/lib/catalog/starDutyTypes.d.ts +22 -0
  71. package/lib/catalog/starDutyTypes.js +7 -0
  72. package/lib/catalog/starDutyTypes.js.map +1 -0
  73. package/lib/catalog/towerCatalog.d.ts +32 -0
  74. package/lib/catalog/towerCatalog.js +44 -0
  75. package/lib/catalog/towerCatalog.js.map +1 -0
  76. package/lib/engineBinding/binding.d.ts +36 -0
  77. package/lib/engineBinding/binding.js +90 -0
  78. package/lib/engineBinding/binding.js.map +1 -0
  79. package/lib/engineBinding/catalog.d.ts +24 -0
  80. package/lib/engineBinding/catalog.js +267 -0
  81. package/lib/engineBinding/catalog.js.map +1 -0
  82. package/lib/engineBinding/engine.d.ts +866 -0
  83. package/lib/engineBinding/exportTiers.d.ts +289 -0
  84. package/lib/engineBinding/exportTiers.js +283 -0
  85. package/lib/engineBinding/exportTiers.js.map +1 -0
  86. package/lib/engineBinding/toolingMethods.d.ts +12 -0
  87. package/lib/engineBinding/toolingMethods.js +20 -0
  88. package/lib/engineBinding/toolingMethods.js.map +1 -0
  89. package/lib/events/gameplayCatalog.d.ts +57 -0
  90. package/lib/events/gameplayCatalog.js +214 -0
  91. package/lib/events/gameplayCatalog.js.map +1 -0
  92. package/lib/events/gameplayEventRules.d.ts +4 -0
  93. package/lib/events/gameplayEventRules.js +32 -0
  94. package/lib/events/gameplayEventRules.js.map +1 -0
  95. package/lib/events/gameplayEvents.d.ts +284 -0
  96. package/lib/presentation/clockText.d.ts +28 -0
  97. package/lib/presentation/clockText.js +38 -0
  98. package/lib/presentation/clockText.js.map +1 -0
  99. package/lib/presentation/facilityPresentation.d.ts +20 -0
  100. package/lib/presentation/facilityPresentation.js +164 -0
  101. package/lib/presentation/facilityPresentation.js.map +1 -0
  102. package/lib/presentation/statsCopy.d.ts +20 -0
  103. package/lib/presentation/statsCopy.js +37 -0
  104. package/lib/presentation/statsCopy.js.map +1 -0
  105. package/lib/presentation/traffic.d.ts +75 -0
  106. package/lib/presentation/traffic.js +79 -0
  107. package/lib/presentation/traffic.js.map +1 -0
  108. package/lib/presentation/viewKinds.d.ts +33 -0
  109. package/lib/presentation/viewKinds.js +88 -0
  110. package/lib/presentation/viewKinds.js.map +1 -0
  111. package/lib/presentation/viewWorld.d.ts +29 -0
  112. package/lib/presentation/viewWorld.js +31 -0
  113. package/lib/presentation/viewWorld.js.map +1 -0
  114. package/lib/render/atlas/archive.d.ts +78 -0
  115. package/lib/render/atlas/archive.js +427 -0
  116. package/lib/render/atlas/archive.js.map +1 -0
  117. package/lib/render/atlas/bake.d.ts +132 -0
  118. package/lib/render/atlas/bake.js +331 -0
  119. package/lib/render/atlas/bake.js.map +1 -0
  120. package/lib/render/atlas/bakeAdditions.d.ts +24 -0
  121. package/lib/render/atlas/bakeAdditions.js +46 -0
  122. package/lib/render/atlas/bakeAdditions.js.map +1 -0
  123. package/lib/render/atlas/browserEntry.d.ts +12 -0
  124. package/lib/render/atlas/browserEntry.js +222 -0
  125. package/lib/render/atlas/browserEntry.js.map +1 -0
  126. package/lib/render/atlas/catalog.d.ts +118 -0
  127. package/lib/render/atlas/catalog.js +253 -0
  128. package/lib/render/atlas/catalog.js.map +1 -0
  129. package/lib/render/atlas/catalogExtras.d.ts +45 -0
  130. package/lib/render/atlas/catalogExtras.js +217 -0
  131. package/lib/render/atlas/catalogExtras.js.map +1 -0
  132. package/lib/render/atlas/compose.d.ts +30 -0
  133. package/lib/render/atlas/compose.js +125 -0
  134. package/lib/render/atlas/compose.js.map +1 -0
  135. package/lib/render/atlas/cycles.d.ts +25 -0
  136. package/lib/render/atlas/cycles.js +41 -0
  137. package/lib/render/atlas/cycles.js.map +1 -0
  138. package/lib/render/atlas/lookup.d.ts +65 -0
  139. package/lib/render/atlas/lookup.js +83 -0
  140. package/lib/render/atlas/lookup.js.map +1 -0
  141. package/lib/render/atlas/pack.d.ts +23 -0
  142. package/lib/render/atlas/pack.js +50 -0
  143. package/lib/render/atlas/pack.js.map +1 -0
  144. package/lib/render/atlas/paint.d.ts +120 -0
  145. package/lib/render/atlas/paint.js +154 -0
  146. package/lib/render/atlas/paint.js.map +1 -0
  147. package/lib/render/atlas/pixels.d.ts +46 -0
  148. package/lib/render/atlas/pixels.js +158 -0
  149. package/lib/render/atlas/pixels.js.map +1 -0
  150. package/lib/render/atlas/png.d.ts +3 -0
  151. package/lib/render/atlas/png.js +102 -0
  152. package/lib/render/atlas/png.js.map +1 -0
  153. package/lib/render/atlas/raster.d.ts +34 -0
  154. package/lib/render/atlas/raster.js +114 -0
  155. package/lib/render/atlas/raster.js.map +1 -0
  156. package/lib/render/atlas/recyclingFill.d.ts +5 -0
  157. package/lib/render/atlas/recyclingFill.js +65 -0
  158. package/lib/render/atlas/recyclingFill.js.map +1 -0
  159. package/lib/render/atlas/samples.d.ts +24 -0
  160. package/lib/render/atlas/samples.js +75 -0
  161. package/lib/render/atlas/samples.js.map +1 -0
  162. package/lib/render/atlas/scenery.d.ts +230 -0
  163. package/lib/render/atlas/scenery.js +242 -0
  164. package/lib/render/atlas/scenery.js.map +1 -0
  165. package/lib/render/atlas/schema.d.ts +189 -0
  166. package/lib/render/atlas/schema.js +31 -0
  167. package/lib/render/atlas/schema.js.map +1 -0
  168. package/lib/render/atlas/shellMarks.d.ts +16 -0
  169. package/lib/render/atlas/shellMarks.js +72 -0
  170. package/lib/render/atlas/shellMarks.js.map +1 -0
  171. package/lib/render/atlas/store.d.ts +75 -0
  172. package/lib/render/atlas/store.js +127 -0
  173. package/lib/render/atlas/store.js.map +1 -0
  174. package/lib/render/atlas/verify.d.ts +43 -0
  175. package/lib/render/atlas/verify.js +87 -0
  176. package/lib/render/atlas/verify.js.map +1 -0
  177. package/lib/render/atlas/verifyExtras.d.ts +19 -0
  178. package/lib/render/atlas/verifyExtras.js +310 -0
  179. package/lib/render/atlas/verifyExtras.js.map +1 -0
  180. package/lib/render/cameraBounds.d.ts +71 -0
  181. package/lib/render/cameraBounds.js +107 -0
  182. package/lib/render/cameraBounds.js.map +1 -0
  183. package/lib/render/carIndicator.d.ts +41 -0
  184. package/lib/render/carIndicator.js +45 -0
  185. package/lib/render/carIndicator.js.map +1 -0
  186. package/lib/render/carMotion.d.ts +33 -0
  187. package/lib/render/carMotion.js +42 -0
  188. package/lib/render/carMotion.js.map +1 -0
  189. package/lib/render/catalogScale.d.ts +40 -0
  190. package/lib/render/catalogScale.js +33 -0
  191. package/lib/render/catalogScale.js.map +1 -0
  192. package/lib/render/climbPath.d.ts +59 -0
  193. package/lib/render/climbPath.js +115 -0
  194. package/lib/render/climbPath.js.map +1 -0
  195. package/lib/render/depthPlanes.d.ts +55 -0
  196. package/lib/render/depthPlanes.js +58 -0
  197. package/lib/render/depthPlanes.js.map +1 -0
  198. package/lib/render/excalibur/TowerEngine.d.ts +348 -0
  199. package/lib/render/excalibur/TowerEngine.js +415 -0
  200. package/lib/render/excalibur/TowerEngine.js.map +1 -0
  201. package/lib/render/excalibur/cabGraphics.d.ts +75 -0
  202. package/lib/render/excalibur/cabGraphics.js +108 -0
  203. package/lib/render/excalibur/cabGraphics.js.map +1 -0
  204. package/lib/render/excalibur/cabParts.d.ts +32 -0
  205. package/lib/render/excalibur/cabParts.js +79 -0
  206. package/lib/render/excalibur/cabParts.js.map +1 -0
  207. package/lib/render/excalibur/cabRiders.d.ts +72 -0
  208. package/lib/render/excalibur/cabRiders.js +176 -0
  209. package/lib/render/excalibur/cabRiders.js.map +1 -0
  210. package/lib/render/excalibur/crowdCull.d.ts +34 -0
  211. package/lib/render/excalibur/crowdCull.js +72 -0
  212. package/lib/render/excalibur/crowdCull.js.map +1 -0
  213. package/lib/render/excalibur/crowdFigure.d.ts +42 -0
  214. package/lib/render/excalibur/crowdFigure.js +99 -0
  215. package/lib/render/excalibur/crowdFigure.js.map +1 -0
  216. package/lib/render/excalibur/crowdLook.d.ts +137 -0
  217. package/lib/render/excalibur/crowdLook.js +186 -0
  218. package/lib/render/excalibur/crowdLook.js.map +1 -0
  219. package/lib/render/excalibur/frameHold.d.ts +23 -0
  220. package/lib/render/excalibur/frameHold.js +30 -0
  221. package/lib/render/excalibur/frameHold.js.map +1 -0
  222. package/lib/render/excalibur/guardPosition.d.ts +17 -0
  223. package/lib/render/excalibur/guardPosition.js +37 -0
  224. package/lib/render/excalibur/guardPosition.js.map +1 -0
  225. package/lib/render/excalibur/keyboardHost.d.ts +15 -0
  226. package/lib/render/excalibur/keyboardHost.js +22 -0
  227. package/lib/render/excalibur/keyboardHost.js.map +1 -0
  228. package/lib/render/excalibur/longPress.d.ts +16 -0
  229. package/lib/render/excalibur/longPress.js +71 -0
  230. package/lib/render/excalibur/longPress.js.map +1 -0
  231. package/lib/render/excalibur/peopleGfx.d.ts +16 -0
  232. package/lib/render/excalibur/peopleGfx.js +46 -0
  233. package/lib/render/excalibur/peopleGfx.js.map +1 -0
  234. package/lib/render/excalibur/peopleWindow.d.ts +35 -0
  235. package/lib/render/excalibur/peopleWindow.js +38 -0
  236. package/lib/render/excalibur/peopleWindow.js.map +1 -0
  237. package/lib/render/excalibur/personFocus.d.ts +36 -0
  238. package/lib/render/excalibur/personFocus.js +169 -0
  239. package/lib/render/excalibur/personFocus.js.map +1 -0
  240. package/lib/render/excalibur/pointerButtonGuard.d.ts +35 -0
  241. package/lib/render/excalibur/pointerButtonGuard.js +86 -0
  242. package/lib/render/excalibur/pointerButtonGuard.js.map +1 -0
  243. package/lib/render/excalibur/pressLifecycle.d.ts +26 -0
  244. package/lib/render/excalibur/pressLifecycle.js +66 -0
  245. package/lib/render/excalibur/pressLifecycle.js.map +1 -0
  246. package/lib/render/excalibur/rainShelter.d.ts +16 -0
  247. package/lib/render/excalibur/rainShelter.js +94 -0
  248. package/lib/render/excalibur/rainShelter.js.map +1 -0
  249. package/lib/render/excalibur/roomSignature.d.ts +30 -0
  250. package/lib/render/excalibur/roomSignature.js +49 -0
  251. package/lib/render/excalibur/roomSignature.js.map +1 -0
  252. package/lib/render/excalibur/sceneBake.d.ts +9 -0
  253. package/lib/render/excalibur/sceneBake.js +12 -0
  254. package/lib/render/excalibur/sceneBake.js.map +1 -0
  255. package/lib/render/excalibur/thiefSpan.d.ts +18 -0
  256. package/lib/render/excalibur/thiefSpan.js +51 -0
  257. package/lib/render/excalibur/thiefSpan.js.map +1 -0
  258. package/lib/render/excalibur/towerBridgeTiles.d.ts +30 -0
  259. package/lib/render/excalibur/towerBridgeTiles.js +43 -0
  260. package/lib/render/excalibur/towerBridgeTiles.js.map +1 -0
  261. package/lib/render/excalibur/towerCrowd.d.ts +73 -0
  262. package/lib/render/excalibur/towerCrowd.js +464 -0
  263. package/lib/render/excalibur/towerCrowd.js.map +1 -0
  264. package/lib/render/excalibur/towerCrowdLayout.d.ts +40 -0
  265. package/lib/render/excalibur/towerCrowdLayout.js +77 -0
  266. package/lib/render/excalibur/towerCrowdLayout.js.map +1 -0
  267. package/lib/render/excalibur/towerFireResponse.d.ts +25 -0
  268. package/lib/render/excalibur/towerFireResponse.js +89 -0
  269. package/lib/render/excalibur/towerFireResponse.js.map +1 -0
  270. package/lib/render/excalibur/towerFrame.d.ts +8 -0
  271. package/lib/render/excalibur/towerFrame.js +57 -0
  272. package/lib/render/excalibur/towerFrame.js.map +1 -0
  273. package/lib/render/excalibur/towerGhostLabel.d.ts +9 -0
  274. package/lib/render/excalibur/towerGhostLabel.js +37 -0
  275. package/lib/render/excalibur/towerGhostLabel.js.map +1 -0
  276. package/lib/render/excalibur/towerHallDoors.d.ts +42 -0
  277. package/lib/render/excalibur/towerHallDoors.js +129 -0
  278. package/lib/render/excalibur/towerHallDoors.js.map +1 -0
  279. package/lib/render/excalibur/towerHaloRings.d.ts +34 -0
  280. package/lib/render/excalibur/towerHaloRings.js +45 -0
  281. package/lib/render/excalibur/towerHaloRings.js.map +1 -0
  282. package/lib/render/excalibur/towerInputCamera.d.ts +90 -0
  283. package/lib/render/excalibur/towerInputCamera.js +480 -0
  284. package/lib/render/excalibur/towerInputCamera.js.map +1 -0
  285. package/lib/render/excalibur/towerMetro.d.ts +31 -0
  286. package/lib/render/excalibur/towerMetro.js +115 -0
  287. package/lib/render/excalibur/towerMetro.js.map +1 -0
  288. package/lib/render/excalibur/towerNoiseReach.d.ts +32 -0
  289. package/lib/render/excalibur/towerNoiseReach.js +75 -0
  290. package/lib/render/excalibur/towerNoiseReach.js.map +1 -0
  291. package/lib/render/excalibur/towerOverlay.d.ts +59 -0
  292. package/lib/render/excalibur/towerOverlay.js +453 -0
  293. package/lib/render/excalibur/towerOverlay.js.map +1 -0
  294. package/lib/render/excalibur/towerReconcile.d.ts +17 -0
  295. package/lib/render/excalibur/towerReconcile.js +404 -0
  296. package/lib/render/excalibur/towerReconcile.js.map +1 -0
  297. package/lib/render/excalibur/towerRegions.d.ts +61 -0
  298. package/lib/render/excalibur/towerRegions.js +193 -0
  299. package/lib/render/excalibur/towerRegions.js.map +1 -0
  300. package/lib/render/excalibur/towerScene.d.ts +66 -0
  301. package/lib/render/excalibur/towerScene.js +443 -0
  302. package/lib/render/excalibur/towerScene.js.map +1 -0
  303. package/lib/render/excalibur/towerScenery.d.ts +12 -0
  304. package/lib/render/excalibur/towerScenery.js +299 -0
  305. package/lib/render/excalibur/towerScenery.js.map +1 -0
  306. package/lib/render/excalibur/towerSceneryDraw.d.ts +86 -0
  307. package/lib/render/excalibur/towerSceneryDraw.js +288 -0
  308. package/lib/render/excalibur/towerSceneryDraw.js.map +1 -0
  309. package/lib/render/excalibur/towerShaftNumbers.d.ts +23 -0
  310. package/lib/render/excalibur/towerShaftNumbers.js +90 -0
  311. package/lib/render/excalibur/towerShaftNumbers.js.map +1 -0
  312. package/lib/render/excalibur/towerStructTiles.d.ts +56 -0
  313. package/lib/render/excalibur/towerStructTiles.js +238 -0
  314. package/lib/render/excalibur/towerStructTiles.js.map +1 -0
  315. package/lib/render/excalibur/towerSyncSchedule.d.ts +84 -0
  316. package/lib/render/excalibur/towerSyncSchedule.js +137 -0
  317. package/lib/render/excalibur/towerSyncSchedule.js.map +1 -0
  318. package/lib/render/excalibur/towerWalkerBuild.d.ts +30 -0
  319. package/lib/render/excalibur/towerWalkerBuild.js +126 -0
  320. package/lib/render/excalibur/towerWalkerBuild.js.map +1 -0
  321. package/lib/render/excalibur/trafficSpotlight.d.ts +29 -0
  322. package/lib/render/excalibur/trafficSpotlight.js +64 -0
  323. package/lib/render/excalibur/trafficSpotlight.js.map +1 -0
  324. package/lib/render/facadeGeometry.d.ts +50 -0
  325. package/lib/render/facadeGeometry.js +79 -0
  326. package/lib/render/facadeGeometry.js.map +1 -0
  327. package/lib/render/groundEntrances.d.ts +44 -0
  328. package/lib/render/groundEntrances.js +118 -0
  329. package/lib/render/groundEntrances.js.map +1 -0
  330. package/lib/render/lateNight.d.ts +14 -0
  331. package/lib/render/lateNight.js +18 -0
  332. package/lib/render/lateNight.js.map +1 -0
  333. package/lib/render/lobbyHalls.d.ts +44 -0
  334. package/lib/render/lobbyHalls.js +63 -0
  335. package/lib/render/lobbyHalls.js.map +1 -0
  336. package/lib/render/metroTrainSchedule.d.ts +20 -0
  337. package/lib/render/metroTrainSchedule.js +65 -0
  338. package/lib/render/metroTrainSchedule.js.map +1 -0
  339. package/lib/render/overviewMap/drawList.d.ts +67 -0
  340. package/lib/render/overviewMap/drawList.js +103 -0
  341. package/lib/render/overviewMap/drawList.js.map +1 -0
  342. package/lib/render/overviewMap/extent.d.ts +70 -0
  343. package/lib/render/overviewMap/extent.js +155 -0
  344. package/lib/render/overviewMap/extent.js.map +1 -0
  345. package/lib/render/overviewMap/floorSpans.d.ts +27 -0
  346. package/lib/render/overviewMap/floorSpans.js +32 -0
  347. package/lib/render/overviewMap/floorSpans.js.map +1 -0
  348. package/lib/render/overviewMap/gaps.d.ts +48 -0
  349. package/lib/render/overviewMap/gaps.js +148 -0
  350. package/lib/render/overviewMap/gaps.js.map +1 -0
  351. package/lib/render/overviewMap/geometry.d.ts +139 -0
  352. package/lib/render/overviewMap/geometry.js +245 -0
  353. package/lib/render/overviewMap/geometry.js.map +1 -0
  354. package/lib/render/overviewMap/heatView.d.ts +91 -0
  355. package/lib/render/overviewMap/heatView.js +143 -0
  356. package/lib/render/overviewMap/heatView.js.map +1 -0
  357. package/lib/render/overviewMap/hotelView.d.ts +82 -0
  358. package/lib/render/overviewMap/hotelView.js +136 -0
  359. package/lib/render/overviewMap/hotelView.js.map +1 -0
  360. package/lib/render/overviewMap/model.d.ts +97 -0
  361. package/lib/render/overviewMap/model.js +116 -0
  362. package/lib/render/overviewMap/model.js.map +1 -0
  363. package/lib/render/overviewMap/paint.d.ts +63 -0
  364. package/lib/render/overviewMap/paint.js +168 -0
  365. package/lib/render/overviewMap/paint.js.map +1 -0
  366. package/lib/render/overviewMap/style.d.ts +46 -0
  367. package/lib/render/overviewMap/style.js +117 -0
  368. package/lib/render/overviewMap/style.js.map +1 -0
  369. package/lib/render/overviewMap/tierView.d.ts +103 -0
  370. package/lib/render/overviewMap/tierView.js +209 -0
  371. package/lib/render/overviewMap/tierView.js.map +1 -0
  372. package/lib/render/overviewMap/viewMark.d.ts +69 -0
  373. package/lib/render/overviewMap/viewMark.js +103 -0
  374. package/lib/render/overviewMap/viewMark.js.map +1 -0
  375. package/lib/render/overviewMap/views.d.ts +24 -0
  376. package/lib/render/overviewMap/views.js +29 -0
  377. package/lib/render/overviewMap/views.js.map +1 -0
  378. package/lib/render/pinchTracker.d.ts +91 -0
  379. package/lib/render/pinchTracker.js +145 -0
  380. package/lib/render/pinchTracker.js.map +1 -0
  381. package/lib/render/pixelSprites/amusements.d.ts +32 -0
  382. package/lib/render/pixelSprites/amusements.js +243 -0
  383. package/lib/render/pixelSprites/amusements.js.map +1 -0
  384. package/lib/render/pixelSprites/artScale.d.ts +97 -0
  385. package/lib/render/pixelSprites/artScale.js +151 -0
  386. package/lib/render/pixelSprites/artScale.js.map +1 -0
  387. package/lib/render/pixelSprites/boutique.d.ts +30 -0
  388. package/lib/render/pixelSprites/boutique.js +244 -0
  389. package/lib/render/pixelSprites/boutique.js.map +1 -0
  390. package/lib/render/pixelSprites/clinic.d.ts +30 -0
  391. package/lib/render/pixelSprites/clinic.js +184 -0
  392. package/lib/render/pixelSprites/clinic.js.map +1 -0
  393. package/lib/render/pixelSprites/common.d.ts +185 -0
  394. package/lib/render/pixelSprites/common.js +449 -0
  395. package/lib/render/pixelSprites/common.js.map +1 -0
  396. package/lib/render/pixelSprites/daycare.d.ts +3 -0
  397. package/lib/render/pixelSprites/daycare.js +99 -0
  398. package/lib/render/pixelSprites/daycare.js.map +1 -0
  399. package/lib/render/pixelSprites/dollhouse.d.ts +45 -0
  400. package/lib/render/pixelSprites/dollhouse.js +110 -0
  401. package/lib/render/pixelSprites/dollhouse.js.map +1 -0
  402. package/lib/render/pixelSprites/fitness.d.ts +30 -0
  403. package/lib/render/pixelSprites/fitness.js +176 -0
  404. package/lib/render/pixelSprites/fitness.js.map +1 -0
  405. package/lib/render/pixelSprites/food.d.ts +27 -0
  406. package/lib/render/pixelSprites/food.interiors.d.ts +38 -0
  407. package/lib/render/pixelSprites/food.interiors.js +516 -0
  408. package/lib/render/pixelSprites/food.interiors.js.map +1 -0
  409. package/lib/render/pixelSprites/food.js +36 -0
  410. package/lib/render/pixelSprites/food.js.map +1 -0
  411. package/lib/render/pixelSprites/food.kit.d.ts +50 -0
  412. package/lib/render/pixelSprites/food.kit.js +140 -0
  413. package/lib/render/pixelSprites/food.kit.js.map +1 -0
  414. package/lib/render/pixelSprites/food.looks.d.ts +45 -0
  415. package/lib/render/pixelSprites/food.looks.js +56 -0
  416. package/lib/render/pixelSprites/food.looks.js.map +1 -0
  417. package/lib/render/pixelSprites/layers.d.ts +49 -0
  418. package/lib/render/pixelSprites/layers.js +61 -0
  419. package/lib/render/pixelSprites/layers.js.map +1 -0
  420. package/lib/render/pixelSprites/nightclub.d.ts +3 -0
  421. package/lib/render/pixelSprites/nightclub.js +108 -0
  422. package/lib/render/pixelSprites/nightclub.js.map +1 -0
  423. package/lib/render/pixelSprites/people.d.ts +168 -0
  424. package/lib/render/pixelSprites/people.js +431 -0
  425. package/lib/render/pixelSprites/people.js.map +1 -0
  426. package/lib/render/pixelSprites/residential.d.ts +5 -0
  427. package/lib/render/pixelSprites/residential.js +506 -0
  428. package/lib/render/pixelSprites/residential.js.map +1 -0
  429. package/lib/render/pixelSprites/residential.looks.d.ts +40 -0
  430. package/lib/render/pixelSprites/residential.looks.js +43 -0
  431. package/lib/render/pixelSprites/residential.looks.js.map +1 -0
  432. package/lib/render/pixelSprites/residential.roaches.d.ts +38 -0
  433. package/lib/render/pixelSprites/residential.roaches.js +88 -0
  434. package/lib/render/pixelSprites/residential.roaches.js.map +1 -0
  435. package/lib/render/pixelSprites/residentialRentalSprites.d.ts +11 -0
  436. package/lib/render/pixelSprites/residentialRentalSprites.js +19 -0
  437. package/lib/render/pixelSprites/residentialRentalSprites.js.map +1 -0
  438. package/lib/render/pixelSprites/shop.d.ts +14 -0
  439. package/lib/render/pixelSprites/shop.interiors.d.ts +50 -0
  440. package/lib/render/pixelSprites/shop.interiors.js +382 -0
  441. package/lib/render/pixelSprites/shop.interiors.js.map +1 -0
  442. package/lib/render/pixelSprites/shop.js +72 -0
  443. package/lib/render/pixelSprites/shop.js.map +1 -0
  444. package/lib/render/pixelSprites/shop.looks.d.ts +17 -0
  445. package/lib/render/pixelSprites/shop.looks.js +24 -0
  446. package/lib/render/pixelSprites/shop.looks.js.map +1 -0
  447. package/lib/render/pixelSprites/skyBar.d.ts +11 -0
  448. package/lib/render/pixelSprites/skyBar.js +125 -0
  449. package/lib/render/pixelSprites/skyBar.js.map +1 -0
  450. package/lib/render/pixelSprites/spa.d.ts +3 -0
  451. package/lib/render/pixelSprites/spa.js +88 -0
  452. package/lib/render/pixelSprites/spa.js.map +1 -0
  453. package/lib/render/pixelSprites.d.ts +33 -0
  454. package/lib/render/pixelSprites.js +167 -0
  455. package/lib/render/pixelSprites.js.map +1 -0
  456. package/lib/render/regionGrid.d.ts +49 -0
  457. package/lib/render/regionGrid.js +82 -0
  458. package/lib/render/regionGrid.js.map +1 -0
  459. package/lib/render/regionPaint.d.ts +15 -0
  460. package/lib/render/regionPaint.js +33 -0
  461. package/lib/render/regionPaint.js.map +1 -0
  462. package/lib/render/renderSim.d.ts +104 -0
  463. package/lib/render/renderSim.js +2 -0
  464. package/lib/render/renderSim.js.map +1 -0
  465. package/lib/render/roomPortrait.d.ts +35 -0
  466. package/lib/render/roomPortrait.js +142 -0
  467. package/lib/render/roomPortrait.js.map +1 -0
  468. package/lib/render/roomShading.d.ts +29 -0
  469. package/lib/render/roomShading.js +43 -0
  470. package/lib/render/roomShading.js.map +1 -0
  471. package/lib/render/scale.d.ts +31 -0
  472. package/lib/render/scale.js +34 -0
  473. package/lib/render/scale.js.map +1 -0
  474. package/lib/render/sceneryLayout.d.ts +234 -0
  475. package/lib/render/sceneryLayout.js +199 -0
  476. package/lib/render/sceneryLayout.js.map +1 -0
  477. package/lib/render/sprites/common.d.ts +41 -0
  478. package/lib/render/sprites/common.js +46 -0
  479. package/lib/render/sprites/common.js.map +1 -0
  480. package/lib/render/sprites/escalator.d.ts +27 -0
  481. package/lib/render/sprites/escalator.js +156 -0
  482. package/lib/render/sprites/escalator.js.map +1 -0
  483. package/lib/render/sprites/events.d.ts +56 -0
  484. package/lib/render/sprites/events.js +280 -0
  485. package/lib/render/sprites/events.js.map +1 -0
  486. package/lib/render/sprites/facilities/garage.d.ts +23 -0
  487. package/lib/render/sprites/facilities/garage.js +230 -0
  488. package/lib/render/sprites/facilities/garage.js.map +1 -0
  489. package/lib/render/sprites/facilities/recycling.d.ts +3 -0
  490. package/lib/render/sprites/facilities/recycling.js +210 -0
  491. package/lib/render/sprites/facilities/recycling.js.map +1 -0
  492. package/lib/render/sprites/facilities/recyclingLook.d.ts +49 -0
  493. package/lib/render/sprites/facilities/recyclingLook.js +52 -0
  494. package/lib/render/sprites/facilities/recyclingLook.js.map +1 -0
  495. package/lib/render/sprites/facilities/service.d.ts +14 -0
  496. package/lib/render/sprites/facilities/service.js +437 -0
  497. package/lib/render/sprites/facilities/service.js.map +1 -0
  498. package/lib/render/sprites/facilities/serviceKit.d.ts +61 -0
  499. package/lib/render/sprites/facilities/serviceKit.js +113 -0
  500. package/lib/render/sprites/facilities/serviceKit.js.map +1 -0
  501. package/lib/render/sprites/facilities/vehicles.d.ts +38 -0
  502. package/lib/render/sprites/facilities/vehicles.js +276 -0
  503. package/lib/render/sprites/facilities/vehicles.js.map +1 -0
  504. package/lib/render/sprites/facilities/venue.d.ts +28 -0
  505. package/lib/render/sprites/facilities/venue.js +211 -0
  506. package/lib/render/sprites/facilities/venue.js.map +1 -0
  507. package/lib/render/sprites/facilities/weddingHall.d.ts +9 -0
  508. package/lib/render/sprites/facilities/weddingHall.js +410 -0
  509. package/lib/render/sprites/facilities/weddingHall.js.map +1 -0
  510. package/lib/render/sprites/facilities.d.ts +22 -0
  511. package/lib/render/sprites/facilities.js +24 -0
  512. package/lib/render/sprites/facilities.js.map +1 -0
  513. package/lib/render/sprites/helicopter.d.ts +11 -0
  514. package/lib/render/sprites/helicopter.js +60 -0
  515. package/lib/render/sprites/helicopter.js.map +1 -0
  516. package/lib/render/sprites/sky.d.ts +67 -0
  517. package/lib/render/sprites/sky.js +85 -0
  518. package/lib/render/sprites/sky.js.map +1 -0
  519. package/lib/render/sprites/spiralStair.d.ts +19 -0
  520. package/lib/render/sprites/spiralStair.js +111 -0
  521. package/lib/render/sprites/spiralStair.js.map +1 -0
  522. package/lib/render/sprites/structure/entrance.d.ts +35 -0
  523. package/lib/render/sprites/structure/entrance.js +347 -0
  524. package/lib/render/sprites/structure/entrance.js.map +1 -0
  525. package/lib/render/sprites/structure/lobby.d.ts +88 -0
  526. package/lib/render/sprites/structure/lobby.js +350 -0
  527. package/lib/render/sprites/structure/lobby.js.map +1 -0
  528. package/lib/render/sprites/structure/revolvingDoor.d.ts +53 -0
  529. package/lib/render/sprites/structure/revolvingDoor.js +184 -0
  530. package/lib/render/sprites/structure/revolvingDoor.js.map +1 -0
  531. package/lib/render/sprites/structure/rooftop.d.ts +93 -0
  532. package/lib/render/sprites/structure/rooftop.js +302 -0
  533. package/lib/render/sprites/structure/rooftop.js.map +1 -0
  534. package/lib/render/sprites/structure/shell.d.ts +19 -0
  535. package/lib/render/sprites/structure/shell.js +142 -0
  536. package/lib/render/sprites/structure/shell.js.map +1 -0
  537. package/lib/render/sprites/structure/skyBridge.d.ts +28 -0
  538. package/lib/render/sprites/structure/skyBridge.js +259 -0
  539. package/lib/render/sprites/structure/skyBridge.js.map +1 -0
  540. package/lib/render/sprites/structure/tallLobby.d.ts +8 -0
  541. package/lib/render/sprites/structure/tallLobby.js +166 -0
  542. package/lib/render/sprites/structure/tallLobby.js.map +1 -0
  543. package/lib/render/sprites/structure/tallLobbyPieces.d.ts +18 -0
  544. package/lib/render/sprites/structure/tallLobbyPieces.js +82 -0
  545. package/lib/render/sprites/structure/tallLobbyPieces.js.map +1 -0
  546. package/lib/render/sprites/structure.d.ts +15 -0
  547. package/lib/render/sprites/structure.js +16 -0
  548. package/lib/render/sprites/structure.js.map +1 -0
  549. package/lib/render/sprites/transport.d.ts +30 -0
  550. package/lib/render/sprites/transport.js +376 -0
  551. package/lib/render/sprites/transport.js.map +1 -0
  552. package/lib/render/sprites.d.ts +16 -0
  553. package/lib/render/sprites.js +108 -0
  554. package/lib/render/sprites.js.map +1 -0
  555. package/lib/render/venueFlights.d.ts +61 -0
  556. package/lib/render/venueFlights.js +50 -0
  557. package/lib/render/venueFlights.js.map +1 -0
  558. package/lib/shared/engineTypes.d.ts +256 -0
  559. package/lib/shared/engineTypes.js +8 -0
  560. package/lib/shared/engineTypes.js.map +1 -0
  561. package/lib/shared/floorRuns.d.ts +22 -0
  562. package/lib/shared/floorRuns.js +39 -0
  563. package/lib/shared/floorRuns.js.map +1 -0
  564. package/lib/shared/inputEvents.d.ts +18 -0
  565. package/lib/shared/inputEvents.js +23 -0
  566. package/lib/shared/inputEvents.js.map +1 -0
  567. package/lib/shared/serializedGame.d.ts +142 -0
  568. package/lib/shared/serializedGame.js +2 -0
  569. package/lib/shared/serializedGame.js.map +1 -0
  570. package/lib/shared/types.d.ts +298 -0
  571. package/lib/shared/types.js +47 -0
  572. package/lib/shared/types.js.map +1 -0
  573. package/lib/shared/unitState.d.ts +36 -0
  574. package/lib/shared/unitState.js +42 -0
  575. package/lib/shared/unitState.js.map +1 -0
  576. package/lib/shared/vacateReasonText.d.ts +20 -0
  577. package/lib/shared/vacateReasonText.js +23 -0
  578. package/lib/shared/vacateReasonText.js.map +1 -0
  579. package/lib/shared/viewZoom.d.ts +14 -0
  580. package/lib/shared/viewZoom.js +17 -0
  581. package/lib/shared/viewZoom.js.map +1 -0
  582. package/lib/shared/wellFormed.d.ts +14 -0
  583. package/lib/shared/wellFormed.js +19 -0
  584. package/lib/shared/wellFormed.js.map +1 -0
  585. package/lib/simport/cards.d.ts +26 -0
  586. package/lib/simport/cards.js +138 -0
  587. package/lib/simport/cards.js.map +1 -0
  588. package/lib/simport/clockView.d.ts +24 -0
  589. package/lib/simport/clockView.js +43 -0
  590. package/lib/simport/clockView.js.map +1 -0
  591. package/lib/simport/commands.d.ts +215 -0
  592. package/lib/simport/commands.js +2 -0
  593. package/lib/simport/commands.js.map +1 -0
  594. package/lib/simport/emergencyReads.d.ts +19 -0
  595. package/lib/simport/emergencyReads.js +47 -0
  596. package/lib/simport/emergencyReads.js.map +1 -0
  597. package/lib/simport/enginePort.d.ts +433 -0
  598. package/lib/simport/enginePort.js +11 -0
  599. package/lib/simport/enginePort.js.map +1 -0
  600. package/lib/simport/fixtures/catalog.classic.json +2137 -0
  601. package/lib/simport/fixtures/catalog.modern.json +2515 -0
  602. package/lib/simport/fixtures/viewLayout.json +927 -0
  603. package/lib/simport/headerClock.d.ts +31 -0
  604. package/lib/simport/headerClock.js +29 -0
  605. package/lib/simport/headerClock.js.map +1 -0
  606. package/lib/simport/panels.d.ts +243 -0
  607. package/lib/simport/panels.js +2 -0
  608. package/lib/simport/panels.js.map +1 -0
  609. package/lib/simport/personCards.d.ts +63 -0
  610. package/lib/simport/personCards.js +55 -0
  611. package/lib/simport/personCards.js.map +1 -0
  612. package/lib/simport/portCodes.d.ts +41 -0
  613. package/lib/simport/portCodes.js +49 -0
  614. package/lib/simport/portCodes.js.map +1 -0
  615. package/lib/simport/portEvents.d.ts +39 -0
  616. package/lib/simport/portEvents.js +43 -0
  617. package/lib/simport/portEvents.js.map +1 -0
  618. package/lib/simport/portRenderSim.d.ts +70 -0
  619. package/lib/simport/portRenderSim.js +129 -0
  620. package/lib/simport/portRenderSim.js.map +1 -0
  621. package/lib/simport/queries.d.ts +64 -0
  622. package/lib/simport/queries.js +30 -0
  623. package/lib/simport/queries.js.map +1 -0
  624. package/lib/simport/recyclingPort.d.ts +13 -0
  625. package/lib/simport/recyclingPort.js +2 -0
  626. package/lib/simport/recyclingPort.js.map +1 -0
  627. package/lib/simport/request.d.ts +44 -0
  628. package/lib/simport/request.js +214 -0
  629. package/lib/simport/request.js.map +1 -0
  630. package/lib/simport/roomTiers.d.ts +102 -0
  631. package/lib/simport/roomTiers.js +122 -0
  632. package/lib/simport/roomTiers.js.map +1 -0
  633. package/lib/simport/scheduleSlots.d.ts +19 -0
  634. package/lib/simport/scheduleSlots.js +87 -0
  635. package/lib/simport/scheduleSlots.js.map +1 -0
  636. package/lib/simport/skyBridgePort.d.ts +20 -0
  637. package/lib/simport/skyBridgePort.js +2 -0
  638. package/lib/simport/skyBridgePort.js.map +1 -0
  639. package/lib/simport/skyBridgeView.d.ts +15 -0
  640. package/lib/simport/skyBridgeView.js +42 -0
  641. package/lib/simport/skyBridgeView.js.map +1 -0
  642. package/lib/simport/statsSheet.d.ts +15 -0
  643. package/lib/simport/statsSheet.js +101 -0
  644. package/lib/simport/statsSheet.js.map +1 -0
  645. package/lib/simport/tdtRecords.d.ts +9 -0
  646. package/lib/simport/tdtRecords.js +112 -0
  647. package/lib/simport/tdtRecords.js.map +1 -0
  648. package/lib/simport/tdtReportFacts.d.ts +110 -0
  649. package/lib/simport/tdtReportFacts.js +8 -0
  650. package/lib/simport/tdtReportFacts.js.map +1 -0
  651. package/lib/simport/trafficPort.d.ts +22 -0
  652. package/lib/simport/trafficPort.js +2 -0
  653. package/lib/simport/trafficPort.js.map +1 -0
  654. package/lib/simport/view.d.ts +275 -0
  655. package/lib/simport/view.js +2 -0
  656. package/lib/simport/view.js.map +1 -0
  657. package/lib/simport/viewReader.d.ts +89 -0
  658. package/lib/simport/viewReader.js +426 -0
  659. package/lib/simport/viewReader.js.map +1 -0
  660. package/lib/styles/game/appearance.css +108 -0
  661. package/lib/styles/game/base.css +68 -0
  662. package/lib/styles/game/components.css +69 -0
  663. package/lib/styles/game/desk-title.css +183 -0
  664. package/lib/styles/game/desk.css +487 -0
  665. package/lib/styles/game/dialogs.css +360 -0
  666. package/lib/styles/game/editor-sidebar.css +116 -0
  667. package/lib/styles/game/elevator-schedule.css +217 -0
  668. package/lib/styles/game/file-dialog.css +470 -0
  669. package/lib/styles/game/help.css +141 -0
  670. package/lib/styles/game/launch-fireworks.css +17 -0
  671. package/lib/styles/game/media-landscape.css +333 -0
  672. package/lib/styles/game/media-phone.css +303 -0
  673. package/lib/styles/game/media-tablet-touch.css +177 -0
  674. package/lib/styles/game/menubar.css +158 -0
  675. package/lib/styles/game/new-tower.css +219 -0
  676. package/lib/styles/game/onboarding.css +32 -0
  677. package/lib/styles/game/screen-saver.css +85 -0
  678. package/lib/styles/game/splash.css +413 -0
  679. package/lib/styles/game/stats-saves.css +106 -0
  680. package/lib/styles/game/tools-stage.css +340 -0
  681. package/lib/styles/game/topbar.css +191 -0
  682. package/lib/styles/menu-bar.css +108 -0
  683. package/lib/styles/not-found.css +335 -0
  684. package/lib/styles/overview-map-views.css +88 -0
  685. package/lib/styles/overview-map.css +195 -0
  686. package/lib/styles/retro-components.css +179 -0
  687. package/lib/styles/retro-page.css +254 -0
  688. package/lib/styles/retro-tokens.css +122 -0
  689. package/lib/styles/schemes/high-contrast.css +173 -0
  690. package/lib/styles/schemes/skyline.css +134 -0
  691. package/lib/styles.css +66 -0
  692. package/lib/ui/desk/deskGeometry.d.ts +59 -0
  693. package/lib/ui/desk/deskGeometry.js +106 -0
  694. package/lib/ui/desk/deskGeometry.js.map +1 -0
  695. package/lib/ui/desk/deskWindow.d.ts +90 -0
  696. package/lib/ui/desk/deskWindow.js +253 -0
  697. package/lib/ui/desk/deskWindow.js.map +1 -0
  698. package/lib/ui/desk/deskWindowMenu.d.ts +55 -0
  699. package/lib/ui/desk/deskWindowMenu.js +143 -0
  700. package/lib/ui/desk/deskWindowMenu.js.map +1 -0
  701. package/lib/ui/escape.d.ts +1 -0
  702. package/lib/ui/escape.js +14 -0
  703. package/lib/ui/escape.js.map +1 -0
  704. package/lib/ui/format.d.ts +14 -0
  705. package/lib/ui/format.js +36 -0
  706. package/lib/ui/format.js.map +1 -0
  707. package/lib/ui/iconPaths.generated.d.ts +4 -0
  708. package/lib/ui/iconPaths.generated.js +68 -0
  709. package/lib/ui/iconPaths.generated.js.map +1 -0
  710. package/lib/ui/icons.d.ts +83 -0
  711. package/lib/ui/icons.js +156 -0
  712. package/lib/ui/icons.js.map +1 -0
  713. package/lib/ui/menuBar.d.ts +94 -0
  714. package/lib/ui/menuBar.js +361 -0
  715. package/lib/ui/menuBar.js.map +1 -0
  716. package/lib/ui/modalPrecedence.d.ts +108 -0
  717. package/lib/ui/modalPrecedence.js +165 -0
  718. package/lib/ui/modalPrecedence.js.map +1 -0
  719. package/lib/ui/movableWindow.d.ts +124 -0
  720. package/lib/ui/movableWindow.js +247 -0
  721. package/lib/ui/movableWindow.js.map +1 -0
  722. package/lib/ui/overviewMapInput.d.ts +109 -0
  723. package/lib/ui/overviewMapInput.js +135 -0
  724. package/lib/ui/overviewMapInput.js.map +1 -0
  725. package/lib/ui/uiModal.d.ts +38 -0
  726. package/lib/ui/uiModal.js +70 -0
  727. package/lib/ui/uiModal.js.map +1 -0
  728. package/lib/wasmhost/buildSection.d.ts +54 -0
  729. package/lib/wasmhost/buildSection.js +143 -0
  730. package/lib/wasmhost/buildSection.js.map +1 -0
  731. package/lib/wasmhost/catalogCheck.d.ts +11 -0
  732. package/lib/wasmhost/catalogCheck.js +43 -0
  733. package/lib/wasmhost/catalogCheck.js.map +1 -0
  734. package/lib/wasmhost/engineAssets.d.ts +57 -0
  735. package/lib/wasmhost/engineAssets.js +63 -0
  736. package/lib/wasmhost/engineAssets.js.map +1 -0
  737. package/lib/wasmhost/engineBoot.d.ts +165 -0
  738. package/lib/wasmhost/engineBoot.js +254 -0
  739. package/lib/wasmhost/engineBoot.js.map +1 -0
  740. package/lib/wasmhost/engineChoice.d.ts +6 -0
  741. package/lib/wasmhost/engineChoice.js +2 -0
  742. package/lib/wasmhost/engineChoice.js.map +1 -0
  743. package/lib/wasmhost/engineDiagnostics.d.ts +66 -0
  744. package/lib/wasmhost/engineDiagnostics.js +189 -0
  745. package/lib/wasmhost/engineDiagnostics.js.map +1 -0
  746. package/lib/wasmhost/engineDiagnosticsLive.d.ts +15 -0
  747. package/lib/wasmhost/engineDiagnosticsLive.js +31 -0
  748. package/lib/wasmhost/engineDiagnosticsLive.js.map +1 -0
  749. package/lib/wasmhost/engineIdentity.d.ts +30 -0
  750. package/lib/wasmhost/engineIdentity.js +59 -0
  751. package/lib/wasmhost/engineIdentity.js.map +1 -0
  752. package/lib/wasmhost/engineLabel.d.ts +40 -0
  753. package/lib/wasmhost/engineLabel.js +50 -0
  754. package/lib/wasmhost/engineLabel.js.map +1 -0
  755. package/lib/wasmhost/engineLoad.d.ts +48 -0
  756. package/lib/wasmhost/engineLoad.js +53 -0
  757. package/lib/wasmhost/engineLoad.js.map +1 -0
  758. package/lib/wasmhost/enginePackageCheck.d.ts +77 -0
  759. package/lib/wasmhost/enginePackageCheck.js +274 -0
  760. package/lib/wasmhost/enginePackageCheck.js.map +1 -0
  761. package/lib/wasmhost/enginePackageNames.d.ts +25 -0
  762. package/lib/wasmhost/enginePackageNames.js +28 -0
  763. package/lib/wasmhost/enginePackageNames.js.map +1 -0
  764. package/lib/wasmhost/enginePackageRecord.d.ts +78 -0
  765. package/lib/wasmhost/enginePackageRecord.js +108 -0
  766. package/lib/wasmhost/enginePackageRecord.js.map +1 -0
  767. package/lib/wasmhost/engineRepair.d.ts +55 -0
  768. package/lib/wasmhost/engineRepair.js +183 -0
  769. package/lib/wasmhost/engineRepair.js.map +1 -0
  770. package/lib/wasmhost/frameView.d.ts +87 -0
  771. package/lib/wasmhost/frameView.js +133 -0
  772. package/lib/wasmhost/frameView.js.map +1 -0
  773. package/lib/wasmhost/hostFault.d.ts +40 -0
  774. package/lib/wasmhost/hostFault.js +94 -0
  775. package/lib/wasmhost/hostFault.js.map +1 -0
  776. package/lib/wasmhost/loadEngineModule.d.ts +79 -0
  777. package/lib/wasmhost/loadEngineModule.js +66 -0
  778. package/lib/wasmhost/loadEngineModule.js.map +1 -0
  779. package/lib/wasmhost/packageHash.d.ts +48 -0
  780. package/lib/wasmhost/packageHash.js +436 -0
  781. package/lib/wasmhost/packageHash.js.map +1 -0
  782. package/lib/wasmhost/rustEngine.d.ts +49 -0
  783. package/lib/wasmhost/rustEngine.js +63 -0
  784. package/lib/wasmhost/rustEngine.js.map +1 -0
  785. package/lib/wasmhost/slotPopulation.d.ts +19 -0
  786. package/lib/wasmhost/slotPopulation.js +69 -0
  787. package/lib/wasmhost/slotPopulation.js.map +1 -0
  788. package/lib/wasmhost/telemetry.d.ts +31 -0
  789. package/lib/wasmhost/telemetry.js +13 -0
  790. package/lib/wasmhost/telemetry.js.map +1 -0
  791. package/package.json +80 -4
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toneCrowdVoices.js","sources":["../../src/audio/toneCrowdVoices.ts"],"sourcesContent":["import * as Tone from \"tone\";\nimport {\n computeCalmMask,\n segmentIsCalm,\n pseudo,\n whoopRate,\n LAUGH_REGIONS,\n PHRASE_MIN_S,\n PHRASE_VAR_S,\n PHRASE_RAMP_S,\n} from \"./toneCrowdData\";\nimport { VOICE_LAUGHS_SEED, VOICE_TALK_SEED } from \"./audioAssets\";\n\n/**\n * The voice half of the crowd layer: the two seed recordings (talk and\n * laughs, the owner's own voice, see ASSETS-LICENSE.md) and the play-one-now\n * primitives built on them. A \"talker\" phrase is a calm segment of the talk\n * seed played through a down-only pitch shift with trapezoid fades; a laugh\n * is one of the two seed regions; a whoop is a calm chunk with its playback\n * rate bent upward. {@link CrowdLayer} owns all scheduling and pre-wires the\n * gain nodes it hands in; this module only emits one sound into them.\n *\n * Loading is lazy and failure is silent: until (or unless) the seeds decode,\n * every voiced method is a quiet no-op and the tone-built ambience carries\n * the scene alone.\n */\n\nexport class CrowdVoices {\n private talk: Tone.ToneAudioBuffer | null = null;\n private laughs: Tone.ToneAudioBuffer | null = null;\n private talkMask: Uint8Array | null = null;\n private talkRate = 44100;\n private talkLen = 0;\n /** Live sources, tracked so dispose can cut tails. */\n private live = new Set<Tone.ToneBufferSource>();\n /** Backstop reap timers, one per live source (see {@link track}). */\n private reapTimers = new Set<ReturnType<typeof setTimeout>>();\n private disposed = false;\n\n /** Begin fetching both seeds. Safe to call once, any time after the audio\n * context exists; a failed fetch or decode leaves the layer tone-only. */\n load(baseUrl: string): void {\n try {\n this.talk = new Tone.ToneAudioBuffer(`${baseUrl}${VOICE_TALK_SEED}`, () => {\n try {\n const buf = this.talk?.get();\n if (!buf || this.disposed) return;\n this.talkRate = buf.sampleRate;\n this.talkLen = buf.duration;\n this.talkMask = computeCalmMask(buf.getChannelData(0), buf.sampleRate);\n } catch {\n this.talkMask = null; // undecodable seed: stay tone-only\n }\n });\n this.laughs = new Tone.ToneAudioBuffer(`${baseUrl}${VOICE_LAUGHS_SEED}`, () => {});\n } catch {\n this.talk = this.laughs = null;\n }\n }\n\n /** True once the talk seed is decoded and masked (voiced murmur can play). */\n get ready(): boolean {\n return this.talkMask !== null && this.talk !== null && this.talk.loaded;\n }\n\n /** Play one talker phrase into `gainNode`. `tick` seeds all randomness. Returns\n * the phrase's wall-clock seconds, or null when not ready or no calm\n * segment fits (callers just wait a beat and try again). */\n phrase(gainNode: Tone.Gain, semi: number, tick: number): number | null {\n if (!this.ready || !this.talk || !this.talkMask) return null;\n const wallLen = PHRASE_MIN_S + PHRASE_VAR_S * pseudo(tick * 40503 + 7);\n const rate = Math.pow(2, semi / 12);\n const srcLen = wallLen * rate;\n let start = -1;\n for (let attempt = 0; attempt < 25; attempt++) {\n const s = pseudo(tick * 2654435761 + attempt * 97) * Math.max(0.01, this.talkLen - srcLen - 0.1);\n if (segmentIsCalm(this.talkMask, this.talkRate, s, srcLen)) {\n start = s;\n break;\n }\n }\n if (start < 0) return null;\n // The `duration` arg is wall-clock in Tone's wrapper (unlike the native\n // BufferSource, whose duration is buffer-time). ToneBufferSource.start does\n // not forward duration to the native node; it schedules `stop(time +\n // duration)`, so the phrase plays for wallLen real seconds regardless of\n // playbackRate, consuming srcLen = wallLen * rate seconds of source.\n this.emit(this.talk, gainNode, { rate, offset: start, wallDur: wallLen, fade: PHRASE_RAMP_S });\n return wallLen;\n }\n\n /** Play one of the two seed laughs, muffled by the destination chain. */\n laugh(gainNode: Tone.Gain, tick: number): void {\n if (!this.laughs || !this.laughs.loaded) return;\n const [a, b] = LAUGH_REGIONS[Math.floor(pseudo(tick * 19349663) * LAUGH_REGIONS.length)];\n this.emit(this.laughs, gainNode, { rate: 1, offset: a, wallDur: b - a, fade: 0.03 });\n }\n\n /** A whoop: a calm talk chunk whose playback rate accelerates upward. */\n whoop(gainNode: Tone.Gain, tick: number): void {\n if (!this.ready || !this.talk || !this.talkMask) return;\n const wallLen = 0.4 + 0.15 * pseudo(tick * 22695477 + 3);\n let start = -1;\n for (let attempt = 0; attempt < 25; attempt++) {\n const s = pseudo(tick * 2246822519 + attempt * 131) * Math.max(0.01, this.talkLen - 1.5);\n if (segmentIsCalm(this.talkMask, this.talkRate, s, 0.8)) {\n start = s;\n break;\n }\n }\n if (start < 0) return;\n try {\n const src = new Tone.ToneBufferSource({\n url: this.talk,\n fadeIn: 0.02,\n fadeOut: 0.05,\n playbackRate: whoopRate(0),\n });\n src.connect(gainNode);\n const now = Tone.now();\n // Two-segment linear ramp approximates the approved accelerating bend.\n src.playbackRate.setValueAtTime(whoopRate(0), now);\n src.playbackRate.linearRampToValueAtTime(whoopRate(0.5), now + wallLen * 0.5);\n src.playbackRate.linearRampToValueAtTime(whoopRate(1), now + wallLen);\n // No duration arg here: the whoop's length is governed by the explicit\n // stop below (a scheduled stop from a duration arg would just be the one\n // this stop() cancels and replaces). Stop past the fadeOut so the tail\n // never clicks.\n src.start(now, start);\n src.stop(now + wallLen + 0.06);\n this.track(src, wallLen + 0.1);\n } catch {\n /* voice glitch: skip this whoop */\n }\n }\n\n /** Create, connect, fire, and track one buffer source. */\n private emit(\n buffer: Tone.ToneAudioBuffer,\n gainNode: Tone.Gain,\n opts: { rate: number; offset: number; wallDur: number; fade: number },\n ): void {\n let src: Tone.ToneBufferSource | null = null;\n try {\n src = new Tone.ToneBufferSource({\n url: buffer,\n playbackRate: opts.rate,\n fadeIn: opts.fade,\n fadeOut: opts.fade,\n });\n src.connect(gainNode);\n src.start(Tone.now(), opts.offset, opts.wallDur);\n this.track(src, opts.wallDur); // only a started source can reach onended\n } catch {\n // A source that failed to connect or start never fires onended: reap it\n // here rather than stranding it in the live set.\n try {\n src?.dispose();\n } catch {\n /* already gone */\n }\n }\n }\n\n /** Track a started source so it's reaped when done. `onended` is the primary\n * signal, but Tone does not guarantee it fires (a suspended context, a\n * duration past the buffer end), so a timer sized to the source's expected\n * lifetime is a guaranteed backstop: without it a source that never fires\n * onended would sit in `live` until layer teardown. Whichever fires first\n * reaps once (dispose is idempotent) and cancels the other. */\n private track(src: Tone.ToneBufferSource, lifetimeS: number): void {\n this.live.add(src);\n let timer: ReturnType<typeof setTimeout> | null = null;\n const reap = (): void => {\n if (timer !== null) {\n clearTimeout(timer);\n this.reapTimers.delete(timer);\n timer = null;\n }\n this.live.delete(src);\n try {\n src.dispose();\n } catch {\n /* already gone */\n }\n };\n src.onended = reap;\n timer = setTimeout(reap, (Math.max(0, lifetimeS) + 0.3) * 1000);\n this.reapTimers.add(timer);\n }\n\n dispose(): void {\n this.disposed = true;\n for (const t of this.reapTimers) clearTimeout(t);\n this.reapTimers.clear();\n for (const src of this.live) {\n try {\n src.stop();\n src.dispose();\n } catch {\n /* already gone */\n }\n }\n this.live.clear();\n try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CAAC,GAAG,CAAC,CAAC,EAAE,SAAS,CAAC,GAAG,GAAG,IAAI,IAAI,CAAC;AAC/D,QAAA,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,KAAK,CAAC;IAC5B;IAEA,OAAO,GAAA;AACL,QAAA,IAAI,CAAC,QAAQ,GAAG,IAAI;AACpB,QAAA,KAAK,MAAM,CAAC,IAAI,IAAI,CAAC,UAAU;YAAE,YAAY,CAAC,CAAC,CAAC;AAChD,QAAA,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE;AACvB,QAAA,KAAK,MAAM,GAAG,IAAI,IAAI,CAAC,IAAI,EAAE;AAC3B,YAAA,IAAI;gBACF,GAAG,CAAC,IAAI,EAAE;gBACV,GAAG,CAAC,OAAO,EAAE;YACf;AAAE,YAAA,MAAM;;YAER;QACF;AACA,QAAA,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE;AACjB,QAAA,IAAI;AACF,YAAA,IAAI,CAAC,IAAI,EAAE,OAAO,EAAE;AACpB,YAAA,IAAI,CAAC,MAAM,EAAE,OAAO,EAAE;QACxB;AAAE,QAAA,MAAM;;QAER;QACA,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,MAAM,GAAG,IAAI;AAC9B,QAAA,IAAI,CAAC,QAAQ,GAAG,IAAI;IACtB;AACD;;"}
@@ -0,0 +1,11 @@
1
+ import type * as Tone from "tone";
2
+ import { LightMonoSynth, LightPolySynth } from "./lightSynth";
3
+ /** The composed tracks' pitched voices: the arpeggio, the bass and the melody. */
4
+ export interface MusicVoices {
5
+ readonly arp: LightPolySynth;
6
+ readonly bass: LightMonoSynth;
7
+ readonly hook: LightPolySynth;
8
+ }
9
+ /** Build the track voices, each wired into `musicGain` (the music path's level
10
+ * stage ahead of its warm filters). Percussion is built apart, in tonePercussion. */
11
+ export declare function createMusicVoices(musicGain: Tone.Gain): MusicVoices;
@@ -0,0 +1,31 @@
1
+ import { LightPolySynth, LightMonoSynth } from './lightSynth.js';
2
+
3
+ /** Build the track voices, each wired into `musicGain` (the music path's level
4
+ * stage ahead of its warm filters). Percussion is built apart, in tonePercussion. */
5
+ function createMusicVoices(musicGain) {
6
+ // Rolling sine arpeggio (the bed's main texture): a soft pluck.
7
+ const arp = new LightPolySynth({
8
+ oscillator: { type: "sine" },
9
+ envelope: { attack: 0.03, decay: 0.5, sustain: 0.05, release: 0.8 },
10
+ }).connect(musicGain);
11
+ arp.volume.value = -9;
12
+ arp.maxPolyphony = 12; // a runaway arpeggio would stack tails
13
+ // Soft triangle bass root under each bar.
14
+ const bass = new LightMonoSynth({
15
+ oscillator: { type: "triangle" },
16
+ envelope: { attack: 0.05, decay: 0.3, sustain: 0.6, release: 0.6 },
17
+ }).connect(musicGain);
18
+ bass.volume.value = -8;
19
+ // The melody voice: the owner's hummed tune (splash hook and, since the
20
+ // Two Chapters bed, the in-game lead as well).
21
+ const hook = new LightPolySynth({
22
+ oscillator: { type: "triangle" },
23
+ envelope: { attack: 0.025, decay: 0.3, sustain: 0.2, release: 0.3 },
24
+ }).connect(musicGain);
25
+ hook.volume.value = -6;
26
+ hook.maxPolyphony = 12;
27
+ return { arp, bass, hook };
28
+ }
29
+
30
+ export { createMusicVoices };
31
+ //# sourceMappingURL=toneMusicVoices.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toneMusicVoices.js","sources":["../../src/audio/toneMusicVoices.ts"],"sourcesContent":["import type * as Tone from \"tone\";\nimport { LightMonoSynth, LightPolySynth } from \"./lightSynth\";\n\n/** The composed tracks' pitched voices: the arpeggio, the bass and the melody. */\nexport interface MusicVoices {\n readonly arp: LightPolySynth;\n readonly bass: LightMonoSynth;\n readonly hook: LightPolySynth;\n}\n\n/** Build the track voices, each wired into `musicGain` (the music path's level\n * stage ahead of its warm filters). Percussion is built apart, in tonePercussion. */\nexport function createMusicVoices(musicGain: Tone.Gain): MusicVoices {\n // Rolling sine arpeggio (the bed's main texture): a soft pluck.\n const arp = new LightPolySynth({\n oscillator: { type: \"sine\" },\n envelope: { attack: 0.03, decay: 0.5, sustain: 0.05, release: 0.8 },\n }).connect(musicGain);\n arp.volume.value = -9;\n arp.maxPolyphony = 12; // a runaway arpeggio would stack tails\n\n // Soft triangle bass root under each bar.\n const bass = new LightMonoSynth({\n oscillator: { type: \"triangle\" },\n envelope: { attack: 0.05, decay: 0.3, sustain: 0.6, release: 0.6 },\n }).connect(musicGain);\n bass.volume.value = -8;\n\n // The melody voice: the owner's hummed tune (splash hook and, since the\n // Two Chapters bed, the in-game lead as well).\n const hook = new LightPolySynth({\n oscillator: { type: \"triangle\" },\n envelope: { attack: 0.025, decay: 0.3, sustain: 0.2, release: 0.3 },\n }).connect(musicGain);\n hook.volume.value = -6;\n hook.maxPolyphony = 12;\nreturn { arp, bass, hook };\n}\n"],"names":[],"mappings":";;AAUA;AACsF;AAChF,SAAU,iBAAiB,CAAC,SAAoB,EAAA;;AAEpD,IAAA,MAAM,GAAG,GAAG,IAAI,cAAc,CAAC;AAC7B,QAAA,UAAU,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;AAC5B,QAAA,QAAQ,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE;AACpE,KAAA,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC;AACrB,IAAA,GAAG,CAAC,MAAM,CAAC,KAAK,GAAG,CAAC,CAAC;AACrB,IAAA,GAAG,CAAC,YAAY,GAAG,EAAE,CAAC;;AAGtB,IAAA,MAAM,IAAI,GAAG,IAAI,cAAc,CAAC;AAC9B,QAAA,UAAU,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE;AAChC,QAAA,QAAQ,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE;AACnE,KAAA,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC;AACrB,IAAA,IAAI,CAAC,MAAM,CAAC,KAAK,GAAG,CAAC,CAAC;;;AAItB,IAAA,MAAM,IAAI,GAAG,IAAI,cAAc,CAAC;AAC9B,QAAA,UAAU,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE;AAChC,QAAA,QAAQ,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE;AACpE,KAAA,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC;AACrB,IAAA,IAAI,CAAC,MAAM,CAAC,KAAK,GAAG,CAAC,CAAC;AACtB,IAAA,IAAI,CAAC,YAAY,GAAG,EAAE;AACxB,IAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE;AAC1B;;"}
@@ -0,0 +1,45 @@
1
+ import * as Tone from "tone";
2
+ import { LightMembraneSynth } from "./lightSynth";
3
+ /**
4
+ * The owner's recorded percussion, rebuilt as membrane voices: the chest-hit
5
+ * heartbeat under the splash theme and the object-tap groove under the
6
+ * in-game bed (GDD crowd-din-ambience, "Human-recorded audio theme"
7
+ * amendment). Two voices because one tuning cannot voice both: the thump is a
8
+ * low swept body, the tap a short bright knock.
9
+ *
10
+ * Small-speaker rule (owner-tested): the thump body sweeps about 130 down to
11
+ * 92 Hz and is reinforced with quiet octave and twelfth partials, because a
12
+ * bare sine in that band vanishes on phone speakers. Thump events are
13
+ * authored at midi 42 (~92.5 Hz); the membrane's half-octave sweep starts it
14
+ * near 131 Hz.
15
+ *
16
+ * Routing is the load-bearing part: `percGain` feeds the MUSIC BUS directly,
17
+ * bypassing the music chain's warm lowpass (2400 Hz would dull the tap) and
18
+ * sub highpass (90 Hz would gut the thump). It still sits behind the music
19
+ * volume slider, the shared reverb, and the master mute, and the engine ramps
20
+ * `percGain` with `musicGain` during a program crossfade so the heartbeat
21
+ * never thumps on alone.
22
+ */
23
+ /** The thump: a membrane body plus its two quiet reinforcement partials, one
24
+ * trigger for the engine's Part callback, one dispose for teardown. */
25
+ export declare class ThumpVoice {
26
+ private drum;
27
+ private partials;
28
+ constructor(dest: Tone.ToneAudioNode);
29
+ triggerAttackRelease(freq: number, dur: number, time: number, vel: number): void;
30
+ dispose(): void;
31
+ }
32
+ export interface PercVoices {
33
+ /** Level node into the music bus; the engine ramps it with musicGain. */
34
+ percGain: Tone.Gain;
35
+ /** The chest-hit heartbeat: swept membrane body plus soft partials. */
36
+ thump: ThumpVoice;
37
+ /** The object tap: short bright membrane knock. */
38
+ tap: LightMembraneSynth;
39
+ }
40
+ /** Build the percussion voices on the given music bus at the given level.
41
+ * ToneAudioEngine owns the lifecycle (it disposes everything returned). If a
42
+ * constructor throws mid-build, everything already connected is disposed
43
+ * before the error escapes, so a failed start() cannot strand live nodes on
44
+ * the bus (the engine's catch never sees these locals). */
45
+ export declare function createPercussion(musicBus: Tone.ToneAudioNode, level: number): PercVoices;
@@ -0,0 +1,97 @@
1
+ import * as Tone from 'tone';
2
+ import { LightMembraneSynth, LightPolySynth } from './lightSynth.js';
3
+
4
+ /**
5
+ * The owner's recorded percussion, rebuilt as membrane voices: the chest-hit
6
+ * heartbeat under the splash theme and the object-tap groove under the
7
+ * in-game bed (GDD crowd-din-ambience, "Human-recorded audio theme"
8
+ * amendment). Two voices because one tuning cannot voice both: the thump is a
9
+ * low swept body, the tap a short bright knock.
10
+ *
11
+ * Small-speaker rule (owner-tested): the thump body sweeps about 130 down to
12
+ * 92 Hz and is reinforced with quiet octave and twelfth partials, because a
13
+ * bare sine in that band vanishes on phone speakers. Thump events are
14
+ * authored at midi 42 (~92.5 Hz); the membrane's half-octave sweep starts it
15
+ * near 131 Hz.
16
+ *
17
+ * Routing is the load-bearing part: `percGain` feeds the MUSIC BUS directly,
18
+ * bypassing the music chain's warm lowpass (2400 Hz would dull the tap) and
19
+ * sub highpass (90 Hz would gut the thump). It still sits behind the music
20
+ * volume slider, the shared reverb, and the master mute, and the engine ramps
21
+ * `percGain` with `musicGain` during a program crossfade so the heartbeat
22
+ * never thumps on alone.
23
+ */
24
+ /** The thump: a membrane body plus its two quiet reinforcement partials, one
25
+ * trigger for the engine's Part callback, one dispose for teardown. */
26
+ class ThumpVoice {
27
+ constructor(dest) {
28
+ this.drum = new LightMembraneSynth({
29
+ pitchDecay: 0.045,
30
+ octaves: 0.5,
31
+ oscillator: { type: "sine" },
32
+ envelope: { attack: 0.001, decay: 0.16, sustain: 0, release: 0.05 },
33
+ }).connect(dest);
34
+ this.drum.volume.value = -10;
35
+ try {
36
+ this.partials = new LightPolySynth({
37
+ oscillator: { type: "sine" },
38
+ envelope: { attack: 0.001, decay: 0.1, sustain: 0, release: 0.03 },
39
+ }).connect(dest);
40
+ }
41
+ catch (err) {
42
+ // The factory's reap list only learns about this voice as a whole, so a
43
+ // second-constructor throw must not strand the already-connected drum.
44
+ this.drum.dispose();
45
+ throw err;
46
+ }
47
+ this.partials.volume.value = -10;
48
+ this.partials.maxPolyphony = 8;
49
+ }
50
+ triggerAttackRelease(freq, dur, time, vel) {
51
+ this.drum.triggerAttackRelease(freq, dur, time, vel);
52
+ this.partials.triggerAttackRelease(freq * 2, dur, time, vel * 0.4);
53
+ this.partials.triggerAttackRelease(freq * 3, dur, time, vel * 0.15);
54
+ }
55
+ dispose() {
56
+ this.drum.dispose();
57
+ this.partials.dispose();
58
+ }
59
+ }
60
+ /** Build the percussion voices on the given music bus at the given level.
61
+ * ToneAudioEngine owns the lifecycle (it disposes everything returned). If a
62
+ * constructor throws mid-build, everything already connected is disposed
63
+ * before the error escapes, so a failed start() cannot strand live nodes on
64
+ * the bus (the engine's catch never sees these locals). */
65
+ function createPercussion(musicBus, level) {
66
+ const built = [];
67
+ try {
68
+ const percGain = new Tone.Gain(level).connect(musicBus);
69
+ built.push(percGain);
70
+ const thump = new ThumpVoice(percGain);
71
+ built.push(thump);
72
+ const tap = new LightMembraneSynth({
73
+ pitchDecay: 0.008,
74
+ octaves: 0.5,
75
+ oscillator: { type: "sine" },
76
+ envelope: { attack: 0.001, decay: 0.06, sustain: 0, release: 0.02 },
77
+ });
78
+ built.push(tap);
79
+ tap.connect(percGain);
80
+ tap.volume.value = -14;
81
+ return { percGain, thump, tap };
82
+ }
83
+ catch (err) {
84
+ for (const n of built) {
85
+ try {
86
+ n.dispose();
87
+ }
88
+ catch {
89
+ /* already gone */
90
+ }
91
+ }
92
+ throw err;
93
+ }
94
+ }
95
+
96
+ export { ThumpVoice, createPercussion };
97
+ //# sourceMappingURL=tonePercussion.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tonePercussion.js","sources":["../../src/audio/tonePercussion.ts"],"sourcesContent":["import * as Tone from \"tone\";\nimport { LightMembraneSynth, LightPolySynth } from \"./lightSynth\";\n\n/**\n * The owner's recorded percussion, rebuilt as membrane voices: the chest-hit\n * heartbeat under the splash theme and the object-tap groove under the\n * in-game bed (GDD crowd-din-ambience, \"Human-recorded audio theme\"\n * amendment). Two voices because one tuning cannot voice both: the thump is a\n * low swept body, the tap a short bright knock.\n *\n * Small-speaker rule (owner-tested): the thump body sweeps about 130 down to\n * 92 Hz and is reinforced with quiet octave and twelfth partials, because a\n * bare sine in that band vanishes on phone speakers. Thump events are\n * authored at midi 42 (~92.5 Hz); the membrane's half-octave sweep starts it\n * near 131 Hz.\n *\n * Routing is the load-bearing part: `percGain` feeds the MUSIC BUS directly,\n * bypassing the music chain's warm lowpass (2400 Hz would dull the tap) and\n * sub highpass (90 Hz would gut the thump). It still sits behind the music\n * volume slider, the shared reverb, and the master mute, and the engine ramps\n * `percGain` with `musicGain` during a program crossfade so the heartbeat\n * never thumps on alone.\n */\n\n/** The thump: a membrane body plus its two quiet reinforcement partials, one\n * trigger for the engine's Part callback, one dispose for teardown. */\nexport class ThumpVoice {\n private drum: LightMembraneSynth;\n private partials: LightPolySynth;\n\n constructor(dest: Tone.ToneAudioNode) {\n this.drum = new LightMembraneSynth({\n pitchDecay: 0.045,\n octaves: 0.5,\n oscillator: { type: \"sine\" },\n envelope: { attack: 0.001, decay: 0.16, sustain: 0, release: 0.05 },\n }).connect(dest);\n this.drum.volume.value = -10;\n try {\n this.partials = new LightPolySynth({\n oscillator: { type: \"sine\" },\n envelope: { attack: 0.001, decay: 0.1, sustain: 0, release: 0.03 },\n }).connect(dest);\n } catch (err) {\n // The factory's reap list only learns about this voice as a whole, so a\n // second-constructor throw must not strand the already-connected drum.\n this.drum.dispose();\n throw err;\n }\n this.partials.volume.value = -10;\n this.partials.maxPolyphony = 8;\n }\n\n triggerAttackRelease(freq: number, dur: number, time: number, vel: number): void {\n this.drum.triggerAttackRelease(freq, dur, time, vel);\n this.partials.triggerAttackRelease(freq * 2, dur, time, vel * 0.4);\n this.partials.triggerAttackRelease(freq * 3, dur, time, vel * 0.15);\n }\n\n dispose(): void {\n this.drum.dispose();\n this.partials.dispose();\n }\n}\n\nexport interface PercVoices {\n /** Level node into the music bus; the engine ramps it with musicGain. */\n percGain: Tone.Gain;\n /** The chest-hit heartbeat: swept membrane body plus soft partials. */\n thump: ThumpVoice;\n /** The object tap: short bright membrane knock. */\n tap: LightMembraneSynth;\n}\n\n/** Build the percussion voices on the given music bus at the given level.\n * ToneAudioEngine owns the lifecycle (it disposes everything returned). If a\n * constructor throws mid-build, everything already connected is disposed\n * before the error escapes, so a failed start() cannot strand live nodes on\n * the bus (the engine's catch never sees these locals). */\nexport function createPercussion(musicBus: Tone.ToneAudioNode, level: number): PercVoices {\n const built: Array<{ dispose(): void }> = [];\n try {\n const percGain = new Tone.Gain(level).connect(musicBus);\n built.push(percGain);\n const thump = new ThumpVoice(percGain);\n built.push(thump);\n const tap = new LightMembraneSynth({\n pitchDecay: 0.008,\n octaves: 0.5,\n oscillator: { type: \"sine\" },\n envelope: { attack: 0.001, decay: 0.06, sustain: 0, release: 0.02 },\n });\n built.push(tap);\n tap.connect(percGain);\n tap.volume.value = -14;\n return { percGain, thump, tap };\n } catch (err) {\n for (const n of built) {\n try {\n n.dispose();\n } catch {\n /* already gone */\n }\n }\n throw err;\n }\n}\n"],"names":[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CAAC,EAAE;AACtB,QAAA,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,EAAE;IACjC;IAAE,OAAO,GAAG,EAAE;AACZ,QAAA,KAAK,MAAM,CAAC,IAAI,KAAK,EAAE;AACrB,YAAA,IAAI;gBACF,CAAC,CAAC,OAAO,EAAE;YACb;AAAE,YAAA,MAAM;;YAER;QACF;AACA,QAAA,MAAM,GAAG;IACX;AACF;;"}
@@ -0,0 +1,23 @@
1
+ import * as Tone from "tone";
2
+ /**
3
+ * The outdoor rain layer: a 600..3000 Hz pink-noise band with a slow gust
4
+ * swell (an LFO breathing the level) so it reads as weather, not flat static.
5
+ * It rides the engine's DRY ambience bus on purpose: rain through the shared
6
+ * reverb smears into hiss. The engine drives only `rainGain` (fade in when
7
+ * the sky is visible and the sim says rain, out otherwise); everything else
8
+ * here is fixed, audition-approved character.
9
+ */
10
+ export interface RainVoices {
11
+ /** The level node the engine ramps; 0 = no rain. */
12
+ rainGain: Tone.Gain;
13
+ noise: Tone.Noise;
14
+ bandHp: Tone.Filter;
15
+ /** Caps the band's top end so it reads as rainfall rather than hiss. */
16
+ bandLp: Tone.Filter;
17
+ swell: Tone.Gain;
18
+ lfo: Tone.LFO;
19
+ }
20
+ /** Build and start the rain bed into the given (dry) ambience bus. The engine
21
+ * owns the lifecycle and disposes everything returned. On a mid-build throw,
22
+ * already-connected nodes are disposed before the error escapes. */
23
+ export declare function createRain(dryBus: Tone.ToneAudioNode): RainVoices;
@@ -0,0 +1,39 @@
1
+ import * as Tone from 'tone';
2
+
3
+ /** Build and start the rain bed into the given (dry) ambience bus. The engine
4
+ * owns the lifecycle and disposes everything returned. On a mid-build throw,
5
+ * already-connected nodes are disposed before the error escapes. */
6
+ function createRain(dryBus) {
7
+ const built = [];
8
+ const track = (n) => {
9
+ built.push(n);
10
+ return n;
11
+ };
12
+ try {
13
+ const rainGain = track(new Tone.Gain(0).connect(dryBus));
14
+ const swell = track(new Tone.Gain(1).connect(rainGain));
15
+ const lfo = track(new Tone.LFO({ frequency: 0.3, min: 0.7, max: 1 }));
16
+ lfo.connect(swell.gain);
17
+ lfo.start();
18
+ const bandLp = track(new Tone.Filter({ type: "lowpass", frequency: 3000, Q: 0.5 }).connect(swell));
19
+ const bandHp = track(new Tone.Filter({ type: "highpass", frequency: 600, Q: 0.5 }).connect(bandLp));
20
+ const noise = track(new Tone.Noise({ type: "pink", playbackRate: 1.3 }).connect(bandHp));
21
+ noise.volume.value = -12;
22
+ noise.start();
23
+ return { rainGain, noise, bandHp, bandLp, swell, lfo };
24
+ }
25
+ catch (err) {
26
+ for (const n of built) {
27
+ try {
28
+ n.dispose();
29
+ }
30
+ catch {
31
+ /* already gone */
32
+ }
33
+ }
34
+ throw err;
35
+ }
36
+ }
37
+
38
+ export { createRain };
39
+ //# sourceMappingURL=toneRain.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toneRain.js","sources":["../../src/audio/toneRain.ts"],"sourcesContent":["import * as Tone from \"tone\";\n\n/**\n * The outdoor rain layer: a 600..3000 Hz pink-noise band with a slow gust\n * swell (an LFO breathing the level) so it reads as weather, not flat static.\n * It rides the engine's DRY ambience bus on purpose: rain through the shared\n * reverb smears into hiss. The engine drives only `rainGain` (fade in when\n * the sky is visible and the sim says rain, out otherwise); everything else\n * here is fixed, audition-approved character.\n */\n\nexport interface RainVoices {\n /** The level node the engine ramps; 0 = no rain. */\n rainGain: Tone.Gain;\n noise: Tone.Noise;\n bandHp: Tone.Filter;\n /** Caps the band's top end so it reads as rainfall rather than hiss. */\n bandLp: Tone.Filter;\n swell: Tone.Gain;\n lfo: Tone.LFO;\n}\n\n/** Build and start the rain bed into the given (dry) ambience bus. The engine\n * owns the lifecycle and disposes everything returned. On a mid-build throw,\n * already-connected nodes are disposed before the error escapes. */\nexport function createRain(dryBus: Tone.ToneAudioNode): RainVoices {\n const built: Array<{ dispose(): void }> = [];\n const track = <T extends { dispose(): void }>(n: T): T => {\n built.push(n);\n return n;\n };\n try {\n const rainGain = track(new Tone.Gain(0).connect(dryBus));\n const swell = track(new Tone.Gain(1).connect(rainGain));\n const lfo = track(new Tone.LFO({ frequency: 0.3, min: 0.7, max: 1 }));\n lfo.connect(swell.gain);\n lfo.start();\n const bandLp = track(\n new Tone.Filter({ type: \"lowpass\", frequency: 3000, Q: 0.5 }).connect(swell),\n );\n const bandHp = track(\n new Tone.Filter({ type: \"highpass\", frequency: 600, Q: 0.5 }).connect(bandLp),\n );\n const noise = track(new Tone.Noise({ type: \"pink\", playbackRate: 1.3 }).connect(bandHp));\n noise.volume.value = -12;\n noise.start();\n return { rainGain, noise, bandHp, bandLp, swell, lfo };\n } catch (err) {\n for (const n of built) {\n try {\n n.dispose();\n } catch {\n /* already gone */\n }\n }\n throw err;\n }\n}\n"],"names":[],"mappings":";;AAsBA;;AAEqE;AAC/D,SAAU,UAAU,CAAC,MAA0B,EAAA;IACnD,MAAM,KAAK,GAA+B,EAAE;AAC5C,IAAA,MAAM,KAAK,GAAG,CAAgC,CAAI,KAAO;AACvD,QAAA,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;AACb,QAAA,OAAO,CAAC;AACV,IAAA,CAAC;AACD,IAAA,IAAI;AACF,QAAA,MAAM,QAAQ,GAAG,KAAK,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;AACxD,QAAA,MAAM,KAAK,GAAG,KAAK,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;QACvD,MAAM,GAAG,GAAG,KAAK,CAAC,IAAI,IAAI,CAAC,GAAG,CAAC,EAAE,SAAS,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC,CAAC;AACrE,QAAA,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC;QACvB,GAAG,CAAC,KAAK,EAAE;AACX,QAAA,MAAM,MAAM,GAAG,KAAK,CAClB,IAAI,IAAI,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAC7E;AACD,QAAA,MAAM,MAAM,GAAG,KAAK,CAClB,IAAI,IAAI,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,SAAS,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAC9E;QACD,MAAM,KAAK,GAAG,KAAK,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,YAAY,EAAE,GAAG,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;AACxF,QAAA,KAAK,CAAC,MAAM,CAAC,KAAK,GAAG,CAAC,EAAE;QACxB,KAAK,CAAC,KAAK,EAAE;AACb,QAAA,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,EAAE;IACxD;IAAE,OAAO,GAAG,EAAE;AACZ,QAAA,KAAK,MAAM,CAAC,IAAI,KAAK,EAAE;AACrB,YAAA,IAAI;gBACF,CAAC,CAAC,OAAO,EAAE;YACb;AAAE,YAAA,MAAM;;YAER;QACF;AACA,QAAA,MAAM,GAAG;IACX;AACF;;"}
@@ -0,0 +1,89 @@
1
+ /**
2
+ * A recording stand-in for Tone.js, shared by the tests that run the audio
3
+ * engine's real control flow without an AudioContext (toneAudioEngineGraph and
4
+ * audioFetches). Every Tone class becomes a chainable stub that records what
5
+ * it was built with and where it connected.
6
+ */
7
+ /** What the recording mock captures per node: its Tone class, constructor
8
+ * args, where it connected, whether start() ran, and every trigger call.
9
+ * Regression tests assert graph SHAPE from this (a no-throw suite would pass
10
+ * with the whole feature deleted). */
11
+ export type NodeRec = {
12
+ kind: string;
13
+ args: unknown[];
14
+ connects: NodeRec[];
15
+ started: boolean;
16
+ disposed: boolean;
17
+ triggers: unknown[][];
18
+ ramps: unknown[][];
19
+ };
20
+ /** The nodes built since the last reset, and the per-beat callback the mocked
21
+ * Transport hands back. Tests clear them in beforeEach. */
22
+ export declare const beat: {
23
+ step: null | ((t: number) => void);
24
+ };
25
+ export declare const graph: {
26
+ nodes: NodeRec[];
27
+ };
28
+ /** Every Tone.setContext call, in order: the context passed and whether the
29
+ * previous one was disposed. Cleared by {@link resetToneFaults}. */
30
+ export declare const contextSwaps: Array<{
31
+ context: unknown;
32
+ disposeOld: boolean;
33
+ }>;
34
+ /** Every `suspend` and `resume` asked of any audio context (Tone's or its raw
35
+ * one), in order. Cleared by {@link resetToneFaults}. */
36
+ export declare const contextCalls: string[];
37
+ /** Ways a test can make the mocked Tone misbehave the way the real one can:
38
+ * the state every audio context reports, and an error every note trigger
39
+ * throws (real Tone throws from a mono voice restarted at its own start
40
+ * time). Tests that turn a knob reset it with {@link resetToneFaults}. */
41
+ export declare const toneFaults: {
42
+ contextState: string;
43
+ triggerError: Error | null;
44
+ };
45
+ export declare function resetToneFaults(): void;
46
+ /** A self-returning chainable stub for a Tone node: any property access or
47
+ * call yields the same proxy, so `n.connect(x).connect(y)`, `n.gain.rampTo(…)`,
48
+ * `n.volume.value = …` all no-op safely, while `connect`, `start` and
49
+ * `triggerAttackRelease` additionally record onto the node's registry entry
50
+ * (sub-property accesses like `.gain` yield the same proxy, so an edge into a
51
+ * node's param records as an edge into that node). */
52
+ export declare function node(kind?: string, args?: unknown[]): unknown;
53
+ /** The module object for `vi.mock("tone", async () => (await import("./toneRecordingMock")).toneMock())`. */
54
+ export declare function toneMock(): {
55
+ Gain: (...args: unknown[]) => unknown;
56
+ Filter: (...args: unknown[]) => unknown;
57
+ PolySynth: (...args: unknown[]) => unknown;
58
+ Synth: (...args: unknown[]) => unknown;
59
+ Noise: (...args: unknown[]) => unknown;
60
+ Reverb: (...args: unknown[]) => unknown;
61
+ NoiseSynth: (...args: unknown[]) => unknown;
62
+ MembraneSynth: (...args: unknown[]) => unknown;
63
+ Part: (...args: unknown[]) => unknown;
64
+ LFO: (...args: unknown[]) => unknown;
65
+ ToneAudioBuffer: (...args: unknown[]) => unknown;
66
+ ToneBufferSource: (...args: unknown[]) => unknown;
67
+ Oscillator: (...args: unknown[]) => unknown;
68
+ Context: (...args: unknown[]) => unknown;
69
+ setContext: (context: unknown, disposeOld?: boolean) => void;
70
+ getTransport: () => {
71
+ bpm: unknown;
72
+ scheduleRepeat: (cb: (t: number) => void) => number;
73
+ start: () => void;
74
+ clear: () => void;
75
+ stop: () => void;
76
+ };
77
+ getContext: () => unknown;
78
+ start: () => Promise<void>;
79
+ now: () => number;
80
+ };
81
+ /** The module object for `vi.mock("./lightSynth", async () => (await import("./toneRecordingMock")).lightSynthMock())`:
82
+ * the light voices record like any other node, under their own class names,
83
+ * so a graph test sees every voice, what it was built with, where it
84
+ * connects and every note it plays. */
85
+ export declare function lightSynthMock(): {
86
+ LightPolySynth: (...args: unknown[]) => unknown;
87
+ LightMonoSynth: (...args: unknown[]) => unknown;
88
+ LightMembraneSynth: (...args: unknown[]) => unknown;
89
+ };
@@ -0,0 +1,145 @@
1
+ /**
2
+ * A recording stand-in for Tone.js, shared by the tests that run the audio
3
+ * engine's real control flow without an AudioContext (toneAudioEngineGraph and
4
+ * audioFetches). Every Tone class becomes a chainable stub that records what
5
+ * it was built with and where it connected.
6
+ */
7
+ /** The nodes built since the last reset, and the per-beat callback the mocked
8
+ * Transport hands back. Tests clear them in beforeEach. */
9
+ const beat = { step: null };
10
+ const graph = { nodes: [] };
11
+ /** Every Tone.setContext call, in order: the context passed and whether the
12
+ * previous one was disposed. Cleared by {@link resetToneFaults}. */
13
+ const contextSwaps = [];
14
+ /** Every `suspend` and `resume` asked of any audio context (Tone's or its raw
15
+ * one), in order. Cleared by {@link resetToneFaults}. */
16
+ const contextCalls = [];
17
+ /** Ways a test can make the mocked Tone misbehave the way the real one can:
18
+ * the state every audio context reports, and an error every note trigger
19
+ * throws (real Tone throws from a mono voice restarted at its own start
20
+ * time). Tests that turn a knob reset it with {@link resetToneFaults}. */
21
+ const toneFaults = {
22
+ contextState: "running",
23
+ triggerError: null,
24
+ };
25
+ function resetToneFaults() {
26
+ toneFaults.contextState = "running";
27
+ toneFaults.triggerError = null;
28
+ contextSwaps.length = 0;
29
+ contextCalls.length = 0;
30
+ }
31
+ /** A self-returning chainable stub for a Tone node: any property access or
32
+ * call yields the same proxy, so `n.connect(x).connect(y)`, `n.gain.rampTo(…)`,
33
+ * `n.volume.value = …` all no-op safely, while `connect`, `start` and
34
+ * `triggerAttackRelease` additionally record onto the node's registry entry
35
+ * (sub-property accesses like `.gain` yield the same proxy, so an edge into a
36
+ * node's param records as an edge into that node). */
37
+ // The proxy is deliberately untyped: it stands in for every Tone class.
38
+ /* eslint-disable @typescript-eslint/no-explicit-any */
39
+ function node(kind = "anon", args = []) {
40
+ const rec = { kind, args, connects: [], started: false, disposed: false, triggers: [], ramps: [] };
41
+ graph.nodes.push(rec);
42
+ const p = new Proxy(function () { }, {
43
+ get: (_t, prop) => {
44
+ if (prop === Symbol.toPrimitive)
45
+ return () => 0; // numeric coercion (Tone.now())
46
+ if (prop === "then")
47
+ return undefined; // never a thenable
48
+ if (prop === "__rec")
49
+ return rec;
50
+ if (prop === "state" && kind === "Context")
51
+ return toneFaults.contextState;
52
+ if ((prop === "suspend" || prop === "resume") && kind === "Context")
53
+ return () => {
54
+ contextCalls.push(prop);
55
+ return p;
56
+ };
57
+ if (prop === "connect")
58
+ return (target) => {
59
+ if (target?.__rec)
60
+ rec.connects.push(target.__rec);
61
+ return p;
62
+ };
63
+ if (prop === "start")
64
+ return () => {
65
+ rec.started = true;
66
+ return p;
67
+ };
68
+ if (prop === "triggerAttackRelease")
69
+ return (...a) => {
70
+ if (toneFaults.triggerError)
71
+ throw toneFaults.triggerError;
72
+ rec.triggers.push(a);
73
+ return p;
74
+ };
75
+ if (prop === "rampTo")
76
+ return (...a) => {
77
+ rec.ramps.push(a);
78
+ return p;
79
+ };
80
+ if (prop === "dispose")
81
+ return () => {
82
+ rec.disposed = true;
83
+ return p;
84
+ };
85
+ return p;
86
+ },
87
+ apply: () => p,
88
+ set: () => true,
89
+ });
90
+ return p;
91
+ }
92
+ /** The module object for `vi.mock("tone", async () => (await import("./toneRecordingMock")).toneMock())`. */
93
+ function toneMock() {
94
+ // Regular functions (not arrows) so `new Tone.Gain(...)` works; each returns a
95
+ // node, which `new` then yields as the instance.
96
+ const ctorFor = (kind) => function (...args) {
97
+ return node(kind, args);
98
+ };
99
+ return {
100
+ Gain: ctorFor("Gain"),
101
+ Filter: ctorFor("Filter"),
102
+ PolySynth: ctorFor("PolySynth"),
103
+ Synth: ctorFor("Synth"),
104
+ Noise: ctorFor("Noise"),
105
+ Reverb: ctorFor("Reverb"),
106
+ NoiseSynth: ctorFor("NoiseSynth"),
107
+ MembraneSynth: ctorFor("MembraneSynth"),
108
+ Part: ctorFor("Part"),
109
+ LFO: ctorFor("LFO"),
110
+ ToneAudioBuffer: ctorFor("ToneAudioBuffer"),
111
+ ToneBufferSource: ctorFor("ToneBufferSource"),
112
+ Oscillator: ctorFor("Oscillator"),
113
+ Context: ctorFor("Context"),
114
+ setContext: (context, disposeOld = false) => {
115
+ contextSwaps.push({ context, disposeOld });
116
+ },
117
+ getTransport: () => ({
118
+ bpm: node(), // chainable: supports both `bpm.value = …` and `bpm.rampTo(…)`
119
+ scheduleRepeat: (cb) => ((beat.step = cb), 1),
120
+ start: () => { },
121
+ clear: () => { },
122
+ stop: () => { },
123
+ }),
124
+ getContext: () => node("Context"),
125
+ start: () => Promise.resolve(),
126
+ now: () => 0,
127
+ };
128
+ }
129
+ /** The module object for `vi.mock("./lightSynth", async () => (await import("./toneRecordingMock")).lightSynthMock())`:
130
+ * the light voices record like any other node, under their own class names,
131
+ * so a graph test sees every voice, what it was built with, where it
132
+ * connects and every note it plays. */
133
+ function lightSynthMock() {
134
+ const ctorFor = (kind) => function (...args) {
135
+ return node(kind, args);
136
+ };
137
+ return {
138
+ LightPolySynth: ctorFor("LightPolySynth"),
139
+ LightMonoSynth: ctorFor("LightMonoSynth"),
140
+ LightMembraneSynth: ctorFor("LightMembraneSynth"),
141
+ };
142
+ }
143
+
144
+ export { beat, contextCalls, contextSwaps, graph, lightSynthMock, node, resetToneFaults, toneFaults, toneMock };
145
+ //# sourceMappingURL=toneRecordingMock.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toneRecordingMock.js","sources":["../../src/audio/toneRecordingMock.ts"],"sourcesContent":["/**\n * A recording stand-in for Tone.js, shared by the tests that run the audio\n * engine's real control flow without an AudioContext (toneAudioEngineGraph and\n * audioFetches). Every Tone class becomes a chainable stub that records what\n * it was built with and where it connected.\n */\n\n/** What the recording mock captures per node: its Tone class, constructor\n * args, where it connected, whether start() ran, and every trigger call.\n * Regression tests assert graph SHAPE from this (a no-throw suite would pass\n * with the whole feature deleted). */\nexport type NodeRec = {\n kind: string;\n args: unknown[];\n connects: NodeRec[];\n started: boolean;\n disposed: boolean;\n triggers: unknown[][];\n ramps: unknown[][];\n};\n\n/** The nodes built since the last reset, and the per-beat callback the mocked\n * Transport hands back. Tests clear them in beforeEach. */\nexport const beat: { step: null | ((t: number) => void) } = { step: null };\nexport const graph: { nodes: NodeRec[] } = { nodes: [] };\n/** Every Tone.setContext call, in order: the context passed and whether the\n * previous one was disposed. Cleared by {@link resetToneFaults}. */\nexport const contextSwaps: Array<{ context: unknown; disposeOld: boolean }> = [];\n/** Every `suspend` and `resume` asked of any audio context (Tone's or its raw\n * one), in order. Cleared by {@link resetToneFaults}. */\nexport const contextCalls: string[] = [];\n\n/** Ways a test can make the mocked Tone misbehave the way the real one can:\n * the state every audio context reports, and an error every note trigger\n * throws (real Tone throws from a mono voice restarted at its own start\n * time). Tests that turn a knob reset it with {@link resetToneFaults}. */\nexport const toneFaults: { contextState: string; triggerError: Error | null } = {\n contextState: \"running\",\n triggerError: null,\n};\nexport function resetToneFaults(): void {\n toneFaults.contextState = \"running\";\n toneFaults.triggerError = null;\n contextSwaps.length = 0;\n contextCalls.length = 0;\n}\n\n/** A self-returning chainable stub for a Tone node: any property access or\n * call yields the same proxy, so `n.connect(x).connect(y)`, `n.gain.rampTo(…)`,\n * `n.volume.value = …` all no-op safely, while `connect`, `start` and\n * `triggerAttackRelease` additionally record onto the node's registry entry\n * (sub-property accesses like `.gain` yield the same proxy, so an edge into a\n * node's param records as an edge into that node). */\n// The proxy is deliberately untyped: it stands in for every Tone class.\n/* eslint-disable @typescript-eslint/no-explicit-any */\nexport function node(kind = \"anon\", args: unknown[] = []): unknown {\n const rec: NodeRec = { kind, args, connects: [], started: false, disposed: false, triggers: [], ramps: [] };\n graph.nodes.push(rec);\n const p: any = new Proxy(function () {} as unknown as object, {\n get: (_t, prop) => {\n if (prop === Symbol.toPrimitive) return () => 0; // numeric coercion (Tone.now())\n if (prop === \"then\") return undefined; // never a thenable\n if (prop === \"__rec\") return rec;\n if (prop === \"state\" && kind === \"Context\") return toneFaults.contextState;\n if ((prop === \"suspend\" || prop === \"resume\") && kind === \"Context\")\n return () => {\n contextCalls.push(prop);\n return p;\n };\n if (prop === \"connect\")\n return (target: any) => {\n if (target?.__rec) rec.connects.push(target.__rec);\n return p;\n };\n if (prop === \"start\")\n return () => {\n rec.started = true;\n return p;\n };\n if (prop === \"triggerAttackRelease\")\n return (...a: unknown[]) => {\n if (toneFaults.triggerError) throw toneFaults.triggerError;\n rec.triggers.push(a);\n return p;\n };\n if (prop === \"rampTo\")\n return (...a: unknown[]) => {\n rec.ramps.push(a);\n return p;\n };\n if (prop === \"dispose\")\n return () => {\n rec.disposed = true;\n return p;\n };\n return p;\n },\n apply: () => p,\n set: () => true,\n });\n return p;\n}\n\n\n/** The module object for `vi.mock(\"tone\", async () => (await import(\"./toneRecordingMock\")).toneMock())`. */\nexport function toneMock() {\n // Regular functions (not arrows) so `new Tone.Gain(...)` works; each returns a\n // node, which `new` then yields as the instance.\n const ctorFor = (kind: string) =>\n function (...args: unknown[]) {\n return node(kind, args);\n };\n return {\n Gain: ctorFor(\"Gain\"),\n Filter: ctorFor(\"Filter\"),\n PolySynth: ctorFor(\"PolySynth\"),\n Synth: ctorFor(\"Synth\"),\n Noise: ctorFor(\"Noise\"),\n Reverb: ctorFor(\"Reverb\"),\n NoiseSynth: ctorFor(\"NoiseSynth\"),\n MembraneSynth: ctorFor(\"MembraneSynth\"),\n Part: ctorFor(\"Part\"),\n LFO: ctorFor(\"LFO\"),\n ToneAudioBuffer: ctorFor(\"ToneAudioBuffer\"),\n ToneBufferSource: ctorFor(\"ToneBufferSource\"),\n Oscillator: ctorFor(\"Oscillator\"),\n Context: ctorFor(\"Context\"),\n setContext: (context: unknown, disposeOld = false) => {\n contextSwaps.push({ context, disposeOld });\n },\n getTransport: () => ({\n bpm: node(), // chainable: supports both `bpm.value = …` and `bpm.rampTo(…)`\n scheduleRepeat: (cb: (t: number) => void) => ((beat.step = cb), 1),\n start: () => {},\n clear: () => {},\n stop: () => {},\n }),\n getContext: () => node(\"Context\"),\n start: () => Promise.resolve(),\n now: () => 0,\n };\n}\n\n/** The module object for `vi.mock(\"./lightSynth\", async () => (await import(\"./toneRecordingMock\")).lightSynthMock())`:\n * the light voices record like any other node, under their own class names,\n * so a graph test sees every voice, what it was built with, where it\n * connects and every note it plays. */\nexport function lightSynthMock() {\n const ctorFor = (kind: string) =>\n function (...args: unknown[]) {\n return node(kind, args);\n };\n return {\n LightPolySynth: ctorFor(\"LightPolySynth\"),\n LightMonoSynth: ctorFor(\"LightMonoSynth\"),\n LightMembraneSynth: ctorFor(\"LightMembraneSynth\"),\n };\n}\n"],"names":[],"mappings":"AAAA;;;;;AAKG;AAgBH;AAC4D;MAC/C,IAAI,GAA2C,EAAE,IAAI,EAAE,IAAI;MAC3D,KAAK,GAAyB,EAAE,KAAK,EAAE,EAAE;AACtD;AACqE;AAC9D,MAAM,YAAY,GAAqD;AAC9E;AA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,CAAC;AACjC,QAAA,KAAK,EAAE,MAAM,OAAO,CAAC,OAAO,EAAE;AAC9B,QAAA,GAAG,EAAE,MAAM,CAAC;KACb;AACH;AAEA;;;AAGwC;SACxB,cAAc,GAAA;IAC5B,MAAM,OAAO,GAAG,CAAC,IAAY,KAC3B,UAAU,GAAG,IAAe,EAAA;AAC1B,QAAA,OAAO,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC;AACzB,IAAA,CAAC;IACH,OAAO;AACL,QAAA,cAAc,EAAE,OAAO,CAAC,gBAAgB,CAAC;AACzC,QAAA,cAAc,EAAE,OAAO,CAAC,gBAAgB,CAAC;AACzC,QAAA,kBAAkB,EAAE,OAAO,CAAC,oBAAoB,CAAC;KAClD;AACH;;"}
@@ -0,0 +1,11 @@
1
+ import * as Tone from "tone";
2
+ /** The room-tone bed's chain, source to level: noise, lowpass, highpass, gain. */
3
+ export interface RoomTone {
4
+ readonly ambNoise: Tone.Noise;
5
+ readonly ambFilter: Tone.Filter;
6
+ readonly ambTone: Tone.Filter;
7
+ readonly ambGain: Tone.Gain;
8
+ }
9
+ /** Build the ambient room-tone bed into `bedFilter` (the distance lowpass) and
10
+ * start its noise. Its level starts at 0; the engine's scene and zoom set it. */
11
+ export declare function createRoomTone(bedFilter: Tone.Filter): RoomTone;
@@ -0,0 +1,27 @@
1
+ import * as Tone from 'tone';
2
+
3
+ /** Build the ambient room-tone bed into `bedFilter` (the distance lowpass) and
4
+ * start its noise. Its level starts at 0; the engine's scene and zoom set it. */
5
+ function createRoomTone(bedFilter) {
6
+ // Ambient room-tone bed: pink noise seated LOW behind a steep filter, so
7
+ // it reads as a soft room rush and never bright mid hiss. This applies the
8
+ // audition's no-static rule (steep rolloff -48, warm cutoff, low level)
9
+ // to the bed as well. The steepness and the subsonic-clearing highpass
10
+ // are FIXED here; applyScene re-points the lowpass cutoff and level per
11
+ // scene from SCENES[].amb (all lowpass now, seated warm), and never
12
+ // touches the rolloff, so every scene's bed stays steep. The source also
13
+ // sits a touch quieter than the old bed.
14
+ const ambGain = new Tone.Gain(0).connect(bedFilter);
15
+ // Truly subsonic (35 Hz): it clears speaker-flapping rumble without
16
+ // touching the deep beds of the low-cutoff scenes (metro lowpass 90,
17
+ // cinema 110), whose rush must survive.
18
+ const ambTone = new Tone.Filter({ type: "highpass", frequency: 35, rolloff: -12 }).connect(ambGain);
19
+ const ambFilter = new Tone.Filter({ type: "lowpass", frequency: 600, rolloff: -48 }).connect(ambTone);
20
+ const ambNoise = new Tone.Noise("pink").connect(ambFilter);
21
+ ambNoise.volume.value = -20;
22
+ ambNoise.start();
23
+ return { ambNoise, ambFilter, ambTone, ambGain };
24
+ }
25
+
26
+ export { createRoomTone };
27
+ //# sourceMappingURL=toneRoomTone.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toneRoomTone.js","sources":["../../src/audio/toneRoomTone.ts"],"sourcesContent":["import * as Tone from \"tone\";\n\n/** The room-tone bed's chain, source to level: noise, lowpass, highpass, gain. */\nexport interface RoomTone {\n readonly ambNoise: Tone.Noise;\n readonly ambFilter: Tone.Filter;\n readonly ambTone: Tone.Filter;\n readonly ambGain: Tone.Gain;\n}\n\n/** Build the ambient room-tone bed into `bedFilter` (the distance lowpass) and\n * start its noise. Its level starts at 0; the engine's scene and zoom set it. */\nexport function createRoomTone(bedFilter: Tone.Filter): RoomTone {\n // Ambient room-tone bed: pink noise seated LOW behind a steep filter, so\n // it reads as a soft room rush and never bright mid hiss. This applies the\n // audition's no-static rule (steep rolloff -48, warm cutoff, low level)\n // to the bed as well. The steepness and the subsonic-clearing highpass\n // are FIXED here; applyScene re-points the lowpass cutoff and level per\n // scene from SCENES[].amb (all lowpass now, seated warm), and never\n // touches the rolloff, so every scene's bed stays steep. The source also\n // sits a touch quieter than the old bed.\n const ambGain = new Tone.Gain(0).connect(bedFilter);\n // Truly subsonic (35 Hz): it clears speaker-flapping rumble without\n // touching the deep beds of the low-cutoff scenes (metro lowpass 90,\n // cinema 110), whose rush must survive.\n const ambTone = new Tone.Filter({ type: \"highpass\", frequency: 35, rolloff: -12 }).connect(\n ambGain,\n );\n const ambFilter = new Tone.Filter({ type: \"lowpass\", frequency: 600, rolloff: -48 }).connect(\n ambTone,\n );\n const ambNoise = new Tone.Noise(\"pink\").connect(ambFilter);\n ambNoise.volume.value = -20;\n ambNoise.start();\n return { ambNoise, ambFilter, ambTone, ambGain };\n}\n"],"names":[],"mappings":";;AAUA;AACkF;AAC5E,SAAU,cAAc,CAAC,SAAsB,EAAA;;;;;;;;;AASnD,IAAA,MAAM,OAAO,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC;;;;IAInD,MAAM,OAAO,GAAG,IAAI,IAAI,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,SAAS,EAAE,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,OAAO,CACxF,OAAO,CACR;IACD,MAAM,SAAS,GAAG,IAAI,IAAI,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,SAAS,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,OAAO,CAC1F,OAAO,CACR;AACD,IAAA,MAAM,QAAQ,GAAG,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC;AAC1D,IAAA,QAAQ,CAAC,MAAM,CAAC,KAAK,GAAG,CAAC,EAAE;IAC3B,QAAQ,CAAC,KAAK,EAAE;IAChB,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE;AAClD;;"}