@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,452 @@
1
+ import * as Tone from 'tone';
2
+ import { clamp, detailFor, OVERVIEW_EXIT, OVERVIEW_ZOOM, sceneFor, midiToFreq, SCENES, lerp } from './toneScenes.js';
3
+ import { createSfxVoices, playSfx } from './toneVoices.js';
4
+ import { createPercussion } from './tonePercussion.js';
5
+ import { createRain } from './toneRain.js';
6
+ import { ContextSleep, usePlaybackContext } from './toneContext.js';
7
+ import { programFor } from './toneTracks.js';
8
+ import { CrowdLayer } from './toneCrowd.js';
9
+ import { createMusicVoices } from './toneMusicVoices.js';
10
+ import { createRoomTone } from './toneRoomTone.js';
11
+ import { FirstCueLatch } from './firstCueLatch.js';
12
+
13
+ /** Audio context states with a stopped clock, where a cue cannot sound:
14
+ * autoplay not yet allowed or the tab backgrounded ("suspended"), Safari's
15
+ * phone-call pause ("interrupted"), and a torn-down context ("closed"). */
16
+ const SILENT_CONTEXT_STATES = new Set(["suspended", "interrupted", "closed"]);
17
+ /** How long the master fade into an away sleep plays before the clock stops. */
18
+ const SLEEP_AFTER_FADE_MS = 150;
19
+ class ToneAudioEngine {
20
+ constructor() {
21
+ this.master = null;
22
+ /** Player-set music level: the composed tracks only. */
23
+ this.musicBus = null;
24
+ /** Player-set ambience level: the crowd/venue layer, room tone, and rain,
25
+ * so voices mix independently of the music (an owner request: turn the
26
+ * music down and hear the crowd better). Two nodes because rain stays on
27
+ * its deliberate dry path while the rest shares the reverb. */
28
+ this.ambBus = null;
29
+ this.ambDryBus = null;
30
+ /** Player-set effects level: the one-shot action jingles only. */
31
+ this.sfxBus = null;
32
+ /** Distance lowpass on the AMBIENT bed; opens up as you zoom in. The music
33
+ * bypasses it (see the music chain) so the composed track stays consistent. */
34
+ this.bedFilter = null;
35
+ this.reverb = null;
36
+ // Composed-music voices + their own warm signal path.
37
+ this.arp = null;
38
+ this.bassVoice = null;
39
+ this.hook = null;
40
+ this.perc = null; // heartbeat + taps; routing doc in tonePercussion
41
+ this.musicGain = null;
42
+ /** Warm lowpass + sub high-pass on the music (never bright/harsh, no rumble). */
43
+ this.musicTone = null;
44
+ this.musicSub = null;
45
+ /** The looping player for the active track. Rebuilt on a program change. */
46
+ this.musicPart = null;
47
+ /** Target level for the music bed; the crossfade dips to 0 and back to this. */
48
+ this.musicLevel = 0.8;
49
+ /** Pending track-swap during a crossfade, so a re-switch can cancel it. */
50
+ this.swapTimer = null;
51
+ /** The jingle instrument set (recipes and construction in toneVoices.ts). */
52
+ this.sfxVoices = null;
53
+ /** The crowd/venue ambience layer (talkers, venue detail, venue programs). */
54
+ this.crowd = null;
55
+ // Ambient beds.
56
+ this.ambNoise = null;
57
+ this.ambFilter = null;
58
+ /** Fixed roll-off on the ambient bed so it never turns into bright hiss. */
59
+ this.ambTone = null;
60
+ this.ambGain = null;
61
+ this.rain = null; // outdoor rain bed; character doc in toneRain
62
+ this.scene = "lobby";
63
+ this.targetScene = "lobby";
64
+ /** Hysteresis latch for the zoomed-out overview scene. */
65
+ this.overview = false;
66
+ this.ambBase = 0.2;
67
+ this.detail = 0.4;
68
+ this.rainTarget = 0;
69
+ /** Which composed track plays. The app switches this at the splash boundary. */
70
+ this.program = "game";
71
+ this.muted = false;
72
+ /** The player left the page (`watchAway`): silent, and asleep once faded. */
73
+ this.away = false;
74
+ this.sleep = new ContextSleep();
75
+ /** The latest focus `update` saw, so leaving can stop the crowd at once. */
76
+ this.focus = null;
77
+ /** Player-set levels 0..1, kept even while the graph isn't built so start()
78
+ * can apply them; independent of `muted` (the master kill switch). */
79
+ this.musicVolume = 1;
80
+ this.ambienceVolume = 1;
81
+ this.sfxVolume = 1;
82
+ this.started = false;
83
+ this.firstCue = new FirstCueLatch();
84
+ }
85
+ /** Lazily create the audio graph. Must be called from a user gesture. */
86
+ start() {
87
+ if (this.started) {
88
+ // Already built, but the context may have been suspended since. main.ts
89
+ // calls start() on every gesture: re-attempt the resume (a no-op on a
90
+ // running context, and it recovers a silenced one).
91
+ void Tone.getContext().resume().catch(() => { });
92
+ return;
93
+ }
94
+ const hasWebAudio = typeof globalThis.AudioContext !== "undefined" ||
95
+ typeof globalThis.webkitAudioContext !== "undefined";
96
+ if (!hasWebAudio)
97
+ return; // no WebAudio (tests / unsupported)
98
+ try {
99
+ usePlaybackContext(); // before any node is built
100
+ // Inside a user gesture, so resuming is allowed. Swallow rejections
101
+ // (autoplay/permission) so a blocked context can't surface as unhandled.
102
+ // A cue fired before the unlock lands waits for it (`FirstCueLatch`).
103
+ this.firstCue.begin();
104
+ Tone.start().then(() => this.sfxIfAny(this.firstCue.release()), () => this.firstCue.release());
105
+ this.master = new Tone.Gain(this.silent ? 0 : 0.35).toDestination();
106
+ // Player volume buses: music, ambience (voices, room tone, rain), and
107
+ // effects, each independently mixable. They sit ahead of the shared
108
+ // reverb; the master keeps its fixed 0.35 and the mute ramp. Values are
109
+ // squared (perceptual sliders).
110
+ const sq = (v) => v * v;
111
+ this.sfxBus = new Tone.Gain(sq(this.sfxVolume)).connect(this.master);
112
+ // Shared reverb so the music and ambient life feel like rooms, not dry
113
+ // oscillators.
114
+ this.reverb = new Tone.Reverb({ decay: 2.4, wet: 0.16 }).connect(this.master);
115
+ // Ambient bed's distance lowpass: far out = muffled, up close = present.
116
+ this.ambBus = new Tone.Gain(sq(this.ambienceVolume)).connect(this.reverb);
117
+ this.ambDryBus = new Tone.Gain(sq(this.ambienceVolume)).connect(this.master);
118
+ this.bedFilter = new Tone.Filter({ type: "lowpass", frequency: 3000, Q: 0.7 }).connect(this.ambBus);
119
+ // Composed music path (bypasses the zoom distance filter): voices -> level
120
+ // -> warm lowpass -> sub highpass -> music bus -> reverb. Kept warm and
121
+ // band-limited so the loop never reads bright, harsh, or boomy.
122
+ this.musicBus = new Tone.Gain(sq(this.musicVolume)).connect(this.reverb);
123
+ this.musicSub = new Tone.Filter({ type: "highpass", frequency: 90, Q: 0.7 }).connect(this.musicBus);
124
+ this.musicTone = new Tone.Filter({ type: "lowpass", frequency: 2400, Q: 0.7 }).connect(this.musicSub);
125
+ this.musicGain = new Tone.Gain(this.musicLevel).connect(this.musicTone);
126
+ // The melody voices (recipes in toneMusicVoices).
127
+ ({ arp: this.arp, bass: this.bassVoice, hook: this.hook } = createMusicVoices(this.musicGain));
128
+ this.perc = createPercussion(this.musicBus, this.musicLevel);
129
+ // The crowd/venue ambience layer rides the distance-filtered bed so
130
+ // zoom muffles and opens it with everything else. Its two voice seeds
131
+ // fetch lazily and degrade to tone-only ambience if they never arrive.
132
+ const base = import.meta.env?.BASE_URL ?? "./";
133
+ this.crowd = new CrowdLayer(this.bedFilter, base);
134
+ // Ambient room-tone bed (recipe in toneRoomTone).
135
+ ({ ambGain: this.ambGain, ambTone: this.ambTone, ambFilter: this.ambFilter, ambNoise: this.ambNoise } =
136
+ createRoomTone(this.bedFilter));
137
+ // Outdoor rain layer (dry, off the distance filter; see toneRain).
138
+ this.rain = createRain(this.ambDryBus);
139
+ // One-shot action jingles (the human-voiced bloop and bell family plus
140
+ // the legacy money synth; recipes and dry-bus rationale in toneVoices).
141
+ this.sfxVoices = createSfxVoices(this.sfxBus);
142
+ // Kick off the Transport (the looping music part and the venue programs
143
+ // schedule on it).
144
+ Tone.getTransport().start();
145
+ this.buildMusicPart();
146
+ this.started = true;
147
+ if (this.away)
148
+ this.sleep.sleepAfter(SLEEP_AFTER_FADE_MS); // left during the load
149
+ this.applyScene(this.scene, 0.01);
150
+ this.applyDetail(this.detail, 0.01);
151
+ }
152
+ catch {
153
+ this.dispose();
154
+ }
155
+ }
156
+ setMuted(m) {
157
+ this.muted = m;
158
+ this.applySilence();
159
+ }
160
+ /** The player left the page or came back. A page in the background or out
161
+ * of focus gets a starved, throttled main thread, so notes arrived late and
162
+ * the mix crackled; away, everything fades out and the context sleeps. */
163
+ setAway(away) {
164
+ if (away === this.away)
165
+ return;
166
+ this.away = away;
167
+ // Hidden, the frame loop stops: stop the crowd's own timers now.
168
+ if (away && this.focus)
169
+ this.crowd?.update(this.targetScene, this.focus, this.detail, true);
170
+ this.applySilence();
171
+ }
172
+ get silent() {
173
+ return this.muted || this.away;
174
+ }
175
+ /** Fade the master to match; sleep while away, wake once heard again. */
176
+ applySilence() {
177
+ if (this.master)
178
+ this.master.gain.rampTo(this.silent ? 0 : 0.35, 0.1);
179
+ if (this.away && this.started)
180
+ this.sleep.sleepAfter(SLEEP_AFTER_FADE_MS);
181
+ else if (this.silent)
182
+ this.sleep.cancel();
183
+ else
184
+ this.sleep.wake();
185
+ }
186
+ /** Player volume levels, 0..1 each (clamped, ramped). Safe before start().
187
+ * A non-finite input keeps that channel's level (NaN survives clamp() and
188
+ * the native AudioParam rejects non-finite ramp targets). */
189
+ setVolumes(music, ambience, sfx) {
190
+ if (Number.isFinite(music))
191
+ this.musicVolume = clamp(music, 0, 1);
192
+ if (Number.isFinite(ambience))
193
+ this.ambienceVolume = clamp(ambience, 0, 1);
194
+ if (Number.isFinite(sfx))
195
+ this.sfxVolume = clamp(sfx, 0, 1);
196
+ // Loudness is logarithmic: a linear gain slider feels dead over most of
197
+ // its travel. Squaring the stored 0..1 makes half-slider audibly half.
198
+ this.musicBus?.gain.rampTo(this.musicVolume * this.musicVolume, 0.08);
199
+ this.ambBus?.gain.rampTo(this.ambienceVolume * this.ambienceVolume, 0.08);
200
+ this.ambDryBus?.gain.rampTo(this.ambienceVolume * this.ambienceVolume, 0.08);
201
+ this.sfxBus?.gain.rampTo(this.sfxVolume * this.sfxVolume, 0.08);
202
+ }
203
+ /** Choose which composed track plays: `"splash"` on the start screen,
204
+ * `"game"` in the tower. Safe before start() (stored, applied on build).
205
+ * Live, it CROSSFADES so the splash theme flows into the in-game bed instead
206
+ * of cutting. A repeat of the current program is a no-op. */
207
+ setProgram(program) {
208
+ if (program === this.program)
209
+ return;
210
+ this.program = program;
211
+ if (this.started)
212
+ this.crossfadeProgram();
213
+ }
214
+ /** Dip to silence, swap the part at the bottom, swell back up; percGain rides the dip. */
215
+ crossfadeProgram() {
216
+ if (!this.musicGain)
217
+ return this.buildMusicPart();
218
+ const FADE = 0.8;
219
+ this.musicGain.gain.rampTo(0, FADE);
220
+ this.perc?.percGain.gain.rampTo(0, FADE);
221
+ if (this.swapTimer !== null)
222
+ clearTimeout(this.swapTimer);
223
+ this.swapTimer = setTimeout(() => {
224
+ this.swapTimer = null;
225
+ this.buildMusicPart();
226
+ this.musicGain?.gain.rampTo(this.musicLevel, FADE);
227
+ this.perc?.percGain.gain.rampTo(this.musicLevel, FADE);
228
+ }, FADE * 1000);
229
+ }
230
+ /** Called every frame with the renderer's focus; drives the ambient life
231
+ * (scene room-tone, zoom detail, rain). The music is program-driven, not
232
+ * focus-driven, so it is untouched here. */
233
+ update(focus) {
234
+ if (!this.started)
235
+ return;
236
+ this.focus = focus;
237
+ // Any Tone error here is swallowed and retried next frame, so an audio
238
+ // hiccup never escapes into the game loop or leaves the graph half-updated.
239
+ try {
240
+ // A backgrounded/power-saving tab can suspend the context; nudge it back
241
+ // on each update so sound returns instead of staying dead.
242
+ const ctx = Tone.getContext();
243
+ if (!this.silent && ctx.state === "suspended")
244
+ void ctx.resume().catch(() => { });
245
+ // Zoom detail: opens the distance filter and fades ambient detail in/out.
246
+ const detail = detailFor(focus.zoom);
247
+ if (Math.abs(detail - this.detail) > 0.02)
248
+ this.applyDetail(detail, 0.3);
249
+ // Overview latch with hysteresis so hovering near the zoom threshold can't
250
+ // flip the scene (and re-trigger the ambient bed) frame to frame.
251
+ if (this.overview) {
252
+ if (focus.zoom > OVERVIEW_EXIT)
253
+ this.overview = false;
254
+ }
255
+ else if (focus.zoom < OVERVIEW_ZOOM) {
256
+ this.overview = true;
257
+ }
258
+ const s = sceneFor(focus, this.overview);
259
+ if (s !== this.targetScene) {
260
+ this.targetScene = s;
261
+ this.crossfadeTo(s);
262
+ }
263
+ // The crowd/venue ambience follows the resolved scene, the live focus
264
+ // (occupancy, clock), and zoom every update.
265
+ this.crowd?.update(s, focus, this.detail, this.silent);
266
+ // Outdoor rain only when the sky is visible (overview or the street), so
267
+ // it reads as a real weather tell, not a smear behind indoor scenes.
268
+ const wantRain = focus.weather === "rain" && (s === "outside" || s === "overview") ? 0.13 : 0;
269
+ if (wantRain !== this.rainTarget && this.rain) {
270
+ this.rainTarget = wantRain;
271
+ this.rain.rainGain.gain.rampTo(wantRain, 1.5);
272
+ }
273
+ }
274
+ catch {
275
+ /* transient Tone/context error — recover on the next update */
276
+ }
277
+ }
278
+ /** Build (or rebuild) the looping part for the active program, clearing any
279
+ * prior part first so a switch never stacks two tracks. */
280
+ buildMusicPart() {
281
+ if (!this.arp || !this.bassVoice || !this.hook)
282
+ return;
283
+ // One guard over the whole rebuild: if construction throws, musicPart stays
284
+ // null (never stacked) and the crossfade still swells the gain back.
285
+ try {
286
+ this.musicPart?.stop();
287
+ this.musicPart?.dispose();
288
+ this.musicPart = null;
289
+ const prog = programFor(this.program);
290
+ const part = new Tone.Part((time, ev) => {
291
+ try {
292
+ if (this.silent)
293
+ return; // a stray Tone error must not stop the Transport
294
+ this.noteVoice(ev.voice)?.triggerAttackRelease(midiToFreq(ev.midi), ev.dur, time, ev.vel);
295
+ }
296
+ catch {
297
+ /* skip this note */
298
+ }
299
+ }, prog.events.map((e) => [e.t, e]));
300
+ part.loop = true;
301
+ part.loopEnd = prog.loopEnd;
302
+ part.start(0);
303
+ this.musicPart = part;
304
+ }
305
+ catch {
306
+ /* rebuild failed; leave the part null so a later setProgram can retry */
307
+ }
308
+ }
309
+ /** Resolve a track voice tag to its live synth (owner request: a switch). */
310
+ noteVoice(v) {
311
+ switch (v) {
312
+ case "arp":
313
+ return this.arp;
314
+ case "bass":
315
+ return this.bassVoice;
316
+ case "hook":
317
+ return this.hook;
318
+ case "thump":
319
+ return this.perc?.thump ?? null;
320
+ case "tap":
321
+ return this.perc?.tap ?? null;
322
+ }
323
+ }
324
+ crossfadeTo(s) {
325
+ this.scene = s;
326
+ this.applyScene(s, 1.2);
327
+ }
328
+ /** Move the ambient room-tone bed to a scene's character (music is not
329
+ * scene-driven; only the ambient life follows what you view). */
330
+ applyScene(s, time) {
331
+ if (!this.started)
332
+ return;
333
+ const def = SCENES[s];
334
+ if (this.ambFilter) {
335
+ this.ambFilter.type = def.amb.type;
336
+ this.ambFilter.frequency.rampTo(def.amb.freq, time);
337
+ this.ambFilter.Q.rampTo(def.amb.q, time);
338
+ }
339
+ this.ambBase = def.amb.gain;
340
+ this.updateAmbGain(time);
341
+ }
342
+ /** React to zoom: open the distance filter and scale ambient detail. */
343
+ applyDetail(detail, time) {
344
+ if (!this.started)
345
+ return;
346
+ this.detail = detail;
347
+ // Cap the top end below full-band so zoom-in brightens the mix without
348
+ // unmasking noise as high-frequency static.
349
+ if (this.bedFilter)
350
+ this.bedFilter.frequency.rampTo(lerp(650, 7500, detail), time);
351
+ this.updateAmbGain(time);
352
+ }
353
+ updateAmbGain(time) {
354
+ if (!this.ambGain)
355
+ return;
356
+ // Some room tone is always present; the rest fades in on zoom-in, kept modest
357
+ // so the bed stays background, never foreground hiss.
358
+ this.ambGain.gain.rampTo(this.ambBase * (0.2 + 0.4 * this.detail), time);
359
+ }
360
+ // ---- One-shot action jingles ------------------------------------------
361
+ sfx(name) {
362
+ if (!this.started || !this.sfxVoices || this.silent)
363
+ return;
364
+ // Cues run inside input handlers and the frame loop, so a Tone error here
365
+ // must never escape: a missed jingle beats a dead game.
366
+ try {
367
+ // A context that is not running (autoplay still blocked, a backgrounded
368
+ // tab) has a frozen clock: nothing would sound, and every cue would pile
369
+ // up on one start time. update() nudges it back to life each frame.
370
+ if (SILENT_CONTEXT_STATES.has(Tone.getContext().state))
371
+ return this.firstCue.hold(name);
372
+ playSfx(this.sfxVoices, name);
373
+ }
374
+ catch {
375
+ /* drop this cue; the next one schedules fresh */
376
+ }
377
+ }
378
+ sfxIfAny(name) {
379
+ if (name)
380
+ this.sfx(name);
381
+ }
382
+ dispose() {
383
+ // Tear the crowd layer down first (it owns its own timers), then stop the
384
+ // global Transport so no scheduled part keeps ticking after teardown.
385
+ this.crowd?.dispose();
386
+ this.crowd = null;
387
+ this.sleep.cancel();
388
+ try {
389
+ Tone.getTransport().stop();
390
+ }
391
+ catch {
392
+ /* transport already gone */
393
+ }
394
+ if (this.swapTimer !== null)
395
+ clearTimeout(this.swapTimer);
396
+ this.swapTimer = null;
397
+ try {
398
+ this.musicPart?.stop();
399
+ }
400
+ catch {
401
+ /* already stopped */
402
+ }
403
+ const nodes = [
404
+ this.musicPart,
405
+ this.arp,
406
+ this.bassVoice,
407
+ this.hook,
408
+ ...(this.perc ? Object.values(this.perc) : []),
409
+ this.musicGain,
410
+ this.musicTone,
411
+ this.musicSub,
412
+ ...(this.sfxVoices ? Object.values(this.sfxVoices) : []),
413
+ this.ambNoise,
414
+ this.ambFilter,
415
+ this.ambTone,
416
+ this.ambGain,
417
+ ...(this.rain ? Object.values(this.rain) : []),
418
+ this.bedFilter,
419
+ this.reverb,
420
+ this.musicBus,
421
+ this.ambBus,
422
+ this.ambDryBus,
423
+ this.sfxBus,
424
+ this.master,
425
+ ];
426
+ for (const n of nodes) {
427
+ try {
428
+ n?.dispose();
429
+ }
430
+ catch {
431
+ /* already disposed */
432
+ }
433
+ }
434
+ this.musicPart = null;
435
+ this.arp = this.hook = this.bassVoice = null;
436
+ this.perc = null;
437
+ this.sfxVoices = null;
438
+ this.ambNoise = null;
439
+ this.ambFilter = this.ambTone = this.bedFilter = null;
440
+ this.musicTone = this.musicSub = null;
441
+ this.rain = null;
442
+ this.ambGain = null;
443
+ this.musicGain = null;
444
+ this.reverb = null;
445
+ this.musicBus = this.ambBus = this.ambDryBus = this.sfxBus = null;
446
+ this.master = null;
447
+ this.started = false;
448
+ }
449
+ }
450
+
451
+ export { ToneAudioEngine };
452
+ //# sourceMappingURL=ToneAudioEngine.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ToneAudioEngine.js","sources":["../../src/audio/ToneAudioEngine.ts"],"sourcesContent":["import * as Tone from \"tone\";\nimport type { ViewFocus } from \"../render/excalibur/TowerEngine\";\nimport {\n SCENES,\n OVERVIEW_ZOOM,\n OVERVIEW_EXIT,\n sceneFor,\n detailFor,\n midiToFreq,\n clamp,\n lerp,\n type Scene,\n type SfxName,\n} from \"./toneScenes\";\nimport { createSfxVoices, playSfx, type SfxVoices } from \"./toneVoices\";\nimport { createPercussion, type PercVoices } from \"./tonePercussion\";\nimport { createRain, type RainVoices } from \"./toneRain\";\nimport { ContextSleep, usePlaybackContext } from \"./toneContext\";\nimport { programFor, type Program, type ProgramKind, type TrackVoice } from \"./toneTracks\";\nimport { CrowdLayer } from \"./toneCrowd\";\nimport type { LightMonoSynth, LightPolySynth } from \"./lightSynth\";\nimport { createMusicVoices } from \"./toneMusicVoices\";\nimport { createRoomTone } from \"./toneRoomTone\";\nimport { FirstCueLatch } from \"./firstCueLatch\";\n\n/** Audio context states with a stopped clock, where a cue cannot sound:\n * autoplay not yet allowed or the tab backgrounded (\"suspended\"), Safari's\n * phone-call pause (\"interrupted\"), and a torn-down context (\"closed\"). */\nconst SILENT_CONTEXT_STATES: ReadonlySet<string> = new Set([\"suspended\", \"interrupted\", \"closed\"]);\n/** How long the master fade into an away sleep plays before the clock stops. */\nconst SLEEP_AFTER_FADE_MS = 150;\n\ntype NoteVoice = { triggerAttackRelease: (f: number, d: number, t: number, v: number) => unknown };\n\n/**\n * Music + ambient audio for the tower, built on Tone.js.\n *\n * The music is two looping tracks transcribed from the owner's own recordings\n * (see `./toneTracks.ts`), played by a looping {@link Tone.Part} through bass,\n * pad, melody, and percussion voices; {@link setProgram} picks the track.\n *\n * Layered under it is the building's ambient life: a per-area \"room tone\" bed\n * (filtered noise), an outdoor rain layer, and the crowd/venue ambience layer\n * (see `./toneCrowd.ts`): voices, venue detail, and composed venue programs\n * driven by scene, zoom, live occupancy, and the sim clock. The music runs on\n * its own path so it stays warm at any zoom.\n *\n * Feature-detected and gesture-gated: with no AudioContext (tests / unsupported)\n * `start()` is a no-op and the engine stays inert. It carries the whole Tone.js\n * dependency (~230 kB), so the {@link AudioEngine} facade loads it lazily via a\n * dynamic `import()` on the first gesture.\n */\n\n// Re-export the jingle name vocabulary from its new home so existing importers\n// (the Audio facade, tests) keep resolving `SfxName` from this module.\nexport type { SfxName };\n\nexport class ToneAudioEngine {\n private master: Tone.Gain | null = null;\n /** Player-set music level: the composed tracks only. */\n private musicBus: Tone.Gain | null = null;\n /** Player-set ambience level: the crowd/venue layer, room tone, and rain,\n * so voices mix independently of the music (an owner request: turn the\n * music down and hear the crowd better). Two nodes because rain stays on\n * its deliberate dry path while the rest shares the reverb. */\n private ambBus: Tone.Gain | null = null;\n private ambDryBus: Tone.Gain | null = null;\n /** Player-set effects level: the one-shot action jingles only. */\n private sfxBus: Tone.Gain | null = null;\n /** Distance lowpass on the AMBIENT bed; opens up as you zoom in. The music\n * bypasses it (see the music chain) so the composed track stays consistent. */\n private bedFilter: Tone.Filter | null = null;\n private reverb: Tone.Reverb | null = null;\n\n // Composed-music voices + their own warm signal path.\n private arp: LightPolySynth | null = null;\n private bassVoice: LightMonoSynth | null = null;\n private hook: LightPolySynth | null = null;\n private perc: PercVoices | null = null; // heartbeat + taps; routing doc in tonePercussion\n private musicGain: Tone.Gain | null = null;\n /** Warm lowpass + sub high-pass on the music (never bright/harsh, no rumble). */\n private musicTone: Tone.Filter | null = null;\n private musicSub: Tone.Filter | null = null;\n /** The looping player for the active track. Rebuilt on a program change. */\n private musicPart: Tone.Part | null = null;\n /** Target level for the music bed; the crossfade dips to 0 and back to this. */\n private readonly musicLevel = 0.8;\n /** Pending track-swap during a crossfade, so a re-switch can cancel it. */\n private swapTimer: ReturnType<typeof setTimeout> | null = null;\n\n /** The jingle instrument set (recipes and construction in toneVoices.ts). */\n private sfxVoices: SfxVoices | null = null;\n /** The crowd/venue ambience layer (talkers, venue detail, venue programs). */\n private crowd: CrowdLayer | null = null;\n\n // Ambient beds.\n private ambNoise: Tone.Noise | null = null;\n private ambFilter: Tone.Filter | null = null;\n /** Fixed roll-off on the ambient bed so it never turns into bright hiss. */\n private ambTone: Tone.Filter | null = null;\n private ambGain: Tone.Gain | null = null;\n private rain: RainVoices | null = null; // outdoor rain bed; character doc in toneRain\n\n private scene: Scene = \"lobby\";\n private targetScene: Scene = \"lobby\";\n /** Hysteresis latch for the zoomed-out overview scene. */\n private overview = false;\n private ambBase = 0.2;\n private detail = 0.4;\n private rainTarget = 0;\n /** Which composed track plays. The app switches this at the splash boundary. */\n private program: ProgramKind = \"game\";\n muted = false;\n /** The player left the page (`watchAway`): silent, and asleep once faded. */\n private away = false;\n private readonly sleep = new ContextSleep();\n /** The latest focus `update` saw, so leaving can stop the crowd at once. */\n private focus: ViewFocus | null = null;\n /** Player-set levels 0..1, kept even while the graph isn't built so start()\n * can apply them; independent of `muted` (the master kill switch). */\n musicVolume = 1;\n ambienceVolume = 1;\n sfxVolume = 1;\n started = false;\n private readonly firstCue = new FirstCueLatch<SfxName>();\n\n /** Lazily create the audio graph. Must be called from a user gesture. */\n start(): void {\n if (this.started) {\n // Already built, but the context may have been suspended since. main.ts\n // calls start() on every gesture: re-attempt the resume (a no-op on a\n // running context, and it recovers a silenced one).\n void Tone.getContext().resume().catch(() => {});\n return;\n }\n const hasWebAudio =\n typeof (globalThis as { AudioContext?: unknown }).AudioContext !== \"undefined\" ||\n typeof (globalThis as { webkitAudioContext?: unknown }).webkitAudioContext !== \"undefined\";\n if (!hasWebAudio) return; // no WebAudio (tests / unsupported)\n try {\n usePlaybackContext(); // before any node is built\n // Inside a user gesture, so resuming is allowed. Swallow rejections\n // (autoplay/permission) so a blocked context can't surface as unhandled.\n // A cue fired before the unlock lands waits for it (`FirstCueLatch`).\n this.firstCue.begin();\n Tone.start().then(() => this.sfxIfAny(this.firstCue.release()), () => this.firstCue.release());\n\n this.master = new Tone.Gain(this.silent ? 0 : 0.35).toDestination();\n\n // Player volume buses: music, ambience (voices, room tone, rain), and\n // effects, each independently mixable. They sit ahead of the shared\n // reverb; the master keeps its fixed 0.35 and the mute ramp. Values are\n // squared (perceptual sliders).\n const sq = (v: number) => v * v;\n this.sfxBus = new Tone.Gain(sq(this.sfxVolume)).connect(this.master);\n\n // Shared reverb so the music and ambient life feel like rooms, not dry\n // oscillators.\n this.reverb = new Tone.Reverb({ decay: 2.4, wet: 0.16 }).connect(this.master);\n\n // Ambient bed's distance lowpass: far out = muffled, up close = present.\n this.ambBus = new Tone.Gain(sq(this.ambienceVolume)).connect(this.reverb);\n this.ambDryBus = new Tone.Gain(sq(this.ambienceVolume)).connect(this.master);\n this.bedFilter = new Tone.Filter({ type: \"lowpass\", frequency: 3000, Q: 0.7 }).connect(\n this.ambBus,\n );\n\n // Composed music path (bypasses the zoom distance filter): voices -> level\n // -> warm lowpass -> sub highpass -> music bus -> reverb. Kept warm and\n // band-limited so the loop never reads bright, harsh, or boomy.\n this.musicBus = new Tone.Gain(sq(this.musicVolume)).connect(this.reverb);\n this.musicSub = new Tone.Filter({ type: \"highpass\", frequency: 90, Q: 0.7 }).connect(this.musicBus);\n this.musicTone = new Tone.Filter({ type: \"lowpass\", frequency: 2400, Q: 0.7 }).connect(this.musicSub);\n this.musicGain = new Tone.Gain(this.musicLevel).connect(this.musicTone);\n\n // The melody voices (recipes in toneMusicVoices).\n ({ arp: this.arp, bass: this.bassVoice, hook: this.hook } = createMusicVoices(this.musicGain));\n\n this.perc = createPercussion(this.musicBus, this.musicLevel);\n\n // The crowd/venue ambience layer rides the distance-filtered bed so\n // zoom muffles and opens it with everything else. Its two voice seeds\n // fetch lazily and degrade to tone-only ambience if they never arrive.\n const base = (import.meta as { env?: { BASE_URL?: string } }).env?.BASE_URL ?? \"./\";\n this.crowd = new CrowdLayer(this.bedFilter, base);\n\n // Ambient room-tone bed (recipe in toneRoomTone).\n ({ ambGain: this.ambGain, ambTone: this.ambTone, ambFilter: this.ambFilter, ambNoise: this.ambNoise } =\n createRoomTone(this.bedFilter));\n\n // Outdoor rain layer (dry, off the distance filter; see toneRain).\n this.rain = createRain(this.ambDryBus);\n\n // One-shot action jingles (the human-voiced bloop and bell family plus\n // the legacy money synth; recipes and dry-bus rationale in toneVoices).\n this.sfxVoices = createSfxVoices(this.sfxBus);\n\n // Kick off the Transport (the looping music part and the venue programs\n // schedule on it).\n Tone.getTransport().start();\n this.buildMusicPart();\n\n this.started = true;\n if (this.away) this.sleep.sleepAfter(SLEEP_AFTER_FADE_MS); // left during the load\n this.applyScene(this.scene, 0.01);\n this.applyDetail(this.detail, 0.01);\n } catch {\n this.dispose();\n }\n }\n\n setMuted(m: boolean): void {\n this.muted = m;\n this.applySilence();\n }\n\n /** The player left the page or came back. A page in the background or out\n * of focus gets a starved, throttled main thread, so notes arrived late and\n * the mix crackled; away, everything fades out and the context sleeps. */\n setAway(away: boolean): void {\n if (away === this.away) return;\n this.away = away;\n // Hidden, the frame loop stops: stop the crowd's own timers now.\n if (away && this.focus) this.crowd?.update(this.targetScene, this.focus, this.detail, true);\n this.applySilence();\n }\n\n private get silent(): boolean {\n return this.muted || this.away;\n }\n\n /** Fade the master to match; sleep while away, wake once heard again. */\n private applySilence(): void {\n if (this.master) this.master.gain.rampTo(this.silent ? 0 : 0.35, 0.1);\n if (this.away && this.started) this.sleep.sleepAfter(SLEEP_AFTER_FADE_MS);\n else if (this.silent) this.sleep.cancel();\n else this.sleep.wake();\n }\n\n /** Player volume levels, 0..1 each (clamped, ramped). Safe before start().\n * A non-finite input keeps that channel's level (NaN survives clamp() and\n * the native AudioParam rejects non-finite ramp targets). */\n setVolumes(music: number, ambience: number, sfx: number): void {\n if (Number.isFinite(music)) this.musicVolume = clamp(music, 0, 1);\n if (Number.isFinite(ambience)) this.ambienceVolume = clamp(ambience, 0, 1);\n if (Number.isFinite(sfx)) this.sfxVolume = clamp(sfx, 0, 1);\n // Loudness is logarithmic: a linear gain slider feels dead over most of\n // its travel. Squaring the stored 0..1 makes half-slider audibly half.\n this.musicBus?.gain.rampTo(this.musicVolume * this.musicVolume, 0.08);\n this.ambBus?.gain.rampTo(this.ambienceVolume * this.ambienceVolume, 0.08);\n this.ambDryBus?.gain.rampTo(this.ambienceVolume * this.ambienceVolume, 0.08);\n this.sfxBus?.gain.rampTo(this.sfxVolume * this.sfxVolume, 0.08);\n }\n\n /** Choose which composed track plays: `\"splash\"` on the start screen,\n * `\"game\"` in the tower. Safe before start() (stored, applied on build).\n * Live, it CROSSFADES so the splash theme flows into the in-game bed instead\n * of cutting. A repeat of the current program is a no-op. */\n setProgram(program: ProgramKind): void {\n if (program === this.program) return;\n this.program = program;\n if (this.started) this.crossfadeProgram();\n }\n\n /** Dip to silence, swap the part at the bottom, swell back up; percGain rides the dip. */\n private crossfadeProgram(): void {\n if (!this.musicGain) return this.buildMusicPart();\n const FADE = 0.8;\n this.musicGain.gain.rampTo(0, FADE);\n this.perc?.percGain.gain.rampTo(0, FADE);\n if (this.swapTimer !== null) clearTimeout(this.swapTimer);\n this.swapTimer = setTimeout(() => {\n this.swapTimer = null;\n this.buildMusicPart();\n this.musicGain?.gain.rampTo(this.musicLevel, FADE);\n this.perc?.percGain.gain.rampTo(this.musicLevel, FADE);\n }, FADE * 1000);\n }\n\n /** Called every frame with the renderer's focus; drives the ambient life\n * (scene room-tone, zoom detail, rain). The music is program-driven, not\n * focus-driven, so it is untouched here. */\n update(focus: ViewFocus): void {\n if (!this.started) return;\n this.focus = focus;\n // Any Tone error here is swallowed and retried next frame, so an audio\n // hiccup never escapes into the game loop or leaves the graph half-updated.\n try {\n // A backgrounded/power-saving tab can suspend the context; nudge it back\n // on each update so sound returns instead of staying dead.\n const ctx = Tone.getContext();\n if (!this.silent && ctx.state === \"suspended\") void ctx.resume().catch(() => {});\n\n // Zoom detail: opens the distance filter and fades ambient detail in/out.\n const detail = detailFor(focus.zoom);\n if (Math.abs(detail - this.detail) > 0.02) this.applyDetail(detail, 0.3);\n\n // Overview latch with hysteresis so hovering near the zoom threshold can't\n // flip the scene (and re-trigger the ambient bed) frame to frame.\n if (this.overview) {\n if (focus.zoom > OVERVIEW_EXIT) this.overview = false;\n } else if (focus.zoom < OVERVIEW_ZOOM) {\n this.overview = true;\n }\n\n const s = sceneFor(focus, this.overview);\n if (s !== this.targetScene) {\n this.targetScene = s;\n this.crossfadeTo(s);\n }\n\n // The crowd/venue ambience follows the resolved scene, the live focus\n // (occupancy, clock), and zoom every update.\n this.crowd?.update(s, focus, this.detail, this.silent);\n\n // Outdoor rain only when the sky is visible (overview or the street), so\n // it reads as a real weather tell, not a smear behind indoor scenes.\n const wantRain = focus.weather === \"rain\" && (s === \"outside\" || s === \"overview\") ? 0.13 : 0;\n if (wantRain !== this.rainTarget && this.rain) {\n this.rainTarget = wantRain;\n this.rain.rainGain.gain.rampTo(wantRain, 1.5);\n }\n } catch {\n /* transient Tone/context error — recover on the next update */\n }\n }\n\n /** Build (or rebuild) the looping part for the active program, clearing any\n * prior part first so a switch never stacks two tracks. */\n private buildMusicPart(): void {\n if (!this.arp || !this.bassVoice || !this.hook) return;\n // One guard over the whole rebuild: if construction throws, musicPart stays\n // null (never stacked) and the crossfade still swells the gain back.\n try {\n this.musicPart?.stop();\n this.musicPart?.dispose();\n this.musicPart = null;\n const prog: Program = programFor(this.program);\n const part = new Tone.Part((time, ev) => {\n try {\n if (this.silent) return; // a stray Tone error must not stop the Transport\n this.noteVoice(ev.voice)?.triggerAttackRelease(midiToFreq(ev.midi), ev.dur, time, ev.vel);\n } catch {\n /* skip this note */\n }\n }, prog.events.map((e) => [e.t, e] as [number, typeof e]));\n part.loop = true;\n part.loopEnd = prog.loopEnd;\n part.start(0);\n this.musicPart = part;\n } catch {\n /* rebuild failed; leave the part null so a later setProgram can retry */\n }\n }\n\n /** Resolve a track voice tag to its live synth (owner request: a switch). */\n private noteVoice(v: TrackVoice): NoteVoice | null {\n switch (v) {\n case \"arp\":\n return this.arp;\n case \"bass\":\n return this.bassVoice;\n case \"hook\":\n return this.hook;\n case \"thump\":\n return this.perc?.thump ?? null;\n case \"tap\":\n return this.perc?.tap ?? null;\n }\n }\n\n private crossfadeTo(s: Scene): void {\n this.scene = s;\n this.applyScene(s, 1.2);\n }\n\n /** Move the ambient room-tone bed to a scene's character (music is not\n * scene-driven; only the ambient life follows what you view). */\n private applyScene(s: Scene, time: number): void {\n if (!this.started) return;\n const def = SCENES[s];\n if (this.ambFilter) {\n this.ambFilter.type = def.amb.type;\n this.ambFilter.frequency.rampTo(def.amb.freq, time);\n this.ambFilter.Q.rampTo(def.amb.q, time);\n }\n this.ambBase = def.amb.gain;\n this.updateAmbGain(time);\n }\n\n /** React to zoom: open the distance filter and scale ambient detail. */\n private applyDetail(detail: number, time: number): void {\n if (!this.started) return;\n this.detail = detail;\n // Cap the top end below full-band so zoom-in brightens the mix without\n // unmasking noise as high-frequency static.\n if (this.bedFilter) this.bedFilter.frequency.rampTo(lerp(650, 7500, detail), time);\n this.updateAmbGain(time);\n }\n\n private updateAmbGain(time: number): void {\n if (!this.ambGain) return;\n // Some room tone is always present; the rest fades in on zoom-in, kept modest\n // so the bed stays background, never foreground hiss.\n this.ambGain.gain.rampTo(this.ambBase * (0.2 + 0.4 * this.detail), time);\n }\n\n // ---- One-shot action jingles ------------------------------------------\n\n sfx(name: SfxName): void {\n if (!this.started || !this.sfxVoices || this.silent) return;\n // Cues run inside input handlers and the frame loop, so a Tone error here\n // must never escape: a missed jingle beats a dead game.\n try {\n // A context that is not running (autoplay still blocked, a backgrounded\n // tab) has a frozen clock: nothing would sound, and every cue would pile\n // up on one start time. update() nudges it back to life each frame.\n if (SILENT_CONTEXT_STATES.has(Tone.getContext().state)) return this.firstCue.hold(name);\n playSfx(this.sfxVoices, name);\n } catch {\n /* drop this cue; the next one schedules fresh */\n }\n }\n\n private sfxIfAny(name: SfxName | null): void {\n if (name) this.sfx(name);\n }\n\n dispose(): void {\n // Tear the crowd layer down first (it owns its own timers), then stop the\n // global Transport so no scheduled part keeps ticking after teardown.\n this.crowd?.dispose();\n this.crowd = null;\n this.sleep.cancel();\n try {\n Tone.getTransport().stop();\n } catch {\n /* transport already gone */\n }\n if (this.swapTimer !== null) clearTimeout(this.swapTimer);\n this.swapTimer = null;\n try {\n this.musicPart?.stop();\n } catch {\n /* already stopped */\n }\n const nodes = [\n this.musicPart,\n this.arp,\n this.bassVoice,\n this.hook,\n ...(this.perc ? Object.values(this.perc) : []),\n this.musicGain,\n this.musicTone,\n this.musicSub,\n ...(this.sfxVoices ? Object.values(this.sfxVoices) : []),\n this.ambNoise,\n this.ambFilter,\n this.ambTone,\n this.ambGain,\n ...(this.rain ? Object.values(this.rain) : []),\n this.bedFilter,\n this.reverb,\n this.musicBus,\n this.ambBus,\n this.ambDryBus,\n this.sfxBus,\n this.master,\n ];\n for (const n of nodes) {\n try {\n n?.dispose();\n } catch {\n /* already disposed */\n }\n }\n this.musicPart = null;\n this.arp = this.hook = this.bassVoice = null;\n this.perc = null;\n this.sfxVoices = null;\n this.ambNoise = null;\n this.ambFilter = this.ambTone = this.bedFilter = null;\n this.musicTone = this.musicSub = null;\n this.rain = null;\n this.ambGain = null;\n this.musicGain = null;\n this.reverb = null;\n this.musicBus = this.ambBus = this.ambDryBus = this.sfxBus = null;\n this.master = null;\n this.started = false;\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;AAyBA;;AAE4E;AAC5E,MAAM,qBAAqB,GAAwB,IAAI,GAAG,CAAC,CAAC,WAAW,EAAE,aAAa,EAAE,QAAQ,CAAC,CAAC;AAClG;AACA,MAAM,mBAAmB,GAAG,GAAG;MA2BlB,eAAe,CAAA;AAA5B,IAAA,WAAA,GAAA;QACU,IAAA,CAAA,MAAM,GAAqB,IAAI;;QAE/B,IAAA,CAAA,QAAQ,GAAqB,IAAI;AACzC;;;AAGgE;QACxD,IAAA,CAAA,MAAM,GAAqB,IAAI;QAC/B,IAAA,CAAA,SAAS,GAAqB,IAAI;;QAElC,IAAA,CAAA,MAAM,GAAqB,IAAI;AACvC;AACgF;QACxE,IAAA,CAAA,SAAS,GAAuB,IAAI;QACpC,IAAA,CAAA,MAAM,GAAuB,IAAI;;QAGjC,IAAA,CAAA,GAAG,GAA0B,IAAI;QACjC,IAAA,CAAA,SAAS,GAA0B,IAAI;QACvC,IAAA,CAAA,IAAI,GAA0B,IAAI;AAClC,QAAA,IAAA,CAAA,IAAI,GAAsB,IAAI,CAAC;QAC/B,IAAA,CAAA,SAAS,GAAqB,IAAI;;QAElC,IAAA,CAAA,SAAS,GAAuB,IAAI;QACpC,IAAA,CAAA,QAAQ,GAAuB,IAAI;;QAEnC,IAAA,CAAA,SAAS,GAAqB,IAAI;;QAEzB,IAAA,CAAA,UAAU,GAAG,GAAG;;QAEzB,IAAA,CAAA,SAAS,GAAyC,IAAI;;QAGtD,IAAA,CAAA,SAAS,GAAqB,IAAI;;QAElC,IAAA,CAAA,KAAK,GAAsB,IAAI;;QAG/B,IAAA,CAAA,QAAQ,GAAsB,IAAI;QAClC,IAAA,CAAA,SAAS,GAAuB,IAAI;;QAEpC,IAAA,CAAA,OAAO,GAAuB,IAAI;QAClC,IA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,YAAA,IAAI;gBACF,CAAC,EAAE,OAAO,EAAE;YACd;AAAE,YAAA,MAAM;;YAER;QACF;AACA,QAAA,IAAI,CAAC,SAAS,GAAG,IAAI;AACrB,QAAA,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,SAAS,GAAG,IAAI;AAC5C,QAAA,IAAI,CAAC,IAAI,GAAG,IAAI;AAChB,QAAA,IAAI,CAAC,SAAS,GAAG,IAAI;AACrB,QAAA,IAAI,CAAC,QAAQ,GAAG,IAAI;AACpB,QAAA,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,SAAS,GAAG,IAAI;QACrD,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,QAAQ,GAAG,IAAI;AACrC,QAAA,IAAI,CAAC,IAAI,GAAG,IAAI;AAChB,QAAA,IAAI,CAAC,OAAO,GAAG,IAAI;AACnB,QAAA,IAAI,CAAC,SAAS,GAAG,IAAI;AACrB,QAAA,IAAI,CAAC,MAAM,GAAG,IAAI;AAClB,QAAA,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,MAAM,GAAG,IAAI;AACjE,QAAA,IAAI,CAAC,MAAM,GAAG,IAAI;AAClB,QAAA,IAAI,CAAC,OAAO,GAAG,KAAK;IACtB;AACD;;"}
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Every file the audio layer fetches at run time, as paths under the site base.
3
+ *
4
+ * Today's sounds are synthesized by Tone.js inside one lazy chunk (the
5
+ * `ToneAudioEngine` chunk, see Audio.ts), except the crowd's two voice seeds,
6
+ * which are recordings. An installed game must play all of them offline
7
+ * (#985), so each file here has to be in the service worker's precache:
8
+ * scripts/verify-precache.ts fails the build when one is missing from the
9
+ * manifest, audioAssets.test.ts fails when src/public/audio/ holds a file this
10
+ * list lacks, and audioFetches.test.ts fails when the engine loads one it lacks.
11
+ *
12
+ * Keep this file ERASABLE (type-only TypeScript syntax, no enums or
13
+ * namespaces; the rule is spelled out in scripts/screenshot-env.ts):
14
+ * verify-precache.ts imports it under plain `node`, which strips types.
15
+ */
16
+ /** The crowd's talk seed (the owner's own voice, see ASSETS-LICENSE.md). */
17
+ export declare const VOICE_TALK_SEED = "audio/voice-talk.mp3";
18
+ /** The crowd's laugh seed. */
19
+ export declare const VOICE_LAUGHS_SEED = "audio/voice-laughs.mp3";
20
+ /** The audio files fetched at run time. Add a new one here in the same change
21
+ * that loads it. */
22
+ export declare const AUDIO_RUNTIME_FILES: readonly string[];
23
+ /** The built name of the lazy chunk that carries Tone.js and every
24
+ * synthesized sound (Vite names it after ToneAudioEngine.ts). */
25
+ export declare const AUDIO_ENGINE_CHUNK: RegExp;
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Every file the audio layer fetches at run time, as paths under the site base.
3
+ *
4
+ * Today's sounds are synthesized by Tone.js inside one lazy chunk (the
5
+ * `ToneAudioEngine` chunk, see Audio.ts), except the crowd's two voice seeds,
6
+ * which are recordings. An installed game must play all of them offline
7
+ * (#985), so each file here has to be in the service worker's precache:
8
+ * scripts/verify-precache.ts fails the build when one is missing from the
9
+ * manifest, audioAssets.test.ts fails when src/public/audio/ holds a file this
10
+ * list lacks, and audioFetches.test.ts fails when the engine loads one it lacks.
11
+ *
12
+ * Keep this file ERASABLE (type-only TypeScript syntax, no enums or
13
+ * namespaces; the rule is spelled out in scripts/screenshot-env.ts):
14
+ * verify-precache.ts imports it under plain `node`, which strips types.
15
+ */
16
+ /** The crowd's talk seed (the owner's own voice, see ASSETS-LICENSE.md). */
17
+ const VOICE_TALK_SEED = "audio/voice-talk.mp3";
18
+ /** The crowd's laugh seed. */
19
+ const VOICE_LAUGHS_SEED = "audio/voice-laughs.mp3";
20
+ /** The audio files fetched at run time. Add a new one here in the same change
21
+ * that loads it. */
22
+ const AUDIO_RUNTIME_FILES = [VOICE_TALK_SEED, VOICE_LAUGHS_SEED];
23
+ /** The built name of the lazy chunk that carries Tone.js and every
24
+ * synthesized sound (Vite names it after ToneAudioEngine.ts). */
25
+ const AUDIO_ENGINE_CHUNK = /(^|\/)ToneAudioEngine-[^/]+\.js$/;
26
+
27
+ export { AUDIO_ENGINE_CHUNK, AUDIO_RUNTIME_FILES, VOICE_LAUGHS_SEED, VOICE_TALK_SEED };
28
+ //# sourceMappingURL=audioAssets.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"audioAssets.js","sources":["../../src/audio/audioAssets.ts"],"sourcesContent":["/**\n * Every file the audio layer fetches at run time, as paths under the site base.\n *\n * Today's sounds are synthesized by Tone.js inside one lazy chunk (the\n * `ToneAudioEngine` chunk, see Audio.ts), except the crowd's two voice seeds,\n * which are recordings. An installed game must play all of them offline\n * (#985), so each file here has to be in the service worker's precache:\n * scripts/verify-precache.ts fails the build when one is missing from the\n * manifest, audioAssets.test.ts fails when src/public/audio/ holds a file this\n * list lacks, and audioFetches.test.ts fails when the engine loads one it lacks.\n *\n * Keep this file ERASABLE (type-only TypeScript syntax, no enums or\n * namespaces; the rule is spelled out in scripts/screenshot-env.ts):\n * verify-precache.ts imports it under plain `node`, which strips types.\n */\n\n/** The crowd's talk seed (the owner's own voice, see ASSETS-LICENSE.md). */\nexport const VOICE_TALK_SEED = \"audio/voice-talk.mp3\";\n/** The crowd's laugh seed. */\nexport const VOICE_LAUGHS_SEED = \"audio/voice-laughs.mp3\";\n\n/** The audio files fetched at run time. Add a new one here in the same change\n * that loads it. */\nexport const AUDIO_RUNTIME_FILES: readonly string[] = [VOICE_TALK_SEED, VOICE_LAUGHS_SEED];\n\n/** The built name of the lazy chunk that carries Tone.js and every\n * synthesized sound (Vite names it after ToneAudioEngine.ts). */\nexport const AUDIO_ENGINE_CHUNK = /(^|\\/)ToneAudioEngine-[^/]+\\.js$/;\n"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;AAcG;AAEH;AACO,MAAM,eAAe,GAAG;AAC/B;AACO,MAAM,iBAAiB,GAAG;AAEjC;AACqB;MACR,mBAAmB,GAAsB,CAAC,eAAe,EAAE,iBAAiB;AAEzF;AACkE;AAC3D,MAAM,kBAAkB,GAAG;;"}
@@ -0,0 +1,17 @@
1
+ /** The page the watch reads: its window's focus events and its document. */
2
+ export interface AwayWatchTarget {
3
+ readonly win: Pick<Window, "addEventListener" | "removeEventListener">;
4
+ readonly doc: Pick<Document, "addEventListener" | "removeEventListener" | "hasFocus"> & {
5
+ readonly visibilityState: DocumentVisibilityState;
6
+ };
7
+ }
8
+ /**
9
+ * Report when the player leaves the game and when they come back. They are
10
+ * away while the tab is hidden (another tab, a minimized window, a phone app
11
+ * in the background) or while the page has lost focus (another app or window
12
+ * in front of an installed app or a visible tab).
13
+ *
14
+ * `onChange` hears the state at once and then each time it flips. Returns a
15
+ * function that stops the watch.
16
+ */
17
+ export declare function watchAway(target: AwayWatchTarget, onChange: (away: boolean) => void): () => void;
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Report when the player leaves the game and when they come back. They are
3
+ * away while the tab is hidden (another tab, a minimized window, a phone app
4
+ * in the background) or while the page has lost focus (another app or window
5
+ * in front of an installed app or a visible tab).
6
+ *
7
+ * `onChange` hears the state at once and then each time it flips. Returns a
8
+ * function that stops the watch.
9
+ */
10
+ function watchAway(target, onChange) {
11
+ const { win, doc } = target;
12
+ const isAway = () => doc.visibilityState !== "visible" || !doc.hasFocus();
13
+ let away = isAway();
14
+ onChange(away);
15
+ const check = () => {
16
+ const now = isAway();
17
+ if (now === away)
18
+ return;
19
+ away = now;
20
+ onChange(away);
21
+ };
22
+ win.addEventListener("blur", check);
23
+ win.addEventListener("focus", check);
24
+ doc.addEventListener("visibilitychange", check);
25
+ return () => {
26
+ win.removeEventListener("blur", check);
27
+ win.removeEventListener("focus", check);
28
+ doc.removeEventListener("visibilitychange", check);
29
+ };
30
+ }
31
+
32
+ export { watchAway };
33
+ //# sourceMappingURL=awayWatch.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"awayWatch.js","sources":["../../src/audio/awayWatch.ts"],"sourcesContent":["/** The page the watch reads: its window's focus events and its document. */\nexport interface AwayWatchTarget {\n readonly win: Pick<Window, \"addEventListener\" | \"removeEventListener\">;\n readonly doc: Pick<Document, \"addEventListener\" | \"removeEventListener\" | \"hasFocus\"> & {\n readonly visibilityState: DocumentVisibilityState;\n };\n}\n\n/**\n * Report when the player leaves the game and when they come back. They are\n * away while the tab is hidden (another tab, a minimized window, a phone app\n * in the background) or while the page has lost focus (another app or window\n * in front of an installed app or a visible tab).\n *\n * `onChange` hears the state at once and then each time it flips. Returns a\n * function that stops the watch.\n */\nexport function watchAway(target: AwayWatchTarget, onChange: (away: boolean) => void): () => void {\n const { win, doc } = target;\n const isAway = (): boolean => doc.visibilityState !== \"visible\" || !doc.hasFocus();\n let away = isAway();\n onChange(away);\n const check = (): void => {\n const now = isAway();\n if (now === away) return;\n away = now;\n onChange(away);\n };\n win.addEventListener(\"blur\", check);\n win.addEventListener(\"focus\", check);\n doc.addEventListener(\"visibilitychange\", check);\n return () => {\n win.removeEventListener(\"blur\", check);\n win.removeEventListener(\"focus\", check);\n doc.removeEventListener(\"visibilitychange\", check);\n };\n}\n"],"names":[],"mappings":"AAQA;;;;;;;;AAQG;AACG,SAAU,SAAS,CAAC,MAAuB,EAAE,QAAiC,EAAA;AAClF,IAAA,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,MAAM;AAC3B,IAAA,MAAM,MAAM,GAAG,MAAe,GAAG,CAAC,eAAe,KAAK,SAAS,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE;AAClF,IAAA,IAAI,IAAI,GAAG,MAAM,EAAE;IACnB,QAAQ,CAAC,IAAI,CAAC;IACd,MAAM,KAAK,GAAG,MAAW;AACvB,QAAA,MAAM,GAAG,GAAG,MAAM,EAAE;QACpB,IAAI,GAAG,KAAK,IAAI;YAAE;QAClB,IAAI,GAAG,GAAG;QACV,QAAQ,CAAC,IAAI,CAAC;AAChB,IAAA,CAAC;AACD,IAAA,GAAG,CAAC,gBAAgB,CAAC,MAAM,EAAE,KAAK,CAAC;AACnC,IAAA,GAAG,CAAC,gBAAgB,CAAC,OAAO,EAAE,KAAK,CAAC;AACpC,IAAA,GAAG,CAAC,gBAAgB,CAAC,kBAAkB,EAAE,KAAK,CAAC;AAC/C,IAAA,OAAO,MAAK;AACV,QAAA,GAAG,CAAC,mBAAmB,CAAC,MAAM,EAAE,KAAK,CAAC;AACtC,QAAA,GAAG,CAAC,mBAAmB,CAAC,OAAO,EAAE,KAAK,CAAC;AACvC,QAAA,GAAG,CAAC,mBAAmB,CAAC,kBAAkB,EAAE,KAAK,CAAC;AACpD,IAAA,CAAC;AACH;;"}