@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":"crowdCull.js","sources":["../../../src/render/excalibur/crowdCull.ts"],"sourcesContent":["import type { TowerEngine } from \"./TowerEngine\";\n\n/**\n * Zoom-gated culling of the moving layer (CAP-1 of the mobile render-perf\n * spec, `_bmad-output/specs/spec-render-perf-mobile-zoom/`): people, ambient\n * walkers, elevator cars, the metro train, garbage trucks, and garage cars\n * stop being drawn AND their per-frame update loops are skipped once the\n * camera zooms out past the sub-legible threshold. Friend-module of\n * towerCrowd, which calls {@link applyCrowdCull} at the top of its per-frame\n * passes and {@link reassertCrowdCull} after a structural rebuild.\n */\n\n/** Camera zoom below which the crowd/vehicle layer culls (CAP-1). A person\n * figure is ~24 world px tall, so under this zoom it renders below ~3 screen\n * px: sub-legible, pure per-frame cost. Rooms and structure stay drawn at\n * every zoom; only the moving layer (people, walkers, elevator cars, train,\n * trucks, garage cars) culls. */\nexport const CROWD_CULL_ZOOM = 0.125;\n/** Re-show at a strictly higher zoom than the hide threshold (hysteresis), so\n * a pinch sweeping across the boundary never strobes the crowd. */\nexport const CROWD_SHOW_ZOOM = 0.16;\n\n/** Pure hysteresis step for the crowd cull: hide strictly below\n * {@link CROWD_CULL_ZOOM}, stay hidden until the zoom climbs back to\n * {@link CROWD_SHOW_ZOOM} or above (the re-show threshold is inclusive). */\nexport function crowdCullNext(zoom: number, wasCulled: boolean): boolean {\n return wasCulled ? zoom < CROWD_SHOW_ZOOM : zoom < CROWD_CULL_ZOOM;\n}\n\n/** One pass over every crowd/vehicle actor, setting graphics visibility. On\n * cull it hides the whole moving layer; on re-show it restores the vehicle\n * groups and the regular per-frame gates (walker rank, truck hour, garage\n * rush) immediately re-refine on the next {@link updateMotion} pass. */\nfunction setCrowdLayerVisible(engine: TowerEngine, visible: boolean): void {\n for (const c of engine.carActors) c.actor.graphics.isVisible = visible;\n for (const tr of engine.trainActors) tr.actor.graphics.isVisible = visible;\n for (const tk of engine.truckActors) tk.actor.graphics.isVisible = visible;\n for (const g of engine.garageCars) g.actor.graphics.isVisible = visible;\n for (const w of engine.walkers) w.actor.graphics.isVisible = visible;\n // The routed people are only ever force-hidden here. On re-show they stay\n // hidden for the moment: the same tick's reconcileCrowd (which runs before\n // the frame draws) shows every live non-rider via positionPerson, keeps\n // riders hidden, and reaps anyone who departed while culled, so a stale\n // figure never flashes at a minutes-old position.\n if (!visible) for (const rec of engine.crowdActors.values()) rec.actor.graphics.isVisible = false;\n}\n\n/** Apply the zoom cull for this frame. Returns true when the moving layer is\n * culled and the caller should skip its per-frame work entirely. */\nexport function applyCrowdCull(engine: TowerEngine): boolean {\n const culled = crowdCullNext(engine.cam.zoom, engine.crowdCulled);\n if (culled !== engine.crowdCulled) {\n engine.crowdCulled = culled;\n setCrowdLayerVisible(engine, !culled);\n }\n return culled;\n}\n\n/** Re-assert the cull after a structural rebuild: {@link syncMotion} recreates\n * car/walker/vehicle actors visible, so a rebuild while zoomed out must hide\n * the fresh layer before it can flash for a frame. Runs the hysteresis step\n * itself (not just the latch) so a rebuild that lands before the first\n * per-frame pass, e.g. on boot with the camera already zoomed out, still\n * hides the fresh actors; the explicit hide covers the already-latched case\n * the step's flip branch does not touch. */\nexport function reassertCrowdCull(engine: TowerEngine): void {\n if (applyCrowdCull(engine)) setCrowdLayerVisible(engine, false);\n}\n"],"names":[],"mappings":"AAEA;;;;;;;;AAQG;AAEH;;;;AAIkC;AAC3B,MAAM,eAAe,GAAG;AAC/B;AACoE;AAC7D,MAAM,eAAe,GAAG;AAE/B;;AAE6E;AACvE,SAAU,aAAa,CAAC,IAAY,EAAE,SAAkB,EAAA;AAC5D,IAAA,OAAO,SAAS,GAAG,IAAI,GAAG,eAAe,GAAG,IAAI,GAAG,eAAe;AACpE;AAEA;;;AAGyE;AACzE,SAAS,oBAAoB,CAAC,MAAmB,EAAE,OAAgB,EAAA;AACjE,IAAA,KAAK,MAAM,CAAC,IAAI,MAAM,CAAC,SAAS;QAAE,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,SAAS,GAAG,OAAO;AACtE,IAAA,KAAK,MAAM,EAAE,IAAI,MAAM,CAAC,WAAW;QAAE,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,SAAS,GAAG,OAAO;AAC1E,IAAA,KAAK,MAAM,EAAE,IAAI,MAAM,CAAC,WAAW;QAAE,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,SAAS,GAAG,OAAO;AAC1E,IAAA,KAAK,MAAM,CAAC,IAAI,MAAM,CAAC,UAAU;QAAE,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,SAAS,GAAG,OAAO;AACvE,IAAA,KAAK,MAAM,CAAC,IAAI,MAAM,CAAC,OAAO;QAAE,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,SAAS,GAAG,OAAO;;;;;;AAMpE,IAAA,IAAI,CAAC,OAAO;QAAE,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE;YAAE,GAAG,CAAC,KAAK,CAAC,QAAQ,CAAC,SAAS,GAAG,KAAK;AACnG;AAEA;AACqE;AAC/D,SAAU,cAAc,CAAC,MAAmB,EAAA;AAChD,IAAA,MAAM,MAAM,GAAG,aAAa,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,EAAE,MAAM,CAAC,WAAW,CAAC;AACjE,IAAA,IAAI,MAAM,KAAK,MAAM,CAAC,WAAW,EAAE;AACjC,QAAA,MAAM,CAAC,WAAW,GAAG,MAAM;AAC3B,QAAA,oBAAoB,CAAC,MAAM,EAAE,CAAC,MAAM,CAAC;IACvC;AACA,IAAA,OAAO,MAAM;AACf;AAEA;;;;;;AAM6C;AACvC,SAAU,iBAAiB,CAAC,MAAmB,EAAA;IACnD,IAAI,cAAc,CAAC,MAAM,CAAC;AAAE,QAAA,oBAAoB,CAAC,MAAM,EAAE,KAAK,CAAC;AACjE;;"}
@@ -0,0 +1,42 @@
1
+ import type { PersonView, TransportView } from "../../simport/view";
2
+ import { type Glide, type StepClock } from "./crowdLook";
3
+ /**
4
+ * What one routed person shows this frame (#2097): the bake, the plane it is
5
+ * drawn on, and whether it is hidden inside a car. Pure functions of the
6
+ * engine's state and the glide, used by the crowd pass in `towerCrowd.ts`.
7
+ */
8
+ /** A tenant riding a car is inside it: the cab's own rider count shows them,
9
+ * so the figure is hidden. Staff stay visible while riding: a lone
10
+ * housekeeper in a 16-person service cab rounds to zero on the cab's load
11
+ * indicator, and watching them ride to the room floor is the whole point of
12
+ * the mechanic. */
13
+ export declare function ridingHidden(p: PersonView): boolean;
14
+ /** What this frame's figures read from the catalog and the step clock. */
15
+ export interface CrowdLook {
16
+ readonly lit: boolean;
17
+ readonly fedUpWait: number;
18
+ readonly progress: number;
19
+ readonly clock: StepClock;
20
+ }
21
+ /** The plane a person inside a revolving door is drawn on: behind the
22
+ * center post walking left, in front of it walking right. */
23
+ export declare function doorPlane(through: -1 | 1): number;
24
+ /** The plane for anyone outside a door: walkers go behind the transport. */
25
+ export declare function walkingPlane(p: PersonView): number;
26
+ /** The bake (`figureKey`: look, pose, frame, mood, facing) a person shows,
27
+ * from the engine's state: see `crowdLook.ts` for which state drives which
28
+ * animation. It returns the number itself, so the per-person pass allocates
29
+ * nothing. */
30
+ /** The middle of the elevator shaft a person waits at (#2097). The engine
31
+ * walks a rider to the middle of their shaft, starts the wait there, and
32
+ * then lines them up on one side of it, so the first waiting position is
33
+ * the shaft itself. A person first seen already in line (a loaded save, or
34
+ * a pass skipped by the zoom cull) gets the nearest elevator that stops on
35
+ * their floor. `null` when no elevator serves the floor. One pass over the
36
+ * shafts, run once per wait: the crowd pass keeps the answer until the
37
+ * person stops waiting. */
38
+ export declare function waitShaftMid(transports: ReadonlyArray<TransportView>, p: PersonView): number | null;
39
+ /** Whether someone waiting at `x` for the shaft whose middle is `mid` faces
40
+ * left: they face the shaft, and keep their way while still standing in it. */
41
+ export declare function waitFacesLeft(x: number, mid: number | null, walkedLeft: boolean): boolean;
42
+ export declare function personFigure(p: PersonView, g: Glide, look: CrowdLook, through?: -1 | 1, shaftMid?: number | null): number;
@@ -0,0 +1,99 @@
1
+ import { isElevatorKind } from '../../presentation/viewKinds.js';
2
+ import { Z } from '../depthPlanes.js';
3
+ import { crewIndex, castIndex } from '../pixelSprites/people.js';
4
+ import { TILE } from '../scale.js';
5
+ import { gliding, strideFrame, figureKey, waitMood, beatFrame, shuffling, waitPose } from './crowdLook.js';
6
+
7
+ /**
8
+ * What one routed person shows this frame (#2097): the bake, the plane it is
9
+ * drawn on, and whether it is hidden inside a car. Pure functions of the
10
+ * engine's state and the glide, used by the crowd pass in `towerCrowd.ts`.
11
+ */
12
+ /** A tenant riding a car is inside it: the cab's own rider count shows them,
13
+ * so the figure is hidden. Staff stay visible while riding: a lone
14
+ * housekeeper in a 16-person service cab rounds to zero on the cab's load
15
+ * indicator, and watching them ride to the room floor is the whole point of
16
+ * the mechanic. */
17
+ function ridingHidden(p) {
18
+ return p.state === "riding" && !p.staff;
19
+ }
20
+ /** The plane a person inside a revolving door is drawn on: behind the
21
+ * center post walking left, in front of it walking right. */
22
+ function doorPlane(through) {
23
+ return through === -1 ? Z.crowdBehindDoor : Z.crowd;
24
+ }
25
+ /** The plane for anyone outside a door: walkers go behind the transport. */
26
+ function walkingPlane(p) {
27
+ return p.state === "toShaft" || p.state === "toDest" ? Z.walking : Z.crowd;
28
+ }
29
+ /** The bake (`figureKey`: look, pose, frame, mood, facing) a person shows,
30
+ * from the engine's state: see `crowdLook.ts` for which state drives which
31
+ * animation. It returns the number itself, so the per-person pass allocates
32
+ * nothing. */
33
+ /** The middle of the elevator shaft a person waits at (#2097). The engine
34
+ * walks a rider to the middle of their shaft, starts the wait there, and
35
+ * then lines them up on one side of it, so the first waiting position is
36
+ * the shaft itself. A person first seen already in line (a loaded save, or
37
+ * a pass skipped by the zoom cull) gets the nearest elevator that stops on
38
+ * their floor. `null` when no elevator serves the floor. One pass over the
39
+ * shafts, run once per wait: the crowd pass keeps the answer until the
40
+ * person stops waiting. */
41
+ function waitShaftMid(transports, p) {
42
+ let best = Infinity;
43
+ let mid = null;
44
+ for (const t of transports) {
45
+ if (!isElevatorKind(t.kind) || p.floor < t.bottom || p.floor > t.top)
46
+ continue;
47
+ const m = t.x + t.width / 2;
48
+ if (m === p.x)
49
+ return m;
50
+ const d = Math.abs(p.x - m);
51
+ if (d < best) {
52
+ best = d;
53
+ mid = m;
54
+ }
55
+ }
56
+ return mid;
57
+ }
58
+ /** Whether someone waiting at `x` for the shaft whose middle is `mid` faces
59
+ * left: they face the shaft, and keep their way while still standing in it. */
60
+ function waitFacesLeft(x, mid, walkedLeft) {
61
+ if (mid === null || x === mid)
62
+ return walkedLeft;
63
+ return x > mid;
64
+ }
65
+ function personFigure(p, g, look, through, shaftMid = null) {
66
+ const t = look.clock.clockMs;
67
+ const offset = Math.abs(p.seed);
68
+ const moving = gliding(g);
69
+ const stride = strideFrame(look.lit, g.walked * TILE, offset);
70
+ // Inside a revolving door, everyone leans into a wing the way they walk.
71
+ if (through !== undefined) {
72
+ const who = p.staff ? crewIndex(p.seed, false) : castIndex(p.seed);
73
+ return figureKey(who, "push", stride, p.staff ? "content" : waitMood(p.wait, look.fedUpWait), through === -1, look.lit);
74
+ }
75
+ if (p.staff) {
76
+ // A housekeeper dwelling at a room is cleaning it (the engine's 8-minute
77
+ // clean); walking, it pushes its cart; riding, it stands in the car.
78
+ if (p.state === "dwelling")
79
+ return figureKey(crewIndex(p.seed, true), "push", beatFrame(t, offset), "content", g.left, look.lit);
80
+ if (moving && p.state !== "riding")
81
+ return figureKey(crewIndex(p.seed, false), "push", stride, "content", g.left, look.lit);
82
+ return figureKey(crewIndex(p.seed, false), "stand", 1, "content", g.left, look.lit);
83
+ }
84
+ const who = castIndex(p.seed);
85
+ // Long waits warm the top to amber, then the original's stress red.
86
+ const mood = waitMood(p.wait, look.fedUpWait);
87
+ if (p.state === "climbing")
88
+ return figureKey(who, "climb", beatFrame(t, offset), mood, g.left, look.lit);
89
+ // A waiting line closing up shuffles by a fraction of a tile: the person
90
+ // keeps waiting, facing the shaft, rather than walking in place.
91
+ if (p.state === "waiting" && (!moving || shuffling(g)))
92
+ return figureKey(who, waitPose(p.wait, look.fedUpWait), 1, mood, waitFacesLeft(g.x, shaftMid, g.left), look.lit);
93
+ if (moving)
94
+ return figureKey(who, "walk", stride, mood, g.left, look.lit);
95
+ return figureKey(who, "stand", 1, mood, g.left, look.lit);
96
+ }
97
+
98
+ export { doorPlane, personFigure, ridingHidden, waitFacesLeft, waitShaftMid, walkingPlane };
99
+ //# sourceMappingURL=crowdFigure.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"crowdFigure.js","sources":["../../../src/render/excalibur/crowdFigure.ts"],"sourcesContent":["import { isElevatorKind } from \"../../presentation/viewKinds\";\nimport type { PersonView, TransportView } from \"../../simport/view\";\nimport { Z } from \"../depthPlanes\";\nimport { castIndex, crewIndex } from \"../pixelSprites/people\";\nimport { TILE } from \"../scale\";\nimport {\n beatFrame, figureKey, gliding, shuffling, strideFrame, waitMood, waitPose, type Glide, type StepClock,\n} from \"./crowdLook\";\n\n/**\n * What one routed person shows this frame (#2097): the bake, the plane it is\n * drawn on, and whether it is hidden inside a car. Pure functions of the\n * engine's state and the glide, used by the crowd pass in `towerCrowd.ts`.\n */\n\n/** A tenant riding a car is inside it: the cab's own rider count shows them,\n * so the figure is hidden. Staff stay visible while riding: a lone\n * housekeeper in a 16-person service cab rounds to zero on the cab's load\n * indicator, and watching them ride to the room floor is the whole point of\n * the mechanic. */\nexport function ridingHidden(p: PersonView): boolean {\n return p.state === \"riding\" && !p.staff;\n}\n\n/** What this frame's figures read from the catalog and the step clock. */\nexport interface CrowdLook {\n readonly lit: boolean;\n readonly fedUpWait: number;\n readonly progress: number;\n readonly clock: StepClock;\n}\n\n/** The plane a person inside a revolving door is drawn on: behind the\n * center post walking left, in front of it walking right. */\nexport function doorPlane(through: -1 | 1): number {\n return through === -1 ? Z.crowdBehindDoor : Z.crowd;\n}\n\n/** The plane for anyone outside a door: walkers go behind the transport. */\nexport function walkingPlane(p: PersonView): number {\n return p.state === \"toShaft\" || p.state === \"toDest\" ? Z.walking : Z.crowd;\n}\n\n/** The bake (`figureKey`: look, pose, frame, mood, facing) a person shows,\n * from the engine's state: see `crowdLook.ts` for which state drives which\n * animation. It returns the number itself, so the per-person pass allocates\n * nothing. */\n/** The middle of the elevator shaft a person waits at (#2097). The engine\n * walks a rider to the middle of their shaft, starts the wait there, and\n * then lines them up on one side of it, so the first waiting position is\n * the shaft itself. A person first seen already in line (a loaded save, or\n * a pass skipped by the zoom cull) gets the nearest elevator that stops on\n * their floor. `null` when no elevator serves the floor. One pass over the\n * shafts, run once per wait: the crowd pass keeps the answer until the\n * person stops waiting. */\nexport function waitShaftMid(transports: ReadonlyArray<TransportView>, p: PersonView): number | null {\n let best = Infinity;\n let mid: number | null = null;\n for (const t of transports) {\n if (!isElevatorKind(t.kind) || p.floor < t.bottom || p.floor > t.top) continue;\n const m = t.x + t.width / 2;\n if (m === p.x) return m;\n const d = Math.abs(p.x - m);\n if (d < best) {\n best = d;\n mid = m;\n }\n }\n return mid;\n}\n\n/** Whether someone waiting at `x` for the shaft whose middle is `mid` faces\n * left: they face the shaft, and keep their way while still standing in it. */\nexport function waitFacesLeft(x: number, mid: number | null, walkedLeft: boolean): boolean {\n if (mid === null || x === mid) return walkedLeft;\n return x > mid;\n}\n\nexport function personFigure(p: PersonView, g: Glide, look: CrowdLook, through?: -1 | 1, shaftMid: number | null = null): number {\n const t = look.clock.clockMs;\n const offset = Math.abs(p.seed);\n const moving = gliding(g);\n const stride = strideFrame(look.lit, g.walked * TILE, offset);\n // Inside a revolving door, everyone leans into a wing the way they walk.\n if (through !== undefined) {\n const who = p.staff ? crewIndex(p.seed, false) : castIndex(p.seed);\n return figureKey(who, \"push\", stride, p.staff ? \"content\" : waitMood(p.wait, look.fedUpWait), through === -1, look.lit);\n }\n if (p.staff) {\n // A housekeeper dwelling at a room is cleaning it (the engine's 8-minute\n // clean); walking, it pushes its cart; riding, it stands in the car.\n if (p.state === \"dwelling\") return figureKey(crewIndex(p.seed, true), \"push\", beatFrame(t, offset), \"content\", g.left, look.lit);\n if (moving && p.state !== \"riding\") return figureKey(crewIndex(p.seed, false), \"push\", stride, \"content\", g.left, look.lit);\n return figureKey(crewIndex(p.seed, false), \"stand\", 1, \"content\", g.left, look.lit);\n }\n const who = castIndex(p.seed);\n // Long waits warm the top to amber, then the original's stress red.\n const mood = waitMood(p.wait, look.fedUpWait);\n if (p.state === \"climbing\") return figureKey(who, \"climb\", beatFrame(t, offset), mood, g.left, look.lit);\n // A waiting line closing up shuffles by a fraction of a tile: the person\n // keeps waiting, facing the shaft, rather than walking in place.\n if (p.state === \"waiting\" && (!moving || shuffling(g))) return figureKey(who, waitPose(p.wait, look.fedUpWait), 1, mood, waitFacesLeft(g.x, shaftMid, g.left), look.lit);\n if (moving) return figureKey(who, \"walk\", stride, mood, g.left, look.lit);\n return figureKey(who, \"stand\", 1, mood, g.left, look.lit);\n}"],"names":[],"mappings":";;;;;;AASA;;;;AAIG;AAEH;;;;AAIoB;AACd,SAAU,YAAY,CAAC,CAAa,EAAA;IACxC,OAAO,CAAC,CAAC,KAAK,KAAK,QAAQ,IAAI,CAAC,CAAC,CAAC,KAAK;AACzC;AAUA;AAC8D;AACxD,SAAU,SAAS,CAAC,OAAe,EAAA;AACvC,IAAA,OAAO,OAAO,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,eAAe,GAAG,CAAC,CAAC,KAAK;AACrD;AAEA;AACM,SAAU,YAAY,CAAC,CAAa,EAAA;IACxC,OAAO,CAAC,CAAC,KAAK,KAAK,SAAS,IAAI,CAAC,CAAC,KAAK,KAAK,QAAQ,GAAG,CAAC,CAAC,OAAO,GAAG,CAAC,CAAC,KAAK;AAC5E;AAEA;;;AAGe;AACf;;;;;;;AAO4B;AACtB,SAAU,YAAY,CAAC,UAAwC,EAAE,CAAa,EAAA;IAClF,IAAI,IAAI,GAAG,QAAQ;IACnB,IAAI,GAAG,GAAkB,IAAI;AAC7B,IAAA,KAAK,MAAM,CAAC,IAAI,UAAU,EAAE;QAC1B,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,GAAG;YAAE;QACtE,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,GAAG,CAAC;AAC3B,QAAA,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;AAAE,YAAA,OAAO,CAAC;AACvB,QAAA,MAAM,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;AAC3B,QAAA,IAAI,CAAC,GAA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I,CAAC,GAAG,CAAC;AACxK,IAAA,IAAI,MAAM;AAAE,QAAA,OAAO,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,IAAI,CAAC,GAAG,CAAC;AACzE,IAAA,OAAO,SAAS,CAAC,GAAG,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,IAAI,CAAC,GAAG,CAAC;AAC3D;;"}
@@ -0,0 +1,137 @@
1
+ import { type Mood, type Pose } from "../pixelSprites/people";
2
+ /**
3
+ * What a moving figure shows this frame (#2097), as pure functions of the
4
+ * engine's own state, so every animation comes from the game and none is a
5
+ * loop for its own sake:
6
+ *
7
+ * - the waiting poses come from how long the person has waited (`wait`)
8
+ * against the engine's fed-up line (`rules.fedUpWait`): checking the time,
9
+ * then hands on hips in the impatient amber, then arms up in the stress red;
10
+ * - the walk cycle follows the distance the drawn figure walks between two
11
+ * real positions, so it stops when the figure reaches the engine's one;
12
+ * - a housekeeper `dwelling` at a room is cleaning it, so it vacuums;
13
+ * - a `climbing` person climbs.
14
+ *
15
+ * The glide is how the hop is fixed: the engine moves a person once per sim
16
+ * step (about 10 a second at the slowest speed, a whole minute of walking at
17
+ * a time), so the drawn figure eases from where it was drawn to the engine's
18
+ * new position over one step's length instead of jumping there.
19
+ */
20
+ export declare const POSES: readonly Pose[];
21
+ export declare const MOODS: readonly Mood[];
22
+ /** Waiting past this share of the fed-up line, a person checks the time. */
23
+ export declare const WATCH_SHARE = 0.3;
24
+ /** Past this share, hands on hips and the impatient amber. */
25
+ export declare const IMPATIENT_SHARE = 0.6;
26
+ /** One figure's bake, decoded from its key. */
27
+ export interface Figure {
28
+ readonly look: number;
29
+ readonly pose: Pose;
30
+ readonly frame: number;
31
+ readonly mood: Mood;
32
+ readonly left: boolean;
33
+ readonly lit: boolean;
34
+ }
35
+ /** A figure's bake key: one number, so the per-frame lookup allocates nothing. */
36
+ export declare function figureKey(look: number, pose: Pose, frame: number, mood: Mood, left: boolean, lit: boolean): number;
37
+ /** The figure a key names (the bake's side of `figureKey`). */
38
+ export declare function figureOf(key: number): Figure;
39
+ /** The mood a wait shows: impatient amber, then fed-up red past the line. */
40
+ export declare function waitMood(wait: number, fedUpWait: number): Mood;
41
+ /** The pose a waiting person stands in. */
42
+ export declare function waitPose(wait: number, fedUpWait: number): Pose;
43
+ /** World pixels walked per walk frame: a foot lands every two frames of the
44
+ * lit four-step and every frame of the flat two-step, about a third of the
45
+ * figure's height per step, so the feet keep pace with the ground instead of
46
+ * skating over it. */
47
+ export declare const STRIDE_PX: {
48
+ readonly flat: 8;
49
+ readonly lit: 4;
50
+ };
51
+ /** The most a figure's legs count as walked in one drawn frame (tiles). A
52
+ * fast speed moves a figure several strides a frame; counted in full, the
53
+ * legs would land on a random frame each time and strobe. Capped, they keep
54
+ * a brisk, even cadence (a new leg frame every few drawn frames) while the
55
+ * body covers the ground. */
56
+ export declare const MAX_STRIDE_TILES = 0.15;
57
+ /** Milliseconds per vacuum or climb beat. */
58
+ export declare const WORK_BEAT_MS = 220;
59
+ /** The walk frame after `walkedPx` world pixels, offset per person so a crowd
60
+ * is not in step. The cycle follows the distance walked, never a timer. */
61
+ export declare function strideFrame(lit: boolean, walkedPx: number, offset: number): number;
62
+ /** The beat frame (0 to 3) of a working or climbing figure. */
63
+ export declare function beatFrame(clockMs: number, offset: number): number;
64
+ /** The step clock one renderer keeps: when the engine last moved the crowd. */
65
+ export interface StepClock {
66
+ /** The sim minute last seen; a change means a step ran. */
67
+ minutes: number;
68
+ /** Real milliseconds since that step. */
69
+ sinceMs: number;
70
+ /** How long a step lasts: the recent gaps averaged, so steps that land
71
+ * every one or two frames still glide at one speed; a change of pace (the
72
+ * lunch slowdown, a new speed) jumps straight to the new gap. */
73
+ intervalMs: number;
74
+ /** Real milliseconds drawn, for the walk and work beats. */
75
+ clockMs: number;
76
+ /** True on the frame a step landed. */
77
+ stepped: boolean;
78
+ /** Steps seen so far, so a change can wait for the step after it. */
79
+ steps: number;
80
+ }
81
+ /** The longest step the glide stretches over. The slowest real gap is a
82
+ * one-minute step at the bottom speed in the lunch slowdown (about 3.7 s at
83
+ * 2 game minutes a second), so this leaves room above it. */
84
+ export declare const MAX_STEP_MS = 4000;
85
+ /** The shortest: one frame at 120 Hz. */
86
+ export declare const MIN_STEP_MS: number;
87
+ export declare function newStepClock(minutes: number): StepClock;
88
+ /** Advance the step clock by one frame of `elapsedMs`. A paused game passes
89
+ * 0, so a figure freezes mid-glide and the pause never counts as a step. */
90
+ export declare function tickStepClock(c: StepClock, minutes: number, elapsedMs: number): void;
91
+ /** A gap more than this many times longer or shorter than the running
92
+ * interval is a change of pace, taken at once instead of averaged in. */
93
+ export declare const PACE_CHANGE = 2.5;
94
+ /** How much of each new gap the running interval takes in. */
95
+ export declare const GAP_WEIGHT = 0.25;
96
+ /** The step interval after one more gap: an average over recent gaps, so a
97
+ * speed whose steps land every one or two frames still glides evenly, or
98
+ * the new gap outright when the pace has changed. */
99
+ export declare function smoothedInterval(intervalMs: number, gapMs: number): number;
100
+ /** How far through the current step the drawing is, 0 to 1. */
101
+ export declare function stepProgress(c: StepClock): number;
102
+ /** One drawn person's glide between the engine's last two positions. */
103
+ export interface Glide {
104
+ fromX: number;
105
+ toX: number;
106
+ fromFy: number;
107
+ toFy: number;
108
+ x: number;
109
+ fy: number;
110
+ left: boolean;
111
+ /** Tiles walked so far along the floor, for the walk cycle. */
112
+ walked: number;
113
+ /** Whether the last step was on a car, so the step that lets the rider off
114
+ * glides by the car's rule too. */
115
+ rode: boolean;
116
+ }
117
+ /** A move shorter than this (tiles) is a shuffle, such as a waiting line
118
+ * closing up: it neither turns the figure nor reads as walking. */
119
+ export declare const SHUFFLE_TILES = 1;
120
+ /** A hop longer than this (tiles) is a jump, drawn at once. */
121
+ export declare const SNAP_TILES = 40;
122
+ /** A change of more than this many floors in one step is a jump too. */
123
+ export declare const SNAP_FLOORS = 1.5;
124
+ export declare function newGlide(x: number, fy: number, left: boolean): Glide;
125
+ /**
126
+ * Move a glide on: on a step, start from where the figure is drawn now toward
127
+ * the engine's new position, or jump there when the hop is too far to be a
128
+ * walk; then draw it `progress` of the way. A person `riding` a car moves
129
+ * with it, so they jump only when the drawn car does (`carMotion`), on the
130
+ * step they get out included: on the walkers' shorter limit a fast car's
131
+ * rider jumped ahead of it and hung in the empty shaft until it caught up.
132
+ */
133
+ export declare function advanceGlide(g: Glide, x: number, fy: number, stepped: boolean, progress: number, show: boolean, riding?: boolean): void;
134
+ /** Whether this glide is only a shuffle in place (see `SHUFFLE_TILES`). */
135
+ export declare function shuffling(g: Glide): boolean;
136
+ /** Whether the drawn figure is still on its way. */
137
+ export declare function gliding(g: Glide): boolean;
@@ -0,0 +1,186 @@
1
+ import { LOOKS, walkFrame } from '../pixelSprites/people.js';
2
+ import { SNAP_FLOORS as SNAP_FLOORS$1 } from '../carMotion.js';
3
+
4
+ /**
5
+ * What a moving figure shows this frame (#2097), as pure functions of the
6
+ * engine's own state, so every animation comes from the game and none is a
7
+ * loop for its own sake:
8
+ *
9
+ * - the waiting poses come from how long the person has waited (`wait`)
10
+ * against the engine's fed-up line (`rules.fedUpWait`): checking the time,
11
+ * then hands on hips in the impatient amber, then arms up in the stress red;
12
+ * - the walk cycle follows the distance the drawn figure walks between two
13
+ * real positions, so it stops when the figure reaches the engine's one;
14
+ * - a housekeeper `dwelling` at a room is cleaning it, so it vacuums;
15
+ * - a `climbing` person climbs.
16
+ *
17
+ * The glide is how the hop is fixed: the engine moves a person once per sim
18
+ * step (about 10 a second at the slowest speed, a whole minute of walking at
19
+ * a time), so the drawn figure eases from where it was drawn to the engine's
20
+ * new position over one step's length instead of jumping there.
21
+ */
22
+ const POSES = ["walk", "stand", "watch", "hips", "armsUp", "climb", "push", "bend", "run", "caught"];
23
+ const MOODS = ["content", "impatient", "fedUp"];
24
+ const POSE_CODE = new Map(POSES.map((p, i) => [p, i]));
25
+ const MOOD_CODE = new Map(MOODS.map((m, i) => [m, i]));
26
+ const FRAMES = 4;
27
+ /** Waiting past this share of the fed-up line, a person checks the time. */
28
+ const WATCH_SHARE = 0.3;
29
+ /** Past this share, hands on hips and the impatient amber. */
30
+ const IMPATIENT_SHARE = 0.6;
31
+ /** A figure's bake key: one number, so the per-frame lookup allocates nothing. */
32
+ function figureKey(look, pose, frame, mood, left, lit) {
33
+ const p = POSE_CODE.get(pose) ?? 0;
34
+ const m = MOOD_CODE.get(mood) ?? 0;
35
+ return ((((look * POSES.length + p) * FRAMES + frame) * MOODS.length + m) * 2 + (left ? 1 : 0)) * 2 + (lit ? 1 : 0);
36
+ }
37
+ /** The figure a key names (the bake's side of `figureKey`). */
38
+ function figureOf(key) {
39
+ let k = key;
40
+ const lit = k % 2 === 1;
41
+ k = Math.floor(k / 2);
42
+ const left = k % 2 === 1;
43
+ k = Math.floor(k / 2);
44
+ const mood = MOODS[k % MOODS.length];
45
+ k = Math.floor(k / MOODS.length);
46
+ const frame = k % FRAMES;
47
+ k = Math.floor(k / FRAMES);
48
+ const pose = POSES[k % POSES.length];
49
+ const look = Math.floor(k / POSES.length);
50
+ return { look: Math.min(look, LOOKS.length - 1), pose, frame, mood, left, lit };
51
+ }
52
+ /** The mood a wait shows: impatient amber, then fed-up red past the line. */
53
+ function waitMood(wait, fedUpWait) {
54
+ if (wait > fedUpWait)
55
+ return "fedUp";
56
+ if (wait > fedUpWait * IMPATIENT_SHARE)
57
+ return "impatient";
58
+ return "content";
59
+ }
60
+ /** The pose a waiting person stands in. */
61
+ function waitPose(wait, fedUpWait) {
62
+ if (wait > fedUpWait)
63
+ return "armsUp";
64
+ if (wait > fedUpWait * IMPATIENT_SHARE)
65
+ return "hips";
66
+ if (wait > fedUpWait * WATCH_SHARE)
67
+ return "watch";
68
+ return "stand";
69
+ }
70
+ /** World pixels walked per walk frame: a foot lands every two frames of the
71
+ * lit four-step and every frame of the flat two-step, about a third of the
72
+ * figure's height per step, so the feet keep pace with the ground instead of
73
+ * skating over it. */
74
+ const STRIDE_PX = { flat: 8, lit: 4 };
75
+ /** The most a figure's legs count as walked in one drawn frame (tiles). A
76
+ * fast speed moves a figure several strides a frame; counted in full, the
77
+ * legs would land on a random frame each time and strobe. Capped, they keep
78
+ * a brisk, even cadence (a new leg frame every few drawn frames) while the
79
+ * body covers the ground. */
80
+ const MAX_STRIDE_TILES = 0.15;
81
+ /** Milliseconds per vacuum or climb beat. */
82
+ const WORK_BEAT_MS = 220;
83
+ /** The walk frame after `walkedPx` world pixels, offset per person so a crowd
84
+ * is not in step. The cycle follows the distance walked, never a timer. */
85
+ function strideFrame(lit, walkedPx, offset) {
86
+ const px = lit ? STRIDE_PX.lit : STRIDE_PX.flat;
87
+ return walkFrame(lit, Math.floor(walkedPx / px) + offset);
88
+ }
89
+ /** The beat frame (0 to 3) of a working or climbing figure. */
90
+ function beatFrame(clockMs, offset) {
91
+ return (Math.floor(clockMs / WORK_BEAT_MS) + offset) % FRAMES;
92
+ }
93
+ /** The longest step the glide stretches over. The slowest real gap is a
94
+ * one-minute step at the bottom speed in the lunch slowdown (about 3.7 s at
95
+ * 2 game minutes a second), so this leaves room above it. */
96
+ const MAX_STEP_MS = 4000;
97
+ /** The shortest: one frame at 120 Hz. */
98
+ const MIN_STEP_MS = 1000 / 120;
99
+ function newStepClock(minutes) {
100
+ return { minutes, sinceMs: 0, intervalMs: 100, clockMs: 0, stepped: false, steps: 0 };
101
+ }
102
+ /** Advance the step clock by one frame of `elapsedMs`. A paused game passes
103
+ * 0, so a figure freezes mid-glide and the pause never counts as a step. */
104
+ function tickStepClock(c, minutes, elapsedMs) {
105
+ c.clockMs += elapsedMs;
106
+ c.stepped = minutes !== c.minutes;
107
+ if (!c.stepped) {
108
+ c.sinceMs += elapsedMs;
109
+ return;
110
+ }
111
+ // The gap runs from the last step's frame to the frame before this one,
112
+ // and this frame already counts toward the new step: the frame a step lands
113
+ // on draws one frame of its travel, so a glide never holds still for a
114
+ // frame at each step (the 3.7.0 elevator jitter).
115
+ const gap = Math.min(MAX_STEP_MS, Math.max(MIN_STEP_MS, c.sinceMs));
116
+ // The clock starts with no step behind it, so its first two gaps are taken
117
+ // as they are rather than averaged against the starting guess.
118
+ c.intervalMs = c.steps < 2 ? gap : smoothedInterval(c.intervalMs, gap);
119
+ c.minutes = minutes;
120
+ c.steps++;
121
+ c.sinceMs = elapsedMs;
122
+ }
123
+ /** A gap more than this many times longer or shorter than the running
124
+ * interval is a change of pace, taken at once instead of averaged in. */
125
+ const PACE_CHANGE = 2.5;
126
+ /** How much of each new gap the running interval takes in. */
127
+ const GAP_WEIGHT = 0.25;
128
+ /** The step interval after one more gap: an average over recent gaps, so a
129
+ * speed whose steps land every one or two frames still glides evenly, or
130
+ * the new gap outright when the pace has changed. */
131
+ function smoothedInterval(intervalMs, gapMs) {
132
+ if (gapMs > intervalMs * PACE_CHANGE || gapMs * PACE_CHANGE < intervalMs)
133
+ return gapMs;
134
+ return intervalMs + (gapMs - intervalMs) * GAP_WEIGHT;
135
+ }
136
+ /** How far through the current step the drawing is, 0 to 1. */
137
+ function stepProgress(c) {
138
+ return Math.min(1, c.sinceMs / Math.max(MIN_STEP_MS, c.intervalMs));
139
+ }
140
+ /** A move shorter than this (tiles) is a shuffle, such as a waiting line
141
+ * closing up: it neither turns the figure nor reads as walking. */
142
+ const SHUFFLE_TILES = 1;
143
+ /** A hop longer than this (tiles) is a jump, drawn at once. */
144
+ const SNAP_TILES = 40;
145
+ /** A change of more than this many floors in one step is a jump too. */
146
+ const SNAP_FLOORS = 1.5;
147
+ function newGlide(x, fy, left) {
148
+ return { fromX: x, toX: x, fromFy: fy, toFy: fy, x, fy, left, walked: 0, rode: false };
149
+ }
150
+ /**
151
+ * Move a glide on: on a step, start from where the figure is drawn now toward
152
+ * the engine's new position, or jump there when the hop is too far to be a
153
+ * walk; then draw it `progress` of the way. A person `riding` a car moves
154
+ * with it, so they jump only when the drawn car does (`carMotion`), on the
155
+ * step they get out included: on the walkers' shorter limit a fast car's
156
+ * rider jumped ahead of it and hung in the empty shaft until it caught up.
157
+ */
158
+ function advanceGlide(g, x, fy, stepped, progress, show, riding = false) {
159
+ if (stepped || x !== g.toX || fy !== g.toFy) {
160
+ // The step a rider gets out on is the car's last glide to their floor.
161
+ const snapFloors = riding || g.rode ? SNAP_FLOORS$1 : SNAP_FLOORS;
162
+ g.rode = riding;
163
+ const jump = !show || Math.abs(x - g.x) > SNAP_TILES || Math.abs(fy - g.fy) > snapFloors;
164
+ g.fromX = jump ? x : g.x;
165
+ g.fromFy = jump ? fy : g.fy;
166
+ g.toX = x;
167
+ g.toFy = fy;
168
+ if (Math.abs(x - g.fromX) >= SHUFFLE_TILES)
169
+ g.left = x < g.fromX;
170
+ }
171
+ const x0 = g.x;
172
+ g.x = g.fromX + (g.toX - g.fromX) * progress;
173
+ g.fy = g.fromFy + (g.toFy - g.fromFy) * progress;
174
+ g.walked += Math.min(Math.abs(g.x - x0), MAX_STRIDE_TILES);
175
+ }
176
+ /** Whether this glide is only a shuffle in place (see `SHUFFLE_TILES`). */
177
+ function shuffling(g) {
178
+ return Math.abs(g.toX - g.fromX) < SHUFFLE_TILES && g.toFy === g.fromFy;
179
+ }
180
+ /** Whether the drawn figure is still on its way. */
181
+ function gliding(g) {
182
+ return g.x !== g.toX || g.fy !== g.toFy;
183
+ }
184
+
185
+ export { GAP_WEIGHT, IMPATIENT_SHARE, MAX_STEP_MS, MAX_STRIDE_TILES, MIN_STEP_MS, MOODS, PACE_CHANGE, POSES, SHUFFLE_TILES, SNAP_FLOORS, SNAP_TILES, STRIDE_PX, WATCH_SHARE, WORK_BEAT_MS, advanceGlide, beatFrame, figureKey, figureOf, gliding, newGlide, newStepClock, shuffling, smoothedInterval, stepProgress, strideFrame, tickStepClock, waitMood, waitPose };
186
+ //# sourceMappingURL=crowdLook.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"crowdLook.js","sources":["../../../src/render/excalibur/crowdLook.ts"],"sourcesContent":["import { LOOKS, walkFrame, type Mood, type Pose } from \"../pixelSprites/people\";\nimport { SNAP_FLOORS as CAR_SNAP_FLOORS } from \"../carMotion\";\n\n/**\n * What a moving figure shows this frame (#2097), as pure functions of the\n * engine's own state, so every animation comes from the game and none is a\n * loop for its own sake:\n *\n * - the waiting poses come from how long the person has waited (`wait`)\n * against the engine's fed-up line (`rules.fedUpWait`): checking the time,\n * then hands on hips in the impatient amber, then arms up in the stress red;\n * - the walk cycle follows the distance the drawn figure walks between two\n * real positions, so it stops when the figure reaches the engine's one;\n * - a housekeeper `dwelling` at a room is cleaning it, so it vacuums;\n * - a `climbing` person climbs.\n *\n * The glide is how the hop is fixed: the engine moves a person once per sim\n * step (about 10 a second at the slowest speed, a whole minute of walking at\n * a time), so the drawn figure eases from where it was drawn to the engine's\n * new position over one step's length instead of jumping there.\n */\n\nexport const POSES: readonly Pose[] = [\"walk\", \"stand\", \"watch\", \"hips\", \"armsUp\", \"climb\", \"push\", \"bend\", \"run\", \"caught\"];\nexport const MOODS: readonly Mood[] = [\"content\", \"impatient\", \"fedUp\"];\nconst POSE_CODE = new Map(POSES.map((p, i) => [p, i]));\nconst MOOD_CODE = new Map(MOODS.map((m, i) => [m, i]));\nconst FRAMES = 4;\n\n/** Waiting past this share of the fed-up line, a person checks the time. */\nexport const WATCH_SHARE = 0.3;\n/** Past this share, hands on hips and the impatient amber. */\nexport const IMPATIENT_SHARE = 0.6;\n\n/** One figure's bake, decoded from its key. */\nexport interface Figure {\n readonly look: number;\n readonly pose: Pose;\n readonly frame: number;\n readonly mood: Mood;\n readonly left: boolean;\n readonly lit: boolean;\n}\n\n/** A figure's bake key: one number, so the per-frame lookup allocates nothing. */\nexport function figureKey(look: number, pose: Pose, frame: number, mood: Mood, left: boolean, lit: boolean): number {\n const p = POSE_CODE.get(pose) ?? 0;\n const m = MOOD_CODE.get(mood) ?? 0;\n return ((((look * POSES.length + p) * FRAMES + frame) * MOODS.length + m) * 2 + (left ? 1 : 0)) * 2 + (lit ? 1 : 0);\n}\n\n/** The figure a key names (the bake's side of `figureKey`). */\nexport function figureOf(key: number): Figure {\n let k = key;\n const lit = k % 2 === 1;\n k = Math.floor(k / 2);\n const left = k % 2 === 1;\n k = Math.floor(k / 2);\n const mood = MOODS[k % MOODS.length];\n k = Math.floor(k / MOODS.length);\n const frame = k % FRAMES;\n k = Math.floor(k / FRAMES);\n const pose = POSES[k % POSES.length];\n const look = Math.floor(k / POSES.length);\n return { look: Math.min(look, LOOKS.length - 1), pose, frame, mood, left, lit };\n}\n\n/** The mood a wait shows: impatient amber, then fed-up red past the line. */\nexport function waitMood(wait: number, fedUpWait: number): Mood {\n if (wait > fedUpWait) return \"fedUp\";\n if (wait > fedUpWait * IMPATIENT_SHARE) return \"impatient\";\n return \"content\";\n}\n\n/** The pose a waiting person stands in. */\nexport function waitPose(wait: number, fedUpWait: number): Pose {\n if (wait > fedUpWait) return \"armsUp\";\n if (wait > fedUpWait * IMPATIENT_SHARE) return \"hips\";\n if (wait > fedUpWait * WATCH_SHARE) return \"watch\";\n return \"stand\";\n}\n\n/** World pixels walked per walk frame: a foot lands every two frames of the\n * lit four-step and every frame of the flat two-step, about a third of the\n * figure's height per step, so the feet keep pace with the ground instead of\n * skating over it. */\nexport const STRIDE_PX = { flat: 8, lit: 4 } as const;\n/** The most a figure's legs count as walked in one drawn frame (tiles). A\n * fast speed moves a figure several strides a frame; counted in full, the\n * legs would land on a random frame each time and strobe. Capped, they keep\n * a brisk, even cadence (a new leg frame every few drawn frames) while the\n * body covers the ground. */\nexport const MAX_STRIDE_TILES = 0.15;\n/** Milliseconds per vacuum or climb beat. */\nexport const WORK_BEAT_MS = 220;\n\n/** The walk frame after `walkedPx` world pixels, offset per person so a crowd\n * is not in step. The cycle follows the distance walked, never a timer. */\nexport function strideFrame(lit: boolean, walkedPx: number, offset: number): number {\n const px = lit ? STRIDE_PX.lit : STRIDE_PX.flat;\n return walkFrame(lit, Math.floor(walkedPx / px) + offset);\n}\n\n/** The beat frame (0 to 3) of a working or climbing figure. */\nexport function beatFrame(clockMs: number, offset: number): number {\n return (Math.floor(clockMs / WORK_BEAT_MS) + offset) % FRAMES;\n}\n\n// ---- The glide ---------------------------------------------------------------\n\n/** The step clock one renderer keeps: when the engine last moved the crowd. */\nexport interface StepClock {\n /** The sim minute last seen; a change means a step ran. */\n minutes: number;\n /** Real milliseconds since that step. */\n sinceMs: number;\n /** How long a step lasts: the recent gaps averaged, so steps that land\n * every one or two frames still glide at one speed; a change of pace (the\n * lunch slowdown, a new speed) jumps straight to the new gap. */\n intervalMs: number;\n /** Real milliseconds drawn, for the walk and work beats. */\n clockMs: number;\n /** True on the frame a step landed. */\n stepped: boolean;\n /** Steps seen so far, so a change can wait for the step after it. */\n steps: number;\n}\n\n/** The longest step the glide stretches over. The slowest real gap is a\n * one-minute step at the bottom speed in the lunch slowdown (about 3.7 s at\n * 2 game minutes a second), so this leaves room above it. */\nexport const MAX_STEP_MS = 4000;\n/** The shortest: one frame at 120 Hz. */\nexport const MIN_STEP_MS = 1000 / 120;\n\nexport function newStepClock(minutes: number): StepClock {\n return { minutes, sinceMs: 0, intervalMs: 100, clockMs: 0, stepped: false, steps: 0 };\n}\n\n/** Advance the step clock by one frame of `elapsedMs`. A paused game passes\n * 0, so a figure freezes mid-glide and the pause never counts as a step. */\nexport function tickStepClock(c: StepClock, minutes: number, elapsedMs: number): void {\n c.clockMs += elapsedMs;\n c.stepped = minutes !== c.minutes;\n if (!c.stepped) {\n c.sinceMs += elapsedMs;\n return;\n }\n // The gap runs from the last step's frame to the frame before this one,\n // and this frame already counts toward the new step: the frame a step lands\n // on draws one frame of its travel, so a glide never holds still for a\n // frame at each step (the 3.7.0 elevator jitter).\n const gap = Math.min(MAX_STEP_MS, Math.max(MIN_STEP_MS, c.sinceMs));\n // The clock starts with no step behind it, so its first two gaps are taken\n // as they are rather than averaged against the starting guess.\n c.intervalMs = c.steps < 2 ? gap : smoothedInterval(c.intervalMs, gap);\n c.minutes = minutes;\n c.steps++;\n c.sinceMs = elapsedMs;\n}\n\n/** A gap more than this many times longer or shorter than the running\n * interval is a change of pace, taken at once instead of averaged in. */\nexport const PACE_CHANGE = 2.5;\n/** How much of each new gap the running interval takes in. */\nexport const GAP_WEIGHT = 0.25;\n\n/** The step interval after one more gap: an average over recent gaps, so a\n * speed whose steps land every one or two frames still glides evenly, or\n * the new gap outright when the pace has changed. */\nexport function smoothedInterval(intervalMs: number, gapMs: number): number {\n if (gapMs > intervalMs * PACE_CHANGE || gapMs * PACE_CHANGE < intervalMs) return gapMs;\n return intervalMs + (gapMs - intervalMs) * GAP_WEIGHT;\n}\n\n/** How far through the current step the drawing is, 0 to 1. */\nexport function stepProgress(c: StepClock): number {\n return Math.min(1, c.sinceMs / Math.max(MIN_STEP_MS, c.intervalMs));\n}\n\n/** One drawn person's glide between the engine's last two positions. */\nexport interface Glide {\n fromX: number;\n toX: number;\n fromFy: number;\n toFy: number;\n x: number;\n fy: number;\n left: boolean;\n /** Tiles walked so far along the floor, for the walk cycle. */\n walked: number;\n /** Whether the last step was on a car, so the step that lets the rider off\n * glides by the car's rule too. */\n rode: boolean;\n}\n\n/** A move shorter than this (tiles) is a shuffle, such as a waiting line\n * closing up: it neither turns the figure nor reads as walking. */\nexport const SHUFFLE_TILES = 1;\n/** A hop longer than this (tiles) is a jump, drawn at once. */\nexport const SNAP_TILES = 40;\n/** A change of more than this many floors in one step is a jump too. */\nexport const SNAP_FLOORS = 1.5;\n\nexport function newGlide(x: number, fy: number, left: boolean): Glide {\n return { fromX: x, toX: x, fromFy: fy, toFy: fy, x, fy, left, walked: 0, rode: false };\n}\n\n/**\n * Move a glide on: on a step, start from where the figure is drawn now toward\n * the engine's new position, or jump there when the hop is too far to be a\n * walk; then draw it `progress` of the way. A person `riding` a car moves\n * with it, so they jump only when the drawn car does (`carMotion`), on the\n * step they get out included: on the walkers' shorter limit a fast car's\n * rider jumped ahead of it and hung in the empty shaft until it caught up.\n */\nexport function advanceGlide(g: Glide, x: number, fy: number, stepped: boolean, progress: number, show: boolean, riding = false): void {\n if (stepped || x !== g.toX || fy !== g.toFy) {\n // The step a rider gets out on is the car's last glide to their floor.\n const snapFloors = riding || g.rode ? CAR_SNAP_FLOORS : SNAP_FLOORS;\n g.rode = riding;\n const jump = !show || Math.abs(x - g.x) > SNAP_TILES || Math.abs(fy - g.fy) > snapFloors;\n g.fromX = jump ? x : g.x;\n g.fromFy = jump ? fy : g.fy;\n g.toX = x;\n g.toFy = fy;\n if (Math.abs(x - g.fromX) >= SHUFFLE_TILES) g.left = x < g.fromX;\n }\n const x0 = g.x;\n g.x = g.fromX + (g.toX - g.fromX) * progress;\n g.fy = g.fromFy + (g.toFy - g.fromFy) * progress;\n g.walked += Math.min(Math.abs(g.x - x0), MAX_STRIDE_TILES);\n}\n\n/** Whether this glide is only a shuffle in place (see `SHUFFLE_TILES`). */\nexport function shuffling(g: Glide): boolean {\n return Math.abs(g.toX - g.fromX) < SHUFFLE_TILES && g.toFy === g.fromFy;\n}\n\n/** Whether the drawn figure is still on its way. */\nexport function gliding(g: Glide): boolean {\n return g.x !== g.toX || g.fy !== g.toFy;\n}\n"],"names":["CAR_SNAP_FLOORS"],"mappings":";;;AAGA;;;;;;;;;;;;;;;;;AAiBG;AAEI,MAAM,KAAK,GAAoB,CAAC,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ;AACpH,MAAM,KAAK,GAAoB,CAAC,SAAS,EAAE,WAAW,EAAE,OAAO;AACtE,MAAM,SAAS,GAAG,IAAI,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;AACtD,MAAM,SAAS,GAAG,IAAI,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;AACtD,MAA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
+ * Stop the tower's frame clock while something covers the whole screen (the
3
+ * screen saver), so the hidden tower is not drawn every display frame, and
4
+ * start it again after. The context-loss handler in `TowerEngine.ts` stops
5
+ * the same clock. A frame that arrives after a long hold is clamped by the
6
+ * frame loop, so nothing jumps.
7
+ */
8
+ /** The part of the renderer this needs: its Excalibur engine's clock. */
9
+ export interface FrameClockOwner {
10
+ readonly engine: {
11
+ readonly clock: {
12
+ readonly isRunning: boolean;
13
+ start(): void;
14
+ stop(): void;
15
+ };
16
+ };
17
+ }
18
+ /** Hold the frames of the renderer `live()` returns now. Returns the
19
+ * release, which runs once. A clock that was not running (a lost GL
20
+ * context) is left stopped, and so is one whose renderer was replaced
21
+ * during the hold (a context-loss rebuild disposed it; the new one runs on
22
+ * its own). */
23
+ export declare function holdTowerFrames(live: () => FrameClockOwner): () => void;
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Stop the tower's frame clock while something covers the whole screen (the
3
+ * screen saver), so the hidden tower is not drawn every display frame, and
4
+ * start it again after. The context-loss handler in `TowerEngine.ts` stops
5
+ * the same clock. A frame that arrives after a long hold is clamped by the
6
+ * frame loop, so nothing jumps.
7
+ */
8
+ /** Hold the frames of the renderer `live()` returns now. Returns the
9
+ * release, which runs once. A clock that was not running (a lost GL
10
+ * context) is left stopped, and so is one whose renderer was replaced
11
+ * during the hold (a context-loss rebuild disposed it; the new one runs on
12
+ * its own). */
13
+ function holdTowerFrames(live) {
14
+ const tower = live();
15
+ const clock = tower.engine.clock;
16
+ const wasRunning = clock.isRunning;
17
+ if (wasRunning)
18
+ clock.stop();
19
+ let released = false;
20
+ return () => {
21
+ if (released)
22
+ return;
23
+ released = true;
24
+ if (wasRunning && live() === tower && !clock.isRunning)
25
+ clock.start();
26
+ };
27
+ }
28
+
29
+ export { holdTowerFrames };
30
+ //# sourceMappingURL=frameHold.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"frameHold.js","sources":["../../../src/render/excalibur/frameHold.ts"],"sourcesContent":["/**\n * Stop the tower's frame clock while something covers the whole screen (the\n * screen saver), so the hidden tower is not drawn every display frame, and\n * start it again after. The context-loss handler in `TowerEngine.ts` stops\n * the same clock. A frame that arrives after a long hold is clamped by the\n * frame loop, so nothing jumps.\n */\n\n/** The part of the renderer this needs: its Excalibur engine's clock. */\nexport interface FrameClockOwner {\n readonly engine: { readonly clock: { readonly isRunning: boolean; start(): void; stop(): void } };\n}\n\n/** Hold the frames of the renderer `live()` returns now. Returns the\n * release, which runs once. A clock that was not running (a lost GL\n * context) is left stopped, and so is one whose renderer was replaced\n * during the hold (a context-loss rebuild disposed it; the new one runs on\n * its own). */\nexport function holdTowerFrames(live: () => FrameClockOwner): () => void {\n const tower = live();\n const clock = tower.engine.clock;\n const wasRunning = clock.isRunning;\n if (wasRunning) clock.stop();\n let released = false;\n return () => {\n if (released) return;\n released = true;\n if (wasRunning && live() === tower && !clock.isRunning) clock.start();\n };\n}\n"],"names":[],"mappings":"AAAA;;;;;;AAMG;AAOH;;;;AAIgB;AACV,SAAU,eAAe,CAAC,IAA2B,EAAA;AACzD,IAAA,MAAM,KAAK,GAAG,IAAI,EAAE;AACpB,IAAA,MAAM,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,KAAK;AAChC,IAAA,MAAM,UAAU,GAAG,KAAK,CAAC,SAAS;AAClC,IAAA,IAAI,UAAU;QAAE,KAAK,CAAC,IAAI,EAAE;IAC5B,IAAI,QAAQ,GAAG,KAAK;AACpB,IAAA,OAAO,MAAK;AACV,QAAA,IAAI,QAAQ;YAAE;QACd,QAAQ,GAAG,IAAI;QACf,IAAI,UAAU,IAAI,IAAI,EAAE,KAAK,KAAK,IAAI,CAAC,KAAK,CAAC,SAAS;YAAE,KAAK,CAAC,KAAK,EAAE;AACvE,IAAA,CAAC;AACH;;"}
@@ -0,0 +1,17 @@
1
+ import type { BombSearchGuard } from "../../simport/view";
2
+ /** How far left of a run's first tile a climbing guard stands, in tiles:
3
+ * the middle of the fire escape hung off that side of the floor. */
4
+ export declare const ON_THE_ESCAPE: number;
5
+ /** Where a guard is at minute `now`: on the emergency stairs until
6
+ * `arrive`, then walking the rooms left to right until `done`. On the
7
+ * stairs it follows the engine's `route` corner to corner, so a guard
8
+ * crossing to another tower walks to a floor they share and over instead
9
+ * of climbing through the sky between them. The stairs time is split by
10
+ * floors; crossing a shared floor takes none. `floor` may be fractional on
11
+ * the stairs, where `x` is on the fire escape left of the route's stairs
12
+ * tile; `x` is in tiles. */
13
+ export declare function guardPosition(g: BombSearchGuard, now: number): {
14
+ floor: number;
15
+ x: number;
16
+ climbing: boolean;
17
+ };