@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":"catalog.js","sources":["../../../src/render/atlas/catalog.ts"],"sourcesContent":["import type { FacilityKind, UnitState } from \"../../shared/types\";\nimport { LATE_NIGHT_KINDS, isLateHour } from \"../lateNight\";\nimport { TILE, FLOOR } from \"../scale\";\nimport { findViewKind, hasBusinessHours, isOpenAt, viewKindKeys } from \"../../presentation/viewKinds\";\nimport { CONSTRUCTION_FRAMES, FIRE_FRAMES, ROOM_VARIANTS } from \"./schema\";\nimport type { PaintSpec, UnitPaint } from \"./paint\";\nimport { CINEMA_CYCLES, clockFor } from \"./cycles\";\nimport { recyclingFillBreaks } from \"./recyclingFill\";\n\n/**\n * The room half of the atlas catalog: every facility kind in every unit state,\n * baked on the static inputs of the web's re-bake signature\n * (`excalibur/roomSignature.ts`) and split from the inputs a frontend\n * composes at runtime. Pure data; the bake runs it.\n */\n\nexport type Keys = Record<string, string | number | boolean>;\n\n/** A still frame, optionally carrying composed layers. */\nexport interface StillJob {\n type: \"still\";\n name: string;\n w: number;\n h: number;\n anchor: { x: number; y: number };\n keys: Keys;\n paint: PaintSpec;\n /** Ordered steps; layer `k` is what changes from step `k-1` to step `k`.\n * Step 0 is the frame's own paint. `alternativeTo` names the chain this\n * one is drawn instead of (never with it); an alternative came after the\n * first atlas, so its images pack after every older page. */\n chains?: Record<string, { input: string; steps: PaintSpec[]; alternativeTo?: string }>;\n /** Looping pictures over the frame, each its own loop (the cinema's marquee\n * and screen): step `k` is what changes from the frame's own paint\n * (`steps[0]`) to picture `k`, and a frontend shows step\n * `floor(clock * rate) % steps.length`. Added after the first atlas, so\n * their images pack after every older page. */\n cycles?: Record<string, { rate: number; steps: PaintSpec[] }>;\n /** Moments the bake recomposes from the frame, its cycles at `at` and its\n * chains at `chains`, and holds to `paint`. */\n cycleChecks?: { at: Record<string, number>; chains: Record<string, number>; paint: PaintSpec }[];\n /** Single overlays: what changes from the frame's paint to this one. */\n overlays?: Record<string, PaintSpec>;\n /** Try a depth split of the frame's paint (a room): a paint that marks a\n * shell break (`pixelSprites/layers.ts`) gets shell and furniture layers. */\n layers?: boolean;\n /** True for a vehicle: with `layers`, what the paint draws after its\n * `layerEnd` becomes a front picture over the riders instead of landing\n * on the shell (`BakedLayers.front`). */\n front?: boolean;\n /** Set for a family added after the first atlas: its new images pack on\n * pages after the first atlas's frame pages (`BakeResult.groups`). A\n * string names the family, so a later family starts pages of its own. */\n ownPages?: boolean | string;\n}\n\n/** An animation: one frame per paint, `dt` seconds apart. */\nexport interface AnimJob {\n type: \"anim\";\n name: string;\n w: number;\n h: number;\n anchor: { x: number; y: number };\n keys: Keys;\n dt: number;\n loop: boolean;\n frames: PaintSpec[];\n /** True when every frame should also be split for depth, like a still. */\n layers?: boolean;\n /** Set for a family added after the first atlas: its new images pack on\n * pages after the first atlas's frame pages (`BakeResult.groups`). A\n * string names the family, so a later family starts pages of its own. */\n ownPages?: boolean | string;\n}\n\nexport type Job = StillJob | AnimJob;\n\n/** Every state the engine names (engine-rs `UnitState::as_str`). Fire and\n * construction ship as animations; the rest bake as stills. */\nexport const UNIT_STATES: readonly UnitState[] = [\n \"construction\",\n \"empty\",\n \"occupied\",\n \"moving_in\",\n \"vacating\",\n \"asleep\",\n \"dirty\",\n \"infested\",\n \"fire\",\n \"gutted\",\n];\n\n/** Kinds whose art ignores `occupants` entirely, so they carry no presence\n * split and no occupant chain. */\nexport const OCCUPANT_FREE = new Set<FacilityKind>([\"parking\", \"parkingRamp\", \"security\", \"medical\", \"housekeeping\", \"recycling\", \"metro\"]);\n\n/** The web's re-bake bucket for the recycling pile (`r${round(fill * 8)}`). */\nexport const RECYCLE_STEPS = 8;\n\n/** Every fill where the recycling center's picture changes, ascending: the\n * exact chain's steps (`recyclingFill.ts`), published as\n * `data.recyclingFillBreaks`. */\nexport const RECYCLE_BREAKS: readonly number[] = recyclingFillBreaks();\n\n/** Parked car colors: `ACCENTS[id % 7]` in the garage art. */\nexport const PARKING_CAR_COLORS = 7;\n\nfunction facilityEntry(kind: FacilityKind) {\n const f = findViewKind(kind);\n if (!f) throw new Error(`the bound catalog lists no facility \"${kind}\"`);\n return f;\n}\n\n/** The sampled per-footprint seeds for variant `v` of `kind`. Above-ground\n * and basement kinds sample floors on their own side of the ground line, and\n * a full-lot kind (the metro) has exactly one placement. */\nexport function variantPlacements(kind: FacilityKind): { floor: number; x: number; id: number }[] {\n const f = facilityEntry(kind);\n if (kind === \"metro\") return [{ floor: -8, x: 0, id: 1 }];\n const floors = f.basement ? [-1, -2, -4, -6] : [5, 12, 27, 43];\n const xs = [17, 64, 131, 208];\n const ids = [3, 14, 25, 36];\n return Array.from({ length: ROOM_VARIANTS }, (_, v) => ({ floor: floors[v], x: xs[v], id: ids[v] }));\n}\n\n/** The kinds that bake as rooms: everything but structure and transport. */\nexport function roomKinds(): FacilityKind[] {\n return viewKindKeys().filter((kind) => kind !== \"floor\" && kind !== \"lobby\" && !facilityEntry(kind).transport);\n}\n\n/** An hour that realizes the requested open/closed and late-night bits for\n * `kind`. `open` is ignored for kinds without business hours. */\nexport function hourFor(kind: FacilityKind, open: boolean, late: boolean): number {\n for (let i = 0; i < 24; i++) {\n const h = (12 + i) % 24;\n if (LATE_NIGHT_KINDS.has(kind) && isLateHour(h) !== late) continue;\n if (hasBusinessHours(kind) && isOpenAt(kind, h) !== open) continue;\n return h;\n }\n throw new Error(`no hour realizes ${kind} open=${open} late=${late}`);\n}\n\n/** The most occupants the engine can put in a room of `kind`, which is the\n * occupant chain's length. Leases and stays fill to the catalog population,\n * commercial customers stay under it (`crowd/visits.ts`), venues are clamped\n * to their attendance (`census.syncAttendanceOccupants`), and a Modern\n * household runs up to the largest family size. A frontend clamps a larger\n * (forged) count to the chain's `max`. */\nexport function occupantCap(kind: FacilityKind): number {\n const f = facilityEntry(kind);\n const household = f.maxHousehold ?? 0;\n return Math.max(f.population, f.attendance ?? 0, household);\n}\n\n/** Frame name token for a subtype: the engine's name, or `-` for none. */\nfunction subtypeToken(s: string | undefined): string {\n if (s === undefined) return \"-\";\n if (s.includes(\"/\")) throw new Error(`subtype ${s} would break the frame name`);\n return s;\n}\n\n/** All still and animated room jobs. */\nexport function roomJobs(): Job[] {\n const jobs: Job[] = [];\n for (const kind of roomKinds()) {\n const f = facilityEntry(kind);\n const w = f.width * TILE;\n const h = f.floors * FLOOR;\n jobs.push(...roomAnimations(kind, w, h));\n const subtypes: (string | undefined)[] = [undefined, ...(f.subtypes ?? [])];\n const hoursSet = f.openHours !== null ? [\"open\", \"closed\"] : [\"always\"];\n const lateSet = LATE_NIGHT_KINDS.has(kind) ? [\"late\", \"notlate\"] : [\"any\"];\n const placements = variantPlacements(kind);\n for (const state of UNIT_STATES) {\n if (state === \"fire\" || state === \"construction\") continue;\n for (const subtype of subtypes) {\n for (const lit of [false, true]) {\n for (const hours of hoursSet) {\n for (const late of lateSet) {\n placements.forEach((pl, v) => {\n const base: UnitPaint = {\n p: \"unit\",\n kind,\n state,\n subtype,\n floor: pl.floor,\n x: pl.x,\n id: pl.id,\n width: f.width,\n occupants: 0,\n outForMeal: 0,\n lit,\n hour: hourFor(kind, hours === \"open\", late === \"late\"),\n anim: 0,\n };\n const keys: Keys = { kind, state, subtype: subtypeToken(subtype), width: f.width, lit, hours, late, variant: v };\n const stem = `room/${kind}/${state}/${subtypeToken(subtype)}/w${f.width}/${lit ? \"lit\" : \"unlit\"}/${hours}/${late}/v${v}`;\n jobs.push(...roomStills(kind, stem, w, h, base, keys));\n });\n }\n }\n }\n }\n }\n }\n return jobs;\n}\n\n/** The still frames for one static signature, each tried for a depth split\n * (the paint decides whether it has one: a vacancy card, a shutter or a\n * gutted shell paints flat). */\nfunction roomStills(kind: FacilityKind, stem: string, w: number, h: number, base: UnitPaint, keys: Keys): StillJob[] {\n const jobs = roomStillJobs(kind, stem, w, h, base, keys, { x: 0, y: 0 }).map((j) => ({ ...j, layers: true }));\n return kind === \"cinema\" ? jobs.map(withCinemaCycles) : jobs;\n}\n\n/** The cinema's marquee and screen loops on a frame baked at clock 0. Each\n * cycle's picture `k` is painted at a clock that shows step `k` of it and\n * step 0 of the other, and the bake checks every pairing of the two (with\n * no one seated, and with the chain's full house), and every count in\n * between at one pairing, against the paint. */\nfunction withCinemaCycles(job: StillJob): StillJob {\n const at = (spec: PaintSpec, clock: number): PaintSpec => ({ ...(spec as UnitPaint), anim: clock });\n const clock = (want: Record<string, number>): number => {\n const t = clockFor(CINEMA_CYCLES, want);\n if (t === null) throw new Error(`no clock shows ${JSON.stringify(want)}`);\n return t;\n };\n const cycles: NonNullable<StillJob[\"cycles\"]> = {};\n for (const [key, c] of Object.entries(CINEMA_CYCLES)) {\n cycles[key] = { rate: c.rate, steps: Array.from({ length: c.frames }, (_, k) => (k === 0 ? job.paint : at(job.paint, clock({ [key]: k })))) };\n }\n const [mk, sk] = Object.keys(CINEMA_CYCLES);\n const chain = Object.entries(job.chains ?? {})[0];\n const cycleChecks: NonNullable<StillJob[\"cycleChecks\"]> = [];\n for (let m = 0; m < CINEMA_CYCLES[mk].frames; m++) {\n for (let s = 0; s < CINEMA_CYCLES[sk].frames; s++) {\n const want = { [mk]: m, [sk]: s };\n cycleChecks.push({ at: want, chains: {}, paint: at(job.paint, clock(want)) });\n if (chain) {\n const top = chain[1].steps.length - 1;\n cycleChecks.push({ at: want, chains: { [chain[0]]: top }, paint: at(chain[1].steps[top], clock(want)) });\n }\n }\n }\n // Every count in between, at one pairing with neither cycle at step 0.\n if (chain) {\n const want = { [mk]: 1, [sk]: 3 };\n for (let n = 1; n < chain[1].steps.length - 1; n++) cycleChecks.push({ at: want, chains: { [chain[0]]: n }, paint: at(chain[1].steps[n], clock(want)) });\n }\n return { ...job, cycles, cycleChecks };\n}\n\n/** The presence split and the composed layers each kind carries. */\nfunction roomStillJobs(kind: FacilityKind, stem: string, w: number, h: number, base: UnitPaint, keys: Keys, anchor: { x: number; y: number }): StillJob[] {\n if (kind === \"parking\") {\n const overlays: Record<string, PaintSpec> = { dead: { ...base, dead: true } };\n for (let c = 0; c < PARKING_CAR_COLORS; c++) overlays[`car${c}`] = { ...base, id: c, parkingUse: 1 };\n return [{ type: \"still\", name: stem, w, h, anchor, keys, paint: base, overlays }];\n }\n if (kind === \"recycling\") {\n const steps: PaintSpec[] = [];\n for (let k = 0; k <= RECYCLE_STEPS; k++) steps.push({ ...base, recycleFill: k / RECYCLE_STEPS });\n // The exact chain: one step per fill where the picture changes.\n const exact: PaintSpec[] = [base, ...RECYCLE_BREAKS.map((fill) => ({ ...base, recycleFill: fill }))];\n const chains = { fill: { input: \"recyclingFill\", steps }, fillExact: { input: \"recyclingFillExact\", steps: exact, alternativeTo: \"fill\" } };\n return [{ type: \"still\", name: stem, w, h, anchor, keys, paint: base, chains }];\n }\n if (OCCUPANT_FREE.has(kind)) return [{ type: \"still\", name: stem, w, h, anchor, keys, paint: base }];\n const away: StillJob = { type: \"still\", name: `${stem}/away`, w, h, anchor, keys: { ...keys, presence: \"away\" }, paint: base };\n // Present: raw occupants > 0. The chain walks the VISIBLE count (occupants\n // minus those out for a meal); step 0 is everyone out, which only a meal\n // origin can reach.\n const homeBase: UnitPaint = { ...base, occupants: 1, outForMeal: 1 };\n const steps: PaintSpec[] = [homeBase];\n for (let v = 1; v <= occupantCap(kind); v++) steps.push({ ...base, occupants: v, outForMeal: 0 });\n const home: StillJob = {\n type: \"still\",\n name: `${stem}/home`,\n w,\n h,\n anchor,\n keys: { ...keys, presence: \"home\" },\n paint: homeBase,\n chains: { occupants: { input: \"visibleOccupants\", steps } },\n };\n return [away, home];\n}\n\n/** Fire and construction loops for a kind (their art reads only the size and\n * the animation clock). */\nfunction roomAnimations(kind: FacilityKind, w: number, h: number): AnimJob[] {\n const base = (state: UnitState, anim: number): UnitPaint => ({\n p: \"unit\",\n kind,\n state,\n floor: 5,\n x: 17,\n id: 3,\n width: facilityEntry(kind).width,\n occupants: 0,\n outForMeal: 0,\n lit: false,\n hour: 12,\n anim,\n });\n // drawFlames: sin(anim * 6 + ...), period 2pi/6. drawConstruction: sin(anim).\n const firePeriod = (2 * Math.PI) / 6;\n const buildPeriod = 2 * Math.PI;\n const loop = (state: UnitState, period: number, n: number): AnimJob => ({\n type: \"anim\",\n name: `${state}/${kind}`,\n w,\n h,\n anchor: { x: 0, y: 0 },\n keys: { kind, state, width: facilityEntry(kind).width },\n dt: period / n,\n loop: true,\n frames: Array.from({ length: n }, (_, i) => base(state, (period * i) / n)),\n });\n return [loop(\"fire\", firePeriod, FIRE_FRAMES), loop(\"construction\", buildPeriod, CONSTRUCTION_FRAMES)];\n}\n"],"names":[],"mappings":";;;;;;;AA6EA;AACgE;AACzD,MAAM,WAAW,GAAyB;IAC/C,cAAc;IACd,OAAO;IACP,UAAU;IACV,WAAW;IACX,UAAU;IACV,QAAQ;IACR,OAAO;IACP,UAAU;IACV,MAAM;IAC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job } from "./catalog";
4
+ /** Floor and lobby tiles plus the four ground-floor entrance slices. The
5
+ * lobby tiles and the entrance frames carry depth layers. */
6
+ export declare function structureJobs(): Job[];
7
+ /** Sampled car seeds (the web seeds a cab by `car index * 7 + shaft id`). */
8
+ export declare const CAR_SEEDS: number[];
9
+ /** Rider chain length: a cab shows at most four riders (`carIndicator.ts`
10
+ * clamps the load to 0..4). */
11
+ export declare const RIDER_CAP = 4;
12
+ /** Elevator shafts as floor bands, the fixed-span stairs and escalators, and
13
+ * the cabs with their rider chains. */
14
+ export declare function transportJobs(): Job[];
15
+ /** The narrower widths a legacy save keeps for a shaft (`deserialize` keeps a
16
+ * stored width up to the catalog's; canon widths only ever grew). Stairs and
17
+ * escalators went 4 to 8 (E1b), and the migration leaves walkways as stored;
18
+ * the standard elevator went 3 to 4 and the express 4 to 6, and a shaft boxed
19
+ * in on both sides keeps its legacy width (`widenLegacyElevatorShafts`). The
20
+ * service elevator has always been 4. */
21
+ export declare const LEGACY_SHAFT_WIDTHS: Partial<Record<FacilityKind, readonly number[]>>;
22
+ /** The legacy-width shafts and their cabs, named with a `w<tiles>` segment
23
+ * after the kind. They joined the atlas after its first release, so they
24
+ * pack on pages of their own. */
25
+ export declare function legacyShaftJobs(): Job[];
26
+ /** Figure builds and their sizes, from the game's own build table: the build's
27
+ * width and its height (head, torso and legs). */
28
+ export declare const BUILDS: Record<PersonBuild, {
29
+ w: number;
30
+ h: number;
31
+ }>;
32
+ /** Every figure build in every fill the game paints it in. */
33
+ export declare function peopleJobs(): Job[];
34
+ /** Fire escapes, ground-floor awnings and the rooftop crane. */
35
+ export declare function facadeJobs(): Job[];
36
+ /** Sampled garage-sedan seeds (the web seeds one per parking floor). */
37
+ export declare const STREET_CAR_SEEDS: number[];
38
+ /** The moving vehicles: garage sedans, the garbage truck, the metro train. */
39
+ export declare function vehicleJobs(): Job[];
40
+ /** Skyline fills (`sceneryLayout.ts`, which the game reads): far, then near. */
41
+ export { SKYLINE_FILLS } from "../sceneryLayout";
42
+ /** Columns in the sky strip: one per quarter hour. */
43
+ export declare const SKY_COLUMNS = 96;
44
+ /** The day's sky strip, the sun and moon, every cloud, and the skyline. */
45
+ export declare function skyJobs(): Job[];
@@ -0,0 +1,217 @@
1
+ import { SKYLINE_FILLS } from '../sceneryLayout.js';
2
+ import { BUILDS as BUILDS$1, SHIRTS, moodTint } from '../pixelSprites/common.js';
3
+ import { TILE, FLOOR } from '../scale.js';
4
+ import '../sprites.js';
5
+ import { GARBAGE_TRUCK_H, METRO_TRAIN_H } from '../sprites/facilities/vehicles.js';
6
+ import { SUN_R, MOON_R, CLOUD_COUNT, cloudRadius, cloudSeed } from '../sprites/sky.js';
7
+ import { personSize, cloudOrigin } from './paint.js';
8
+ import { CRANE_FRAMES, CRANE_DT } from './schema.js';
9
+ import { viewKindKeys, findViewKind, isElevatorKind } from '../../presentation/viewKinds.js';
10
+ import { LOBBY_VARIANTS } from '../sprites/structure/lobby.js';
11
+ import { ESCAPE_W, AWNING_W, CRANE_H, CRANE_W } from '../sprites/structure/rooftop.js';
12
+
13
+ /**
14
+ * The non-room half of the atlas catalog: structure tiles and entrances,
15
+ * shafts and cars, people, the exterior facade, vehicles and the sky.
16
+ */
17
+ const lit2 = (lit) => (lit ? "lit" : "unlit");
18
+ function still(name, w, h, paint, keys, anchor = { x: 0, y: 0 }) {
19
+ return { type: "still", name, w, h, anchor, keys, paint };
20
+ }
21
+ /** Floor and lobby tiles plus the four ground-floor entrance slices. The
22
+ * lobby tiles and the entrance frames carry depth layers. */
23
+ function structureJobs() {
24
+ const jobs = [still("structure/floor", TILE, FLOOR, { p: "floor" }, { kind: "floor" })];
25
+ for (const ground of [true, false]) {
26
+ for (const lit of [false, true]) {
27
+ for (let v = 0; v < LOBBY_VARIANTS; v++) {
28
+ const style = ground ? "ground" : "sky";
29
+ jobs.push({ ...still(`structure/lobby/${style}/${lit2(lit)}/v${v}`, TILE, FLOOR, { p: "lobby", ground, variant: v, lit }, { kind: "lobby", style, lit, variant: v }), layers: true });
30
+ }
31
+ }
32
+ }
33
+ const kinds = ["grand-left", "grand-right", "grand-solo", "service"];
34
+ for (const kind of kinds) {
35
+ for (const lit of [false, true]) {
36
+ for (const staffed of [true, false]) {
37
+ // The doorman sways between two poses every 1.5 s (`entrance.ts`).
38
+ const frames = [0, 1.5].map((anim) => ({ p: "entrance", kind, lit, anim, staffed }));
39
+ const anim = {
40
+ type: "anim",
41
+ name: `structure/entrance/${kind}/${lit2(lit)}/${staffed ? "staffed" : "unstaffed"}`,
42
+ w: TILE,
43
+ h: FLOOR,
44
+ anchor: { x: 0, y: 0 },
45
+ keys: { kind: "lobby", entrance: kind, lit, staffed },
46
+ dt: 1.5,
47
+ loop: true,
48
+ frames,
49
+ layers: true,
50
+ };
51
+ jobs.push(anim);
52
+ }
53
+ }
54
+ }
55
+ return jobs;
56
+ }
57
+ /** Sampled car seeds (the web seeds a cab by `car index * 7 + shaft id`). */
58
+ const CAR_SEEDS = [0, 7, 15, 22];
59
+ /** Rider chain length: a cab shows at most four riders (`carIndicator.ts`
60
+ * clamps the load to 0..4). */
61
+ const RIDER_CAP = 4;
62
+ /** Elevator shafts as floor bands, the fixed-span stairs and escalators, and
63
+ * the cabs with their rider chains. */
64
+ function transportJobs() {
65
+ const jobs = [];
66
+ for (const kind of viewKindKeys()) {
67
+ const f = findViewKind(kind);
68
+ if (f?.transport)
69
+ jobs.push(...shaftJobs(kind, f.width));
70
+ }
71
+ return jobs;
72
+ }
73
+ /** The narrower widths a legacy save keeps for a shaft (`deserialize` keeps a
74
+ * stored width up to the catalog's; canon widths only ever grew). Stairs and
75
+ * escalators went 4 to 8 (E1b), and the migration leaves walkways as stored;
76
+ * the standard elevator went 3 to 4 and the express 4 to 6, and a shaft boxed
77
+ * in on both sides keeps its legacy width (`widenLegacyElevatorShafts`). The
78
+ * service elevator has always been 4. */
79
+ const LEGACY_SHAFT_WIDTHS = {
80
+ stairs: [4],
81
+ escalator: [4],
82
+ elevatorStandard: [3],
83
+ elevatorExpress: [4],
84
+ };
85
+ /** The legacy-width shafts and their cabs, named with a `w<tiles>` segment
86
+ * after the kind. They joined the atlas after its first release, so they
87
+ * pack on pages of their own. */
88
+ function legacyShaftJobs() {
89
+ const jobs = [];
90
+ for (const [kind, widths] of Object.entries(LEGACY_SHAFT_WIDTHS)) {
91
+ for (const tiles of widths)
92
+ for (const job of shaftJobs(kind, tiles, `/w${tiles}`))
93
+ jobs.push({ ...job, keys: { ...job.keys, width: tiles }, ownPages: "legacy-shafts" });
94
+ }
95
+ return jobs;
96
+ }
97
+ /** One transport kind's frames at `tiles` wide: a two-floor flight for stairs
98
+ * and escalators; shaft bands and cabs for an elevator. `seg` follows the
99
+ * kind in each name (empty at the catalog width). */
100
+ function shaftJobs(kind, tiles, seg = "") {
101
+ const jobs = [];
102
+ const w = tiles * TILE;
103
+ if (!isElevatorKind(kind)) {
104
+ // Stairs and escalators always span exactly two floors.
105
+ jobs.push(still(`transport/${kind}${seg}`, w, 2 * FLOOR, { p: "shaft", kind, floors: 2, band: 0, skip: [] }, { kind, floors: 2 }));
106
+ return jobs;
107
+ }
108
+ const band = (piece, floors, b, skip) => still(`shaft/${kind}${seg}/${piece}`, w, FLOOR, { p: "shaft", kind, floors, band: b, skip }, { kind, piece });
109
+ // Bands are numbered from the top floor down; floor 2 of a 3-floor shaft
110
+ // is its middle band.
111
+ jobs.push(band("top", 3, 0, []), band("stop", 3, 1, []), band("skip", 3, 1, [2]), band("bottom", 3, 2, []), band("single", 1, 0, []),
112
+ // A skipped end floor (a resized or loaded non-express shaft can keep
113
+ // one in its skip list). The bottom loses its stop line; the top's is
114
+ // already under the motor housing, so top-skip matches top.
115
+ band("top-skip", 3, 0, [3]), band("bottom-skip", 3, 2, [1]), band("single-skip", 1, 0, [1]));
116
+ for (const arrow of [null, "up", "down"]) {
117
+ for (const full of [false, true]) {
118
+ CAR_SEEDS.forEach((seed, s) => {
119
+ const car = (riders) => ({ p: "car", kind, seed, riders, arrow, full });
120
+ const steps = Array.from({ length: RIDER_CAP + 1 }, (_, r) => car(r));
121
+ jobs.push({
122
+ ...still(`car/${kind}${seg}/${arrow ?? "idle"}/${full ? "full" : "notfull"}/s${s}`, w, FLOOR, car(0), { kind, arrow: arrow ?? "idle", full, variant: s }),
123
+ chains: { riders: { input: "riders", steps } },
124
+ // The cab's interior is the back, its riders, step by step, the
125
+ // furniture, and its door frames, FULL bar and lantern the front.
126
+ layers: true,
127
+ front: true,
128
+ });
129
+ });
130
+ }
131
+ }
132
+ return jobs;
133
+ }
134
+ /** Figure builds and their sizes, from the game's own build table: the build's
135
+ * width and its height (head, torso and legs). */
136
+ const BUILDS = Object.fromEntries(Object.keys(BUILDS$1).map((b) => {
137
+ const spec = BUILDS$1[b];
138
+ return [b, { w: spec.width, h: spec.head + spec.torso + spec.legs }];
139
+ }));
140
+ /** Every figure build in every fill the game paints it in. */
141
+ function peopleJobs() {
142
+ const fills = SHIRTS.map((c, i) => [`shirt${i}`, c]);
143
+ fills.push(["staff", "#E8E4DA"], ["impatient", moodTint("impatient", 0)], ["fedUp", moodTint("fedUp", 0)]);
144
+ const jobs = [];
145
+ for (const build of Object.keys(BUILDS)) {
146
+ const size = personSize(BUILDS[build].w, BUILDS[build].h);
147
+ for (const [name, fill] of fills) {
148
+ const anchor = { x: Math.floor(size.w / 2), y: size.h - 1 };
149
+ jobs.push(still(`person/${build}/${name}`, size.w, size.h, { p: "person", build, fill }, { build, fill: name, color: fill }, anchor));
150
+ }
151
+ }
152
+ return jobs;
153
+ }
154
+ /** Fire escapes, ground-floor awnings and the rooftop crane. */
155
+ function facadeJobs() {
156
+ const jobs = [];
157
+ for (const side of ["left", "right"]) {
158
+ for (const parity of [0, 1]) {
159
+ jobs.push(still(`facade/escape/${side}/${parity}`, ESCAPE_W, FLOOR, { p: "escape", side, parity }, { piece: "escape", side, parity }));
160
+ }
161
+ jobs.push(still(`facade/awning/${side}`, AWNING_W, FLOOR, { p: "awning", side }, { piece: "awning", side }));
162
+ }
163
+ for (const lit of [false, true]) {
164
+ jobs.push({
165
+ type: "anim",
166
+ name: `facade/crane/${lit2(lit)}`,
167
+ w: CRANE_W,
168
+ h: CRANE_H,
169
+ anchor: { x: CRANE_W / 2, y: CRANE_H },
170
+ keys: { piece: "crane", lit },
171
+ dt: CRANE_DT,
172
+ loop: false,
173
+ frames: Array.from({ length: CRANE_FRAMES }, (_, i) => ({ p: "crane", t: i * CRANE_DT, lit })),
174
+ });
175
+ }
176
+ return jobs;
177
+ }
178
+ /** Sampled garage-sedan seeds (the web seeds one per parking floor). */
179
+ const STREET_CAR_SEEDS = [0, 97, 401, 1213];
180
+ /** The moving vehicles: garage sedans, the garbage truck, the metro train. */
181
+ function vehicleJobs() {
182
+ const jobs = STREET_CAR_SEEDS.map((seed, s) => still(`vehicle/streetcar/s${s}`, 16, 8, { p: "streetCar", seed }, { vehicle: "streetcar", variant: s }));
183
+ jobs.push(still("vehicle/garbagetruck", 68, GARBAGE_TRUCK_H, { p: "garbageTruck", w: 68 }, { vehicle: "garbagetruck" }));
184
+ const metro = findViewKind("metro");
185
+ if (!metro)
186
+ throw new Error('the bound catalog lists no facility "metro"');
187
+ const trainW = metro.width * TILE - 6;
188
+ for (const headlight of [true, false]) {
189
+ jobs.push({ ...still(`vehicle/metrotrain/${headlight ? "headlight" : "dark"}`, trainW, METRO_TRAIN_H, { p: "metroTrain", w: trainW, headlight }, { vehicle: "metrotrain", headlight }), layers: true, front: true });
190
+ }
191
+ return jobs;
192
+ }
193
+ /** Columns in the sky strip: one per quarter hour. */
194
+ const SKY_COLUMNS = 96;
195
+ /** The day's sky strip, the sun and moon, every cloud, and the skyline. */
196
+ function skyJobs() {
197
+ const jobs = [still("sky/gradient", SKY_COLUMNS, 1, { p: "skyGradient" }, { piece: "gradient", columnsPerHour: SKY_COLUMNS / 24 })];
198
+ for (const [name, day, r] of [["sun", true, SUN_R], ["moon", false, MOON_R]]) {
199
+ const d = 2 * r + 2;
200
+ jobs.push(still(`sky/${name}`, d, d, { p: "disc", day, r }, { piece: name }, { x: d / 2, y: d / 2 }));
201
+ }
202
+ for (const weather of ["overcast", "rain"]) {
203
+ for (let i = 0; i < CLOUD_COUNT; i++) {
204
+ const r = cloudRadius(cloudSeed(i));
205
+ const o = cloudOrigin(r);
206
+ jobs.push(still(`sky/cloud/${weather}/${i}`, o.w, o.h, { p: "cloud", weather, r }, { piece: "cloud", weather, index: i }, { x: o.x, y: o.y }));
207
+ }
208
+ }
209
+ SKYLINE_FILLS.forEach((css, i) => {
210
+ const depth = i === 0 ? "far" : "near";
211
+ jobs.push(still(`sky/skyline/${depth}`, 2, 2, { p: "solid", css }, { piece: "skyline", depth }));
212
+ });
213
+ return jobs;
214
+ }
215
+
216
+ export { BUILDS, CAR_SEEDS, LEGACY_SHAFT_WIDTHS, RIDER_CAP, SKYLINE_FILLS, SKY_COLUMNS, STREET_CAR_SEEDS, facadeJobs, legacyShaftJobs, peopleJobs, skyJobs, structureJobs, transportJobs, vehicleJobs };
217
+ //# sourceMappingURL=catalogExtras.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"catalogExtras.js","sources":["../../../src/render/atlas/catalogExtras.ts"],"sourcesContent":["import { SKYLINE_FILLS } from \"../sceneryLayout\";\nimport type { FacilityKind } from \"../../shared/types\";\nimport type { PersonBuild } from \"../pixelSprites/common\";\nimport { BUILDS as FIGURE_BUILDS, SHIRTS, moodTint } from \"../pixelSprites/common\";\nimport { FLOOR, TILE } from \"../scale\";\nimport {\n AWNING_W,\n CRANE_H,\n CRANE_W,\n ESCAPE_W,\n LOBBY_VARIANTS,\n type EntranceKind,\n} from \"../sprites\";\nimport { GARBAGE_TRUCK_H, METRO_TRAIN_H } from \"../sprites/facilities/vehicles\";\nimport { CLOUD_COUNT, MOON_R, SUN_R, cloudRadius, cloudSeed } from \"../sprites/sky\";\nimport type { AnimJob, Job, Keys, StillJob } from \"./catalog\";\nimport { cloudOrigin, personSize, type PaintSpec } from \"./paint\";\nimport { CRANE_DT, CRANE_FRAMES } from \"./schema\";\nimport { findViewKind, isElevatorKind, viewKindKeys } from \"../../presentation/viewKinds\";\n\n/**\n * The non-room half of the atlas catalog: structure tiles and entrances,\n * shafts and cars, people, the exterior facade, vehicles and the sky.\n */\n\nconst lit2 = (lit: boolean): string => (lit ? \"lit\" : \"unlit\");\n\nfunction still(name: string, w: number, h: number, paint: PaintSpec, keys: Keys, anchor = { x: 0, y: 0 }): StillJob {\n return { type: \"still\", name, w, h, anchor, keys, paint };\n}\n\n/** Floor and lobby tiles plus the four ground-floor entrance slices. The\n * lobby tiles and the entrance frames carry depth layers. */\nexport function structureJobs(): Job[] {\n const jobs: Job[] = [still(\"structure/floor\", TILE, FLOOR, { p: \"floor\" }, { kind: \"floor\" })];\n for (const ground of [true, false]) {\n for (const lit of [false, true]) {\n for (let v = 0; v < LOBBY_VARIANTS; v++) {\n const style = ground ? \"ground\" : \"sky\";\n jobs.push({ ...still(`structure/lobby/${style}/${lit2(lit)}/v${v}`, TILE, FLOOR, { p: \"lobby\", ground, variant: v, lit }, { kind: \"lobby\", style, lit, variant: v }), layers: true });\n }\n }\n }\n const kinds: EntranceKind[] = [\"grand-left\", \"grand-right\", \"grand-solo\", \"service\"];\n for (const kind of kinds) {\n for (const lit of [false, true]) {\n for (const staffed of [true, false]) {\n // The doorman sways between two poses every 1.5 s (`entrance.ts`).\n const frames: PaintSpec[] = [0, 1.5].map((anim) => ({ p: \"entrance\", kind, lit, anim, staffed }));\n const anim: AnimJob = {\n type: \"anim\",\n name: `structure/entrance/${kind}/${lit2(lit)}/${staffed ? \"staffed\" : \"unstaffed\"}`,\n w: TILE,\n h: FLOOR,\n anchor: { x: 0, y: 0 },\n keys: { kind: \"lobby\", entrance: kind, lit, staffed },\n dt: 1.5,\n loop: true,\n frames,\n layers: true,\n };\n jobs.push(anim);\n }\n }\n }\n return jobs;\n}\n\n/** Sampled car seeds (the web seeds a cab by `car index * 7 + shaft id`). */\nexport const CAR_SEEDS = [0, 7, 15, 22];\n\n/** Rider chain length: a cab shows at most four riders (`carIndicator.ts`\n * clamps the load to 0..4). */\nexport const RIDER_CAP = 4;\n\n/** Elevator shafts as floor bands, the fixed-span stairs and escalators, and\n * the cabs with their rider chains. */\nexport function transportJobs(): Job[] {\n const jobs: Job[] = [];\n for (const kind of viewKindKeys()) {\n const f = findViewKind(kind);\n if (f?.transport) jobs.push(...shaftJobs(kind, f.width));\n }\n return jobs;\n}\n\n/** The narrower widths a legacy save keeps for a shaft (`deserialize` keeps a\n * stored width up to the catalog's; canon widths only ever grew). Stairs and\n * escalators went 4 to 8 (E1b), and the migration leaves walkways as stored;\n * the standard elevator went 3 to 4 and the express 4 to 6, and a shaft boxed\n * in on both sides keeps its legacy width (`widenLegacyElevatorShafts`). The\n * service elevator has always been 4. */\nexport const LEGACY_SHAFT_WIDTHS: Partial<Record<FacilityKind, readonly number[]>> = {\n stairs: [4],\n escalator: [4],\n elevatorStandard: [3],\n elevatorExpress: [4],\n};\n\n/** The legacy-width shafts and their cabs, named with a `w<tiles>` segment\n * after the kind. They joined the atlas after its first release, so they\n * pack on pages of their own. */\nexport function legacyShaftJobs(): Job[] {\n const jobs: Job[] = [];\n for (const [kind, widths] of Object.entries(LEGACY_SHAFT_WIDTHS) as [FacilityKind, readonly number[]][]) {\n for (const tiles of widths) for (const job of shaftJobs(kind, tiles, `/w${tiles}`)) jobs.push({ ...job, keys: { ...job.keys, width: tiles }, ownPages: \"legacy-shafts\" });\n }\n return jobs;\n}\n\n/** One transport kind's frames at `tiles` wide: a two-floor flight for stairs\n * and escalators; shaft bands and cabs for an elevator. `seg` follows the\n * kind in each name (empty at the catalog width). */\nfunction shaftJobs(kind: FacilityKind, tiles: number, seg = \"\"): Job[] {\n const jobs: Job[] = [];\n const w = tiles * TILE;\n if (!isElevatorKind(kind)) {\n // Stairs and escalators always span exactly two floors.\n jobs.push(still(`transport/${kind}${seg}`, w, 2 * FLOOR, { p: \"shaft\", kind, floors: 2, band: 0, skip: [] }, { kind, floors: 2 }));\n return jobs;\n }\n const band = (piece: string, floors: number, b: number, skip: number[]): StillJob =>\n still(`shaft/${kind}${seg}/${piece}`, w, FLOOR, { p: \"shaft\", kind, floors, band: b, skip }, { kind, piece });\n // Bands are numbered from the top floor down; floor 2 of a 3-floor shaft\n // is its middle band.\n jobs.push(\n band(\"top\", 3, 0, []),\n band(\"stop\", 3, 1, []),\n band(\"skip\", 3, 1, [2]),\n band(\"bottom\", 3, 2, []),\n band(\"single\", 1, 0, []),\n // A skipped end floor (a resized or loaded non-express shaft can keep\n // one in its skip list). The bottom loses its stop line; the top's is\n // already under the motor housing, so top-skip matches top.\n band(\"top-skip\", 3, 0, [3]),\n band(\"bottom-skip\", 3, 2, [1]),\n band(\"single-skip\", 1, 0, [1]),\n );\n for (const arrow of [null, \"up\", \"down\"] as const) {\n for (const full of [false, true]) {\n CAR_SEEDS.forEach((seed, s) => {\n const car = (riders: number): PaintSpec => ({ p: \"car\", kind, seed, riders, arrow, full });\n const steps = Array.from({ length: RIDER_CAP + 1 }, (_, r) => car(r));\n jobs.push({\n ...still(`car/${kind}${seg}/${arrow ?? \"idle\"}/${full ? \"full\" : \"notfull\"}/s${s}`, w, FLOOR, car(0), { kind, arrow: arrow ?? \"idle\", full, variant: s }),\n chains: { riders: { input: \"riders\", steps } },\n // The cab's interior is the back, its riders, step by step, the\n // furniture, and its door frames, FULL bar and lantern the front.\n layers: true,\n front: true,\n });\n });\n }\n }\n return jobs;\n}\n\n/** Figure builds and their sizes, from the game's own build table: the build's\n * width and its height (head, torso and legs). */\nexport const BUILDS = Object.fromEntries(\n (Object.keys(FIGURE_BUILDS) as PersonBuild[]).map((b) => {\n const spec = FIGURE_BUILDS[b];\n return [b, { w: spec.width, h: spec.head + spec.torso + spec.legs }];\n }),\n) as Record<PersonBuild, { w: number; h: number }>;\n\n/** Every figure build in every fill the game paints it in. */\nexport function peopleJobs(): Job[] {\n const fills: [string, string][] = SHIRTS.map((c, i) => [`shirt${i}`, c]);\n fills.push([\"staff\", \"#E8E4DA\"], [\"impatient\", moodTint(\"impatient\", 0)], [\"fedUp\", moodTint(\"fedUp\", 0)]);\n const jobs: Job[] = [];\n for (const build of Object.keys(BUILDS) as PersonBuild[]) {\n const size = personSize(BUILDS[build].w, BUILDS[build].h);\n for (const [name, fill] of fills) {\n const anchor = { x: Math.floor(size.w / 2), y: size.h - 1 };\n jobs.push(still(`person/${build}/${name}`, size.w, size.h, { p: \"person\", build, fill }, { build, fill: name, color: fill }, anchor));\n }\n }\n return jobs;\n}\n\n/** Fire escapes, ground-floor awnings and the rooftop crane. */\nexport function facadeJobs(): Job[] {\n const jobs: Job[] = [];\n for (const side of [\"left\", \"right\"] as const) {\n for (const parity of [0, 1] as const) {\n jobs.push(still(`facade/escape/${side}/${parity}`, ESCAPE_W, FLOOR, { p: \"escape\", side, parity }, { piece: \"escape\", side, parity }));\n }\n jobs.push(still(`facade/awning/${side}`, AWNING_W, FLOOR, { p: \"awning\", side }, { piece: \"awning\", side }));\n }\n for (const lit of [false, true]) {\n jobs.push({\n type: \"anim\",\n name: `facade/crane/${lit2(lit)}`,\n w: CRANE_W,\n h: CRANE_H,\n anchor: { x: CRANE_W / 2, y: CRANE_H },\n keys: { piece: \"crane\", lit },\n dt: CRANE_DT,\n loop: false,\n frames: Array.from({ length: CRANE_FRAMES }, (_, i) => ({ p: \"crane\", t: i * CRANE_DT, lit })),\n });\n }\n return jobs;\n}\n\n/** Sampled garage-sedan seeds (the web seeds one per parking floor). */\nexport const STREET_CAR_SEEDS = [0, 97, 401, 1213];\n\n/** The moving vehicles: garage sedans, the garbage truck, the metro train. */\nexport function vehicleJobs(): Job[] {\n const jobs: Job[] = STREET_CAR_SEEDS.map((seed, s) =>\n still(`vehicle/streetcar/s${s}`, 16, 8, { p: \"streetCar\", seed }, { vehicle: \"streetcar\", variant: s }),\n );\n jobs.push(still(\"vehicle/garbagetruck\", 68, GARBAGE_TRUCK_H, { p: \"garbageTruck\", w: 68 }, { vehicle: \"garbagetruck\" }));\n const metro = findViewKind(\"metro\");\n if (!metro) throw new Error('the bound catalog lists no facility \"metro\"');\n const trainW = metro.width * TILE - 6;\n for (const headlight of [true, false]) {\n jobs.push(\n { ...still(`vehicle/metrotrain/${headlight ? \"headlight\" : \"dark\"}`, trainW, METRO_TRAIN_H, { p: \"metroTrain\", w: trainW, headlight }, { vehicle: \"metrotrain\", headlight }), layers: true, front: true },\n );\n }\n return jobs;\n}\n\n/** Skyline fills (`sceneryLayout.ts`, which the game reads): far, then near. */\nexport { SKYLINE_FILLS } from \"../sceneryLayout\";\n\n/** Columns in the sky strip: one per quarter hour. */\nexport const SKY_COLUMNS = 96;\n\n/** The day's sky strip, the sun and moon, every cloud, and the skyline. */\nexport function skyJobs(): Job[] {\n const jobs: Job[] = [still(\"sky/gradient\", SKY_COLUMNS, 1, { p: \"skyGradient\" }, { piece: \"gradient\", columnsPerHour: SKY_COLUMNS / 24 })];\n for (const [name, day, r] of [[\"sun\", true, SUN_R], [\"moon\", false, MOON_R]] as const) {\n const d = 2 * r + 2;\n jobs.push(still(`sky/${name}`, d, d, { p: \"disc\", day, r }, { piece: name }, { x: d / 2, y: d / 2 }));\n }\n for (const weather of [\"overcast\", \"rain\"] as const) {\n for (let i = 0; i < CLOUD_COUNT; i++) {\n const r = cloudRadius(cloudSeed(i));\n const o = cloudOrigin(r);\n jobs.push(still(`sky/cloud/${weather}/${i}`, o.w, o.h, { p: \"cloud\", weather, r }, { piece: \"cloud\", weather, index: i }, { x: o.x, y: o.y }));\n }\n }\n SKYLINE_FILLS.forEach((css, i) => {\n const depth = i === 0 ? \"far\" : \"near\";\n jobs.push(still(`sky/skyline/${depth}`, 2, 2, { p: \"solid\", css }, { piece: \"skyline\", depth }));\n });\n return jobs;\n}\n"],"names":["FIGURE_BUILDS"],"mappings":";;;;;;;;;;;;AAoBA;;;AAGG;AAEH,MAAM,IAAI,GAAG,CAAC,GAAY,MAAc,GAAG,GAAG,KAAK,GAAG,OAAO,CAAC;AAE9D,SAAS,KAAK,CAAC,IAAY,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AAM,CAAC,GAAG,WAAW,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;AACnC,YAAA,MAAM,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC;YACxB,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA,UAAA,EAAa,OAAO,CAAA,CAAA,EAAI,CAAC,CAAA,CAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;QAChJ;IACF;IACA,aAAa,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,CAAC,KAAI;AAC/B,QAAA,MAAM,KAAK,GAAG,CAAC,KAAK,CAAC,GAAG,KAAK,GAAG,MAAM;AACtC,QAAA,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA,YAAA,EAAe,KAAK,CAAA,CAAE,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,EAAE,OAAO,EAAE,GAAG,EAAE,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC,CAAC;AAClG,IAAA,CAAC,CAAC;AACF,IAAA,OAAO,IAAI;AACb;;"}
@@ -0,0 +1,30 @@
1
+ import type { BakeResult, BakedFrame } from "./bake";
2
+ import type { Lookup } from "./lookup";
3
+ import { type Image } from "./pixels";
4
+ /** Compose `rec` with chain inputs `chains` and overlays `overlays`. */
5
+ export declare function composeFrame(bake: Pick<BakeResult, "images">, rec: BakedFrame, chains?: Record<string, number>, overlays?: readonly string[], cycles?: Record<string, number>): Image;
6
+ /** Compose `rec` the way a frontend drawing with depth does: the shell and
7
+ * its chain's shell steps, then its cycles, then the furniture (or, with `soft`, the soft
8
+ * furniture) and its chain's furniture (or soft) steps, then a vehicle's front
9
+ * and its steps, each source-over. Named overlays (a parking space's car or
10
+ * dead mark) draw last. Throws for a frame without depth layers. */
11
+ export declare function composeLayered(bake: Pick<BakeResult, "images">, rec: BakedFrame, chains?: Record<string, number>, overlays?: readonly string[], soft?: boolean, cycles?: Record<string, number>): Image;
12
+ /** The frame a lookup names (an animation resolves to its frame `i`), and
13
+ * the composed pixels. */
14
+ export declare function composeLookup(bake: Pick<BakeResult, "images" | "frames">, found: Lookup, frameIndex?: number): {
15
+ name: string;
16
+ image: Image;
17
+ };
18
+ /** Scale a picture horizontally to `w` pixels, nearest neighbor from its left
19
+ * edge: the reader's `stretchTo` rule. */
20
+ export declare function stretch(image: Image, w: number): Image;
21
+ /** Count differing pixels and their bounding box. */
22
+ export declare function compareImages(a: Image, b: Image): {
23
+ mismatches: number;
24
+ box?: {
25
+ x0: number;
26
+ y0: number;
27
+ x1: number;
28
+ y1: number;
29
+ };
30
+ };
@@ -0,0 +1,125 @@
1
+ import { over, blank } from './pixels.js';
2
+ import { TILE } from '../scale.js';
3
+
4
+ /**
5
+ * Composition the way a frontend does it: a frame's image, then its cycles at
6
+ * the requested steps, then the chain steps up to the requested count, then
7
+ * the named overlays, each drawn source-over at its offset. Works on a bake result; the archive test checks
8
+ * that the packed pages plus the manifest give back the same pixels.
9
+ */
10
+ function place(dst, bake, ref) {
11
+ if (ref)
12
+ over(dst, bake.images[ref.id], ref.dx, ref.dy);
13
+ }
14
+ /** Draw `rec`'s cycles at the steps `cycles` names. A cycle the frame does not
15
+ * carry draws nothing (the bake leaves out a cycle that never changes the
16
+ * frame); an unknown step throws. */
17
+ function drawCycles(out, bake, rec, cycles) {
18
+ for (const [key, k] of Object.entries(cycles)) {
19
+ const cycle = rec.cycles?.[key];
20
+ if (!cycle)
21
+ continue;
22
+ if (!(Number.isInteger(k) && k >= 0 && k < cycle.steps.length))
23
+ throw new Error(`${rec.name} cycle ${key} has no step ${k}`);
24
+ place(out, bake, cycle.steps[k]);
25
+ }
26
+ }
27
+ /** Draw `rec`'s chain steps up to `chains` and its named `overlays` onto `out`. */
28
+ function drawRuntime(out, bake, rec, chains, overlays) {
29
+ for (const [key, n] of Object.entries(chains)) {
30
+ const chain = rec.chains?.[key];
31
+ if (!chain)
32
+ throw new Error(`${rec.name} has no chain ${key}`);
33
+ for (let k = 1; k <= Math.min(n, chain.steps.length - 1); k++)
34
+ place(out, bake, chain.steps[k]);
35
+ }
36
+ for (const o of overlays) {
37
+ if (!rec.overlays || !(o in rec.overlays))
38
+ throw new Error(`${rec.name} has no overlay ${o}`);
39
+ place(out, bake, rec.overlays[o]);
40
+ }
41
+ }
42
+ /** Compose `rec` with chain inputs `chains` and overlays `overlays`. */
43
+ function composeFrame(bake, rec, chains = {}, overlays = [], cycles = {}) {
44
+ const out = blank(rec.w, rec.h);
45
+ place(out, bake, rec.image);
46
+ drawCycles(out, bake, rec, cycles);
47
+ drawRuntime(out, bake, rec, chains, overlays);
48
+ return out;
49
+ }
50
+ /** Compose `rec` the way a frontend drawing with depth does: the shell and
51
+ * its chain's shell steps, then its cycles, then the furniture (or, with `soft`, the soft
52
+ * furniture) and its chain's furniture (or soft) steps, then a vehicle's front
53
+ * and its steps, each source-over. Named overlays (a parking space's car or
54
+ * dead mark) draw last. Throws for a frame without depth layers. */
55
+ function composeLayered(bake, rec, chains = {}, overlays = [], soft = false, cycles = {}) {
56
+ const layers = rec.layers;
57
+ if (!layers)
58
+ throw new Error(`${rec.name} has no depth layers`);
59
+ if (soft && layers.soft === undefined)
60
+ throw new Error(`${rec.name} has no soft furniture`);
61
+ const out = blank(rec.w, rec.h);
62
+ const stepsOf = (key, n, list) => {
63
+ if (!list)
64
+ throw new Error(`${rec.name} has no depth steps for chain ${key}`);
65
+ for (let k = 1; k <= Math.min(n, list.length - 1); k++)
66
+ place(out, bake, list[k]);
67
+ };
68
+ place(out, bake, layers.shell);
69
+ for (const [key, n] of Object.entries(chains))
70
+ stepsOf(key, n, layers.chains?.[key]?.shell);
71
+ drawCycles(out, bake, rec, cycles);
72
+ place(out, bake, soft ? (layers.soft ?? null) : layers.furniture);
73
+ for (const [key, n] of Object.entries(chains))
74
+ stepsOf(key, n, soft ? layers.chains?.[key]?.soft : layers.chains?.[key]?.furniture);
75
+ if (layers.front !== undefined) {
76
+ place(out, bake, layers.front);
77
+ for (const [key, n] of Object.entries(chains))
78
+ stepsOf(key, n, layers.chains?.[key]?.front);
79
+ }
80
+ drawRuntime(out, bake, rec, {}, overlays);
81
+ return out;
82
+ }
83
+ /** The frame a lookup names (an animation resolves to its frame `i`), and
84
+ * the composed pixels. */
85
+ function composeLookup(bake, found, frameIndex = 0) {
86
+ const name = "animation" in found ? `${found.animation}/${frameIndex}` : found.frame;
87
+ const rec = bake.frames.find((f) => f.name === name);
88
+ if (!rec)
89
+ throw new Error(`no frame ${name}`);
90
+ const image = "animation" in found ? composeFrame(bake, rec) : composeFrame(bake, rec, found.chains, found.overlays, found.cycles);
91
+ return { name, image: found.stretchTo === undefined ? image : stretch(image, found.stretchTo * TILE) };
92
+ }
93
+ /** Scale a picture horizontally to `w` pixels, nearest neighbor from its left
94
+ * edge: the reader's `stretchTo` rule. */
95
+ function stretch(image, w) {
96
+ if (!Number.isInteger(w) || w < 1 || image.w < 1)
97
+ throw new Error(`cannot stretch a ${image.w} px picture to ${w} px`);
98
+ const out = { w, h: image.h, data: new Uint8ClampedArray(w * image.h * 4) };
99
+ for (let y = 0; y < image.h; y++) {
100
+ for (let x = 0; x < w; x++) {
101
+ const sx = Math.min(image.w - 1, Math.floor((x * image.w) / w));
102
+ out.data.set(image.data.subarray((y * image.w + sx) * 4, (y * image.w + sx) * 4 + 4), (y * w + x) * 4);
103
+ }
104
+ }
105
+ return out;
106
+ }
107
+ /** Count differing pixels and their bounding box. */
108
+ function compareImages(a, b) {
109
+ if (a.w !== b.w || a.h !== b.h)
110
+ return { mismatches: Math.max(a.w * a.h, b.w * b.h) };
111
+ let mismatches = 0;
112
+ let box;
113
+ for (let i = 0, p = 0; i < a.data.length; i += 4, p++) {
114
+ if (a.data[i] === b.data[i] && a.data[i + 1] === b.data[i + 1] && a.data[i + 2] === b.data[i + 2] && a.data[i + 3] === b.data[i + 3])
115
+ continue;
116
+ mismatches++;
117
+ const x = p % a.w;
118
+ const y = (p - x) / a.w;
119
+ box = box ? { x0: Math.min(box.x0, x), y0: Math.min(box.y0, y), x1: Math.max(box.x1, x), y1: Math.max(box.y1, y) } : { x0: x, y0: y, x1: x, y1: y };
120
+ }
121
+ return { mismatches, box };
122
+ }
123
+
124
+ export { compareImages, composeFrame, composeLayered, composeLookup, stretch };
125
+ //# sourceMappingURL=compose.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"compose.js","sources":["../../../src/render/atlas/compose.ts"],"sourcesContent":["import type { BakeResult, BakedFrame, ImageRef } from \"./bake\";\nimport type { Lookup } from \"./lookup\";\nimport { blank, over, type Image } from \"./pixels\";\nimport { TILE } from \"../scale\";\n\n/**\n * Composition the way a frontend does it: a frame's image, then its cycles at\n * the requested steps, then the chain steps up to the requested count, then\n * the named overlays, each drawn source-over at its offset. Works on a bake result; the archive test checks\n * that the packed pages plus the manifest give back the same pixels.\n */\n\nfunction place(dst: Image, bake: Pick<BakeResult, \"images\">, ref: ImageRef | null): void {\n if (ref) over(dst, bake.images[ref.id], ref.dx, ref.dy);\n}\n\n/** Draw `rec`'s cycles at the steps `cycles` names. A cycle the frame does not\n * carry draws nothing (the bake leaves out a cycle that never changes the\n * frame); an unknown step throws. */\nfunction drawCycles(out: Image, bake: Pick<BakeResult, \"images\">, rec: BakedFrame, cycles: Record<string, number>): void {\n for (const [key, k] of Object.entries(cycles)) {\n const cycle = rec.cycles?.[key];\n if (!cycle) continue;\n if (!(Number.isInteger(k) && k >= 0 && k < cycle.steps.length)) throw new Error(`${rec.name} cycle ${key} has no step ${k}`);\n place(out, bake, cycle.steps[k]);\n }\n}\n\n/** Draw `rec`'s chain steps up to `chains` and its named `overlays` onto `out`. */\nfunction drawRuntime(out: Image, bake: Pick<BakeResult, \"images\">, rec: BakedFrame, chains: Record<string, number>, overlays: readonly string[]): void {\n for (const [key, n] of Object.entries(chains)) {\n const chain = rec.chains?.[key];\n if (!chain) throw new Error(`${rec.name} has no chain ${key}`);\n for (let k = 1; k <= Math.min(n, chain.steps.length - 1); k++) place(out, bake, chain.steps[k]);\n }\n for (const o of overlays) {\n if (!rec.overlays || !(o in rec.overlays)) throw new Error(`${rec.name} has no overlay ${o}`);\n place(out, bake, rec.overlays[o]);\n }\n}\n\n/** Compose `rec` with chain inputs `chains` and overlays `overlays`. */\nexport function composeFrame(\n bake: Pick<BakeResult, \"images\">,\n rec: BakedFrame,\n chains: Record<string, number> = {},\n overlays: readonly string[] = [],\n cycles: Record<string, number> = {},\n): Image {\n const out = blank(rec.w, rec.h);\n place(out, bake, rec.image);\n drawCycles(out, bake, rec, cycles);\n drawRuntime(out, bake, rec, chains, overlays);\n return out;\n}\n\n/** Compose `rec` the way a frontend drawing with depth does: the shell and\n * its chain's shell steps, then its cycles, then the furniture (or, with `soft`, the soft\n * furniture) and its chain's furniture (or soft) steps, then a vehicle's front\n * and its steps, each source-over. Named overlays (a parking space's car or\n * dead mark) draw last. Throws for a frame without depth layers. */\nexport function composeLayered(\n bake: Pick<BakeResult, \"images\">,\n rec: BakedFrame,\n chains: Record<string, number> = {},\n overlays: readonly string[] = [],\n soft = false,\n cycles: Record<string, number> = {},\n): Image {\n const layers = rec.layers;\n if (!layers) throw new Error(`${rec.name} has no depth layers`);\n if (soft && layers.soft === undefined) throw new Error(`${rec.name} has no soft furniture`);\n const out = blank(rec.w, rec.h);\n const stepsOf = (key: string, n: number, list: (ImageRef | null)[] | undefined) => {\n if (!list) throw new Error(`${rec.name} has no depth steps for chain ${key}`);\n for (let k = 1; k <= Math.min(n, list.length - 1); k++) place(out, bake, list[k]);\n };\n place(out, bake, layers.shell);\n for (const [key, n] of Object.entries(chains)) stepsOf(key, n, layers.chains?.[key]?.shell);\n drawCycles(out, bake, rec, cycles);\n place(out, bake, soft ? (layers.soft ?? null) : layers.furniture);\n for (const [key, n] of Object.entries(chains)) stepsOf(key, n, soft ? layers.chains?.[key]?.soft : layers.chains?.[key]?.furniture);\n if (layers.front !== undefined) {\n place(out, bake, layers.front);\n for (const [key, n] of Object.entries(chains)) stepsOf(key, n, layers.chains?.[key]?.front);\n }\n drawRuntime(out, bake, rec, {}, overlays);\n return out;\n}\n\n/** The frame a lookup names (an animation resolves to its frame `i`), and\n * the composed pixels. */\nexport function composeLookup(bake: Pick<BakeResult, \"images\" | \"frames\">, found: Lookup, frameIndex = 0): { name: string; image: Image } {\n const name = \"animation\" in found ? `${found.animation}/${frameIndex}` : found.frame;\n const rec = bake.frames.find((f) => f.name === name);\n if (!rec) throw new Error(`no frame ${name}`);\n const image = \"animation\" in found ? composeFrame(bake, rec) : composeFrame(bake, rec, found.chains, found.overlays, found.cycles);\n return { name, image: found.stretchTo === undefined ? image : stretch(image, found.stretchTo * TILE) };\n}\n\n/** Scale a picture horizontally to `w` pixels, nearest neighbor from its left\n * edge: the reader's `stretchTo` rule. */\nexport function stretch(image: Image, w: number): Image {\n if (!Number.isInteger(w) || w < 1 || image.w < 1) throw new Error(`cannot stretch a ${image.w} px picture to ${w} px`);\n const out: Image = { w, h: image.h, data: new Uint8ClampedArray(w * image.h * 4) };\n for (let y = 0; y < image.h; y++) {\n for (let x = 0; x < w; x++) {\n const sx = Math.min(image.w - 1, Math.floor((x * image.w) / w));\n out.data.set(image.data.subarray((y * image.w + sx) * 4, (y * image.w + sx) * 4 + 4), (y * w + x) * 4);\n }\n }\n return out;\n}\n\n/** Count differing pixels and their bounding box. */\nexport function compareImages(a: Image, b: Image): { mismatches: number; box?: { x0: number; y0: number; x1: number; y1: number } } {\n if (a.w !== b.w || a.h !== b.h) return { mismatches: Math.max(a.w * a.h, b.w * b.h) };\n let mismatches = 0;\n let box: { x0: number; y0: number; x1: number; y1: number } | undefined;\n for (let i = 0, p = 0; i < a.data.length; i += 4, p++) {\n if (a.data[i] === b.data[i] && a.data[i + 1] === b.data[i + 1] && a.data[i + 2] === b.data[i + 2] && a.data[i + 3] === b.data[i + 3]) continue;\n mismatches++;\n const x = p % a.w;\n const y = (p - x) / a.w;\n box = box ? { x0: Math.min(box.x0, x), y0: Math.min(box.y0, y), x1: Math.max(box.x1, x), y1: Math.max(box.y1, y) } : { x0: x, y0: y, x1: x, y1: y };\n }\n return { mismatches, box };\n}\n"],"names":[],"mappings":";;;AAKA;;;;;AAKG;AAEH,SAAS,KAAK,CAAC,GAAU,EAAE,IAAgC,EAAE,GAAoB,EAAA;AAC/E,IAAA,IAAI,GAAG;QAAE,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,GAAG,CAAC,EAAE,EAAE,GAAG,CAAC,EAAE,CAAC;AACzD;AAEA;;AAEsC;AACtC,SAAS,UAAU,CAAC,GAAU,EAAE,IAAgC,EAAE,GAAe,EAAE,MAA8B,EAAA;AAC/G,IAAA,KAAK,MAAM,CAAC,GAAG,EAAE,CAAC,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE;QAC7C,MAAM,KAAK,GAAG,GAAG,CAAC,MAAM,GAAG,GAAG,CAAC;AAC/B,QAAA,IAAI,CAAC,KAAK;YAAE;QACZ,IAAI,EAAE,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC;AAAE,YAAA,MAAM,IAAI,KAAK,CAAC,CAAA,EAAG,GAAG,CAAC,IAAI,CAAA,OAAA,EAAU,GAAG,CAAA,aAAA,EAAgB,CAAC,CAAA,CAAE,CAAC;AAC5H,QAAA,KAAK,CAAC,GAAG,EAAE,IAAI,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAClC;AACF;AAEA;AACA,SAAS,WAAW,CAAC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,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;YAAE;AACtI,QAAA,UAAU,EAAE;AACZ,QAAA,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;QACjB,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC;AACvB,QAAA,GAAG,GAAG,GAAG,GAAG,EAAE,EAAE,EAAE,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE;IACrJ;AACA,IAAA,OAAO,EAAE,UAAU,EAAE,GAAG,EAAE;AAC5B;;"}
@@ -0,0 +1,25 @@
1
+ /**
2
+ * The cinema's two looping pictures (`drawCinema` in
3
+ * `pixelSprites/food.interiors.ts`), the one room art that reads the animation
4
+ * clock: the marquee bulbs swap colors 4 times a second, and the screen steps
5
+ * through its 5 frames 2.5 times a second (`floor(clock * 4)` and
6
+ * `floor(clock * 2.5 + seed) % 5`), so together they repeat every 2 seconds.
7
+ * The atlas bakes each room at clock 0 and each cycle's other pictures as
8
+ * layers over it; at clock `t` a frontend draws step `floor(t * rate) % len`
9
+ * of each.
10
+ */
11
+ export interface CycleSpec {
12
+ /** Pictures a second. */
13
+ rate: number;
14
+ /** Pictures in one loop. */
15
+ frames: number;
16
+ }
17
+ export declare const CINEMA_CYCLES: Readonly<Record<string, CycleSpec>>;
18
+ /** The step of `cycle` at `clock` seconds; a negative or non-finite clock
19
+ * reads as 0. */
20
+ export declare function cycleStep(cycle: CycleSpec, clock: number): number;
21
+ /** Every cycle's step at `clock`. */
22
+ export declare function cycleSteps(cycles: Readonly<Record<string, CycleSpec>>, clock: number): Record<string, number>;
23
+ /** A clock that shows each cycle at the step `want` names (cycles it does not
24
+ * name at step 0), or null when no moment in the first `seconds` does. */
25
+ export declare function clockFor(cycles: Readonly<Record<string, CycleSpec>>, want: Readonly<Record<string, number>>, seconds?: number): number | null;
@@ -0,0 +1,41 @@
1
+ /**
2
+ * The cinema's two looping pictures (`drawCinema` in
3
+ * `pixelSprites/food.interiors.ts`), the one room art that reads the animation
4
+ * clock: the marquee bulbs swap colors 4 times a second, and the screen steps
5
+ * through its 5 frames 2.5 times a second (`floor(clock * 4)` and
6
+ * `floor(clock * 2.5 + seed) % 5`), so together they repeat every 2 seconds.
7
+ * The atlas bakes each room at clock 0 and each cycle's other pictures as
8
+ * layers over it; at clock `t` a frontend draws step `floor(t * rate) % len`
9
+ * of each.
10
+ */
11
+ const CINEMA_CYCLES = {
12
+ marquee: { rate: 4, frames: 2 },
13
+ screen: { rate: 2.5, frames: 5 },
14
+ };
15
+ /** The step of `cycle` at `clock` seconds; a negative or non-finite clock
16
+ * reads as 0. */
17
+ function cycleStep(cycle, clock) {
18
+ const t = Number.isFinite(clock) ? Math.max(0, clock) : 0;
19
+ return Math.floor(t * cycle.rate) % cycle.frames;
20
+ }
21
+ /** Every cycle's step at `clock`. */
22
+ function cycleSteps(cycles, clock) {
23
+ return Object.fromEntries(Object.entries(cycles).map(([k, c]) => [k, cycleStep(c, clock)]));
24
+ }
25
+ /** How often the clock is sampled when looking for a moment: every 1/20 s,
26
+ * at the middle of each slice, so a sample never sits on a step boundary
27
+ * (every boundary of both cinema cycles falls on a multiple of 1/20 s). */
28
+ const SAMPLES_PER_SECOND = 20;
29
+ /** A clock that shows each cycle at the step `want` names (cycles it does not
30
+ * name at step 0), or null when no moment in the first `seconds` does. */
31
+ function clockFor(cycles, want, seconds = 2) {
32
+ for (let i = 0; i < seconds * SAMPLES_PER_SECOND; i++) {
33
+ const clock = (i + 0.5) / SAMPLES_PER_SECOND;
34
+ if (Object.entries(cycles).every(([k, c]) => cycleStep(c, clock) === (want[k] ?? 0)))
35
+ return clock;
36
+ }
37
+ return null;
38
+ }
39
+
40
+ export { CINEMA_CYCLES, clockFor, cycleStep, cycleSteps };
41
+ //# sourceMappingURL=cycles.js.map