@verticopolis/components 0.0.0-stage → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (791) hide show
  1. package/ASSETS-LICENSE.md +49 -0
  2. package/LICENSE +21 -0
  3. package/README.md +121 -2
  4. package/lib/audio/Audio.d.ts +110 -0
  5. package/lib/audio/Audio.js +199 -0
  6. package/lib/audio/Audio.js.map +1 -0
  7. package/lib/audio/ToneAudioEngine.d.ts +125 -0
  8. package/lib/audio/ToneAudioEngine.js +452 -0
  9. package/lib/audio/ToneAudioEngine.js.map +1 -0
  10. package/lib/audio/audioAssets.d.ts +25 -0
  11. package/lib/audio/audioAssets.js +28 -0
  12. package/lib/audio/audioAssets.js.map +1 -0
  13. package/lib/audio/awayWatch.d.ts +17 -0
  14. package/lib/audio/awayWatch.js +33 -0
  15. package/lib/audio/awayWatch.js.map +1 -0
  16. package/lib/audio/firstCueLatch.d.ts +18 -0
  17. package/lib/audio/firstCueLatch.js +34 -0
  18. package/lib/audio/firstCueLatch.js.map +1 -0
  19. package/lib/audio/lightEnvelope.d.ts +64 -0
  20. package/lib/audio/lightEnvelope.js +124 -0
  21. package/lib/audio/lightEnvelope.js.map +1 -0
  22. package/lib/audio/lightSynth.d.ts +125 -0
  23. package/lib/audio/lightSynth.js +203 -0
  24. package/lib/audio/lightSynth.js.map +1 -0
  25. package/lib/audio/toneContext.d.ts +30 -0
  26. package/lib/audio/toneContext.js +79 -0
  27. package/lib/audio/toneContext.js.map +1 -0
  28. package/lib/audio/toneCrowd.d.ts +62 -0
  29. package/lib/audio/toneCrowd.js +429 -0
  30. package/lib/audio/toneCrowd.js.map +1 -0
  31. package/lib/audio/toneCrowdData.d.ts +144 -0
  32. package/lib/audio/toneCrowdData.js +317 -0
  33. package/lib/audio/toneCrowdData.js.map +1 -0
  34. package/lib/audio/toneCrowdPrograms.d.ts +71 -0
  35. package/lib/audio/toneCrowdPrograms.js +273 -0
  36. package/lib/audio/toneCrowdPrograms.js.map +1 -0
  37. package/lib/audio/toneCrowdVoices.d.ts +49 -0
  38. package/lib/audio/toneCrowdVoices.js +212 -0
  39. package/lib/audio/toneCrowdVoices.js.map +1 -0
  40. package/lib/audio/toneMusicVoices.d.ts +11 -0
  41. package/lib/audio/toneMusicVoices.js +31 -0
  42. package/lib/audio/toneMusicVoices.js.map +1 -0
  43. package/lib/audio/tonePercussion.d.ts +45 -0
  44. package/lib/audio/tonePercussion.js +97 -0
  45. package/lib/audio/tonePercussion.js.map +1 -0
  46. package/lib/audio/toneRain.d.ts +23 -0
  47. package/lib/audio/toneRain.js +39 -0
  48. package/lib/audio/toneRain.js.map +1 -0
  49. package/lib/audio/toneRecordingMock.d.ts +89 -0
  50. package/lib/audio/toneRecordingMock.js +145 -0
  51. package/lib/audio/toneRecordingMock.js.map +1 -0
  52. package/lib/audio/toneRoomTone.d.ts +11 -0
  53. package/lib/audio/toneRoomTone.js +27 -0
  54. package/lib/audio/toneRoomTone.js.map +1 -0
  55. package/lib/audio/toneScenes.d.ts +57 -0
  56. package/lib/audio/toneScenes.js +208 -0
  57. package/lib/audio/toneScenes.js.map +1 -0
  58. package/lib/audio/toneTracks.d.ts +50 -0
  59. package/lib/audio/toneTracks.js +356 -0
  60. package/lib/audio/toneTracks.js.map +1 -0
  61. package/lib/audio/toneVoices.d.ts +57 -0
  62. package/lib/audio/toneVoices.js +208 -0
  63. package/lib/audio/toneVoices.js.map +1 -0
  64. package/lib/catalog/catalogTypes.d.ts +428 -0
  65. package/lib/catalog/catalogTypes.js +102 -0
  66. package/lib/catalog/catalogTypes.js.map +1 -0
  67. package/lib/catalog/skyBridgeTypes.d.ts +25 -0
  68. package/lib/catalog/skyBridgeTypes.js +7 -0
  69. package/lib/catalog/skyBridgeTypes.js.map +1 -0
  70. package/lib/catalog/starDutyTypes.d.ts +22 -0
  71. package/lib/catalog/starDutyTypes.js +7 -0
  72. package/lib/catalog/starDutyTypes.js.map +1 -0
  73. package/lib/catalog/towerCatalog.d.ts +32 -0
  74. package/lib/catalog/towerCatalog.js +44 -0
  75. package/lib/catalog/towerCatalog.js.map +1 -0
  76. package/lib/engineBinding/binding.d.ts +36 -0
  77. package/lib/engineBinding/binding.js +90 -0
  78. package/lib/engineBinding/binding.js.map +1 -0
  79. package/lib/engineBinding/catalog.d.ts +24 -0
  80. package/lib/engineBinding/catalog.js +267 -0
  81. package/lib/engineBinding/catalog.js.map +1 -0
  82. package/lib/engineBinding/engine.d.ts +866 -0
  83. package/lib/engineBinding/exportTiers.d.ts +289 -0
  84. package/lib/engineBinding/exportTiers.js +283 -0
  85. package/lib/engineBinding/exportTiers.js.map +1 -0
  86. package/lib/engineBinding/toolingMethods.d.ts +12 -0
  87. package/lib/engineBinding/toolingMethods.js +20 -0
  88. package/lib/engineBinding/toolingMethods.js.map +1 -0
  89. package/lib/events/gameplayCatalog.d.ts +57 -0
  90. package/lib/events/gameplayCatalog.js +214 -0
  91. package/lib/events/gameplayCatalog.js.map +1 -0
  92. package/lib/events/gameplayEventRules.d.ts +4 -0
  93. package/lib/events/gameplayEventRules.js +32 -0
  94. package/lib/events/gameplayEventRules.js.map +1 -0
  95. package/lib/events/gameplayEvents.d.ts +284 -0
  96. package/lib/presentation/clockText.d.ts +28 -0
  97. package/lib/presentation/clockText.js +38 -0
  98. package/lib/presentation/clockText.js.map +1 -0
  99. package/lib/presentation/facilityPresentation.d.ts +20 -0
  100. package/lib/presentation/facilityPresentation.js +164 -0
  101. package/lib/presentation/facilityPresentation.js.map +1 -0
  102. package/lib/presentation/statsCopy.d.ts +20 -0
  103. package/lib/presentation/statsCopy.js +37 -0
  104. package/lib/presentation/statsCopy.js.map +1 -0
  105. package/lib/presentation/traffic.d.ts +75 -0
  106. package/lib/presentation/traffic.js +79 -0
  107. package/lib/presentation/traffic.js.map +1 -0
  108. package/lib/presentation/viewKinds.d.ts +33 -0
  109. package/lib/presentation/viewKinds.js +88 -0
  110. package/lib/presentation/viewKinds.js.map +1 -0
  111. package/lib/presentation/viewWorld.d.ts +29 -0
  112. package/lib/presentation/viewWorld.js +31 -0
  113. package/lib/presentation/viewWorld.js.map +1 -0
  114. package/lib/render/atlas/archive.d.ts +78 -0
  115. package/lib/render/atlas/archive.js +427 -0
  116. package/lib/render/atlas/archive.js.map +1 -0
  117. package/lib/render/atlas/bake.d.ts +132 -0
  118. package/lib/render/atlas/bake.js +331 -0
  119. package/lib/render/atlas/bake.js.map +1 -0
  120. package/lib/render/atlas/bakeAdditions.d.ts +24 -0
  121. package/lib/render/atlas/bakeAdditions.js +46 -0
  122. package/lib/render/atlas/bakeAdditions.js.map +1 -0
  123. package/lib/render/atlas/browserEntry.d.ts +12 -0
  124. package/lib/render/atlas/browserEntry.js +222 -0
  125. package/lib/render/atlas/browserEntry.js.map +1 -0
  126. package/lib/render/atlas/catalog.d.ts +118 -0
  127. package/lib/render/atlas/catalog.js +253 -0
  128. package/lib/render/atlas/catalog.js.map +1 -0
  129. package/lib/render/atlas/catalogExtras.d.ts +45 -0
  130. package/lib/render/atlas/catalogExtras.js +217 -0
  131. package/lib/render/atlas/catalogExtras.js.map +1 -0
  132. package/lib/render/atlas/compose.d.ts +30 -0
  133. package/lib/render/atlas/compose.js +125 -0
  134. package/lib/render/atlas/compose.js.map +1 -0
  135. package/lib/render/atlas/cycles.d.ts +25 -0
  136. package/lib/render/atlas/cycles.js +41 -0
  137. package/lib/render/atlas/cycles.js.map +1 -0
  138. package/lib/render/atlas/lookup.d.ts +65 -0
  139. package/lib/render/atlas/lookup.js +83 -0
  140. package/lib/render/atlas/lookup.js.map +1 -0
  141. package/lib/render/atlas/pack.d.ts +23 -0
  142. package/lib/render/atlas/pack.js +50 -0
  143. package/lib/render/atlas/pack.js.map +1 -0
  144. package/lib/render/atlas/paint.d.ts +120 -0
  145. package/lib/render/atlas/paint.js +154 -0
  146. package/lib/render/atlas/paint.js.map +1 -0
  147. package/lib/render/atlas/pixels.d.ts +46 -0
  148. package/lib/render/atlas/pixels.js +158 -0
  149. package/lib/render/atlas/pixels.js.map +1 -0
  150. package/lib/render/atlas/png.d.ts +3 -0
  151. package/lib/render/atlas/png.js +102 -0
  152. package/lib/render/atlas/png.js.map +1 -0
  153. package/lib/render/atlas/raster.d.ts +34 -0
  154. package/lib/render/atlas/raster.js +114 -0
  155. package/lib/render/atlas/raster.js.map +1 -0
  156. package/lib/render/atlas/recyclingFill.d.ts +5 -0
  157. package/lib/render/atlas/recyclingFill.js +65 -0
  158. package/lib/render/atlas/recyclingFill.js.map +1 -0
  159. package/lib/render/atlas/samples.d.ts +24 -0
  160. package/lib/render/atlas/samples.js +75 -0
  161. package/lib/render/atlas/samples.js.map +1 -0
  162. package/lib/render/atlas/scenery.d.ts +230 -0
  163. package/lib/render/atlas/scenery.js +242 -0
  164. package/lib/render/atlas/scenery.js.map +1 -0
  165. package/lib/render/atlas/schema.d.ts +189 -0
  166. package/lib/render/atlas/schema.js +31 -0
  167. package/lib/render/atlas/schema.js.map +1 -0
  168. package/lib/render/atlas/shellMarks.d.ts +16 -0
  169. package/lib/render/atlas/shellMarks.js +72 -0
  170. package/lib/render/atlas/shellMarks.js.map +1 -0
  171. package/lib/render/atlas/store.d.ts +75 -0
  172. package/lib/render/atlas/store.js +127 -0
  173. package/lib/render/atlas/store.js.map +1 -0
  174. package/lib/render/atlas/verify.d.ts +43 -0
  175. package/lib/render/atlas/verify.js +87 -0
  176. package/lib/render/atlas/verify.js.map +1 -0
  177. package/lib/render/atlas/verifyExtras.d.ts +19 -0
  178. package/lib/render/atlas/verifyExtras.js +310 -0
  179. package/lib/render/atlas/verifyExtras.js.map +1 -0
  180. package/lib/render/cameraBounds.d.ts +71 -0
  181. package/lib/render/cameraBounds.js +107 -0
  182. package/lib/render/cameraBounds.js.map +1 -0
  183. package/lib/render/carIndicator.d.ts +41 -0
  184. package/lib/render/carIndicator.js +45 -0
  185. package/lib/render/carIndicator.js.map +1 -0
  186. package/lib/render/carMotion.d.ts +33 -0
  187. package/lib/render/carMotion.js +42 -0
  188. package/lib/render/carMotion.js.map +1 -0
  189. package/lib/render/catalogScale.d.ts +40 -0
  190. package/lib/render/catalogScale.js +33 -0
  191. package/lib/render/catalogScale.js.map +1 -0
  192. package/lib/render/climbPath.d.ts +59 -0
  193. package/lib/render/climbPath.js +115 -0
  194. package/lib/render/climbPath.js.map +1 -0
  195. package/lib/render/depthPlanes.d.ts +55 -0
  196. package/lib/render/depthPlanes.js +58 -0
  197. package/lib/render/depthPlanes.js.map +1 -0
  198. package/lib/render/excalibur/TowerEngine.d.ts +348 -0
  199. package/lib/render/excalibur/TowerEngine.js +415 -0
  200. package/lib/render/excalibur/TowerEngine.js.map +1 -0
  201. package/lib/render/excalibur/cabGraphics.d.ts +75 -0
  202. package/lib/render/excalibur/cabGraphics.js +108 -0
  203. package/lib/render/excalibur/cabGraphics.js.map +1 -0
  204. package/lib/render/excalibur/cabParts.d.ts +32 -0
  205. package/lib/render/excalibur/cabParts.js +79 -0
  206. package/lib/render/excalibur/cabParts.js.map +1 -0
  207. package/lib/render/excalibur/cabRiders.d.ts +72 -0
  208. package/lib/render/excalibur/cabRiders.js +176 -0
  209. package/lib/render/excalibur/cabRiders.js.map +1 -0
  210. package/lib/render/excalibur/crowdCull.d.ts +34 -0
  211. package/lib/render/excalibur/crowdCull.js +72 -0
  212. package/lib/render/excalibur/crowdCull.js.map +1 -0
  213. package/lib/render/excalibur/crowdFigure.d.ts +42 -0
  214. package/lib/render/excalibur/crowdFigure.js +99 -0
  215. package/lib/render/excalibur/crowdFigure.js.map +1 -0
  216. package/lib/render/excalibur/crowdLook.d.ts +137 -0
  217. package/lib/render/excalibur/crowdLook.js +186 -0
  218. package/lib/render/excalibur/crowdLook.js.map +1 -0
  219. package/lib/render/excalibur/frameHold.d.ts +23 -0
  220. package/lib/render/excalibur/frameHold.js +30 -0
  221. package/lib/render/excalibur/frameHold.js.map +1 -0
  222. package/lib/render/excalibur/guardPosition.d.ts +17 -0
  223. package/lib/render/excalibur/guardPosition.js +37 -0
  224. package/lib/render/excalibur/guardPosition.js.map +1 -0
  225. package/lib/render/excalibur/keyboardHost.d.ts +15 -0
  226. package/lib/render/excalibur/keyboardHost.js +22 -0
  227. package/lib/render/excalibur/keyboardHost.js.map +1 -0
  228. package/lib/render/excalibur/longPress.d.ts +16 -0
  229. package/lib/render/excalibur/longPress.js +71 -0
  230. package/lib/render/excalibur/longPress.js.map +1 -0
  231. package/lib/render/excalibur/peopleGfx.d.ts +16 -0
  232. package/lib/render/excalibur/peopleGfx.js +46 -0
  233. package/lib/render/excalibur/peopleGfx.js.map +1 -0
  234. package/lib/render/excalibur/peopleWindow.d.ts +35 -0
  235. package/lib/render/excalibur/peopleWindow.js +38 -0
  236. package/lib/render/excalibur/peopleWindow.js.map +1 -0
  237. package/lib/render/excalibur/personFocus.d.ts +36 -0
  238. package/lib/render/excalibur/personFocus.js +169 -0
  239. package/lib/render/excalibur/personFocus.js.map +1 -0
  240. package/lib/render/excalibur/pointerButtonGuard.d.ts +35 -0
  241. package/lib/render/excalibur/pointerButtonGuard.js +86 -0
  242. package/lib/render/excalibur/pointerButtonGuard.js.map +1 -0
  243. package/lib/render/excalibur/pressLifecycle.d.ts +26 -0
  244. package/lib/render/excalibur/pressLifecycle.js +66 -0
  245. package/lib/render/excalibur/pressLifecycle.js.map +1 -0
  246. package/lib/render/excalibur/rainShelter.d.ts +16 -0
  247. package/lib/render/excalibur/rainShelter.js +94 -0
  248. package/lib/render/excalibur/rainShelter.js.map +1 -0
  249. package/lib/render/excalibur/roomSignature.d.ts +30 -0
  250. package/lib/render/excalibur/roomSignature.js +49 -0
  251. package/lib/render/excalibur/roomSignature.js.map +1 -0
  252. package/lib/render/excalibur/sceneBake.d.ts +9 -0
  253. package/lib/render/excalibur/sceneBake.js +12 -0
  254. package/lib/render/excalibur/sceneBake.js.map +1 -0
  255. package/lib/render/excalibur/thiefSpan.d.ts +18 -0
  256. package/lib/render/excalibur/thiefSpan.js +51 -0
  257. package/lib/render/excalibur/thiefSpan.js.map +1 -0
  258. package/lib/render/excalibur/towerBridgeTiles.d.ts +30 -0
  259. package/lib/render/excalibur/towerBridgeTiles.js +43 -0
  260. package/lib/render/excalibur/towerBridgeTiles.js.map +1 -0
  261. package/lib/render/excalibur/towerCrowd.d.ts +73 -0
  262. package/lib/render/excalibur/towerCrowd.js +464 -0
  263. package/lib/render/excalibur/towerCrowd.js.map +1 -0
  264. package/lib/render/excalibur/towerCrowdLayout.d.ts +40 -0
  265. package/lib/render/excalibur/towerCrowdLayout.js +77 -0
  266. package/lib/render/excalibur/towerCrowdLayout.js.map +1 -0
  267. package/lib/render/excalibur/towerFireResponse.d.ts +25 -0
  268. package/lib/render/excalibur/towerFireResponse.js +89 -0
  269. package/lib/render/excalibur/towerFireResponse.js.map +1 -0
  270. package/lib/render/excalibur/towerFrame.d.ts +8 -0
  271. package/lib/render/excalibur/towerFrame.js +57 -0
  272. package/lib/render/excalibur/towerFrame.js.map +1 -0
  273. package/lib/render/excalibur/towerGhostLabel.d.ts +9 -0
  274. package/lib/render/excalibur/towerGhostLabel.js +37 -0
  275. package/lib/render/excalibur/towerGhostLabel.js.map +1 -0
  276. package/lib/render/excalibur/towerHallDoors.d.ts +42 -0
  277. package/lib/render/excalibur/towerHallDoors.js +129 -0
  278. package/lib/render/excalibur/towerHallDoors.js.map +1 -0
  279. package/lib/render/excalibur/towerHaloRings.d.ts +34 -0
  280. package/lib/render/excalibur/towerHaloRings.js +45 -0
  281. package/lib/render/excalibur/towerHaloRings.js.map +1 -0
  282. package/lib/render/excalibur/towerInputCamera.d.ts +90 -0
  283. package/lib/render/excalibur/towerInputCamera.js +480 -0
  284. package/lib/render/excalibur/towerInputCamera.js.map +1 -0
  285. package/lib/render/excalibur/towerMetro.d.ts +31 -0
  286. package/lib/render/excalibur/towerMetro.js +115 -0
  287. package/lib/render/excalibur/towerMetro.js.map +1 -0
  288. package/lib/render/excalibur/towerNoiseReach.d.ts +32 -0
  289. package/lib/render/excalibur/towerNoiseReach.js +75 -0
  290. package/lib/render/excalibur/towerNoiseReach.js.map +1 -0
  291. package/lib/render/excalibur/towerOverlay.d.ts +59 -0
  292. package/lib/render/excalibur/towerOverlay.js +453 -0
  293. package/lib/render/excalibur/towerOverlay.js.map +1 -0
  294. package/lib/render/excalibur/towerReconcile.d.ts +17 -0
  295. package/lib/render/excalibur/towerReconcile.js +404 -0
  296. package/lib/render/excalibur/towerReconcile.js.map +1 -0
  297. package/lib/render/excalibur/towerRegions.d.ts +61 -0
  298. package/lib/render/excalibur/towerRegions.js +193 -0
  299. package/lib/render/excalibur/towerRegions.js.map +1 -0
  300. package/lib/render/excalibur/towerScene.d.ts +66 -0
  301. package/lib/render/excalibur/towerScene.js +443 -0
  302. package/lib/render/excalibur/towerScene.js.map +1 -0
  303. package/lib/render/excalibur/towerScenery.d.ts +12 -0
  304. package/lib/render/excalibur/towerScenery.js +299 -0
  305. package/lib/render/excalibur/towerScenery.js.map +1 -0
  306. package/lib/render/excalibur/towerSceneryDraw.d.ts +86 -0
  307. package/lib/render/excalibur/towerSceneryDraw.js +288 -0
  308. package/lib/render/excalibur/towerSceneryDraw.js.map +1 -0
  309. package/lib/render/excalibur/towerShaftNumbers.d.ts +23 -0
  310. package/lib/render/excalibur/towerShaftNumbers.js +90 -0
  311. package/lib/render/excalibur/towerShaftNumbers.js.map +1 -0
  312. package/lib/render/excalibur/towerStructTiles.d.ts +56 -0
  313. package/lib/render/excalibur/towerStructTiles.js +238 -0
  314. package/lib/render/excalibur/towerStructTiles.js.map +1 -0
  315. package/lib/render/excalibur/towerSyncSchedule.d.ts +84 -0
  316. package/lib/render/excalibur/towerSyncSchedule.js +137 -0
  317. package/lib/render/excalibur/towerSyncSchedule.js.map +1 -0
  318. package/lib/render/excalibur/towerWalkerBuild.d.ts +30 -0
  319. package/lib/render/excalibur/towerWalkerBuild.js +126 -0
  320. package/lib/render/excalibur/towerWalkerBuild.js.map +1 -0
  321. package/lib/render/excalibur/trafficSpotlight.d.ts +29 -0
  322. package/lib/render/excalibur/trafficSpotlight.js +64 -0
  323. package/lib/render/excalibur/trafficSpotlight.js.map +1 -0
  324. package/lib/render/facadeGeometry.d.ts +50 -0
  325. package/lib/render/facadeGeometry.js +79 -0
  326. package/lib/render/facadeGeometry.js.map +1 -0
  327. package/lib/render/groundEntrances.d.ts +44 -0
  328. package/lib/render/groundEntrances.js +118 -0
  329. package/lib/render/groundEntrances.js.map +1 -0
  330. package/lib/render/lateNight.d.ts +14 -0
  331. package/lib/render/lateNight.js +18 -0
  332. package/lib/render/lateNight.js.map +1 -0
  333. package/lib/render/lobbyHalls.d.ts +44 -0
  334. package/lib/render/lobbyHalls.js +63 -0
  335. package/lib/render/lobbyHalls.js.map +1 -0
  336. package/lib/render/metroTrainSchedule.d.ts +20 -0
  337. package/lib/render/metroTrainSchedule.js +65 -0
  338. package/lib/render/metroTrainSchedule.js.map +1 -0
  339. package/lib/render/overviewMap/drawList.d.ts +67 -0
  340. package/lib/render/overviewMap/drawList.js +103 -0
  341. package/lib/render/overviewMap/drawList.js.map +1 -0
  342. package/lib/render/overviewMap/extent.d.ts +70 -0
  343. package/lib/render/overviewMap/extent.js +155 -0
  344. package/lib/render/overviewMap/extent.js.map +1 -0
  345. package/lib/render/overviewMap/floorSpans.d.ts +27 -0
  346. package/lib/render/overviewMap/floorSpans.js +32 -0
  347. package/lib/render/overviewMap/floorSpans.js.map +1 -0
  348. package/lib/render/overviewMap/gaps.d.ts +48 -0
  349. package/lib/render/overviewMap/gaps.js +148 -0
  350. package/lib/render/overviewMap/gaps.js.map +1 -0
  351. package/lib/render/overviewMap/geometry.d.ts +139 -0
  352. package/lib/render/overviewMap/geometry.js +245 -0
  353. package/lib/render/overviewMap/geometry.js.map +1 -0
  354. package/lib/render/overviewMap/heatView.d.ts +91 -0
  355. package/lib/render/overviewMap/heatView.js +143 -0
  356. package/lib/render/overviewMap/heatView.js.map +1 -0
  357. package/lib/render/overviewMap/hotelView.d.ts +82 -0
  358. package/lib/render/overviewMap/hotelView.js +136 -0
  359. package/lib/render/overviewMap/hotelView.js.map +1 -0
  360. package/lib/render/overviewMap/model.d.ts +97 -0
  361. package/lib/render/overviewMap/model.js +116 -0
  362. package/lib/render/overviewMap/model.js.map +1 -0
  363. package/lib/render/overviewMap/paint.d.ts +63 -0
  364. package/lib/render/overviewMap/paint.js +168 -0
  365. package/lib/render/overviewMap/paint.js.map +1 -0
  366. package/lib/render/overviewMap/style.d.ts +46 -0
  367. package/lib/render/overviewMap/style.js +117 -0
  368. package/lib/render/overviewMap/style.js.map +1 -0
  369. package/lib/render/overviewMap/tierView.d.ts +103 -0
  370. package/lib/render/overviewMap/tierView.js +209 -0
  371. package/lib/render/overviewMap/tierView.js.map +1 -0
  372. package/lib/render/overviewMap/viewMark.d.ts +69 -0
  373. package/lib/render/overviewMap/viewMark.js +103 -0
  374. package/lib/render/overviewMap/viewMark.js.map +1 -0
  375. package/lib/render/overviewMap/views.d.ts +24 -0
  376. package/lib/render/overviewMap/views.js +29 -0
  377. package/lib/render/overviewMap/views.js.map +1 -0
  378. package/lib/render/pinchTracker.d.ts +91 -0
  379. package/lib/render/pinchTracker.js +145 -0
  380. package/lib/render/pinchTracker.js.map +1 -0
  381. package/lib/render/pixelSprites/amusements.d.ts +32 -0
  382. package/lib/render/pixelSprites/amusements.js +243 -0
  383. package/lib/render/pixelSprites/amusements.js.map +1 -0
  384. package/lib/render/pixelSprites/artScale.d.ts +97 -0
  385. package/lib/render/pixelSprites/artScale.js +151 -0
  386. package/lib/render/pixelSprites/artScale.js.map +1 -0
  387. package/lib/render/pixelSprites/boutique.d.ts +30 -0
  388. package/lib/render/pixelSprites/boutique.js +244 -0
  389. package/lib/render/pixelSprites/boutique.js.map +1 -0
  390. package/lib/render/pixelSprites/clinic.d.ts +30 -0
  391. package/lib/render/pixelSprites/clinic.js +184 -0
  392. package/lib/render/pixelSprites/clinic.js.map +1 -0
  393. package/lib/render/pixelSprites/common.d.ts +185 -0
  394. package/lib/render/pixelSprites/common.js +449 -0
  395. package/lib/render/pixelSprites/common.js.map +1 -0
  396. package/lib/render/pixelSprites/daycare.d.ts +3 -0
  397. package/lib/render/pixelSprites/daycare.js +99 -0
  398. package/lib/render/pixelSprites/daycare.js.map +1 -0
  399. package/lib/render/pixelSprites/dollhouse.d.ts +45 -0
  400. package/lib/render/pixelSprites/dollhouse.js +110 -0
  401. package/lib/render/pixelSprites/dollhouse.js.map +1 -0
  402. package/lib/render/pixelSprites/fitness.d.ts +30 -0
  403. package/lib/render/pixelSprites/fitness.js +176 -0
  404. package/lib/render/pixelSprites/fitness.js.map +1 -0
  405. package/lib/render/pixelSprites/food.d.ts +27 -0
  406. package/lib/render/pixelSprites/food.interiors.d.ts +38 -0
  407. package/lib/render/pixelSprites/food.interiors.js +516 -0
  408. package/lib/render/pixelSprites/food.interiors.js.map +1 -0
  409. package/lib/render/pixelSprites/food.js +36 -0
  410. package/lib/render/pixelSprites/food.js.map +1 -0
  411. package/lib/render/pixelSprites/food.kit.d.ts +50 -0
  412. package/lib/render/pixelSprites/food.kit.js +140 -0
  413. package/lib/render/pixelSprites/food.kit.js.map +1 -0
  414. package/lib/render/pixelSprites/food.looks.d.ts +45 -0
  415. package/lib/render/pixelSprites/food.looks.js +56 -0
  416. package/lib/render/pixelSprites/food.looks.js.map +1 -0
  417. package/lib/render/pixelSprites/layers.d.ts +49 -0
  418. package/lib/render/pixelSprites/layers.js +61 -0
  419. package/lib/render/pixelSprites/layers.js.map +1 -0
  420. package/lib/render/pixelSprites/nightclub.d.ts +3 -0
  421. package/lib/render/pixelSprites/nightclub.js +108 -0
  422. package/lib/render/pixelSprites/nightclub.js.map +1 -0
  423. package/lib/render/pixelSprites/people.d.ts +168 -0
  424. package/lib/render/pixelSprites/people.js +431 -0
  425. package/lib/render/pixelSprites/people.js.map +1 -0
  426. package/lib/render/pixelSprites/residential.d.ts +5 -0
  427. package/lib/render/pixelSprites/residential.js +506 -0
  428. package/lib/render/pixelSprites/residential.js.map +1 -0
  429. package/lib/render/pixelSprites/residential.looks.d.ts +40 -0
  430. package/lib/render/pixelSprites/residential.looks.js +43 -0
  431. package/lib/render/pixelSprites/residential.looks.js.map +1 -0
  432. package/lib/render/pixelSprites/residential.roaches.d.ts +38 -0
  433. package/lib/render/pixelSprites/residential.roaches.js +88 -0
  434. package/lib/render/pixelSprites/residential.roaches.js.map +1 -0
  435. package/lib/render/pixelSprites/residentialRentalSprites.d.ts +11 -0
  436. package/lib/render/pixelSprites/residentialRentalSprites.js +19 -0
  437. package/lib/render/pixelSprites/residentialRentalSprites.js.map +1 -0
  438. package/lib/render/pixelSprites/shop.d.ts +14 -0
  439. package/lib/render/pixelSprites/shop.interiors.d.ts +50 -0
  440. package/lib/render/pixelSprites/shop.interiors.js +382 -0
  441. package/lib/render/pixelSprites/shop.interiors.js.map +1 -0
  442. package/lib/render/pixelSprites/shop.js +72 -0
  443. package/lib/render/pixelSprites/shop.js.map +1 -0
  444. package/lib/render/pixelSprites/shop.looks.d.ts +17 -0
  445. package/lib/render/pixelSprites/shop.looks.js +24 -0
  446. package/lib/render/pixelSprites/shop.looks.js.map +1 -0
  447. package/lib/render/pixelSprites/skyBar.d.ts +11 -0
  448. package/lib/render/pixelSprites/skyBar.js +125 -0
  449. package/lib/render/pixelSprites/skyBar.js.map +1 -0
  450. package/lib/render/pixelSprites/spa.d.ts +3 -0
  451. package/lib/render/pixelSprites/spa.js +88 -0
  452. package/lib/render/pixelSprites/spa.js.map +1 -0
  453. package/lib/render/pixelSprites.d.ts +33 -0
  454. package/lib/render/pixelSprites.js +167 -0
  455. package/lib/render/pixelSprites.js.map +1 -0
  456. package/lib/render/regionGrid.d.ts +49 -0
  457. package/lib/render/regionGrid.js +82 -0
  458. package/lib/render/regionGrid.js.map +1 -0
  459. package/lib/render/regionPaint.d.ts +15 -0
  460. package/lib/render/regionPaint.js +33 -0
  461. package/lib/render/regionPaint.js.map +1 -0
  462. package/lib/render/renderSim.d.ts +104 -0
  463. package/lib/render/renderSim.js +2 -0
  464. package/lib/render/renderSim.js.map +1 -0
  465. package/lib/render/roomPortrait.d.ts +35 -0
  466. package/lib/render/roomPortrait.js +142 -0
  467. package/lib/render/roomPortrait.js.map +1 -0
  468. package/lib/render/roomShading.d.ts +29 -0
  469. package/lib/render/roomShading.js +43 -0
  470. package/lib/render/roomShading.js.map +1 -0
  471. package/lib/render/scale.d.ts +31 -0
  472. package/lib/render/scale.js +34 -0
  473. package/lib/render/scale.js.map +1 -0
  474. package/lib/render/sceneryLayout.d.ts +234 -0
  475. package/lib/render/sceneryLayout.js +199 -0
  476. package/lib/render/sceneryLayout.js.map +1 -0
  477. package/lib/render/sprites/common.d.ts +41 -0
  478. package/lib/render/sprites/common.js +46 -0
  479. package/lib/render/sprites/common.js.map +1 -0
  480. package/lib/render/sprites/escalator.d.ts +27 -0
  481. package/lib/render/sprites/escalator.js +156 -0
  482. package/lib/render/sprites/escalator.js.map +1 -0
  483. package/lib/render/sprites/events.d.ts +56 -0
  484. package/lib/render/sprites/events.js +280 -0
  485. package/lib/render/sprites/events.js.map +1 -0
  486. package/lib/render/sprites/facilities/garage.d.ts +23 -0
  487. package/lib/render/sprites/facilities/garage.js +230 -0
  488. package/lib/render/sprites/facilities/garage.js.map +1 -0
  489. package/lib/render/sprites/facilities/recycling.d.ts +3 -0
  490. package/lib/render/sprites/facilities/recycling.js +210 -0
  491. package/lib/render/sprites/facilities/recycling.js.map +1 -0
  492. package/lib/render/sprites/facilities/recyclingLook.d.ts +49 -0
  493. package/lib/render/sprites/facilities/recyclingLook.js +52 -0
  494. package/lib/render/sprites/facilities/recyclingLook.js.map +1 -0
  495. package/lib/render/sprites/facilities/service.d.ts +14 -0
  496. package/lib/render/sprites/facilities/service.js +437 -0
  497. package/lib/render/sprites/facilities/service.js.map +1 -0
  498. package/lib/render/sprites/facilities/serviceKit.d.ts +61 -0
  499. package/lib/render/sprites/facilities/serviceKit.js +113 -0
  500. package/lib/render/sprites/facilities/serviceKit.js.map +1 -0
  501. package/lib/render/sprites/facilities/vehicles.d.ts +38 -0
  502. package/lib/render/sprites/facilities/vehicles.js +276 -0
  503. package/lib/render/sprites/facilities/vehicles.js.map +1 -0
  504. package/lib/render/sprites/facilities/venue.d.ts +28 -0
  505. package/lib/render/sprites/facilities/venue.js +211 -0
  506. package/lib/render/sprites/facilities/venue.js.map +1 -0
  507. package/lib/render/sprites/facilities/weddingHall.d.ts +9 -0
  508. package/lib/render/sprites/facilities/weddingHall.js +410 -0
  509. package/lib/render/sprites/facilities/weddingHall.js.map +1 -0
  510. package/lib/render/sprites/facilities.d.ts +22 -0
  511. package/lib/render/sprites/facilities.js +24 -0
  512. package/lib/render/sprites/facilities.js.map +1 -0
  513. package/lib/render/sprites/helicopter.d.ts +11 -0
  514. package/lib/render/sprites/helicopter.js +60 -0
  515. package/lib/render/sprites/helicopter.js.map +1 -0
  516. package/lib/render/sprites/sky.d.ts +67 -0
  517. package/lib/render/sprites/sky.js +85 -0
  518. package/lib/render/sprites/sky.js.map +1 -0
  519. package/lib/render/sprites/spiralStair.d.ts +19 -0
  520. package/lib/render/sprites/spiralStair.js +111 -0
  521. package/lib/render/sprites/spiralStair.js.map +1 -0
  522. package/lib/render/sprites/structure/entrance.d.ts +35 -0
  523. package/lib/render/sprites/structure/entrance.js +347 -0
  524. package/lib/render/sprites/structure/entrance.js.map +1 -0
  525. package/lib/render/sprites/structure/lobby.d.ts +88 -0
  526. package/lib/render/sprites/structure/lobby.js +350 -0
  527. package/lib/render/sprites/structure/lobby.js.map +1 -0
  528. package/lib/render/sprites/structure/revolvingDoor.d.ts +53 -0
  529. package/lib/render/sprites/structure/revolvingDoor.js +184 -0
  530. package/lib/render/sprites/structure/revolvingDoor.js.map +1 -0
  531. package/lib/render/sprites/structure/rooftop.d.ts +93 -0
  532. package/lib/render/sprites/structure/rooftop.js +302 -0
  533. package/lib/render/sprites/structure/rooftop.js.map +1 -0
  534. package/lib/render/sprites/structure/shell.d.ts +19 -0
  535. package/lib/render/sprites/structure/shell.js +142 -0
  536. package/lib/render/sprites/structure/shell.js.map +1 -0
  537. package/lib/render/sprites/structure/skyBridge.d.ts +28 -0
  538. package/lib/render/sprites/structure/skyBridge.js +259 -0
  539. package/lib/render/sprites/structure/skyBridge.js.map +1 -0
  540. package/lib/render/sprites/structure/tallLobby.d.ts +8 -0
  541. package/lib/render/sprites/structure/tallLobby.js +166 -0
  542. package/lib/render/sprites/structure/tallLobby.js.map +1 -0
  543. package/lib/render/sprites/structure/tallLobbyPieces.d.ts +18 -0
  544. package/lib/render/sprites/structure/tallLobbyPieces.js +82 -0
  545. package/lib/render/sprites/structure/tallLobbyPieces.js.map +1 -0
  546. package/lib/render/sprites/structure.d.ts +15 -0
  547. package/lib/render/sprites/structure.js +16 -0
  548. package/lib/render/sprites/structure.js.map +1 -0
  549. package/lib/render/sprites/transport.d.ts +30 -0
  550. package/lib/render/sprites/transport.js +376 -0
  551. package/lib/render/sprites/transport.js.map +1 -0
  552. package/lib/render/sprites.d.ts +16 -0
  553. package/lib/render/sprites.js +108 -0
  554. package/lib/render/sprites.js.map +1 -0
  555. package/lib/render/venueFlights.d.ts +61 -0
  556. package/lib/render/venueFlights.js +50 -0
  557. package/lib/render/venueFlights.js.map +1 -0
  558. package/lib/shared/engineTypes.d.ts +256 -0
  559. package/lib/shared/engineTypes.js +8 -0
  560. package/lib/shared/engineTypes.js.map +1 -0
  561. package/lib/shared/floorRuns.d.ts +22 -0
  562. package/lib/shared/floorRuns.js +39 -0
  563. package/lib/shared/floorRuns.js.map +1 -0
  564. package/lib/shared/inputEvents.d.ts +18 -0
  565. package/lib/shared/inputEvents.js +23 -0
  566. package/lib/shared/inputEvents.js.map +1 -0
  567. package/lib/shared/serializedGame.d.ts +142 -0
  568. package/lib/shared/serializedGame.js +2 -0
  569. package/lib/shared/serializedGame.js.map +1 -0
  570. package/lib/shared/types.d.ts +298 -0
  571. package/lib/shared/types.js +47 -0
  572. package/lib/shared/types.js.map +1 -0
  573. package/lib/shared/unitState.d.ts +36 -0
  574. package/lib/shared/unitState.js +42 -0
  575. package/lib/shared/unitState.js.map +1 -0
  576. package/lib/shared/vacateReasonText.d.ts +20 -0
  577. package/lib/shared/vacateReasonText.js +23 -0
  578. package/lib/shared/vacateReasonText.js.map +1 -0
  579. package/lib/shared/viewZoom.d.ts +14 -0
  580. package/lib/shared/viewZoom.js +17 -0
  581. package/lib/shared/viewZoom.js.map +1 -0
  582. package/lib/shared/wellFormed.d.ts +14 -0
  583. package/lib/shared/wellFormed.js +19 -0
  584. package/lib/shared/wellFormed.js.map +1 -0
  585. package/lib/simport/cards.d.ts +26 -0
  586. package/lib/simport/cards.js +138 -0
  587. package/lib/simport/cards.js.map +1 -0
  588. package/lib/simport/clockView.d.ts +24 -0
  589. package/lib/simport/clockView.js +43 -0
  590. package/lib/simport/clockView.js.map +1 -0
  591. package/lib/simport/commands.d.ts +215 -0
  592. package/lib/simport/commands.js +2 -0
  593. package/lib/simport/commands.js.map +1 -0
  594. package/lib/simport/emergencyReads.d.ts +19 -0
  595. package/lib/simport/emergencyReads.js +47 -0
  596. package/lib/simport/emergencyReads.js.map +1 -0
  597. package/lib/simport/enginePort.d.ts +433 -0
  598. package/lib/simport/enginePort.js +11 -0
  599. package/lib/simport/enginePort.js.map +1 -0
  600. package/lib/simport/fixtures/catalog.classic.json +2137 -0
  601. package/lib/simport/fixtures/catalog.modern.json +2515 -0
  602. package/lib/simport/fixtures/viewLayout.json +927 -0
  603. package/lib/simport/headerClock.d.ts +31 -0
  604. package/lib/simport/headerClock.js +29 -0
  605. package/lib/simport/headerClock.js.map +1 -0
  606. package/lib/simport/panels.d.ts +243 -0
  607. package/lib/simport/panels.js +2 -0
  608. package/lib/simport/panels.js.map +1 -0
  609. package/lib/simport/personCards.d.ts +63 -0
  610. package/lib/simport/personCards.js +55 -0
  611. package/lib/simport/personCards.js.map +1 -0
  612. package/lib/simport/portCodes.d.ts +41 -0
  613. package/lib/simport/portCodes.js +49 -0
  614. package/lib/simport/portCodes.js.map +1 -0
  615. package/lib/simport/portEvents.d.ts +39 -0
  616. package/lib/simport/portEvents.js +43 -0
  617. package/lib/simport/portEvents.js.map +1 -0
  618. package/lib/simport/portRenderSim.d.ts +70 -0
  619. package/lib/simport/portRenderSim.js +129 -0
  620. package/lib/simport/portRenderSim.js.map +1 -0
  621. package/lib/simport/queries.d.ts +64 -0
  622. package/lib/simport/queries.js +30 -0
  623. package/lib/simport/queries.js.map +1 -0
  624. package/lib/simport/recyclingPort.d.ts +13 -0
  625. package/lib/simport/recyclingPort.js +2 -0
  626. package/lib/simport/recyclingPort.js.map +1 -0
  627. package/lib/simport/request.d.ts +44 -0
  628. package/lib/simport/request.js +214 -0
  629. package/lib/simport/request.js.map +1 -0
  630. package/lib/simport/roomTiers.d.ts +102 -0
  631. package/lib/simport/roomTiers.js +122 -0
  632. package/lib/simport/roomTiers.js.map +1 -0
  633. package/lib/simport/scheduleSlots.d.ts +19 -0
  634. package/lib/simport/scheduleSlots.js +87 -0
  635. package/lib/simport/scheduleSlots.js.map +1 -0
  636. package/lib/simport/skyBridgePort.d.ts +20 -0
  637. package/lib/simport/skyBridgePort.js +2 -0
  638. package/lib/simport/skyBridgePort.js.map +1 -0
  639. package/lib/simport/skyBridgeView.d.ts +15 -0
  640. package/lib/simport/skyBridgeView.js +42 -0
  641. package/lib/simport/skyBridgeView.js.map +1 -0
  642. package/lib/simport/statsSheet.d.ts +15 -0
  643. package/lib/simport/statsSheet.js +101 -0
  644. package/lib/simport/statsSheet.js.map +1 -0
  645. package/lib/simport/tdtRecords.d.ts +9 -0
  646. package/lib/simport/tdtRecords.js +112 -0
  647. package/lib/simport/tdtRecords.js.map +1 -0
  648. package/lib/simport/tdtReportFacts.d.ts +110 -0
  649. package/lib/simport/tdtReportFacts.js +8 -0
  650. package/lib/simport/tdtReportFacts.js.map +1 -0
  651. package/lib/simport/trafficPort.d.ts +22 -0
  652. package/lib/simport/trafficPort.js +2 -0
  653. package/lib/simport/trafficPort.js.map +1 -0
  654. package/lib/simport/view.d.ts +275 -0
  655. package/lib/simport/view.js +2 -0
  656. package/lib/simport/view.js.map +1 -0
  657. package/lib/simport/viewReader.d.ts +89 -0
  658. package/lib/simport/viewReader.js +426 -0
  659. package/lib/simport/viewReader.js.map +1 -0
  660. package/lib/styles/game/appearance.css +108 -0
  661. package/lib/styles/game/base.css +68 -0
  662. package/lib/styles/game/components.css +69 -0
  663. package/lib/styles/game/desk-title.css +183 -0
  664. package/lib/styles/game/desk.css +487 -0
  665. package/lib/styles/game/dialogs.css +360 -0
  666. package/lib/styles/game/editor-sidebar.css +116 -0
  667. package/lib/styles/game/elevator-schedule.css +217 -0
  668. package/lib/styles/game/file-dialog.css +470 -0
  669. package/lib/styles/game/help.css +141 -0
  670. package/lib/styles/game/launch-fireworks.css +17 -0
  671. package/lib/styles/game/media-landscape.css +333 -0
  672. package/lib/styles/game/media-phone.css +303 -0
  673. package/lib/styles/game/media-tablet-touch.css +177 -0
  674. package/lib/styles/game/menubar.css +158 -0
  675. package/lib/styles/game/new-tower.css +219 -0
  676. package/lib/styles/game/onboarding.css +32 -0
  677. package/lib/styles/game/screen-saver.css +85 -0
  678. package/lib/styles/game/splash.css +413 -0
  679. package/lib/styles/game/stats-saves.css +106 -0
  680. package/lib/styles/game/tools-stage.css +340 -0
  681. package/lib/styles/game/topbar.css +191 -0
  682. package/lib/styles/menu-bar.css +108 -0
  683. package/lib/styles/not-found.css +335 -0
  684. package/lib/styles/overview-map-views.css +88 -0
  685. package/lib/styles/overview-map.css +195 -0
  686. package/lib/styles/retro-components.css +179 -0
  687. package/lib/styles/retro-page.css +254 -0
  688. package/lib/styles/retro-tokens.css +122 -0
  689. package/lib/styles/schemes/high-contrast.css +173 -0
  690. package/lib/styles/schemes/skyline.css +134 -0
  691. package/lib/styles.css +66 -0
  692. package/lib/ui/desk/deskGeometry.d.ts +59 -0
  693. package/lib/ui/desk/deskGeometry.js +106 -0
  694. package/lib/ui/desk/deskGeometry.js.map +1 -0
  695. package/lib/ui/desk/deskWindow.d.ts +90 -0
  696. package/lib/ui/desk/deskWindow.js +253 -0
  697. package/lib/ui/desk/deskWindow.js.map +1 -0
  698. package/lib/ui/desk/deskWindowMenu.d.ts +55 -0
  699. package/lib/ui/desk/deskWindowMenu.js +143 -0
  700. package/lib/ui/desk/deskWindowMenu.js.map +1 -0
  701. package/lib/ui/escape.d.ts +1 -0
  702. package/lib/ui/escape.js +14 -0
  703. package/lib/ui/escape.js.map +1 -0
  704. package/lib/ui/format.d.ts +14 -0
  705. package/lib/ui/format.js +36 -0
  706. package/lib/ui/format.js.map +1 -0
  707. package/lib/ui/iconPaths.generated.d.ts +4 -0
  708. package/lib/ui/iconPaths.generated.js +68 -0
  709. package/lib/ui/iconPaths.generated.js.map +1 -0
  710. package/lib/ui/icons.d.ts +83 -0
  711. package/lib/ui/icons.js +156 -0
  712. package/lib/ui/icons.js.map +1 -0
  713. package/lib/ui/menuBar.d.ts +94 -0
  714. package/lib/ui/menuBar.js +361 -0
  715. package/lib/ui/menuBar.js.map +1 -0
  716. package/lib/ui/modalPrecedence.d.ts +108 -0
  717. package/lib/ui/modalPrecedence.js +165 -0
  718. package/lib/ui/modalPrecedence.js.map +1 -0
  719. package/lib/ui/movableWindow.d.ts +124 -0
  720. package/lib/ui/movableWindow.js +247 -0
  721. package/lib/ui/movableWindow.js.map +1 -0
  722. package/lib/ui/overviewMapInput.d.ts +109 -0
  723. package/lib/ui/overviewMapInput.js +135 -0
  724. package/lib/ui/overviewMapInput.js.map +1 -0
  725. package/lib/ui/uiModal.d.ts +38 -0
  726. package/lib/ui/uiModal.js +70 -0
  727. package/lib/ui/uiModal.js.map +1 -0
  728. package/lib/wasmhost/buildSection.d.ts +54 -0
  729. package/lib/wasmhost/buildSection.js +143 -0
  730. package/lib/wasmhost/buildSection.js.map +1 -0
  731. package/lib/wasmhost/catalogCheck.d.ts +11 -0
  732. package/lib/wasmhost/catalogCheck.js +43 -0
  733. package/lib/wasmhost/catalogCheck.js.map +1 -0
  734. package/lib/wasmhost/engineAssets.d.ts +57 -0
  735. package/lib/wasmhost/engineAssets.js +63 -0
  736. package/lib/wasmhost/engineAssets.js.map +1 -0
  737. package/lib/wasmhost/engineBoot.d.ts +165 -0
  738. package/lib/wasmhost/engineBoot.js +254 -0
  739. package/lib/wasmhost/engineBoot.js.map +1 -0
  740. package/lib/wasmhost/engineChoice.d.ts +6 -0
  741. package/lib/wasmhost/engineChoice.js +2 -0
  742. package/lib/wasmhost/engineChoice.js.map +1 -0
  743. package/lib/wasmhost/engineDiagnostics.d.ts +66 -0
  744. package/lib/wasmhost/engineDiagnostics.js +189 -0
  745. package/lib/wasmhost/engineDiagnostics.js.map +1 -0
  746. package/lib/wasmhost/engineDiagnosticsLive.d.ts +15 -0
  747. package/lib/wasmhost/engineDiagnosticsLive.js +31 -0
  748. package/lib/wasmhost/engineDiagnosticsLive.js.map +1 -0
  749. package/lib/wasmhost/engineIdentity.d.ts +30 -0
  750. package/lib/wasmhost/engineIdentity.js +59 -0
  751. package/lib/wasmhost/engineIdentity.js.map +1 -0
  752. package/lib/wasmhost/engineLabel.d.ts +40 -0
  753. package/lib/wasmhost/engineLabel.js +50 -0
  754. package/lib/wasmhost/engineLabel.js.map +1 -0
  755. package/lib/wasmhost/engineLoad.d.ts +48 -0
  756. package/lib/wasmhost/engineLoad.js +53 -0
  757. package/lib/wasmhost/engineLoad.js.map +1 -0
  758. package/lib/wasmhost/enginePackageCheck.d.ts +77 -0
  759. package/lib/wasmhost/enginePackageCheck.js +274 -0
  760. package/lib/wasmhost/enginePackageCheck.js.map +1 -0
  761. package/lib/wasmhost/enginePackageNames.d.ts +25 -0
  762. package/lib/wasmhost/enginePackageNames.js +28 -0
  763. package/lib/wasmhost/enginePackageNames.js.map +1 -0
  764. package/lib/wasmhost/enginePackageRecord.d.ts +78 -0
  765. package/lib/wasmhost/enginePackageRecord.js +108 -0
  766. package/lib/wasmhost/enginePackageRecord.js.map +1 -0
  767. package/lib/wasmhost/engineRepair.d.ts +55 -0
  768. package/lib/wasmhost/engineRepair.js +183 -0
  769. package/lib/wasmhost/engineRepair.js.map +1 -0
  770. package/lib/wasmhost/frameView.d.ts +87 -0
  771. package/lib/wasmhost/frameView.js +133 -0
  772. package/lib/wasmhost/frameView.js.map +1 -0
  773. package/lib/wasmhost/hostFault.d.ts +40 -0
  774. package/lib/wasmhost/hostFault.js +94 -0
  775. package/lib/wasmhost/hostFault.js.map +1 -0
  776. package/lib/wasmhost/loadEngineModule.d.ts +79 -0
  777. package/lib/wasmhost/loadEngineModule.js +66 -0
  778. package/lib/wasmhost/loadEngineModule.js.map +1 -0
  779. package/lib/wasmhost/packageHash.d.ts +48 -0
  780. package/lib/wasmhost/packageHash.js +436 -0
  781. package/lib/wasmhost/packageHash.js.map +1 -0
  782. package/lib/wasmhost/rustEngine.d.ts +49 -0
  783. package/lib/wasmhost/rustEngine.js +63 -0
  784. package/lib/wasmhost/rustEngine.js.map +1 -0
  785. package/lib/wasmhost/slotPopulation.d.ts +19 -0
  786. package/lib/wasmhost/slotPopulation.js +69 -0
  787. package/lib/wasmhost/slotPopulation.js.map +1 -0
  788. package/lib/wasmhost/telemetry.d.ts +31 -0
  789. package/lib/wasmhost/telemetry.js +13 -0
  790. package/lib/wasmhost/telemetry.js.map +1 -0
  791. package/package.json +80 -4
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toneCrowd.js","sources":["../../src/audio/toneCrowd.ts"],"sourcesContent":["import * as Tone from \"tone\";\nimport type { ViewFocus } from \"../render/excalibur/TowerEngine\";\nimport type { Scene } from \"./toneScenes\";\nimport {\n CROWD_SCENES,\n resolveCrowdScene,\n hourActivity,\n pseudo,\n PITCH_MIN_SEMI,\n PITCH_MAX_SEMI,\n type CrowdSceneKey,\n type ElementSpec,\n} from \"./toneCrowdData\";\nimport { CrowdVoices } from \"./toneCrowdVoices\";\nimport { LightPolySynth } from \"./lightSynth\";\nimport { PartyBand, CinemaProgram, MetroProgram } from \"./toneCrowdPrograms\";\n\n/**\n * The crowd/venue ambience layer: talkers murmuring from the voice seeds,\n * per-scene one-shot details, and the composed venue programs, all mixed into\n * the engine's distance-filtered bed so camera zoom muffles and opens it\n * naturally. {@link ToneAudioEngine} feeds it the resolved scene and focus at\n * its update cadence; everything else (which sounds, how many, how often, how\n * loud) follows the specs in `./toneCrowdData.ts` scaled by live occupancy,\n * the sim clock, and zoom. Scheduling runs on short timers seeded by the\n * deterministic hash, so no Math.random and no fixed loops.\n */\n\n/** How often a party crowd laughs and whoops, seconds (min plus a draw). */\nconst LAUGH_GAP_S = { min: 18, varS: 22 };\nconst WHOOP_GAP_S = { min: 22, varS: 24 };\n/** Layer master at full detail; the whole layer sits under the music bed. */\nconst LAYER_LEVEL = 0.5;\n/** Crowd factors below this read as \"nobody there\": the scene stays silent\n * (the GDD's occupancy rule). */\nconst EMPTY_CROWD = 0.05;\n/** A scene key must win this many consecutive updates before the layer\n * switches, so a mixed floor (cinema beside a party hall) cannot churn the\n * programs while the camera pans. Mute bypasses it. */\nconst KEY_SETTLE_UPDATES = 2;\n/** A level or cutoff target within this share of the one already sent is\n * not re-sent (one percent is under a tenth of a decibel). */\nconst RAMP_TOLERANCE = 0.01;\n\ninterface TalkerSlot {\n gain: Tone.Gain;\n semi: number;\n timer: ReturnType<typeof setTimeout> | null;\n active: boolean;\n}\n\nexport class CrowdLayer {\n private master: Tone.Gain | null = null;\n private murmurFilter: Tone.Filter | null = null;\n /** Applies each scene's murmur level (the hotel whispers, the lobby talks). */\n private murmurGain: Tone.Gain | null = null;\n private toneGain: Tone.Gain | null = null;\n private pingSynth: LightPolySynth | null = null;\n private thudSynth: LightPolySynth | null = null;\n private noiseSynth: Tone.NoiseSynth | null = null;\n private noiseFilter: Tone.Filter | null = null;\n /** The street's 65/98 Hz city hum, breathing on its own slow swell. */\n private humGain: Tone.Gain | null = null;\n private humLow: Tone.Oscillator | null = null;\n private humHigh: Tone.Oscillator | null = null;\n private humLfo: Tone.LFO | null = null;\n /** The swell the LFO breathes between the hum's two sines and its gain. */\n private humSwell: Tone.Gain | null = null;\n private voices: CrowdVoices | null = null;\n private party: PartyBand | null = null;\n private cinema: CinemaProgram | null = null;\n private metro: MetroProgram | null = null;\n\n private slots: TalkerSlot[] = [];\n private elementTimers = new Set<ReturnType<typeof setTimeout>>();\n private scene: CrowdSceneKey | null = null;\n private pendingKey: CrowdSceneKey | null = null;\n private pendingCount = 0;\n private programOn = false;\n private activity = 0;\n private tick = 1;\n private disposed = false;\n /** The target each per-update ramp was last sent, by param. update() runs\n * on every audio update (about six a second), and every rampTo adds\n * automation events to its param. Re-sending unchanged targets each time\n * piled them up until the audio\n * thread's render cost doubled within a minute (the crackle once a venue\n * was on screen for a while), so a target is sent only when it moves. */\n private sentTargets = new Map<object, number>();\n\n constructor(dest: Tone.InputNode, seedBaseUrl: string) {\n try {\n this.master = new Tone.Gain(0).connect(dest);\n // Every voiced sound passes a steep filter (the audition rule: nothing\n // bright survives; noise never reads as static), then the per-scene\n // murmur level.\n this.murmurGain = new Tone.Gain(0.4).connect(this.master);\n this.murmurFilter = new Tone.Filter({ type: \"lowpass\", frequency: 900, rolloff: -48 }).connect(\n this.murmurGain,\n );\n this.toneGain = new Tone.Gain(0.8).connect(this.master);\n this.pingSynth = new LightPolySynth({\n oscillator: { type: \"sine\" },\n envelope: { attack: 0.004, decay: 0.12, sustain: 0, release: 0.08 },\n }).connect(this.toneGain);\n this.pingSynth.volume.value = -10;\n this.pingSynth.maxPolyphony = 8;\n this.thudSynth = new LightPolySynth({\n oscillator: { type: \"sine\" },\n envelope: { attack: 0.006, decay: 0.09, sustain: 0, release: 0.08 },\n }).connect(this.toneGain);\n this.thudSynth.volume.value = -8;\n this.thudSynth.maxPolyphony = 8;\n this.noiseFilter = new Tone.Filter({ type: \"lowpass\", frequency: 900, rolloff: -48 }).connect(\n this.toneGain,\n );\n this.noiseSynth = new Tone.NoiseSynth({\n noise: { type: \"pink\" },\n envelope: { attack: 0.004, decay: 0.1, sustain: 0 },\n }).connect(this.noiseFilter);\n this.noiseSynth.volume.value = -16;\n // The street hum: two well-separated sines breathing on a slow swell.\n this.humGain = new Tone.Gain(0).connect(this.master);\n this.humLfo = new Tone.LFO({ frequency: 0.08, min: 0.55, max: 1 });\n const humSwell = (this.humSwell = new Tone.Gain(1).connect(this.humGain));\n this.humLfo.connect(humSwell.gain);\n this.humLfo.start();\n this.humLow = new Tone.Oscillator({ frequency: 65, type: \"sine\", volume: -18 }).connect(humSwell);\n this.humHigh = new Tone.Oscillator({ frequency: 98, type: \"sine\", volume: -24 }).connect(humSwell);\n this.humLow.start();\n this.humHigh.start();\n for (let i = 0; i < 6; i++) {\n const gain = new Tone.Gain(0.5).connect(this.murmurFilter);\n this.slots.push({ gain, semi: PITCH_MAX_SEMI, timer: null, active: false });\n }\n this.voices = new CrowdVoices();\n this.voices.load(seedBaseUrl);\n this.party = new PartyBand(this.master);\n this.cinema = new CinemaProgram(this.master);\n this.metro = new MetroProgram(this.master);\n } catch {\n this.dispose();\n }\n }\n\n /** Drive the layer from the engine's update: resolve the ambience scene,\n * swap generators on a (settled) change, and retune levels every call. */\n update(scene: Scene, focus: ViewFocus, detail: number, muted: boolean): void {\n if (this.disposed || !this.master) return;\n try {\n const rawKey = muted ? null : resolveCrowdScene(scene, focus.dominant);\n // Settle the key across a couple of updates so a mixed floor can't\n // churn programs while panning; mute switches immediately.\n if (rawKey !== this.scene) {\n if (muted || rawKey === null) {\n this.switchScene(rawKey);\n } else if (rawKey === this.pendingKey) {\n if (++this.pendingCount >= KEY_SETTLE_UPDATES) this.switchScene(rawKey);\n } else {\n this.pendingKey = rawKey;\n this.pendingCount = 1;\n }\n } else {\n this.pendingKey = null;\n this.pendingCount = 0;\n }\n const key = this.scene;\n if (!key) {\n this.rampOnChange(this.master.gain, 0, 0.5);\n this.activity = 0;\n return;\n }\n const spec = CROWD_SCENES[key];\n const hour = Number.isFinite(focus.hour) ? focus.hour : 12;\n const rawCrowd = Number.isFinite(focus.crowd) ? focus.crowd : 0.5;\n let crowd: number;\n if (spec.gate === \"attendance\") crowd = rawCrowd < EMPTY_CROWD ? 0 : rawCrowd;\n else crowd = Math.max(rawCrowd, spec.crowdFloor ?? 0);\n this.activity = hourActivity(spec.gate, hour) * (crowd < EMPTY_CROWD ? 0 : crowd);\n // Honest loudness: the layer level scales with activity (clock times\n // occupancy) as well as zoom, so a near-empty room is near-silent. The\n // activity term is square-rooted: loudness perception is logarithmic,\n // and a linear scale read as dead below half fill (the owner heard\n // \"just a hum\" over lightly-visited venues), the same fallacy the\n // perceptual volume sliders fixed. Empty stays exactly zero.\n this.rampOnChange(\n this.master.gain,\n this.activity <= 0\n ? 0\n : LAYER_LEVEL * (0.38 + 0.62 * detail) * Math.sqrt(Math.min(1, this.activity)),\n 0.5,\n );\n if (this.humGain) this.rampOnChange(this.humGain.gain, key === \"outside\" && this.activity > 0 ? 0.5 : 0, 1.2);\n if (spec.murmur) {\n if (this.murmurFilter) this.rampOnChange(this.murmurFilter.frequency, spec.murmur.muffleHz, 0.4);\n if (this.murmurGain) this.rampOnChange(this.murmurGain.gain, spec.murmur.gain, 0.4);\n // Talkers = round(maxTalkers * crowd), floored at ONE while the room\n // is live: a couple eating in a big restaurant is still a quiet\n // conversation, not silence (rounding 3 talkers * 0.14 fill to zero\n // muted every lightly-visited venue). Empty rooms still fall fully\n // silent through the activity gate above, so the honest-rooms rule\n // holds: no people, no voices.\n const want =\n this.activity <= 0\n ? 0\n : Math.max(1, Math.round(spec.murmur.maxTalkers * Math.min(1, crowd)));\n for (let i = 0; i < this.slots.length; i++) {\n this.setSlotActive(i, this.activity > 0 && i < want, key);\n }\n }\n // Venue programs run only while the venue is actually live (a show or\n // party in progress), not merely while the empty hall is on screen.\n if (spec.program) {\n const shouldRun = this.activity > 0;\n if (shouldRun !== this.programOn) {\n this.programOn = shouldRun;\n const program = this.programFor(spec.program);\n if (shouldRun) program?.start();\n else program?.stop();\n }\n }\n } catch {\n /* transient audio error: recover on the next update */\n }\n }\n\n /** Ramp `param` to `target` unless that target (or one within\n * RAMP_TOLERANCE of it) is already where it was last sent. */\n private rampOnChange(param: { rampTo(value: number, time: number): unknown }, target: number, time: number): void {\n const sent = this.sentTargets.get(param);\n if (sent !== undefined && Math.abs(sent - target) <= Math.abs(target) * RAMP_TOLERANCE) return;\n this.sentTargets.set(param, target);\n param.rampTo(target, time);\n }\n\n /** Tear down the old scene's generators and start the new one's. */\n private switchScene(key: CrowdSceneKey | null): void {\n this.pendingKey = null;\n this.pendingCount = 0;\n for (const t of this.elementTimers) clearTimeout(t);\n this.elementTimers.clear();\n for (let i = 0; i < this.slots.length; i++) this.setSlotActive(i, false, key ?? \"lobby\");\n const oldProgram = this.scene ? CROWD_SCENES[this.scene].program : undefined;\n if (oldProgram && this.programOn) this.programFor(oldProgram)?.stop();\n this.programOn = false;\n this.scene = key;\n if (!key) return;\n for (const el of CROWD_SCENES[key].elements) this.scheduleElement(key, el);\n if (key === \"partyHall\") this.schedulePartyVoices(key);\n }\n\n private programFor(name: \"party\" | \"cinema\" | \"metro\"): PartyBand | CinemaProgram | MetroProgram | null {\n switch (name) {\n case \"party\":\n return this.party;\n case \"cinema\":\n return this.cinema;\n default:\n return this.metro;\n }\n }\n\n /** Start or stop one talker slot's phrase loop. */\n private setSlotActive(i: number, active: boolean, key: CrowdSceneKey): void {\n const slot = this.slots[i];\n if (slot.active === active) {\n // A loop that bailed out (activity dipped to zero mid-phrase) marks\n // itself inactive; nothing to do here unless the timer also died while\n // the flag stayed set, which the bail-out paths prevent.\n return;\n }\n slot.active = active;\n if (!active) {\n if (slot.timer !== null) clearTimeout(slot.timer);\n slot.timer = null;\n return;\n }\n const spec = CROWD_SCENES[key].murmur;\n slot.semi =\n spec?.semi ??\n PITCH_MAX_SEMI + (PITCH_MIN_SEMI - PITCH_MAX_SEMI) * pseudo(this.tick++ * 40503 + i * 13);\n const loop = (): void => {\n slot.timer = null;\n // Every bail-out clears the active flag so update() can restart the\n // loop cleanly when the scene comes back to life.\n if (this.disposed || !slot.active || this.scene !== key || this.activity <= 0) {\n slot.active = false;\n return;\n }\n const murmur = CROWD_SCENES[key].murmur;\n if (!murmur) {\n slot.active = false;\n return;\n }\n const wall = this.voices?.phrase(slot.gain, slot.semi, this.tick++) ?? null;\n const pause = murmur.pauseMin + murmur.pauseVar * pseudo(this.tick++ * 22695477 + i);\n slot.timer = setTimeout(loop, ((wall ?? 0.8) + pause) * 1000);\n };\n slot.timer = setTimeout(loop, pseudo(this.tick++ * 19349663 + i) * 1500);\n }\n\n /** Run one element spec's irregular firing loop: typing-style clusters,\n * paired notes, and gaps stretched by low activity (a 20 percent full\n * restaurant clinks a fifth as often, per the GDD's linear scaling). */\n private scheduleElement(key: CrowdSceneKey, el: ElementSpec): void {\n let clusterLeft = 0;\n const draw = (min: number, varS: number, salt: number): number =>\n min + varS * pseudo(this.tick++ * 2654435761 + salt);\n const loop = (): void => {\n if (this.disposed || this.scene !== key) return;\n let gap: number;\n if (this.activity > 0) {\n if (el.cluster && clusterLeft <= 0) {\n clusterLeft =\n el.cluster.min +\n Math.floor(pseudo(this.tick++ * 40503) * (el.cluster.max - el.cluster.min + 1));\n }\n this.fireElement(el);\n if (el.cluster) clusterLeft--;\n const inCluster = el.cluster !== undefined && clusterLeft > 0;\n let base: number;\n if (inCluster) base = draw(el.rateMin, el.rateVar, 1);\n else if (el.cluster) base = draw(el.cluster.pauseMin, el.cluster.pauseVar, 3);\n else base = draw(el.rateMin, el.rateVar, 1);\n gap = base / Math.max(0.2, Math.min(1, this.activity));\n } else {\n // Gated-off scene in view (an office at night): idle slowly instead of\n // polling at keystroke rate, and let any cluster finish later.\n clusterLeft = 0;\n gap = Math.max(2, el.cluster ? draw(el.cluster.pauseMin, el.cluster.pauseVar, 3) : draw(el.rateMin, el.rateVar, 1));\n }\n const timer = setTimeout(() => {\n this.elementTimers.delete(timer);\n loop();\n }, gap * 1000);\n this.elementTimers.add(timer);\n };\n const first = setTimeout(() => {\n this.elementTimers.delete(first);\n loop();\n }, pseudo(this.tick++ * 19349663) * 2000);\n this.elementTimers.add(first);\n }\n\n private fireElement(el: ElementSpec): void {\n try {\n const freq = el.freqMin + (el.freqMax - el.freqMin) * pseudo(this.tick++ * 40503 + 5);\n const gain = el.gainMin + (el.gainMax - el.gainMin) * pseudo(this.tick++ * 22695477 + 9);\n const now = Tone.now();\n const attack = el.attack ?? 0.004;\n if (el.kind === \"burst\") {\n // Envelope follows the spec so a page turn is a swish, not a click,\n // and the filter glides (a snap under a live tail crackles).\n this.noiseSynth?.set({ envelope: { attack, decay: Math.max(0.05, el.dur - attack), sustain: 0 } });\n this.noiseFilter?.frequency.rampTo(freq, 0.02);\n this.noiseSynth?.triggerAttackRelease(el.dur, now + 0.02, gain * 4);\n return;\n }\n const synth = el.kind === \"ping\" ? this.pingSynth : this.thudSynth;\n synth?.set({ envelope: { attack, decay: Math.max(0.06, el.dur - attack), sustain: 0 } });\n synth?.triggerAttackRelease(freq, el.dur, now, gain * 3);\n if (el.pair) {\n synth?.triggerAttackRelease(freq * el.pair.ratio, el.dur, now + el.pair.delayS, gain * 3 * el.pair.gainScale);\n }\n } catch {\n /* skip this detail */\n }\n }\n\n /** While the party runs: the owner's laughs and voice-bent whoops, spaced\n * far apart so they land as moments, not a loop. */\n private schedulePartyVoices(key: CrowdSceneKey): void {\n const slotGain = this.slots[0]?.gain;\n if (!slotGain) return;\n const arm = (gap: { min: number; varS: number }, fire: () => void): void => {\n const timer = setTimeout(\n () => {\n this.elementTimers.delete(timer);\n if (this.disposed || this.scene !== key) return;\n if (this.activity > 0) fire();\n arm(gap, fire);\n },\n (gap.min + gap.varS * pseudo(this.tick++ * 2654435761)) * 1000,\n );\n this.elementTimers.add(timer);\n };\n arm(LAUGH_GAP_S, () => this.voices?.laugh(slotGain, this.tick++));\n arm(WHOOP_GAP_S, () => this.voices?.whoop(slotGain, this.tick++));\n }\n\n dispose(): void {\n this.disposed = true;\n for (const t of this.elementTimers) clearTimeout(t);\n this.elementTimers.clear();\n for (const slot of this.slots) {\n if (slot.timer !== null) clearTimeout(slot.timer);\n slot.timer = null;\n try {\n slot.gain.dispose();\n } catch {\n /* already gone */\n }\n }\n this.slots = [];\n this.voices?.dispose();\n this.party?.dispose();\n this.cinema?.dispose();\n this.metro?.dispose();\n const nodes = [\n this.pingSynth, this.thudSynth, this.noiseSynth, this.noiseFilter,\n this.humLow, this.humHigh, this.humLfo, this.humSwell, this.humGain,\n this.toneGain, this.murmurFilter, this.murmurGain, this.master,\n ];\n for (const n of nodes) {\n try {\n n?.dispose();\n } catch {\n /* already gone */\n }\n }\n this.voices = null;\n this.party = null;\n this.cinema = null;\n this.metro = null;\n this.pingSynth = this.thudSynth = null;\n this.noiseSynth = null;\n this.noiseFilter = this.murmurFilter = null;\n this.humLow = this.humHigh = null;\n this.humLfo = null;\n this.humSwell = null;\n this.humGain = null;\n this.toneGain = this.murmurGain = this.master = null;\n }\n}\n"],"names":[],"mappings":";;;;;;AAiBA;;;;;;;;;AASG;AAEH;AACA,MAAM,WAAW,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE;AACzC,MAAM,WAAW,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE;AACzC;AACA,MAAM,WAAW,GAAG,GAAG;AACvB;AACkC;AAClC,MAAM,WAAW,GAAG,IAAI;AACxB;;AAEwD;AACxD,MAAM,kBAAkB,GAAG,CAAC;AAC5B;AAC+D;AAC/D,MAAM,cAAc,GAAG,IAAI;MASd,UAAU,CAAA;IAuCrB,WAAA,CAAY,IAAoB,EAAE,WAAmB,EAAA;QAtC7C,IAAA,CAAA,MAAM,GAAqB,IAAI;QAC/B,IAAA,CAAA,YAAY,GAAuB,IAAI;;QAEvC,IAAA,CAAA,UAAU,GAAqB,IAAI;QACnC,IAAA,CAAA,QAAQ,GAAqB,IAAI;QACjC,IAAA,CAAA,SAAS,GAA0B,IAAI;QACvC,IAAA,CAAA,SAAS,GAA0B,IAAI;QACvC,IAAA,CAAA,UAAU,GAA2B,IAAI;QACzC,IAAA,CAAA,WAAW,GAAuB,IAAI;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AI,CAAC,OAAO;AACnE,YAAA,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,MAAM;SAC/D;AACD,QAAA,KAAK,MAAM,CAAC,IAAI,KAAK,EAAE;AACrB,YAAA,IAAI;gBACF,CAAC,EAAE,OAAO,EAAE;YACd;AAAE,YAAA,MAAM;;YAER;QACF;AACA,QAAA,IAAI,CAAC,MAAM,GAAG,IAAI;AAClB,QAAA,IAAI,CAAC,KAAK,GAAG,IAAI;AACjB,QAAA,IAAI,CAAC,MAAM,GAAG,IAAI;AAClB,QAAA,IAAI,CAAC,KAAK,GAAG,IAAI;QACjB,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,GAAG,IAAI;AACtC,QAAA,IAAI,CAAC,UAAU,GAAG,IAAI;QACtB,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,YAAY,GAAG,IAAI;QAC3C,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,OAAO,GAAG,IAAI;AACjC,QAAA,IAAI,CAAC,MAAM,GAAG,IAAI;AAClB,QAAA,IAAI,CAAC,QAAQ,GAAG,IAAI;AACpB,QAAA,IAAI,CAAC,OAAO,GAAG,IAAI;AACnB,QAAA,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,MAAM,GAAG,IAAI;IACtD;AACD;;"}
@@ -0,0 +1,144 @@
1
+ import type { FacilityKind } from "../shared/types";
2
+ import type { Scene } from "./toneScenes";
3
+ /**
4
+ * Pure data and math for the crowd/venue ambience layer: the per-scene sound
5
+ * specs approved in the 2026-07-17 audition rounds (see the crowd-din GDD),
6
+ * the calm mask that keeps talkers off squeals and sibilance in the voice
7
+ * seed, the clock activity curves, and the party remix's note derivation from
8
+ * the game's own splash hook. No Tone.js dependency and no live state, so
9
+ * {@link CrowdLayer} builds on it and tests assert it directly.
10
+ *
11
+ * Two hard rules from the auditions bind everything here: human texture comes
12
+ * from voices and pitched tones, never bright noise; and every noise element
13
+ * names a steep-filter cutoff at or below 1800 Hz (the layer applies it with
14
+ * rolloff -48) at low gain.
15
+ */
16
+ /** The ambience scenes. Finer than the music {@link Scene} vocabulary: the
17
+ * food and cinema scenes split on the dominant facility kind. */
18
+ export type CrowdSceneKey = "lobby" | "office" | "condo" | "hotel" | "restaurant" | "fastFood" | "shop" | "cinema" | "partyHall" | "metro" | "outside";
19
+ /** Voiced background talk: how many people, how chatty, how muffled. */
20
+ export interface MurmurSpec {
21
+ /** Talker count at full occupancy; live count scales with the crowd factor. */
22
+ maxTalkers: number;
23
+ /** Pause between a talker's phrases: min plus a 0..1 draw times var, seconds. */
24
+ pauseMin: number;
25
+ pauseVar: number;
26
+ /** Steep lowpass cutoff on the murmur bus (through-the-room warmth). */
27
+ muffleHz: number;
28
+ /** Murmur bus gain at full activity. */
29
+ gain: number;
30
+ /** Fixed talker pitch shift, semitones (single-voice scenes: the office
31
+ * phone call, the condo TV, the cinema dialogue). Omitted: each talker
32
+ * draws its own voice from the down-only range. */
33
+ semi?: number;
34
+ }
35
+ /** A scheduled non-voiced detail sound. `ping` and `thud` are pitched tones;
36
+ * `burst` is a short noise hit through the steep noise filter at `cutoffHz`. */
37
+ export interface ElementSpec {
38
+ kind: "ping" | "thud" | "burst";
39
+ /** Tone frequency range (ping/thud) or noise filter cutoff (burst), Hz. */
40
+ freqMin: number;
41
+ freqMax: number;
42
+ /** Sound length, seconds. */
43
+ dur: number;
44
+ /** Peak gain range within the layer. */
45
+ gainMin: number;
46
+ gainMax: number;
47
+ /** Gap to the next firing: min plus a 0..1 draw times var, seconds. */
48
+ rateMin: number;
49
+ rateVar: number;
50
+ /** Envelope attack, seconds (default 0.004: a tick; longer = a swish). */
51
+ attack?: number;
52
+ /** Fire in clusters (typing): `min..max` hits at the rate gap, then a
53
+ * thinking pause of `pauseMin` plus a draw times `pauseVar` seconds. */
54
+ cluster?: {
55
+ min: number;
56
+ max: number;
57
+ pauseMin: number;
58
+ pauseVar: number;
59
+ };
60
+ /** A companion note (bird second chirp, horn dual tone): frequency times
61
+ * `ratio`, `delayS` later, at `gainScale` of the first. */
62
+ pair?: {
63
+ ratio: number;
64
+ delayS: number;
65
+ gainScale: number;
66
+ };
67
+ }
68
+ /** When a scene makes sound at all. `attendance` gates on the live crowd
69
+ * factor (venues sound only while people are actually inside). */
70
+ export type CrowdGate = "always" | "workday" | "condoDay" | "attendance";
71
+ export interface CrowdSceneSpec {
72
+ murmur?: MurmurSpec;
73
+ elements: ElementSpec[];
74
+ gate: CrowdGate;
75
+ /** Deliberate exception for the CITY'S OWN spaces (the street, the metro
76
+ * platform): they have people and traffic no matter what the tower tracks,
77
+ * so they never fall fully silent. The tower's indoor scenes never set
78
+ * this (honest rooms: empty means silent). */
79
+ crowdFloor?: number;
80
+ /** Scene runs a composed program (party band, cinema score, metro train)
81
+ * built by the programs module rather than murmur alone. */
82
+ program?: "party" | "cinema" | "metro";
83
+ }
84
+ /** The approved kit. Cutoffs are steep-filter values; gains sit inside the
85
+ * layer, whose master stays below the composed music bed. */
86
+ export declare const CROWD_SCENES: Record<CrowdSceneKey, CrowdSceneSpec>;
87
+ /** Resolve the ambience scene for a music scene and the dominant kind. The
88
+ * overview, quiet, and service scenes carry no crowd layer by design. */
89
+ export declare function resolveCrowdScene(scene: Scene, dominant: FacilityKind | "outside" | "lobby" | "empty"): CrowdSceneKey | null;
90
+ /** Clock activity 0..1 for a scene's gate at a sim hour (float, [0, 24)). */
91
+ export declare function hourActivity(gate: CrowdGate, hour: number): number;
92
+ /** Deterministic 0..1 hash (same shape as the music's) so ambience timing
93
+ * varies without Math.random. */
94
+ export declare function pseudo(n: number): number;
95
+ /** Calm-mask window length, seconds. */
96
+ export declare const CALM_WINDOW_S = 0.1;
97
+ /** Mark each 100 ms window of the talk seed calm (1) or not (0). */
98
+ export declare function computeCalmMask(samples: Float32Array, sampleRate: number): Uint8Array;
99
+ /** True when the segment starting at `startS` for `lenS` seconds is at least
100
+ * 85 percent calm windows. */
101
+ export declare function segmentIsCalm(mask: Uint8Array, sampleRate: number, startS: number, lenS: number): boolean;
102
+ /** Talker phrase and pitch constants (owner-approved: down only, long natural
103
+ * phrases with trapezoid ramps). */
104
+ export declare const PHRASE_MIN_S = 0.9;
105
+ export declare const PHRASE_VAR_S = 0.9;
106
+ export declare const PHRASE_RAMP_S = 0.12;
107
+ export declare const PITCH_MIN_SEMI = -6;
108
+ export declare const PITCH_MAX_SEMI = -1.5;
109
+ /** A whoop bends a calm chunk upward: playback rate 0.9 accelerating to 1.9
110
+ * across the chunk (rate at progress p in 0..1). */
111
+ export declare function whoopRate(p: number): number;
112
+ /** Laugh seed regions, seconds (outtake A then B with a 0.15 s gap). */
113
+ export declare const LAUGH_REGIONS: ReadonlyArray<readonly [number, number]>;
114
+ export declare const PARTY_BPM = 124;
115
+ /** The party plays the game's own splash hook, re-timed to the party tempo.
116
+ * Derived from {@link splashProgram} so the tune stays canonical. */
117
+ export declare function partyHookEvents(): Array<{
118
+ t: number;
119
+ midi: number;
120
+ dur: number;
121
+ }>;
122
+ /** Party band bar: root MIDI notes per 4-beat bar (D, A, Bm, G world). */
123
+ export declare const PARTY_BASS_ROOTS: number[];
124
+ /** Sparse plucked minor arpeggio: [midi, startBeat] over a slow 16-beat loop.
125
+ * Decaying plucks only; sustained low swells are banned (they drone). */
126
+ export declare const CINEMA_PLUCKS: ReadonlyArray<readonly [number, number]>;
127
+ /** Riser into a boom: sweep range and the boom partials (mid partials keep
128
+ * the hit audible on small speakers). */
129
+ export declare const CINEMA_RISER: {
130
+ fromHz: number;
131
+ toHz: number;
132
+ durS: number;
133
+ };
134
+ export declare const CINEMA_BOOM_HZ: number[];
135
+ /** The train event script, seconds from the event start. Wheel da-dum pairs
136
+ * roll in over a dark rumble, brakes ease, doors thunk, the pairs speed away. */
137
+ export interface TrainStep {
138
+ at: number;
139
+ kind: "daDum" | "rumbleIn" | "rumbleOut" | "brake" | "door";
140
+ gain: number;
141
+ }
142
+ export declare function trainEvent(): TrainStep[];
143
+ /** Seconds between train events while the metro stays in view. */
144
+ export declare const TRAIN_INTERVAL_S = 55;
@@ -0,0 +1,317 @@
1
+ import { splashProgram } from './toneTracks.js';
2
+
3
+ /** The approved kit. Cutoffs are steep-filter values; gains sit inside the
4
+ * layer, whose master stays below the composed music bed. */
5
+ const CROWD_SCENES = {
6
+ lobby: {
7
+ murmur: { maxTalkers: 6, pauseMin: 0.3, pauseVar: 1.4, muffleHz: 950, gain: 0.5 },
8
+ elements: [],
9
+ gate: "always",
10
+ },
11
+ office: {
12
+ murmur: { maxTalkers: 1, pauseMin: 1.6, pauseVar: 2.6, muffleHz: 850, gain: 0.33, semi: -3.5 },
13
+ elements: [
14
+ // Two typists: dark 12 ms ticks in bursts at the spec's 900 Hz seat; the
15
+ // rate is the per-keystroke gap and the cluster adds thinking pauses.
16
+ { kind: "burst", freqMin: 750, freqMax: 900, dur: 0.012, gainMin: 0.02, gainMax: 0.04, rateMin: 0.08, rateVar: 0.1, cluster: { min: 4, max: 12, pauseMin: 1.2, pauseVar: 3.0 } },
17
+ { kind: "burst", freqMin: 750, freqMax: 900, dur: 0.012, gainMin: 0.02, gainMax: 0.04, rateMin: 0.09, rateVar: 0.09, cluster: { min: 4, max: 12, pauseMin: 1.8, pauseVar: 3.4 } },
18
+ // Page turns: soft dark swishes, not ticks.
19
+ { kind: "burst", freqMin: 650, freqMax: 750, dur: 0.35, gainMin: 0.03, gainMax: 0.05, rateMin: 4, rateVar: 4, attack: 0.08 },
20
+ ],
21
+ gate: "workday",
22
+ },
23
+ condo: {
24
+ murmur: { maxTalkers: 3, pauseMin: 0.9, pauseVar: 1.8, muffleHz: 480, gain: 0.3, semi: -2.5 },
25
+ elements: [
26
+ // Domestic one-shots: a dish clink and a cupboard thud, both rare.
27
+ { kind: "ping", freqMin: 1150, freqMax: 1350, dur: 0.18, gainMin: 0.05, gainMax: 0.08, rateMin: 5, rateVar: 6 },
28
+ { kind: "thud", freqMin: 90, freqMax: 100, dur: 0.3, gainMin: 0.1, gainMax: 0.16, rateMin: 8, rateVar: 8 },
29
+ ],
30
+ gate: "condoDay",
31
+ },
32
+ hotel: {
33
+ murmur: { maxTalkers: 1, pauseMin: 2.2, pauseVar: 3.0, muffleHz: 420, gain: 0.24, semi: -4 },
34
+ elements: [
35
+ // Cart wheel bumps rolling by in a cluster, then a long quiet hall.
36
+ { kind: "thud", freqMin: 64, freqMax: 76, dur: 0.12, gainMin: 0.05, gainMax: 0.09, rateMin: 0.35, rateVar: 0.25, cluster: { min: 5, max: 9, pauseMin: 9, pauseVar: 10 } },
37
+ // A door thud down the hall (110 Hz body with its 70 Hz floor). 0.636 is
38
+ // the 70/110 interval.
39
+ { kind: "thud", freqMin: 105, freqMax: 115, dur: 0.35, gainMin: 0.14, gainMax: 0.2, rateMin: 9, rateVar: 9, pair: { ratio: 0.636, delayS: 0.02, gainScale: 0.8 } },
40
+ ],
41
+ gate: "always",
42
+ },
43
+ restaurant: {
44
+ murmur: { maxTalkers: 3, pauseMin: 1.5, pauseVar: 3.5, muffleHz: 800, gain: 0.34 },
45
+ // Three distinct one-shot characters on their own irregular cadences so no
46
+ // stretch repeats: a wide-pitch glass tinkle (a two-note pair, the second
47
+ // note kept in the warm band by capping the fundamental), a soft low plate
48
+ // set-down, and an occasional chair scrape. Only the chair scrape uses the
49
+ // shared mono noise voice, so nothing fights over it.
50
+ elements: [
51
+ { kind: "ping", freqMin: 850, freqMax: 1250, dur: 0.2, gainMin: 0.05, gainMax: 0.13, rateMin: 0.9, rateVar: 2.4, pair: { ratio: 1.5, delayS: 0.06, gainScale: 0.7 } },
52
+ { kind: "thud", freqMin: 150, freqMax: 210, dur: 0.18, gainMin: 0.06, gainMax: 0.1, rateMin: 4, rateVar: 4, attack: 0.006 },
53
+ { kind: "burst", freqMin: 360, freqMax: 420, dur: 0.4, gainMin: 0.06, gainMax: 0.1, rateMin: 6, rateVar: 5, attack: 0.12 },
54
+ ],
55
+ gate: "attendance",
56
+ },
57
+ fastFood: {
58
+ murmur: { maxTalkers: 5, pauseMin: 0.4, pauseVar: 1.0, muffleHz: 1050, gain: 0.46 },
59
+ // Varied counter life on distinct cadences: tray clatter in short clusters
60
+ // (not a steady tick), a two-note register tone at varied pitch, and a low
61
+ // counter thud. Only the tray clatter uses the shared mono noise voice; the
62
+ // register and thud are pitched, so a long noise texture can't be chopped
63
+ // by the frequent tray hits.
64
+ elements: [
65
+ { kind: "burst", freqMin: 1300, freqMax: 1800, dur: 0.06, gainMin: 0.05, gainMax: 0.1, rateMin: 0.09, rateVar: 0.09, cluster: { min: 2, max: 4, pauseMin: 0.7, pauseVar: 1.6 }, attack: 0.012 },
66
+ { kind: "ping", freqMin: 900, freqMax: 1400, dur: 0.15, gainMin: 0.05, gainMax: 0.08, rateMin: 1.3, rateVar: 1.8, pair: { ratio: 1.33, delayS: 0.11, gainScale: 0.7 } },
67
+ { kind: "thud", freqMin: 120, freqMax: 170, dur: 0.2, gainMin: 0.05, gainMax: 0.08, rateMin: 3, rateVar: 4, attack: 0.006 },
68
+ ],
69
+ gate: "attendance",
70
+ },
71
+ shop: {
72
+ murmur: { maxTalkers: 2, pauseMin: 1.2, pauseVar: 2.4, muffleHz: 950, gain: 0.3 },
73
+ elements: [
74
+ // Occasional soft browse rustle.
75
+ { kind: "burst", freqMin: 1050, freqMax: 1150, dur: 0.42, gainMin: 0.04, gainMax: 0.07, rateMin: 2.2, rateVar: 2.8, attack: 0.1 },
76
+ ],
77
+ gate: "attendance",
78
+ },
79
+ cinema: {
80
+ murmur: { maxTalkers: 1, pauseMin: 1.0, pauseVar: 2.2, muffleHz: 650, gain: 0.3, semi: -5.5 },
81
+ elements: [],
82
+ gate: "attendance",
83
+ program: "cinema",
84
+ },
85
+ partyHall: {
86
+ murmur: { maxTalkers: 2, pauseMin: 1.8, pauseVar: 3.0, muffleHz: 900, gain: 0.3 },
87
+ elements: [],
88
+ gate: "attendance",
89
+ program: "party",
90
+ },
91
+ metro: {
92
+ murmur: { maxTalkers: 4, pauseMin: 0.6, pauseVar: 1.6, muffleHz: 900, gain: 0.42 },
93
+ elements: [],
94
+ gate: "always",
95
+ // The platform belongs to the city, like the street: trains run and a few
96
+ // riders pass through whether or not the tower's drawn crowd is in view,
97
+ // so the station (and its train events) never falls fully silent.
98
+ crowdFloor: 0.3,
99
+ program: "metro",
100
+ },
101
+ outside: {
102
+ murmur: { maxTalkers: 2, pauseMin: 1.6, pauseVar: 2.8, muffleHz: 520, gain: 0.3 },
103
+ elements: [
104
+ // Warm two-note bird chirps.
105
+ { kind: "ping", freqMin: 1300, freqMax: 1550, dur: 0.09, gainMin: 0.05, gainMax: 0.07, rateMin: 3, rateVar: 4.5, pair: { ratio: 1.25, delayS: 0.11, gainScale: 0.7 } },
106
+ // A distant car horn, rare (a warm dual tone).
107
+ { kind: "ping", freqMin: 365, freqMax: 375, dur: 0.35, gainMin: 0.07, gainMax: 0.09, rateMin: 14, rateVar: 12, pair: { ratio: 1.26, delayS: 0, gainScale: 0.8 } },
108
+ ],
109
+ gate: "always",
110
+ crowdFloor: 0.35,
111
+ },
112
+ };
113
+ /** Resolve the ambience scene for a music scene and the dominant kind. The
114
+ * overview, quiet, and service scenes carry no crowd layer by design. */
115
+ function resolveCrowdScene(scene, dominant) {
116
+ switch (scene) {
117
+ case "lobby":
118
+ return "lobby";
119
+ case "office":
120
+ return "office";
121
+ case "residential":
122
+ return "condo";
123
+ case "hotel":
124
+ return "hotel";
125
+ case "food":
126
+ return dominant === "fastFood" ? "fastFood" : "restaurant";
127
+ case "retail":
128
+ return "shop";
129
+ case "cinema":
130
+ // Weddings are parties (the same attendance-venue family).
131
+ return dominant === "partyHall" || dominant === "weddingHall" ? "partyHall" : "cinema";
132
+ case "metro":
133
+ return "metro";
134
+ case "outside":
135
+ return "outside";
136
+ default:
137
+ return null; // overview / quiet / service: music and room tone only
138
+ }
139
+ }
140
+ /** Clock activity 0..1 for a scene's gate at a sim hour (float, [0, 24)). */
141
+ function hourActivity(gate, hour) {
142
+ const ramp = (from, to) => clamp01((hour - from) / (to - from));
143
+ switch (gate) {
144
+ case "workday":
145
+ // Offices ramp in 8-9, hold 9-17, ramp out 17-19, silent overnight.
146
+ if (hour < 8 || hour >= 19)
147
+ return 0;
148
+ if (hour < 9)
149
+ return ramp(8, 9);
150
+ if (hour < 17)
151
+ return 1;
152
+ return 1 - ramp(17, 19);
153
+ case "condoDay":
154
+ // Homes: departure bustle 7-9, midday hush 9-15 (a fifth of full, the
155
+ // one-parent-home texture), ramp back 15-17, evening 17-21, ramp down
156
+ // 21-23, silent overnight.
157
+ if (hour < 7 || hour >= 23)
158
+ return 0;
159
+ if (hour < 9)
160
+ return 1;
161
+ if (hour < 15)
162
+ return 0.2;
163
+ if (hour < 17)
164
+ return 0.2 + 0.8 * ramp(15, 17);
165
+ if (hour < 21)
166
+ return 1;
167
+ return 1 - ramp(21, 23);
168
+ default:
169
+ return 1; // "always" and "attendance" (the crowd factor is the gate)
170
+ }
171
+ }
172
+ function clamp01(x) {
173
+ return Math.max(0, Math.min(1, x));
174
+ }
175
+ /** Deterministic 0..1 hash (same shape as the music's) so ambience timing
176
+ * varies without Math.random. */
177
+ function pseudo(n) {
178
+ let x = n | 0;
179
+ x = Math.imul(x ^ (x >>> 16), 0x45d9f3b);
180
+ x = Math.imul(x ^ (x >>> 16), 0x45d9f3b);
181
+ x = x ^ (x >>> 16);
182
+ return ((x >>> 0) % 10000) / 10000;
183
+ }
184
+ // ---- Voice seed math ------------------------------------------------------
185
+ /** Calm-mask window length, seconds. */
186
+ const CALM_WINDOW_S = 0.1;
187
+ /** Windows whose zero-crossing rate reads above this (Hz) are squeal or
188
+ * sibilance territory and never sampled. */
189
+ const CALM_MAX_ZCR_HZ = 1500;
190
+ /** Windows louder than this RMS are shouts; never sampled either. */
191
+ const CALM_MAX_RMS = 0.32;
192
+ /** A phrase segment must be at least this fraction calm windows. */
193
+ const CALM_SEGMENT_FRACTION = 0.85;
194
+ /** Mark each 100 ms window of the talk seed calm (1) or not (0). */
195
+ function computeCalmMask(samples, sampleRate) {
196
+ const win = Math.max(1, Math.floor(CALM_WINDOW_S * sampleRate));
197
+ const mask = new Uint8Array(Math.ceil(samples.length / win));
198
+ for (let w = 0; w < mask.length; w++) {
199
+ let crossings = 0;
200
+ let energy = 0;
201
+ let count = 0;
202
+ for (let i = w * win + 1; i < Math.min((w + 1) * win, samples.length); i++) {
203
+ if (samples[i] >= 0 !== samples[i - 1] >= 0)
204
+ crossings++;
205
+ energy += samples[i] * samples[i];
206
+ count++;
207
+ }
208
+ if (count === 0) {
209
+ mask[w] = 1;
210
+ continue;
211
+ }
212
+ const zcrHz = (crossings / count) * (sampleRate / 2);
213
+ const rms = Math.sqrt(energy / count);
214
+ mask[w] = zcrHz < CALM_MAX_ZCR_HZ && rms < CALM_MAX_RMS ? 1 : 0;
215
+ }
216
+ return mask;
217
+ }
218
+ /** True when the segment starting at `startS` for `lenS` seconds is at least
219
+ * 85 percent calm windows. */
220
+ function segmentIsCalm(mask, sampleRate, startS, lenS) {
221
+ const win = Math.max(1, Math.floor(CALM_WINDOW_S * sampleRate));
222
+ const w0 = Math.floor((startS * sampleRate) / win);
223
+ const w1 = Math.floor(((startS + lenS) * sampleRate) / win);
224
+ let calm = 0;
225
+ let total = 0;
226
+ for (let w = w0; w <= Math.min(w1, mask.length - 1); w++) {
227
+ total++;
228
+ if (mask[w])
229
+ calm++;
230
+ }
231
+ return total > 0 && calm / total >= CALM_SEGMENT_FRACTION;
232
+ }
233
+ /** Talker phrase and pitch constants (owner-approved: down only, long natural
234
+ * phrases with trapezoid ramps). */
235
+ const PHRASE_MIN_S = 0.9;
236
+ const PHRASE_VAR_S = 0.9;
237
+ const PHRASE_RAMP_S = 0.12;
238
+ const PITCH_MIN_SEMI = -6;
239
+ const PITCH_MAX_SEMI = -1.5;
240
+ /** A whoop bends a calm chunk upward: playback rate 0.9 accelerating to 1.9
241
+ * across the chunk (rate at progress p in 0..1). */
242
+ function whoopRate(p) {
243
+ return 0.9 + 1.0 * p * p;
244
+ }
245
+ /** Laugh seed regions, seconds (outtake A then B with a 0.15 s gap). */
246
+ const LAUGH_REGIONS = [
247
+ [0, 0.8],
248
+ [0.95, 2.55],
249
+ ];
250
+ // ---- Party remix ----------------------------------------------------------
251
+ const PARTY_BPM = 124;
252
+ /** Hook tempo the splash theme is authored at (see toneTracks). */
253
+ const HOOK_BPM = 96;
254
+ /** The party's loop is 16 beats; the full Terrace tune runs 36, so the remix
255
+ * quotes its first phrase (the rise and fall) and loops that. Authored beats. */
256
+ const HOOK_QUOTE_BEATS = 16;
257
+ /** The party plays the game's own splash hook, re-timed to the party tempo.
258
+ * Derived from {@link splashProgram} so the tune stays canonical. */
259
+ function partyHookEvents() {
260
+ const scale = HOOK_BPM / PARTY_BPM;
261
+ const cutoff = HOOK_QUOTE_BEATS * (60 / HOOK_BPM);
262
+ return splashProgram()
263
+ .events.filter((e) => e.voice === "hook" && e.t < cutoff)
264
+ .map((e) => ({
265
+ t: e.t * scale,
266
+ midi: e.midi,
267
+ // Clip the quote's tail at the cutoff so the last note never rings
268
+ // across the party Part's loop restart onto the next pass's downbeat.
269
+ // The floor guards future data: a note authored right at the cutoff
270
+ // must clip to a tiny blip, never a zero or negative duration.
271
+ dur: Math.max(0.01, Math.min(e.dur, cutoff - e.t)) * scale,
272
+ }));
273
+ }
274
+ /** Party band bar: root MIDI notes per 4-beat bar (D, A, Bm, G world). */
275
+ const PARTY_BASS_ROOTS = [38, 33, 35, 31];
276
+ // ---- Cinema program -------------------------------------------------------
277
+ /** Sparse plucked minor arpeggio: [midi, startBeat] over a slow 16-beat loop.
278
+ * Decaying plucks only; sustained low swells are banned (they drone). */
279
+ const CINEMA_PLUCKS = [
280
+ [62, 0.8],
281
+ [65, 2.1],
282
+ [69, 3.3],
283
+ [74, 4.4],
284
+ [69, 6.0],
285
+ [65, 7.2],
286
+ [62, 8.3],
287
+ [65, 11.6],
288
+ [69, 12.8],
289
+ [62, 14.2],
290
+ ];
291
+ /** Riser into a boom: sweep range and the boom partials (mid partials keep
292
+ * the hit audible on small speakers). */
293
+ const CINEMA_RISER = { fromHz: 180, toHz: 420, durS: 1.0 };
294
+ const CINEMA_BOOM_HZ = [57, 110, 225];
295
+ function trainEvent() {
296
+ const steps = [{ at: 0.8, kind: "rumbleIn", gain: 1 }];
297
+ for (let t = 0.8; t < 5.8; t += 0.6) {
298
+ steps.push({ at: t, kind: "daDum", gain: 0.12 + 0.5 * (t / 5.8) });
299
+ }
300
+ steps.push({ at: 6.2, kind: "brake", gain: 0.12 });
301
+ steps.push({ at: 7.6, kind: "door", gain: 0.25 });
302
+ steps.push({ at: 9.2, kind: "door", gain: 0.22 });
303
+ steps.push({ at: 10.2, kind: "rumbleOut", gain: 1 });
304
+ let gap = 0.7;
305
+ let gain = 0.55;
306
+ for (let t = 10.2; t < 15.4; t += gap) {
307
+ steps.push({ at: t, kind: "daDum", gain });
308
+ gap = Math.max(0.32, gap * 0.88);
309
+ gain *= 0.87;
310
+ }
311
+ return steps;
312
+ }
313
+ /** Seconds between train events while the metro stays in view. */
314
+ const TRAIN_INTERVAL_S = 55;
315
+
316
+ export { CALM_WINDOW_S, CINEMA_BOOM_HZ, CINEMA_PLUCKS, CINEMA_RISER, CROWD_SCENES, LAUGH_REGIONS, PARTY_BASS_ROOTS, PARTY_BPM, PHRASE_MIN_S, PHRASE_RAMP_S, PHRASE_VAR_S, PITCH_MAX_SEMI, PITCH_MIN_SEMI, TRAIN_INTERVAL_S, computeCalmMask, hourActivity, partyHookEvents, pseudo, resolveCrowdScene, segmentIsCalm, trainEvent, whoopRate };
317
+ //# sourceMappingURL=toneCrowdData.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toneCrowdData.js","sources":["../../src/audio/toneCrowdData.ts"],"sourcesContent":["import type { FacilityKind } from \"../shared/types\";\nimport type { Scene } from \"./toneScenes\";\nimport { splashProgram } from \"./toneTracks\";\n\n/**\n * Pure data and math for the crowd/venue ambience layer: the per-scene sound\n * specs approved in the 2026-07-17 audition rounds (see the crowd-din GDD),\n * the calm mask that keeps talkers off squeals and sibilance in the voice\n * seed, the clock activity curves, and the party remix's note derivation from\n * the game's own splash hook. No Tone.js dependency and no live state, so\n * {@link CrowdLayer} builds on it and tests assert it directly.\n *\n * Two hard rules from the auditions bind everything here: human texture comes\n * from voices and pitched tones, never bright noise; and every noise element\n * names a steep-filter cutoff at or below 1800 Hz (the layer applies it with\n * rolloff -48) at low gain.\n */\n\n/** The ambience scenes. Finer than the music {@link Scene} vocabulary: the\n * food and cinema scenes split on the dominant facility kind. */\nexport type CrowdSceneKey =\n | \"lobby\"\n | \"office\"\n | \"condo\"\n | \"hotel\"\n | \"restaurant\"\n | \"fastFood\"\n | \"shop\"\n | \"cinema\"\n | \"partyHall\"\n | \"metro\"\n | \"outside\";\n\n/** Voiced background talk: how many people, how chatty, how muffled. */\nexport interface MurmurSpec {\n /** Talker count at full occupancy; live count scales with the crowd factor. */\n maxTalkers: number;\n /** Pause between a talker's phrases: min plus a 0..1 draw times var, seconds. */\n pauseMin: number;\n pauseVar: number;\n /** Steep lowpass cutoff on the murmur bus (through-the-room warmth). */\n muffleHz: number;\n /** Murmur bus gain at full activity. */\n gain: number;\n /** Fixed talker pitch shift, semitones (single-voice scenes: the office\n * phone call, the condo TV, the cinema dialogue). Omitted: each talker\n * draws its own voice from the down-only range. */\n semi?: number;\n}\n\n/** A scheduled non-voiced detail sound. `ping` and `thud` are pitched tones;\n * `burst` is a short noise hit through the steep noise filter at `cutoffHz`. */\nexport interface ElementSpec {\n kind: \"ping\" | \"thud\" | \"burst\";\n /** Tone frequency range (ping/thud) or noise filter cutoff (burst), Hz. */\n freqMin: number;\n freqMax: number;\n /** Sound length, seconds. */\n dur: number;\n /** Peak gain range within the layer. */\n gainMin: number;\n gainMax: number;\n /** Gap to the next firing: min plus a 0..1 draw times var, seconds. */\n rateMin: number;\n rateVar: number;\n /** Envelope attack, seconds (default 0.004: a tick; longer = a swish). */\n attack?: number;\n /** Fire in clusters (typing): `min..max` hits at the rate gap, then a\n * thinking pause of `pauseMin` plus a draw times `pauseVar` seconds. */\n cluster?: { min: number; max: number; pauseMin: number; pauseVar: number };\n /** A companion note (bird second chirp, horn dual tone): frequency times\n * `ratio`, `delayS` later, at `gainScale` of the first. */\n pair?: { ratio: number; delayS: number; gainScale: number };\n}\n\n/** When a scene makes sound at all. `attendance` gates on the live crowd\n * factor (venues sound only while people are actually inside). */\nexport type CrowdGate = \"always\" | \"workday\" | \"condoDay\" | \"attendance\";\n\nexport interface CrowdSceneSpec {\n murmur?: MurmurSpec;\n elements: ElementSpec[];\n gate: CrowdGate;\n /** Deliberate exception for the CITY'S OWN spaces (the street, the metro\n * platform): they have people and traffic no matter what the tower tracks,\n * so they never fall fully silent. The tower's indoor scenes never set\n * this (honest rooms: empty means silent). */\n crowdFloor?: number;\n /** Scene runs a composed program (party band, cinema score, metro train)\n * built by the programs module rather than murmur alone. */\n program?: \"party\" | \"cinema\" | \"metro\";\n}\n\n/** The approved kit. Cutoffs are steep-filter values; gains sit inside the\n * layer, whose master stays below the composed music bed. */\nexport const CROWD_SCENES: Record<CrowdSceneKey, CrowdSceneSpec> = {\n lobby: {\n murmur: { maxTalkers: 6, pauseMin: 0.3, pauseVar: 1.4, muffleHz: 950, gain: 0.5 },\n elements: [],\n gate: \"always\",\n },\n office: {\n murmur: { maxTalkers: 1, pauseMin: 1.6, pauseVar: 2.6, muffleHz: 850, gain: 0.33, semi: -3.5 },\n elements: [\n // Two typists: dark 12 ms ticks in bursts at the spec's 900 Hz seat; the\n // rate is the per-keystroke gap and the cluster adds thinking pauses.\n { kind: \"burst\", freqMin: 750, freqMax: 900, dur: 0.012, gainMin: 0.02, gainMax: 0.04, rateMin: 0.08, rateVar: 0.1, cluster: { min: 4, max: 12, pauseMin: 1.2, pauseVar: 3.0 } },\n { kind: \"burst\", freqMin: 750, freqMax: 900, dur: 0.012, gainMin: 0.02, gainMax: 0.04, rateMin: 0.09, rateVar: 0.09, cluster: { min: 4, max: 12, pauseMin: 1.8, pauseVar: 3.4 } },\n // Page turns: soft dark swishes, not ticks.\n { kind: \"burst\", freqMin: 650, freqMax: 750, dur: 0.35, gainMin: 0.03, gainMax: 0.05, rateMin: 4, rateVar: 4, attack: 0.08 },\n ],\n gate: \"workday\",\n },\n condo: {\n murmur: { maxTalkers: 3, pauseMin: 0.9, pauseVar: 1.8, muffleHz: 480, gain: 0.3, semi: -2.5 },\n elements: [\n // Domestic one-shots: a dish clink and a cupboard thud, both rare.\n { kind: \"ping\", freqMin: 1150, freqMax: 1350, dur: 0.18, gainMin: 0.05, gainMax: 0.08, rateMin: 5, rateVar: 6 },\n { kind: \"thud\", freqMin: 90, freqMax: 100, dur: 0.3, gainMin: 0.1, gainMax: 0.16, rateMin: 8, rateVar: 8 },\n ],\n gate: \"condoDay\",\n },\n hotel: {\n murmur: { maxTalkers: 1, pauseMin: 2.2, pauseVar: 3.0, muffleHz: 420, gain: 0.24, semi: -4 },\n elements: [\n // Cart wheel bumps rolling by in a cluster, then a long quiet hall.\n { kind: \"thud\", freqMin: 64, freqMax: 76, dur: 0.12, gainMin: 0.05, gainMax: 0.09, rateMin: 0.35, rateVar: 0.25, cluster: { min: 5, max: 9, pauseMin: 9, pauseVar: 10 } },\n // A door thud down the hall (110 Hz body with its 70 Hz floor). 0.636 is\n // the 70/110 interval.\n { kind: \"thud\", freqMin: 105, freqMax: 115, dur: 0.35, gainMin: 0.14, gainMax: 0.2, rateMin: 9, rateVar: 9, pair: { ratio: 0.636, delayS: 0.02, gainScale: 0.8 } },\n ],\n gate: \"always\",\n },\n restaurant: {\n murmur: { maxTalkers: 3, pauseMin: 1.5, pauseVar: 3.5, muffleHz: 800, gain: 0.34 },\n // Three distinct one-shot characters on their own irregular cadences so no\n // stretch repeats: a wide-pitch glass tinkle (a two-note pair, the second\n // note kept in the warm band by capping the fundamental), a soft low plate\n // set-down, and an occasional chair scrape. Only the chair scrape uses the\n // shared mono noise voice, so nothing fights over it.\n elements: [\n { kind: \"ping\", freqMin: 850, freqMax: 1250, dur: 0.2, gainMin: 0.05, gainMax: 0.13, rateMin: 0.9, rateVar: 2.4, pair: { ratio: 1.5, delayS: 0.06, gainScale: 0.7 } },\n { kind: \"thud\", freqMin: 150, freqMax: 210, dur: 0.18, gainMin: 0.06, gainMax: 0.1, rateMin: 4, rateVar: 4, attack: 0.006 },\n { kind: \"burst\", freqMin: 360, freqMax: 420, dur: 0.4, gainMin: 0.06, gainMax: 0.1, rateMin: 6, rateVar: 5, attack: 0.12 },\n ],\n gate: \"attendance\",\n },\n fastFood: {\n murmur: { maxTalkers: 5, pauseMin: 0.4, pauseVar: 1.0, muffleHz: 1050, gain: 0.46 },\n // Varied counter life on distinct cadences: tray clatter in short clusters\n // (not a steady tick), a two-note register tone at varied pitch, and a low\n // counter thud. Only the tray clatter uses the shared mono noise voice; the\n // register and thud are pitched, so a long noise texture can't be chopped\n // by the frequent tray hits.\n elements: [\n { kind: \"burst\", freqMin: 1300, freqMax: 1800, dur: 0.06, gainMin: 0.05, gainMax: 0.1, rateMin: 0.09, rateVar: 0.09, cluster: { min: 2, max: 4, pauseMin: 0.7, pauseVar: 1.6 }, attack: 0.012 },\n { kind: \"ping\", freqMin: 900, freqMax: 1400, dur: 0.15, gainMin: 0.05, gainMax: 0.08, rateMin: 1.3, rateVar: 1.8, pair: { ratio: 1.33, delayS: 0.11, gainScale: 0.7 } },\n { kind: \"thud\", freqMin: 120, freqMax: 170, dur: 0.2, gainMin: 0.05, gainMax: 0.08, rateMin: 3, rateVar: 4, attack: 0.006 },\n ],\n gate: \"attendance\",\n },\n shop: {\n murmur: { maxTalkers: 2, pauseMin: 1.2, pauseVar: 2.4, muffleHz: 950, gain: 0.3 },\n elements: [\n // Occasional soft browse rustle.\n { kind: \"burst\", freqMin: 1050, freqMax: 1150, dur: 0.42, gainMin: 0.04, gainMax: 0.07, rateMin: 2.2, rateVar: 2.8, attack: 0.1 },\n ],\n gate: \"attendance\",\n },\n cinema: {\n murmur: { maxTalkers: 1, pauseMin: 1.0, pauseVar: 2.2, muffleHz: 650, gain: 0.3, semi: -5.5 },\n elements: [],\n gate: \"attendance\",\n program: \"cinema\",\n },\n partyHall: {\n murmur: { maxTalkers: 2, pauseMin: 1.8, pauseVar: 3.0, muffleHz: 900, gain: 0.3 },\n elements: [],\n gate: \"attendance\",\n program: \"party\",\n },\n metro: {\n murmur: { maxTalkers: 4, pauseMin: 0.6, pauseVar: 1.6, muffleHz: 900, gain: 0.42 },\n elements: [],\n gate: \"always\",\n // The platform belongs to the city, like the street: trains run and a few\n // riders pass through whether or not the tower's drawn crowd is in view,\n // so the station (and its train events) never falls fully silent.\n crowdFloor: 0.3,\n program: \"metro\",\n },\n outside: {\n murmur: { maxTalkers: 2, pauseMin: 1.6, pauseVar: 2.8, muffleHz: 520, gain: 0.3 },\n elements: [\n // Warm two-note bird chirps.\n { kind: \"ping\", freqMin: 1300, freqMax: 1550, dur: 0.09, gainMin: 0.05, gainMax: 0.07, rateMin: 3, rateVar: 4.5, pair: { ratio: 1.25, delayS: 0.11, gainScale: 0.7 } },\n // A distant car horn, rare (a warm dual tone).\n { kind: \"ping\", freqMin: 365, freqMax: 375, dur: 0.35, gainMin: 0.07, gainMax: 0.09, rateMin: 14, rateVar: 12, pair: { ratio: 1.26, delayS: 0, gainScale: 0.8 } },\n ],\n gate: \"always\",\n crowdFloor: 0.35,\n },\n};\n\n/** Resolve the ambience scene for a music scene and the dominant kind. The\n * overview, quiet, and service scenes carry no crowd layer by design. */\nexport function resolveCrowdScene(\n scene: Scene,\n dominant: FacilityKind | \"outside\" | \"lobby\" | \"empty\",\n): CrowdSceneKey | null {\n switch (scene) {\n case \"lobby\":\n return \"lobby\";\n case \"office\":\n return \"office\";\n case \"residential\":\n return \"condo\";\n case \"hotel\":\n return \"hotel\";\n case \"food\":\n return dominant === \"fastFood\" ? \"fastFood\" : \"restaurant\";\n case \"retail\":\n return \"shop\";\n case \"cinema\":\n // Weddings are parties (the same attendance-venue family).\n return dominant === \"partyHall\" || dominant === \"weddingHall\" ? \"partyHall\" : \"cinema\";\n case \"metro\":\n return \"metro\";\n case \"outside\":\n return \"outside\";\n default:\n return null; // overview / quiet / service: music and room tone only\n }\n}\n\n/** Clock activity 0..1 for a scene's gate at a sim hour (float, [0, 24)). */\nexport function hourActivity(gate: CrowdGate, hour: number): number {\n const ramp = (from: number, to: number): number => clamp01((hour - from) / (to - from));\n switch (gate) {\n case \"workday\":\n // Offices ramp in 8-9, hold 9-17, ramp out 17-19, silent overnight.\n if (hour < 8 || hour >= 19) return 0;\n if (hour < 9) return ramp(8, 9);\n if (hour < 17) return 1;\n return 1 - ramp(17, 19);\n case \"condoDay\":\n // Homes: departure bustle 7-9, midday hush 9-15 (a fifth of full, the\n // one-parent-home texture), ramp back 15-17, evening 17-21, ramp down\n // 21-23, silent overnight.\n if (hour < 7 || hour >= 23) return 0;\n if (hour < 9) return 1;\n if (hour < 15) return 0.2;\n if (hour < 17) return 0.2 + 0.8 * ramp(15, 17);\n if (hour < 21) return 1;\n return 1 - ramp(21, 23);\n default:\n return 1; // \"always\" and \"attendance\" (the crowd factor is the gate)\n }\n}\n\nfunction clamp01(x: number): number {\n return Math.max(0, Math.min(1, x));\n}\n\n/** Deterministic 0..1 hash (same shape as the music's) so ambience timing\n * varies without Math.random. */\nexport function pseudo(n: number): number {\n let x = n | 0;\n x = Math.imul(x ^ (x >>> 16), 0x45d9f3b);\n x = Math.imul(x ^ (x >>> 16), 0x45d9f3b);\n x = x ^ (x >>> 16);\n return ((x >>> 0) % 10000) / 10000;\n}\n\n// ---- Voice seed math ------------------------------------------------------\n\n/** Calm-mask window length, seconds. */\nexport const CALM_WINDOW_S = 0.1;\n/** Windows whose zero-crossing rate reads above this (Hz) are squeal or\n * sibilance territory and never sampled. */\nconst CALM_MAX_ZCR_HZ = 1500;\n/** Windows louder than this RMS are shouts; never sampled either. */\nconst CALM_MAX_RMS = 0.32;\n/** A phrase segment must be at least this fraction calm windows. */\nconst CALM_SEGMENT_FRACTION = 0.85;\n\n/** Mark each 100 ms window of the talk seed calm (1) or not (0). */\nexport function computeCalmMask(samples: Float32Array, sampleRate: number): Uint8Array {\n const win = Math.max(1, Math.floor(CALM_WINDOW_S * sampleRate));\n const mask = new Uint8Array(Math.ceil(samples.length / win));\n for (let w = 0; w < mask.length; w++) {\n let crossings = 0;\n let energy = 0;\n let count = 0;\n for (let i = w * win + 1; i < Math.min((w + 1) * win, samples.length); i++) {\n if (samples[i] >= 0 !== samples[i - 1] >= 0) crossings++;\n energy += samples[i] * samples[i];\n count++;\n }\n if (count === 0) {\n mask[w] = 1;\n continue;\n }\n const zcrHz = (crossings / count) * (sampleRate / 2);\n const rms = Math.sqrt(energy / count);\n mask[w] = zcrHz < CALM_MAX_ZCR_HZ && rms < CALM_MAX_RMS ? 1 : 0;\n }\n return mask;\n}\n\n/** True when the segment starting at `startS` for `lenS` seconds is at least\n * 85 percent calm windows. */\nexport function segmentIsCalm(\n mask: Uint8Array,\n sampleRate: number,\n startS: number,\n lenS: number,\n): boolean {\n const win = Math.max(1, Math.floor(CALM_WINDOW_S * sampleRate));\n const w0 = Math.floor((startS * sampleRate) / win);\n const w1 = Math.floor(((startS + lenS) * sampleRate) / win);\n let calm = 0;\n let total = 0;\n for (let w = w0; w <= Math.min(w1, mask.length - 1); w++) {\n total++;\n if (mask[w]) calm++;\n }\n return total > 0 && calm / total >= CALM_SEGMENT_FRACTION;\n}\n\n/** Talker phrase and pitch constants (owner-approved: down only, long natural\n * phrases with trapezoid ramps). */\nexport const PHRASE_MIN_S = 0.9;\nexport const PHRASE_VAR_S = 0.9;\nexport const PHRASE_RAMP_S = 0.12;\nexport const PITCH_MIN_SEMI = -6;\nexport const PITCH_MAX_SEMI = -1.5;\n\n/** A whoop bends a calm chunk upward: playback rate 0.9 accelerating to 1.9\n * across the chunk (rate at progress p in 0..1). */\nexport function whoopRate(p: number): number {\n return 0.9 + 1.0 * p * p;\n}\n\n/** Laugh seed regions, seconds (outtake A then B with a 0.15 s gap). */\nexport const LAUGH_REGIONS: ReadonlyArray<readonly [number, number]> = [\n [0, 0.8],\n [0.95, 2.55],\n];\n\n// ---- Party remix ----------------------------------------------------------\n\nexport const PARTY_BPM = 124;\n/** Hook tempo the splash theme is authored at (see toneTracks). */\nconst HOOK_BPM = 96;\n/** The party's loop is 16 beats; the full Terrace tune runs 36, so the remix\n * quotes its first phrase (the rise and fall) and loops that. Authored beats. */\nconst HOOK_QUOTE_BEATS = 16;\n\n/** The party plays the game's own splash hook, re-timed to the party tempo.\n * Derived from {@link splashProgram} so the tune stays canonical. */\nexport function partyHookEvents(): Array<{ t: number; midi: number; dur: number }> {\n const scale = HOOK_BPM / PARTY_BPM;\n const cutoff = HOOK_QUOTE_BEATS * (60 / HOOK_BPM);\n return splashProgram()\n .events.filter((e) => e.voice === \"hook\" && e.t < cutoff)\n .map((e) => ({\n t: e.t * scale,\n midi: e.midi,\n // Clip the quote's tail at the cutoff so the last note never rings\n // across the party Part's loop restart onto the next pass's downbeat.\n // The floor guards future data: a note authored right at the cutoff\n // must clip to a tiny blip, never a zero or negative duration.\n dur: Math.max(0.01, Math.min(e.dur, cutoff - e.t)) * scale,\n }));\n}\n\n/** Party band bar: root MIDI notes per 4-beat bar (D, A, Bm, G world). */\nexport const PARTY_BASS_ROOTS = [38, 33, 35, 31];\n\n// ---- Cinema program -------------------------------------------------------\n\n/** Sparse plucked minor arpeggio: [midi, startBeat] over a slow 16-beat loop.\n * Decaying plucks only; sustained low swells are banned (they drone). */\nexport const CINEMA_PLUCKS: ReadonlyArray<readonly [number, number]> = [\n [62, 0.8],\n [65, 2.1],\n [69, 3.3],\n [74, 4.4],\n [69, 6.0],\n [65, 7.2],\n [62, 8.3],\n [65, 11.6],\n [69, 12.8],\n [62, 14.2],\n];\n/** Riser into a boom: sweep range and the boom partials (mid partials keep\n * the hit audible on small speakers). */\nexport const CINEMA_RISER = { fromHz: 180, toHz: 420, durS: 1.0 };\nexport const CINEMA_BOOM_HZ = [57, 110, 225];\n\n// ---- Metro train event ----------------------------------------------------\n\n/** The train event script, seconds from the event start. Wheel da-dum pairs\n * roll in over a dark rumble, brakes ease, doors thunk, the pairs speed away. */\nexport interface TrainStep {\n at: number;\n kind: \"daDum\" | \"rumbleIn\" | \"rumbleOut\" | \"brake\" | \"door\";\n gain: number;\n}\n\nexport function trainEvent(): TrainStep[] {\n const steps: TrainStep[] = [{ at: 0.8, kind: \"rumbleIn\", gain: 1 }];\n for (let t = 0.8; t < 5.8; t += 0.6) {\n steps.push({ at: t, kind: \"daDum\", gain: 0.12 + 0.5 * (t / 5.8) });\n }\n steps.push({ at: 6.2, kind: \"brake\", gain: 0.12 });\n steps.push({ at: 7.6, kind: \"door\", gain: 0.25 });\n steps.push({ at: 9.2, kind: \"door\", gain: 0.22 });\n steps.push({ at: 10.2, kind: \"rumbleOut\", gain: 1 });\n let gap = 0.7;\n let gain = 0.55;\n for (let t = 10.2; t < 15.4; t += gap) {\n steps.push({ at: t, kind: \"daDum\", gain });\n gap = Math.max(0.32, gap * 0.88);\n gain *= 0.87;\n }\n return steps;\n}\n\n/** Seconds between train events while the metro stays in view. */\nexport const TRAIN_INTERVAL_S = 55;\n"],"names":[],"mappings":";;AA6FA;AAC8D;AACvD,MAAM,YAAY,GAA0C;AACjE,IAAA,KAAK,EAAE;QACL,MAAM,EAAE,EAAE,UAAU,EAAE,CAAC,EAAE,QAAQ,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE;AACjF,QAAA,QAAQ,EAAE,EAAE;AACZ,QAAA,IAAI,EAAE,QAAQ;AACf,KAAA;AACD,IAAA,MAAM,EAAE;QACN,MAAM,EAAE,EAAE,UAAU,EAAE,CAAC,EAAE,QAAQ,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,GAAG,EAAE;AAC9F,QAAA,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