@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":"cycles.js","sources":["../../../src/render/atlas/cycles.ts"],"sourcesContent":["/**\n * The cinema's two looping pictures (`drawCinema` in\n * `pixelSprites/food.interiors.ts`), the one room art that reads the animation\n * clock: the marquee bulbs swap colors 4 times a second, and the screen steps\n * through its 5 frames 2.5 times a second (`floor(clock * 4)` and\n * `floor(clock * 2.5 + seed) % 5`), so together they repeat every 2 seconds.\n * The atlas bakes each room at clock 0 and each cycle's other pictures as\n * layers over it; at clock `t` a frontend draws step `floor(t * rate) % len`\n * of each.\n */\n\nexport interface CycleSpec {\n /** Pictures a second. */\n rate: number;\n /** Pictures in one loop. */\n frames: number;\n}\n\nexport const CINEMA_CYCLES: Readonly<Record<string, CycleSpec>> = {\n marquee: { rate: 4, frames: 2 },\n screen: { rate: 2.5, frames: 5 },\n};\n\n/** The step of `cycle` at `clock` seconds; a negative or non-finite clock\n * reads as 0. */\nexport function cycleStep(cycle: CycleSpec, clock: number): number {\n const t = Number.isFinite(clock) ? Math.max(0, clock) : 0;\n return Math.floor(t * cycle.rate) % cycle.frames;\n}\n\n/** Every cycle's step at `clock`. */\nexport function cycleSteps(cycles: Readonly<Record<string, CycleSpec>>, clock: number): Record<string, number> {\n return Object.fromEntries(Object.entries(cycles).map(([k, c]) => [k, cycleStep(c, clock)]));\n}\n\n/** How often the clock is sampled when looking for a moment: every 1/20 s,\n * at the middle of each slice, so a sample never sits on a step boundary\n * (every boundary of both cinema cycles falls on a multiple of 1/20 s). */\nconst SAMPLES_PER_SECOND = 20;\n\n/** A clock that shows each cycle at the step `want` names (cycles it does not\n * name at step 0), or null when no moment in the first `seconds` does. */\nexport function clockFor(cycles: Readonly<Record<string, CycleSpec>>, want: Readonly<Record<string, number>>, seconds = 2): number | null {\n for (let i = 0; i < seconds * SAMPLES_PER_SECOND; i++) {\n const clock = (i + 0.5) / SAMPLES_PER_SECOND;\n if (Object.entries(cycles).every(([k, c]) => cycleStep(c, clock) === (want[k] ?? 0))) return clock;\n }\n return null;\n}\n"],"names":[],"mappings":"AAAA;;;;;;;;;AASG;AASI,MAAM,aAAa,GAAwC;IAChE,OAAO,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE;IAC/B,MAAM,EAAE,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,EAAE,CAAC,EAAE;;AAGlC;AACkB;AACZ,SAAU,SAAS,CAAC,KAAgB,EAAE,KAAa,EAAA;IACvD,MAAM,CAAC,GAAG,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC;AACzD,IAAA,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,KAAK,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,MAAM;AAClD;AAEA;AACM,SAAU,UAAU,CAAC,MAA2C,EAAE,KAAa,EAAA;AACnF,IAAA,OAAO,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;AAC7F;AAEA;;AAE4E;AAC5E,MAAM,kBAAkB,GAAG,EAAE;AAE7B;AAC2E;AACrE,SAAU,QAAQ,CAAC,MAA2C,EAAE,IAAsC,EAAE,OAAO,GAAG,CAAC,EAAA;AACvH,IAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,GAAG,kBAAkB,EAAE,CAAC,EAAE,EAAE;QACrD,MAAM,KAAK,GAAG,CAAC,CAAC,GAAG,GAAG,IAAI,kBAAkB;AAC5C,QAAA,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,SAAS,CAAC,CAAC,EAAE,KAAK,CAAC,MAAM,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;AAAE,YAAA,OAAO,KAAK;IACpG;AACA,IAAA,OAAO,IAAI;AACb;;"}
@@ -0,0 +1,65 @@
1
+ import type { FacilityKind, UnitState } from "../../shared/types";
2
+ /**
3
+ * The reference reader: how a frontend maps a live unit and scene to atlas
4
+ * frames, following the rules in the manifest's `signature`. The comparison
5
+ * test runs it against the web's own bake; a frontend in another language
6
+ * ports these few lines.
7
+ */
8
+ export interface LiveUnit {
9
+ kind: FacilityKind;
10
+ state: UnitState;
11
+ subtype?: string;
12
+ /** The room's width in tiles. The atlas bakes catalog widths only; a room
13
+ * at another width (a TDT import or a legacy save keeps its original
14
+ * width, #731) gets its catalog-width picture and a `stretchTo`. */
15
+ width: number;
16
+ occupants: number;
17
+ outForMeal?: number;
18
+ /** Used for the parked-car color and presence roll, like the web. */
19
+ id: number;
20
+ }
21
+ export interface LiveScene {
22
+ hour: number;
23
+ lit: boolean;
24
+ /** 0..1, the web's `parkingUsage`. */
25
+ parkingUse: number;
26
+ /** 0..1, the web's `recyclingFill`. */
27
+ recycleFill: number;
28
+ /** This parking space is not chained to a ramp. */
29
+ dead: boolean;
30
+ /** Seconds on the game's animation clock, for the cinema's marquee and
31
+ * screen (absent: 0, the moment the atlas bakes). */
32
+ clock?: number;
33
+ }
34
+ /** `stretchTo`, when present, is the room's real width in tiles: its frame or
35
+ * animation is baked at the kind's catalog width, so compose it as usual
36
+ * (chains, overlays, layers, all in catalog-width coordinates), then scale
37
+ * the composed picture horizontally to `stretchTo` tiles, nearest neighbor
38
+ * from its left edge. It approximates the web game, which redraws the room
39
+ * at its real width. */
40
+ export type Lookup = {
41
+ animation: string;
42
+ stretchTo?: number;
43
+ } | {
44
+ frame: string;
45
+ chains: Record<string, number>;
46
+ overlays: string[];
47
+ cycles?: Record<string, number>;
48
+ stretchTo?: number;
49
+ };
50
+ /** Reader choices. `recyclingEighths` reads a recycling center through its
51
+ * `fill` eighths (the game's re-bake buckets) instead of the exact chain. */
52
+ export interface LookupOptions {
53
+ recyclingEighths?: boolean;
54
+ }
55
+ export declare function lookupRoom(u: LiveUnit, s: LiveScene, variant: number, opts?: LookupOptions): Lookup;
56
+ /** A shaft's frame names: an elevator's bands are `<shaft>/<piece>` and its
57
+ * cabs `<car>/<arrow>/<full>/s<variant>`; stairs and escalators draw their
58
+ * one two-floor `shaft` frame. A legacy width the atlas bakes
59
+ * (`LEGACY_SHAFT_WIDTHS`) names its own frames; any other width uses the
60
+ * catalog's, with `stretchTo` as for a room. */
61
+ export declare function lookupShaft(kind: FacilityKind, width: number): {
62
+ shaft: string;
63
+ car?: string;
64
+ stretchTo?: number;
65
+ };
@@ -0,0 +1,83 @@
1
+ import { rand } from '../sprites/common.js';
2
+ import { LATE_NIGHT_KINDS, isLateHour } from '../lateNight.js';
3
+ import { PARKING_CAR_COLORS, RECYCLE_STEPS, RECYCLE_BREAKS, OCCUPANT_FREE } from './catalog.js';
4
+ import { LEGACY_SHAFT_WIDTHS } from './catalogExtras.js';
5
+ import { cycleSteps, CINEMA_CYCLES } from './cycles.js';
6
+ import { recyclingFillStep } from './recyclingFill.js';
7
+ import { findViewKind, isOpenAt, isElevatorKind } from '../../presentation/viewKinds.js';
8
+
9
+ function lookupRoom(u, s, variant, opts = {}) {
10
+ // An unknown kind names its own width and no stretch (its frame is missing
11
+ // either way); a corrupt width (not finite, or under one tile) reads as the
12
+ // catalog's.
13
+ const cat = findViewKind(u.kind)?.width;
14
+ if (cat === undefined)
15
+ return lookupAtCatalogWidth(u, s, variant, u.width, opts);
16
+ const width = Number.isFinite(u.width) && Math.round(u.width) >= 1 ? Math.round(u.width) : cat;
17
+ const found = lookupAtCatalogWidth(u, s, variant, cat, opts);
18
+ return width === cat ? found : { ...found, stretchTo: width };
19
+ }
20
+ function lookupAtCatalogWidth(u, s, variant, width, opts) {
21
+ if (u.state === "fire" || u.state === "construction")
22
+ return { animation: `${u.state}/${u.kind}` };
23
+ let hours = "always";
24
+ const catalog = findViewKind(u.kind);
25
+ if (catalog && catalog.openHours !== null)
26
+ hours = isOpenAt(u.kind, s.hour) ? "open" : "closed";
27
+ let late = "any";
28
+ if (LATE_NIGHT_KINDS.has(u.kind))
29
+ late = isLateHour(s.hour) ? "late" : "notlate";
30
+ // An unknown or legacy subtype draws the kind's default look, the "-" frame.
31
+ const known = u.subtype !== undefined && (catalog?.subtypes ?? []).includes(u.subtype);
32
+ const subtype = known ? u.subtype : "-";
33
+ const stem = `room/${u.kind}/${u.state}/${subtype}/w${width}/${s.lit ? "lit" : "unlit"}/${hours}/${late}/v${variant}`;
34
+ if (u.kind === "parking") {
35
+ const overlays = [];
36
+ if (s.dead)
37
+ overlays.push("dead");
38
+ else if (rand((u.id * 31) | 0) < finite(s.parkingUse))
39
+ overlays.push(`car${u.id % PARKING_CAR_COLORS}`);
40
+ return { frame: stem, chains: {}, overlays };
41
+ }
42
+ if (u.kind === "recycling") {
43
+ if (opts.recyclingEighths)
44
+ return { frame: stem, chains: { fill: Math.round(Math.max(0, Math.min(1, finite(s.recycleFill))) * RECYCLE_STEPS) }, overlays: [] };
45
+ // The exact chain, drawn instead of the eighths ('fill', which is
46
+ // round(fill * 8)): every fill matches the game's paint.
47
+ return { frame: stem, chains: { fillExact: recyclingFillStep(RECYCLE_BREAKS, s.recycleFill) }, overlays: [] };
48
+ }
49
+ if (OCCUPANT_FREE.has(u.kind))
50
+ return { frame: stem, chains: {}, overlays: [] };
51
+ const occupants = finite(u.occupants);
52
+ // The cinema's marquee and screen follow the animation clock.
53
+ const cycles = u.kind === "cinema" ? { cycles: cycleSteps(CINEMA_CYCLES, s.clock ?? 0) } : {};
54
+ if (occupants <= 0)
55
+ return { frame: `${stem}/away`, chains: {}, overlays: [], ...cycles };
56
+ // Whole figures only. The art's figure loops run `i < n`, so a fractional
57
+ // count (a forged save) paints like the next whole one: round up.
58
+ const outForMeal = Math.min(occupants, Math.max(0, finite(u.outForMeal ?? 0)));
59
+ const visible = Math.ceil(Math.max(0, occupants - outForMeal));
60
+ return { frame: `${stem}/home`, chains: { occupants: visible }, overlays: [], ...cycles };
61
+ }
62
+ /** A count or fraction from the engine, with a corrupt value read as 0. */
63
+ function finite(n) {
64
+ return Number.isFinite(n) ? n : 0;
65
+ }
66
+ /** A shaft's frame names: an elevator's bands are `<shaft>/<piece>` and its
67
+ * cabs `<car>/<arrow>/<full>/s<variant>`; stairs and escalators draw their
68
+ * one two-floor `shaft` frame. A legacy width the atlas bakes
69
+ * (`LEGACY_SHAFT_WIDTHS`) names its own frames; any other width uses the
70
+ * catalog's, with `stretchTo` as for a room. */
71
+ function lookupShaft(kind, width) {
72
+ const f = findViewKind(kind);
73
+ if (!f || !f.transport)
74
+ throw new Error(`${kind} is not a transport kind`);
75
+ const cat = f.width;
76
+ const w = Number.isFinite(width) && Math.round(width) >= 1 ? Math.round(width) : cat;
77
+ const seg = w !== cat && (LEGACY_SHAFT_WIDTHS[kind] ?? []).includes(w) ? `/w${w}` : "";
78
+ const names = isElevatorKind(kind) ? { shaft: `shaft/${kind}${seg}`, car: `car/${kind}${seg}` } : { shaft: `transport/${kind}${seg}` };
79
+ return w === cat || seg ? names : { ...names, stretchTo: w };
80
+ }
81
+
82
+ export { lookupRoom, lookupShaft };
83
+ //# sourceMappingURL=lookup.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lookup.js","sources":["../../../src/render/atlas/lookup.ts"],"sourcesContent":["import type { FacilityKind, UnitState } from \"../../shared/types\";\nimport { rand } from \"../sprites/common\";\nimport { LATE_NIGHT_KINDS, isLateHour } from \"../lateNight\";\nimport { OCCUPANT_FREE, PARKING_CAR_COLORS, RECYCLE_BREAKS, RECYCLE_STEPS } from \"./catalog\";\nimport { LEGACY_SHAFT_WIDTHS } from \"./catalogExtras\";\nimport { CINEMA_CYCLES, cycleSteps } from \"./cycles\";\nimport { recyclingFillStep } from \"./recyclingFill\";\nimport { findViewKind, isElevatorKind, isOpenAt } from \"../../presentation/viewKinds\";\n\n/**\n * The reference reader: how a frontend maps a live unit and scene to atlas\n * frames, following the rules in the manifest's `signature`. The comparison\n * test runs it against the web's own bake; a frontend in another language\n * ports these few lines.\n */\n\nexport interface LiveUnit {\n kind: FacilityKind;\n state: UnitState;\n subtype?: string;\n /** The room's width in tiles. The atlas bakes catalog widths only; a room\n * at another width (a TDT import or a legacy save keeps its original\n * width, #731) gets its catalog-width picture and a `stretchTo`. */\n width: number;\n occupants: number;\n outForMeal?: number;\n /** Used for the parked-car color and presence roll, like the web. */\n id: number;\n}\n\nexport interface LiveScene {\n hour: number;\n lit: boolean;\n /** 0..1, the web's `parkingUsage`. */\n parkingUse: number;\n /** 0..1, the web's `recyclingFill`. */\n recycleFill: number;\n /** This parking space is not chained to a ramp. */\n dead: boolean;\n /** Seconds on the game's animation clock, for the cinema's marquee and\n * screen (absent: 0, the moment the atlas bakes). */\n clock?: number;\n}\n\n/** `stretchTo`, when present, is the room's real width in tiles: its frame or\n * animation is baked at the kind's catalog width, so compose it as usual\n * (chains, overlays, layers, all in catalog-width coordinates), then scale\n * the composed picture horizontally to `stretchTo` tiles, nearest neighbor\n * from its left edge. It approximates the web game, which redraws the room\n * at its real width. */\nexport type Lookup =\n | { animation: string; stretchTo?: number }\n | { frame: string; chains: Record<string, number>; overlays: string[]; cycles?: Record<string, number>; stretchTo?: number };\n\n/** Reader choices. `recyclingEighths` reads a recycling center through its\n * `fill` eighths (the game's re-bake buckets) instead of the exact chain. */\nexport interface LookupOptions {\n recyclingEighths?: boolean;\n}\n\nexport function lookupRoom(u: LiveUnit, s: LiveScene, variant: number, opts: LookupOptions = {}): Lookup {\n // An unknown kind names its own width and no stretch (its frame is missing\n // either way); a corrupt width (not finite, or under one tile) reads as the\n // catalog's.\n const cat = findViewKind(u.kind)?.width;\n if (cat === undefined) return lookupAtCatalogWidth(u, s, variant, u.width, opts);\n const width = Number.isFinite(u.width) && Math.round(u.width) >= 1 ? Math.round(u.width) : cat;\n const found = lookupAtCatalogWidth(u, s, variant, cat, opts);\n return width === cat ? found : { ...found, stretchTo: width };\n}\n\nfunction lookupAtCatalogWidth(u: LiveUnit, s: LiveScene, variant: number, width: number, opts: LookupOptions): Lookup {\n if (u.state === \"fire\" || u.state === \"construction\") return { animation: `${u.state}/${u.kind}` };\n let hours = \"always\";\n const catalog = findViewKind(u.kind);\n if (catalog && catalog.openHours !== null) hours = isOpenAt(u.kind, s.hour) ? \"open\" : \"closed\";\n let late = \"any\";\n if (LATE_NIGHT_KINDS.has(u.kind)) late = isLateHour(s.hour) ? \"late\" : \"notlate\";\n // An unknown or legacy subtype draws the kind's default look, the \"-\" frame.\n const known = u.subtype !== undefined && (catalog?.subtypes ?? []).includes(u.subtype);\n const subtype = known ? u.subtype : \"-\";\n const stem = `room/${u.kind}/${u.state}/${subtype}/w${width}/${s.lit ? \"lit\" : \"unlit\"}/${hours}/${late}/v${variant}`;\n if (u.kind === \"parking\") {\n const overlays: string[] = [];\n if (s.dead) overlays.push(\"dead\");\n else if (rand((u.id * 31) | 0) < finite(s.parkingUse)) overlays.push(`car${u.id % PARKING_CAR_COLORS}`);\n return { frame: stem, chains: {}, overlays };\n }\n if (u.kind === \"recycling\") {\n if (opts.recyclingEighths) return { frame: stem, chains: { fill: Math.round(Math.max(0, Math.min(1, finite(s.recycleFill))) * RECYCLE_STEPS) }, overlays: [] };\n // The exact chain, drawn instead of the eighths ('fill', which is\n // round(fill * 8)): every fill matches the game's paint.\n return { frame: stem, chains: { fillExact: recyclingFillStep(RECYCLE_BREAKS, s.recycleFill) }, overlays: [] };\n }\n if (OCCUPANT_FREE.has(u.kind)) return { frame: stem, chains: {}, overlays: [] };\n const occupants = finite(u.occupants);\n // The cinema's marquee and screen follow the animation clock.\n const cycles = u.kind === \"cinema\" ? { cycles: cycleSteps(CINEMA_CYCLES, s.clock ?? 0) } : {};\n if (occupants <= 0) return { frame: `${stem}/away`, chains: {}, overlays: [], ...cycles };\n // Whole figures only. The art's figure loops run `i < n`, so a fractional\n // count (a forged save) paints like the next whole one: round up.\n const outForMeal = Math.min(occupants, Math.max(0, finite(u.outForMeal ?? 0)));\n const visible = Math.ceil(Math.max(0, occupants - outForMeal));\n return { frame: `${stem}/home`, chains: { occupants: visible }, overlays: [], ...cycles };\n}\n\n/** A count or fraction from the engine, with a corrupt value read as 0. */\nfunction finite(n: number): number {\n return Number.isFinite(n) ? n : 0;\n}\n\n/** A shaft's frame names: an elevator's bands are `<shaft>/<piece>` and its\n * cabs `<car>/<arrow>/<full>/s<variant>`; stairs and escalators draw their\n * one two-floor `shaft` frame. A legacy width the atlas bakes\n * (`LEGACY_SHAFT_WIDTHS`) names its own frames; any other width uses the\n * catalog's, with `stretchTo` as for a room. */\nexport function lookupShaft(kind: FacilityKind, width: number): { shaft: string; car?: string; stretchTo?: number } {\n const f = findViewKind(kind);\n if (!f || !f.transport) throw new Error(`${kind} is not a transport kind`);\n const cat = f.width;\n const w = Number.isFinite(width) && Math.round(width) >= 1 ? Math.round(width) : cat;\n const seg = w !== cat && (LEGACY_SHAFT_WIDTHS[kind] ?? []).includes(w) ? `/w${w}` : \"\";\n const names = isElevatorKind(kind) ? { shaft: `shaft/${kind}${seg}`, car: `car/${kind}${seg}` } : { shaft: `transport/${kind}${seg}` };\n return w === cat || seg ? names : { ...names, stretchTo: w };\n}\n"],"names":[],"mappings":";;;;;;;;AA4DM,SAAU,UAAU,CAAC,CAAW,EAAE,CAAY,EAAE,OAAe,EAAE,IAAA,GAAsB,EAAE,EAAA;;;;IAI7F,MAAM,GAAG,GAAG,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,KAAK;IACvC,IAAI,GAAG,KAAK,SAAS;AAAE,QAAA,OAAO,oBAAoB,CAAC,CAAC,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,KAAK,EAAE,IAAI,CAAC;AAChF,IAAA,MAAM,KAAK,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,GAAG;AAC9F,IAAA,MAAM,KAAK,GAAG,oBAAoB,CAAC,CAAC,EAAE,CAAC,EAAE,OAAO,EAAE,GAAG,EAAE,IAAI,CAAC;AAC5D,IAAA,OAAO,KAAK,KAAK,GAAG,GAAG,KAAK,GAAG,EAAE,GAAG,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE;AAC/D;AAEA,SAAS,oBAAoB,CAAC,CAAW,EAAE,CAAY,EAAE,OAAe,EAAE,KAAa,EAAE,IAAmB,EAAA;IAC1G,IAAI,CAAC,CAAC,KAAK,KAAK,MAAM,IAAI,CAAC,CAA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AAK,CAAC,KAAK,CAAC,GAAG,GAAG;AACpF,IAAA,MAAM,GAAG,GAAG,CAAC,KAAK,GAAG,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAA,EAAA,EAAK,CAAC,CAAA,CAAE,GAAG,EAAE;AACtF,IAAA,MAAM,KAAK,GAAG,cAAc,CAAC,IAAI,CAAC,GAAG,EAAE,KAAK,EAAE,CAAA,MAAA,EAAS,IAAI,CAAA,EAAG,GAAG,EAAE,EAAE,GAAG,EAAE,CAAA,IAAA,EAAO,IAAI,CAAA,EAAG,GAAG,CAAA,CAAE,EAAE,GAAG,EAAE,KAAK,EAAE,CAAA,UAAA,EAAa,IAAI,GAAG,GAAG,CAAA,CAAE,EAAE;IACtI,OAAO,CAAC,KAAK,GAAG,IAAI,GAAG,GAAG,KAAK,GAAG,EAAE,GAAG,KAAK,EAAE,SAAS,EAAE,CAAC,EAAE;AAC9D;;"}
@@ -0,0 +1,23 @@
1
+ import type { AtlasRect } from "./schema";
2
+ /**
3
+ * A deterministic shelf packer for the atlas pages. Images go in tallest
4
+ * first (ties by width, then by id, so the same input always packs the same
5
+ * way), each inside a transparent gutter. An image wider than a page is cut
6
+ * into column slices packed on their own; `sx` says where a slice starts in
7
+ * its image.
8
+ */
9
+ export interface PackInput {
10
+ id: number;
11
+ w: number;
12
+ h: number;
13
+ }
14
+ export interface PackedSlice {
15
+ rect: AtlasRect;
16
+ sx: number;
17
+ }
18
+ export interface PackResult {
19
+ pages: number;
20
+ /** Slices per image id, left to right. */
21
+ placements: PackedSlice[][];
22
+ }
23
+ export declare function pack(images: readonly PackInput[], pageSize: number, padding: number): PackResult;
@@ -0,0 +1,50 @@
1
+ function pack(images, pageSize, padding) {
2
+ const maxW = pageSize - 2 * padding;
3
+ if (!(maxW > 0))
4
+ throw new Error(`page ${pageSize} leaves no room inside a ${padding} px gutter`);
5
+ const items = [];
6
+ for (const img of images) {
7
+ if (img.h > maxW)
8
+ throw new Error(`image ${img.id} is ${img.h} px tall, past the ${maxW} px page`);
9
+ if (!(img.w > 0 && img.h > 0))
10
+ throw new Error(`image ${img.id} is empty (${img.w} x ${img.h})`);
11
+ for (let sx = 0; sx < img.w; sx += maxW)
12
+ items.push({ id: img.id, sx, w: Math.min(maxW, img.w - sx), h: img.h });
13
+ }
14
+ items.sort((a, b) => b.h - a.h || b.w - a.w || a.id - b.id || a.sx - b.sx);
15
+ const pages = [];
16
+ const placements = images.map(() => []);
17
+ const index = new Map(images.map((img, i) => [img.id, i]));
18
+ for (const it of items) {
19
+ const cw = it.w + 2 * padding;
20
+ const ch = it.h + 2 * padding;
21
+ let spot = null;
22
+ for (let p = 0; p < pages.length && !spot; p++) {
23
+ const pg = pages[p];
24
+ for (const s of pg.shelves) {
25
+ if (s.h >= ch && s.x + cw <= pageSize) {
26
+ spot = { page: p, x: s.x, y: s.y };
27
+ s.x += cw;
28
+ break;
29
+ }
30
+ }
31
+ if (!spot && pg.used + ch <= pageSize) {
32
+ pg.shelves.push({ y: pg.used, h: ch, x: cw });
33
+ spot = { page: p, x: 0, y: pg.used };
34
+ pg.used += ch;
35
+ }
36
+ }
37
+ if (!spot) {
38
+ pages.push({ shelves: [{ y: 0, h: ch, x: cw }], used: ch });
39
+ spot = { page: pages.length - 1, x: 0, y: 0 };
40
+ }
41
+ const at = index.get(it.id);
42
+ placements[at].push({ rect: { page: spot.page, x: spot.x + padding, y: spot.y + padding, w: it.w, h: it.h }, sx: it.sx });
43
+ }
44
+ for (const list of placements)
45
+ list.sort((a, b) => a.sx - b.sx);
46
+ return { pages: pages.length, placements };
47
+ }
48
+
49
+ export { pack };
50
+ //# sourceMappingURL=pack.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pack.js","sources":["../../../src/render/atlas/pack.ts"],"sourcesContent":["import type { AtlasRect } from \"./schema\";\n\n/**\n * A deterministic shelf packer for the atlas pages. Images go in tallest\n * first (ties by width, then by id, so the same input always packs the same\n * way), each inside a transparent gutter. An image wider than a page is cut\n * into column slices packed on their own; `sx` says where a slice starts in\n * its image.\n */\n\nexport interface PackInput {\n id: number;\n w: number;\n h: number;\n}\n\nexport interface PackedSlice {\n rect: AtlasRect;\n sx: number;\n}\n\nexport interface PackResult {\n pages: number;\n /** Slices per image id, left to right. */\n placements: PackedSlice[][];\n}\n\ninterface Shelf {\n y: number;\n h: number;\n x: number;\n}\n\nexport function pack(images: readonly PackInput[], pageSize: number, padding: number): PackResult {\n const maxW = pageSize - 2 * padding;\n if (!(maxW > 0)) throw new Error(`page ${pageSize} leaves no room inside a ${padding} px gutter`);\n const items: { id: number; sx: number; w: number; h: number }[] = [];\n for (const img of images) {\n if (img.h > maxW) throw new Error(`image ${img.id} is ${img.h} px tall, past the ${maxW} px page`);\n if (!(img.w > 0 && img.h > 0)) throw new Error(`image ${img.id} is empty (${img.w} x ${img.h})`);\n for (let sx = 0; sx < img.w; sx += maxW) items.push({ id: img.id, sx, w: Math.min(maxW, img.w - sx), h: img.h });\n }\n items.sort((a, b) => b.h - a.h || b.w - a.w || a.id - b.id || a.sx - b.sx);\n const pages: { shelves: Shelf[]; used: number }[] = [];\n const placements: PackedSlice[][] = images.map(() => []);\n const index = new Map(images.map((img, i) => [img.id, i]));\n for (const it of items) {\n const cw = it.w + 2 * padding;\n const ch = it.h + 2 * padding;\n let spot: { page: number; x: number; y: number } | null = null;\n for (let p = 0; p < pages.length && !spot; p++) {\n const pg = pages[p];\n for (const s of pg.shelves) {\n if (s.h >= ch && s.x + cw <= pageSize) {\n spot = { page: p, x: s.x, y: s.y };\n s.x += cw;\n break;\n }\n }\n if (!spot && pg.used + ch <= pageSize) {\n pg.shelves.push({ y: pg.used, h: ch, x: cw });\n spot = { page: p, x: 0, y: pg.used };\n pg.used += ch;\n }\n }\n if (!spot) {\n pages.push({ shelves: [{ y: 0, h: ch, x: cw }], used: ch });\n spot = { page: pages.length - 1, x: 0, y: 0 };\n }\n const at = index.get(it.id) as number;\n placements[at].push({ rect: { page: spot.page, x: spot.x + padding, y: spot.y + padding, w: it.w, h: it.h }, sx: it.sx });\n }\n for (const list of placements) list.sort((a, b) => a.sx - b.sx);\n return { pages: pages.length, placements };\n}\n"],"names":[],"mappings":"SAiCgB,IAAI,CAAC,MAA4B,EAAE,QAAgB,EAAE,OAAe,EAAA;AAClF,IAAA,MAAM,IAAI,GAAG,QAAQ,GAAG,CAAC,GAAG,OAAO;AACnC,IAAA,IAAI,EAAE,IAAI,GAAG,CAAC,CAAC;QAAE,MAAM,IAAI,KAAK,CAAC,CAAA,KAAA,EAAQ,QAAQ,CAAA,yBAAA,EAA4B,OAAO,CAAA,UAAA,CAAY,CAAC;IACjG,MAAM,KAAK,GAAuD,EAAE;AACpE,IAAA,KAAK,MAAM,GAAG,IAAI,MAAM,EAAE;AACxB,QAAA,IAAI,GAAG,CAAC,CAAC,GAAG,IAAI;AAAE,YAAA,MAAM,IAAI,KAAK,CAAC,CAAA,MAAA,EAAS,GAAG,CAAC,EAAE,CAAA,IAAA,EAAO,GAAG,CAAC,CAAC,CAAA,mBAAA,EAAsB,IAAI,CAAA,QAAA,CAAU,CAAC;AAClG,QAAA,IAAI,EAAE,GAAG,CAAC,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;AAAE,YAAA,MAAM,IAAI,KAAK,CAAC,CAAA,MAAA,EAAS,GAAG,CAAC,EAAE,CAAA,WAAA,EAAc,GAAG,CAAC,CAAC,CAAA,GAAA,EAAM,GAAG,CAAC,CAAC,CAAA,CAAA,CAAG,CAAC;AAChG,QAAA,KAAK,IAAI,EAAE,GAAG,CAAC,EAAE,EAAE,GAAG,GAAG,CAAC,CAAC,EAAE,EAAE,IAAI,IAAI;AAAE,YAAA,KAAK,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,GAAG,CAAC,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,GAAG,CAAC,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KAAK,MAAM,IAAI,IAAI,UAAU;AAAE,QAAA,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,EAAE,CAAC;IAC/D,OAAO,EAAE,KAAK,EAAE,KAAK,CAAC,MAAM,EAAE,UAAU,EAAE;AAC5C;;"}
@@ -0,0 +1,120 @@
1
+ import type { FacilityKind, UnitState } from "../../shared/types";
2
+ import type { UnitView } from "../../simport/view";
3
+ import type { PersonBuild } from "../pixelSprites/common";
4
+ import type { CarArrow } from "../carIndicator";
5
+ import { type DrawCtx, type EntranceKind } from "../sprites";
6
+ import { type ScenerySpec } from "./scenery";
7
+ /**
8
+ * One draw call the atlas bakes, as plain data: the catalog lists these, the
9
+ * browser bake runs them through {@link paint}, and the comparison test runs
10
+ * the same specs against the web renderer's own bake path. Every spec draws
11
+ * at the canvas origin into a canvas exactly the frame's size, the same way
12
+ * the web game bakes its sprites.
13
+ */
14
+ export type PaintSpec = UnitPaint | {
15
+ p: "lobby";
16
+ ground: boolean;
17
+ variant: number;
18
+ lit: boolean;
19
+ } | {
20
+ p: "floor";
21
+ } | {
22
+ p: "entrance";
23
+ kind: EntranceKind;
24
+ lit: boolean;
25
+ anim: number;
26
+ staffed: boolean;
27
+ } | {
28
+ p: "shaft";
29
+ kind: FacilityKind;
30
+ floors: number;
31
+ band: number;
32
+ skip: number[];
33
+ } | {
34
+ p: "car";
35
+ kind: FacilityKind;
36
+ seed: number;
37
+ riders: number;
38
+ arrow: CarArrow;
39
+ full: boolean;
40
+ } | {
41
+ p: "person";
42
+ build: PersonBuild;
43
+ fill: string;
44
+ } | {
45
+ p: "escape";
46
+ side: "left" | "right";
47
+ parity: 0 | 1;
48
+ } | {
49
+ p: "awning";
50
+ side: "left" | "right";
51
+ } | {
52
+ p: "crane";
53
+ t: number;
54
+ lit: boolean;
55
+ } | {
56
+ p: "streetCar";
57
+ seed: number;
58
+ } | {
59
+ p: "garbageTruck";
60
+ w: number;
61
+ } | {
62
+ p: "metroTrain";
63
+ w: number;
64
+ headlight: boolean;
65
+ } | {
66
+ p: "skyGradient";
67
+ } | {
68
+ p: "disc";
69
+ day: boolean;
70
+ r: number;
71
+ } | {
72
+ p: "cloud";
73
+ weather: "overcast" | "rain";
74
+ r: number;
75
+ } | {
76
+ p: "solid";
77
+ css: string;
78
+ } | ScenerySpec;
79
+ /** The fields of a placed room the sprite code reads, plus the scene inputs
80
+ * the web threads through its `DrawCtx` at bake time. */
81
+ export interface UnitPaint {
82
+ p: "unit";
83
+ kind: FacilityKind;
84
+ state: UnitState;
85
+ subtype?: string;
86
+ floor: number;
87
+ x: number;
88
+ id: number;
89
+ width: number;
90
+ occupants: number;
91
+ outForMeal: number;
92
+ lit: boolean;
93
+ hour: number;
94
+ anim: number;
95
+ parkingUse?: number;
96
+ recycleFill?: number;
97
+ dead?: boolean;
98
+ }
99
+ /** Build the unit view a {@link UnitPaint} describes. */
100
+ export declare function unitOf(s: UnitPaint): UnitView;
101
+ /** The scene context the web's settled-room bake hands `drawUnit`. */
102
+ export declare function unitDrawCtx(ctx: CanvasRenderingContext2D, s: UnitPaint): DrawCtx;
103
+ /** Paint `s` into `ctx`, whose canvas is `w` x `h`. */
104
+ export declare function paint(ctx: CanvasRenderingContext2D, s: PaintSpec, w: number, h: number): void;
105
+ /** The walker bake's column offset (towerScene's PERSON_X): figures sit one
106
+ * pixel in from the left so the 1px contact shadow fits. */
107
+ export declare const PERSON_X = 1;
108
+ /** Canvas size for a person build: the build plus the contact-shadow margin. */
109
+ export declare function personSize(width: number, height: number): {
110
+ w: number;
111
+ h: number;
112
+ };
113
+ /** Where a cloud of radius `r` is drawn inside its own canvas so every puff
114
+ * lands in bounds, and the canvas size that holds it. */
115
+ export declare function cloudOrigin(r: number): {
116
+ x: number;
117
+ y: number;
118
+ w: number;
119
+ h: number;
120
+ };
@@ -0,0 +1,154 @@
1
+ import { personFigure } from '../pixelSprites/common.js';
2
+ import { FLOOR, TILE } from '../scale.js';
3
+ import { drawUnit } from '../sprites.js';
4
+ import { paintAnimatedUnit, paintSettledUnit } from '../regionPaint.js';
5
+ import { cloudFill, drawCloud, drawSunDisc, skyColor } from '../sprites/sky.js';
6
+ import { paintScenery } from './scenery.js';
7
+ import { drawMetroTrain, drawGarbageTruck, drawStreetCar } from '../sprites/facilities/vehicles.js';
8
+ import { drawCrane, drawAwning, drawEscapeStairs } from '../sprites/structure/rooftop.js';
9
+ import { drawCar, drawTransport } from '../sprites/transport.js';
10
+ import { drawLobbyEntrance } from '../sprites/structure/lobby.js';
11
+
12
+ /** Build the unit view a {@link UnitPaint} describes. */
13
+ function unitOf(s) {
14
+ return {
15
+ id: s.id,
16
+ kind: s.kind,
17
+ floor: s.floor,
18
+ x: s.x,
19
+ width: s.width,
20
+ state: s.state,
21
+ occupants: s.occupants,
22
+ outForMeal: s.outForMeal,
23
+ subtype: s.subtype,
24
+ label: "",
25
+ };
26
+ }
27
+ /** A structural tile as the web bakes it (`towerScene.fakeStruct`). */
28
+ function structUnit(kind, floor, x) {
29
+ return {
30
+ id: -1,
31
+ kind,
32
+ floor,
33
+ x,
34
+ width: 1,
35
+ state: "occupied",
36
+ occupants: 0,
37
+ label: "",
38
+ };
39
+ }
40
+ /** The scene context the web's settled-room bake hands `drawUnit`. */
41
+ function unitDrawCtx(ctx, s) {
42
+ return {
43
+ ctx,
44
+ lit: s.lit,
45
+ anim: s.anim,
46
+ hour: s.hour,
47
+ parkingUse: s.parkingUse ?? 0,
48
+ recycleFill: s.recycleFill ?? 0,
49
+ parkingDead: s.dead === true,
50
+ };
51
+ }
52
+ /** Paint `s` into `ctx`, whose canvas is `w` x `h`. */
53
+ function paint(ctx, s, w, h) {
54
+ switch (s.p) {
55
+ case "unit": {
56
+ // The game's own paint paths: burning and unbuilt rooms through their
57
+ // per-unit canvas, settled rooms through the region compositor's.
58
+ const d = unitDrawCtx(ctx, s);
59
+ if (s.state === "fire" || s.state === "construction")
60
+ return paintAnimatedUnit(d, unitOf(s), w, h);
61
+ return paintSettledUnit(d, unitOf(s), 0, 0, w, h, s.dead === true);
62
+ }
63
+ case "lobby":
64
+ return drawUnit(structCtx(ctx, s.lit), structUnit("lobby", s.ground ? 1 : 2, s.variant), 0, 0, TILE, FLOOR);
65
+ case "floor":
66
+ return drawUnit(structCtx(ctx, false), structUnit("floor", 1, 0), 0, 0, TILE, FLOOR);
67
+ case "entrance":
68
+ return drawLobbyEntrance({ ctx, lit: s.lit, anim: s.anim, hour: s.lit ? 20 : 12, staffed: s.staffed }, s.kind, 0, 0, TILE, FLOOR);
69
+ case "shaft":
70
+ return drawTransport(ctx, shaftOf(s.kind, s.floors, s.skip, w), 0, -s.band * FLOOR, w, FLOOR);
71
+ case "car":
72
+ return drawCar(ctx, s.seed, w, FLOOR, s.riders, s.arrow, s.full, s.kind);
73
+ case "person":
74
+ return personFigure(ctx, PERSON_X, h - 1, s.build, s.fill);
75
+ case "escape":
76
+ return drawEscapeStairs(ctx, s.side, s.parity, FLOOR);
77
+ case "awning":
78
+ return drawAwning(ctx, s.side, FLOOR);
79
+ case "crane":
80
+ return drawCrane(ctx, s.t, s.lit);
81
+ case "streetCar":
82
+ return drawStreetCar(ctx, s.seed);
83
+ case "garbageTruck":
84
+ return drawGarbageTruck(ctx, s.w);
85
+ case "metroTrain":
86
+ return drawMetroTrain(ctx, s.w, s.headlight);
87
+ case "scenery":
88
+ return paintScenery(ctx, s, w, h);
89
+ default:
90
+ return paintSky(ctx, s, w, h);
91
+ }
92
+ }
93
+ /** The sky family: the 24-hour color strip, the sun and moon, the clouds and
94
+ * the skyline's solid fills. */
95
+ function paintSky(ctx, s, w, h) {
96
+ switch (s.p) {
97
+ case "skyGradient":
98
+ // One column per quarter hour, sampled at the column's start.
99
+ for (let col = 0; col < w; col++) {
100
+ ctx.fillStyle = skyColor((col * 24) / w);
101
+ ctx.fillRect(col, 0, 1, h);
102
+ }
103
+ return;
104
+ case "disc":
105
+ return drawSunDisc(ctx, w / 2, h / 2, s.day);
106
+ case "cloud": {
107
+ ctx.fillStyle = cloudFill(s.weather);
108
+ const o = cloudOrigin(s.r);
109
+ return drawCloud(ctx, o.x, o.y, s.r);
110
+ }
111
+ case "solid":
112
+ ctx.fillStyle = s.css;
113
+ ctx.fillRect(0, 0, w, h);
114
+ return;
115
+ default:
116
+ throw new Error(`unknown paint spec ${JSON.stringify(s)}`);
117
+ }
118
+ }
119
+ function structCtx(ctx, lit) {
120
+ return { ctx, lit, anim: 0, hour: lit ? 20 : 12 };
121
+ }
122
+ /** A shaft `floors` tall for one band bake, as the web's `transportGraphic`
123
+ * draws it. */
124
+ function shaftOf(kind, floors, skip, w) {
125
+ return {
126
+ id: 1,
127
+ kind,
128
+ x: 0,
129
+ width: w / TILE,
130
+ bottom: 1,
131
+ top: floors,
132
+ cars: 1,
133
+ carPositions: [1],
134
+ carDir: [0],
135
+ skipFloors: skip,
136
+ };
137
+ }
138
+ /** The walker bake's column offset (towerScene's PERSON_X): figures sit one
139
+ * pixel in from the left so the 1px contact shadow fits. */
140
+ const PERSON_X = 1;
141
+ /** Canvas size for a person build: the build plus the contact-shadow margin. */
142
+ function personSize(width, height) {
143
+ return { w: width + 2, h: height + 1 };
144
+ }
145
+ /** Where a cloud of radius `r` is drawn inside its own canvas so every puff
146
+ * lands in bounds, and the canvas size that holds it. */
147
+ function cloudOrigin(r) {
148
+ const x = Math.ceil(r * 0.88) + 2;
149
+ const y = Math.ceil(r * 0.5) + 2;
150
+ return { x, y, w: x + Math.ceil(r * 0.9) + 2, h: y + Math.ceil(r * 0.55) + 11 };
151
+ }
152
+
153
+ export { PERSON_X, cloudOrigin, paint, personSize, unitDrawCtx, unitOf };
154
+ //# sourceMappingURL=paint.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"paint.js","sources":["../../../src/render/atlas/paint.ts"],"sourcesContent":["import type { FacilityKind, UnitState } from \"../../shared/types\";\nimport type { UnitView, TransportView } from \"../../simport/view\";\nimport type { PersonBuild } from \"../pixelSprites/common\";\nimport { personFigure } from \"../pixelSprites/common\";\nimport type { CarArrow } from \"../carIndicator\";\nimport { FLOOR, TILE } from \"../scale\";\nimport { drawCar, drawTransport, drawUnit, type DrawCtx, type EntranceKind } from \"../sprites\";\nimport { drawAwning, drawCrane, drawEscapeStairs, drawLobbyEntrance } from \"../sprites\";\nimport { drawGarbageTruck, drawMetroTrain, drawStreetCar } from \"../sprites\";\nimport { paintAnimatedUnit, paintSettledUnit } from \"../regionPaint\";\nimport { cloudFill, drawCloud, drawSunDisc, skyColor } from \"../sprites/sky\";\nimport { paintScenery, type ScenerySpec } from \"./scenery\";\n\n/**\n * One draw call the atlas bakes, as plain data: the catalog lists these, the\n * browser bake runs them through {@link paint}, and the comparison test runs\n * the same specs against the web renderer's own bake path. Every spec draws\n * at the canvas origin into a canvas exactly the frame's size, the same way\n * the web game bakes its sprites.\n */\nexport type PaintSpec =\n | UnitPaint\n | { p: \"lobby\"; ground: boolean; variant: number; lit: boolean }\n | { p: \"floor\" }\n | { p: \"entrance\"; kind: EntranceKind; lit: boolean; anim: number; staffed: boolean }\n | { p: \"shaft\"; kind: FacilityKind; floors: number; band: number; skip: number[] }\n | { p: \"car\"; kind: FacilityKind; seed: number; riders: number; arrow: CarArrow; full: boolean }\n | { p: \"person\"; build: PersonBuild; fill: string }\n | { p: \"escape\"; side: \"left\" | \"right\"; parity: 0 | 1 }\n | { p: \"awning\"; side: \"left\" | \"right\" }\n | { p: \"crane\"; t: number; lit: boolean }\n | { p: \"streetCar\"; seed: number }\n | { p: \"garbageTruck\"; w: number }\n | { p: \"metroTrain\"; w: number; headlight: boolean }\n | { p: \"skyGradient\" }\n | { p: \"disc\"; day: boolean; r: number }\n | { p: \"cloud\"; weather: \"overcast\" | \"rain\"; r: number }\n | { p: \"solid\"; css: string }\n | ScenerySpec;\n\n/** The fields of a placed room the sprite code reads, plus the scene inputs\n * the web threads through its `DrawCtx` at bake time. */\nexport interface UnitPaint {\n p: \"unit\";\n kind: FacilityKind;\n state: UnitState;\n subtype?: string;\n floor: number;\n x: number;\n id: number;\n width: number;\n occupants: number;\n outForMeal: number;\n lit: boolean;\n hour: number;\n anim: number;\n parkingUse?: number;\n recycleFill?: number;\n dead?: boolean;\n}\n\n/** Build the unit view a {@link UnitPaint} describes. */\nexport function unitOf(s: UnitPaint): UnitView {\n return {\n id: s.id,\n kind: s.kind,\n floor: s.floor,\n x: s.x,\n width: s.width,\n state: s.state,\n occupants: s.occupants,\n outForMeal: s.outForMeal,\n subtype: s.subtype,\n label: \"\",\n };\n}\n\n/** A structural tile as the web bakes it (`towerScene.fakeStruct`). */\nfunction structUnit(kind: \"floor\" | \"lobby\", floor: number, x: number): UnitView {\n return {\n id: -1,\n kind,\n floor,\n x,\n width: 1,\n state: \"occupied\",\n occupants: 0,\n label: \"\",\n };\n}\n\n/** The scene context the web's settled-room bake hands `drawUnit`. */\nexport function unitDrawCtx(ctx: CanvasRenderingContext2D, s: UnitPaint): DrawCtx {\n return {\n ctx,\n lit: s.lit,\n anim: s.anim,\n hour: s.hour,\n parkingUse: s.parkingUse ?? 0,\n recycleFill: s.recycleFill ?? 0,\n parkingDead: s.dead === true,\n };\n}\n\n/** Paint `s` into `ctx`, whose canvas is `w` x `h`. */\nexport function paint(ctx: CanvasRenderingContext2D, s: PaintSpec, w: number, h: number): void {\n switch (s.p) {\n case \"unit\": {\n // The game's own paint paths: burning and unbuilt rooms through their\n // per-unit canvas, settled rooms through the region compositor's.\n const d = unitDrawCtx(ctx, s);\n if (s.state === \"fire\" || s.state === \"construction\") return paintAnimatedUnit(d, unitOf(s), w, h);\n return paintSettledUnit(d, unitOf(s), 0, 0, w, h, s.dead === true);\n }\n case \"lobby\":\n return drawUnit(structCtx(ctx, s.lit), structUnit(\"lobby\", s.ground ? 1 : 2, s.variant), 0, 0, TILE, FLOOR);\n case \"floor\":\n return drawUnit(structCtx(ctx, false), structUnit(\"floor\", 1, 0), 0, 0, TILE, FLOOR);\n case \"entrance\":\n return drawLobbyEntrance(\n { ctx, lit: s.lit, anim: s.anim, hour: s.lit ? 20 : 12, staffed: s.staffed },\n s.kind,\n 0,\n 0,\n TILE,\n FLOOR,\n );\n case \"shaft\":\n return drawTransport(ctx, shaftOf(s.kind, s.floors, s.skip, w), 0, -s.band * FLOOR, w, FLOOR);\n case \"car\":\n return drawCar(ctx, s.seed, w, FLOOR, s.riders, s.arrow, s.full, s.kind);\n case \"person\":\n return personFigure(ctx, PERSON_X, h - 1, s.build, s.fill);\n case \"escape\":\n return drawEscapeStairs(ctx, s.side, s.parity, FLOOR);\n case \"awning\":\n return drawAwning(ctx, s.side, FLOOR);\n case \"crane\":\n return drawCrane(ctx, s.t, s.lit);\n case \"streetCar\":\n return drawStreetCar(ctx, s.seed);\n case \"garbageTruck\":\n return drawGarbageTruck(ctx, s.w);\n case \"metroTrain\":\n return drawMetroTrain(ctx, s.w, s.headlight);\n case \"scenery\":\n return paintScenery(ctx, s, w, h);\n default:\n return paintSky(ctx, s, w, h);\n }\n}\n\n/** The sky family: the 24-hour color strip, the sun and moon, the clouds and\n * the skyline's solid fills. */\nfunction paintSky(ctx: CanvasRenderingContext2D, s: PaintSpec, w: number, h: number): void {\n switch (s.p) {\n case \"skyGradient\":\n // One column per quarter hour, sampled at the column's start.\n for (let col = 0; col < w; col++) {\n ctx.fillStyle = skyColor((col * 24) / w);\n ctx.fillRect(col, 0, 1, h);\n }\n return;\n case \"disc\":\n return drawSunDisc(ctx, w / 2, h / 2, s.day);\n case \"cloud\": {\n ctx.fillStyle = cloudFill(s.weather);\n const o = cloudOrigin(s.r);\n return drawCloud(ctx, o.x, o.y, s.r);\n }\n case \"solid\":\n ctx.fillStyle = s.css;\n ctx.fillRect(0, 0, w, h);\n return;\n default:\n throw new Error(`unknown paint spec ${JSON.stringify(s)}`);\n }\n}\n\nfunction structCtx(ctx: CanvasRenderingContext2D, lit: boolean): DrawCtx {\n return { ctx, lit, anim: 0, hour: lit ? 20 : 12 };\n}\n\n/** A shaft `floors` tall for one band bake, as the web's `transportGraphic`\n * draws it. */\nfunction shaftOf(kind: FacilityKind, floors: number, skip: number[], w: number): TransportView {\n return {\n id: 1,\n kind,\n x: 0,\n width: w / TILE,\n bottom: 1,\n top: floors,\n cars: 1,\n carPositions: [1],\n carDir: [0],\n skipFloors: skip,\n };\n}\n\n/** The walker bake's column offset (towerScene's PERSON_X): figures sit one\n * pixel in from the left so the 1px contact shadow fits. */\nexport const PERSON_X = 1;\n\n/** Canvas size for a person build: the build plus the contact-shadow margin. */\nexport function personSize(width: number, height: number): { w: number; h: number } {\n return { w: width + 2, h: height + 1 };\n}\n\n/** Where a cloud of radius `r` is drawn inside its own canvas so every puff\n * lands in bounds, and the canvas size that holds it. */\nexport function cloudOrigin(r: number): { x: number; y: number; w: number; h: number } {\n const x = Math.ceil(r * 0.88) + 2;\n const y = Math.ceil(r * 0.5) + 2;\n return { x, y, w: x + Math.ceil(r * 0.9) + 2, h: y + Math.ceil(r * 0.55) + 11 };\n}\n"],"names":[],"mappings":";;;;;;;;;;;AA6DA;AACM,SAAU,MAAM,CAAC,CAAY,EAAA;IACjC,OAAO;QACL,EAAE,EAAE,CAAC,CAAC,EAAE;QACR,IAAI,EAAE,CAAC,CAAC,IAAI;QACZ,KAAK,EAAE,CAAC,CAAC,KAAK;QACd,CAAC,EAAE,CAAC,CAAC,CAAC;QACN,KAAK,EAAE,CAAC,CAAC,KAAK;QACd,KAAK,EAAE,CAAC,CAAC,KAAK;QACd,SAAS,EAAE,CAAC,CAAC,SAAS;QACtB,UAAU,EAAE,CAAC,CAAC,UAAU;QACxB,OAAO,EAAE,CAAC,CAAC,OAAO;AAClB,QAAA,KAAK,EAAE,EAAE;KACV;AACH;AAEA;AACA,SAAS,UAAU,CAAC,IAAuB,EAAE,KAAa,EAAE,CAAS,EAAA;IACnE,OAAO;QACL,EAAE,EAAE,CAAC,CAAC;QACN,IAAI;QACJ,KAAK;QACL,CAAC;AACD,QAAA,KAAK,EAAE,CAAC;AACR,QAAA,KAAK,EAAE,UAAU;A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c,EAAA;AACtD,IAAA,OAAO,EAAE,CAAC,EAAE,KAAK,GAAG,CAAC,EAAE,CAAC,EAAE,MAAM,GAAG,CAAC,EAAE;AACxC;AAEA;AAC0D;AACpD,SAAU,WAAW,CAAC,CAAS,EAAA;AACnC,IAAA,MAAM,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC;AACjC,IAAA,MAAM,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,GAAG,CAAC,GAAG,CAAC;AAChC,IAAA,OAAO,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,EAAE,EAAE;AACjF;;"}
@@ -0,0 +1,46 @@
1
+ /**
2
+ * Pure RGBA pixel operations for the atlas bake: trimming transparent borders,
3
+ * diffing two renders into a composable layer, compositing a layer back, and
4
+ * content hashing for deduplication. Images are straight (unpremultiplied)
5
+ * RGBA, the way `getImageData` hands them back.
6
+ */
7
+ export interface Image {
8
+ w: number;
9
+ h: number;
10
+ data: Uint8ClampedArray;
11
+ }
12
+ /** A sub-image placed at (x, y) inside a larger frame. */
13
+ export interface Piece extends Image {
14
+ x: number;
15
+ y: number;
16
+ }
17
+ export declare function blank(w: number, h: number): Image;
18
+ /** Copy the `w` x `h` block at (x, y) out of `img`. */
19
+ export declare function crop(img: Image, x: number, y: number, w: number, h: number): Image;
20
+ /** The smallest block holding every non-transparent pixel, or null when the
21
+ * image is fully transparent. */
22
+ export declare function trim(img: Image): Piece | null;
23
+ /** Thrown when a step's change cannot be expressed as an over-blended layer. */
24
+ export declare class LayerError extends Error {
25
+ name: string;
26
+ }
27
+ /**
28
+ * The layer that turns `prev` into `next`: every pixel that differs, copied
29
+ * from `next`, in the bounding box of the changes; unchanged pixels are
30
+ * transparent. Null when nothing changed.
31
+ *
32
+ * Drawing the layer source-over onto `prev` reproduces `next` exactly only if
33
+ * every changed pixel is opaque in `next` or lands on a fully transparent
34
+ * pixel of `prev`, so that is checked: any other change throws
35
+ * {@link LayerError} instead of shipping a layer that composes wrong.
36
+ */
37
+ export declare function diffLayer(prev: Image, next: Image): Piece | null;
38
+ /**
39
+ * Draw `src` onto `dst` at (x, y) with source-over blending, the way a
40
+ * frontend draws a layer. Straight alpha; an opaque source pixel replaces the
41
+ * destination, a transparent one leaves it.
42
+ */
43
+ export declare function over(dst: Image, src: Image, x: number, y: number): void;
44
+ /** FNV-1a over the size and bytes: the dedup key (byte equality decides). */
45
+ export declare function contentHash(img: Image): string;
46
+ export declare function sameImage(a: Image, b: Image): boolean;