@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,245 @@
1
+ import { TILE, FLOOR } from '../scale.js';
2
+
3
+ /**
4
+ * Pure geometry for the overview MAP window (#343): the transforms between the
5
+ * world's tile and floor coordinates and the map's pixels, and the camera
6
+ * rectangle drawn on it. No canvas, no Excalibur, no DOM, so it is unit-tested
7
+ * on its own and the window code only calls it.
8
+ *
9
+ * Coordinates, as the renderer and the save use them:
10
+ * - tile `t` spans world x `[t * TILE, (t + 1) * TILE]`;
11
+ * - floor `f` spans world y `[-f * FLOOR, -f * FLOOR + FLOOR]`, so a floor's top
12
+ * edge is the "line" `f` and its bottom edge is the line `f - 1` (floor 1 is
13
+ * the ground, floor 0 is B1, floor -9 is B10);
14
+ * - the camera is saved as its center: `{ tile: pos.x / TILE, floor: -pos.y / FLOOR }`.
15
+ *
16
+ * Map space has its origin at the top-left, x to the right and y downward, and
17
+ * its unit is the DEVICE pixel: the window builds its layout from the canvas's
18
+ * backing-store size (CSS size times `devicePixelRatio`), so snapping to whole
19
+ * map pixels is snapping to whole device pixels at any ratio. `mapExtent` is
20
+ * the whole world: the lot across, and vertically the same span the camera is
21
+ * allowed to see (sky above the top floor, one floor of ground below the
22
+ * deepest basement). The map draws the banded crop (`extent.ts`), which adds a
23
+ * margin beside the lot (an extent may start left of tile 0) and is shorter, so
24
+ * a camera can sit wholly or partly above or below it: `viewportRect` clips the
25
+ * rectangle to the map and `viewPlacement` says which edge it passed.
26
+ */
27
+ /** The map's bottom edge, as floor lines counted down from `minFloor` (the
28
+ * lowest floor's top edge is line `minFloor`, its bottom edge `minFloor - 1`).
29
+ * The value 2 matches the bottom clamp in `clampCameraY` (`cameraBounds.ts`,
30
+ * `-(minFloor - 2) * floorPx`) and leaves one floor of ground under the
31
+ * lowest floor. */
32
+ const MAP_LINES_BELOW_LOWEST_FLOOR = 2;
33
+ /** A finite positive number, or `fallback`. */
34
+ function positive(n, fallback) {
35
+ return Number.isFinite(n) && n > 0 ? n : fallback;
36
+ }
37
+ /** A finite number, or `fallback`. */
38
+ function finite(n, fallback) {
39
+ return Number.isFinite(n) ? n : fallback;
40
+ }
41
+ /**
42
+ * The extent the map spans for a world. `skyFloors` is the camera's sky
43
+ * headroom above the top floor (`SKY_HEADROOM_FLOORS` in `cameraBounds.ts`); it
44
+ * is a parameter so this module imports no sprite code.
45
+ */
46
+ function mapExtent(world, skyFloors) {
47
+ const width = positive(world.lotWidth, 1);
48
+ const minFloor = finite(world.minFloor, 0);
49
+ const maxFloor = Math.max(minFloor, finite(world.maxFloor, minFloor));
50
+ const sky = Math.max(0, finite(skyFloors, 0));
51
+ return { leftTile: 0, width, topLine: maxFloor + sky, bottomLine: minFloor - MAP_LINES_BELOW_LOWEST_FLOOR };
52
+ }
53
+ /** Floors the extent spans from top to bottom. Always at least 1. */
54
+ function extentFloors(extent) {
55
+ const span = extent.topLine - extent.bottomLine;
56
+ return Number.isFinite(span) ? Math.max(1, span) : 1;
57
+ }
58
+ /**
59
+ * A layout that fills a box of `boxWidth` by `boxHeight` pixels exactly, with
60
+ * the tile and floor scales set independently (the map is a schematic with its
61
+ * own proportions). A non-finite or non-positive box falls back to 1 pixel so
62
+ * the scales stay finite and positive.
63
+ */
64
+ function fitLayout(extent, boxWidth, boxHeight) {
65
+ const width = positive(boxWidth, 1);
66
+ const height = positive(boxHeight, 1);
67
+ // A hand-built extent is trusted no further than `mapExtent` would trust a
68
+ // world: a width that is not a positive finite number reads as one tile
69
+ // starting at tile 0 (a left edge set back for a margin would leave that one
70
+ // tile wholly in the margin), an upside-down span reads as one floor, and a
71
+ // left edge that is not finite reads as tile 0.
72
+ const widthOk = Number.isFinite(extent.width) && extent.width > 0;
73
+ const tiles = widthOk ? extent.width : 1;
74
+ const leftTile = widthOk ? finite(extent.leftTile, 0) : 0;
75
+ const floors = extentFloors(extent);
76
+ return {
77
+ extent: { leftTile, width: tiles, topLine: extent.topLine, bottomLine: extent.bottomLine },
78
+ pxPerTile: width / tiles,
79
+ pxPerFloor: height / floors,
80
+ width,
81
+ height,
82
+ };
83
+ }
84
+ // ---- world <-> map ------------------------------------------------------
85
+ /** Map x of a tile's left edge (tiles may be fractional: the camera's center is). */
86
+ function tileToMapX(layout, tile) {
87
+ return (finite(tile, 0) - layout.extent.leftTile) * layout.pxPerTile;
88
+ }
89
+ /** Map y of a floor line: the top edge of floor `line` (a floor's bottom edge is
90
+ * `line - 1`). */
91
+ function lineToMapY(layout, line) {
92
+ return (layout.extent.topLine - finite(line, layout.extent.topLine)) * layout.pxPerFloor;
93
+ }
94
+ /** The tile a map x falls on, as a fractional tile (not rounded or clamped). */
95
+ function mapXToTile(layout, x) {
96
+ return layout.extent.leftTile + finite(x, 0) / layout.pxPerTile;
97
+ }
98
+ /** The floor line a map y falls on (not rounded or clamped). */
99
+ function mapYToLine(layout, y) {
100
+ return layout.extent.topLine - finite(y, 0) / layout.pxPerFloor;
101
+ }
102
+ /** The map rectangle of a block: `x` and `width` in tiles, `floor` its lowest
103
+ * floor, `floors` how many floors tall it is (at least 1). */
104
+ function blockRect(layout, x, width, floor, floors = 1) {
105
+ const rows = Math.max(1, floors);
106
+ return {
107
+ x: tileToMapX(layout, x),
108
+ y: lineToMapY(layout, floor + rows - 1),
109
+ w: Math.max(0, finite(width, 0)) * layout.pxPerTile,
110
+ h: rows * layout.pxPerFloor,
111
+ };
112
+ }
113
+ /**
114
+ * The map rectangle of a block, snapped to whole pixels for painting, or null
115
+ * when the block cannot be drawn: any input is not a finite number, the width
116
+ * or floor count is not positive, or the block lies wholly off the map.
117
+ *
118
+ * Both edges of each axis come from the same tile or floor line, so two blocks
119
+ * that share an edge round it the same way and leave no seam. A block is never
120
+ * thinner than one pixel and is clamped into the map, so a narrow shaft in the
121
+ * last column or the bottom row still shows.
122
+ */
123
+ function snappedBlock(layout, x, width, floor, floors) {
124
+ // One check at a time: this runs for every mark of a rebuild, and an
125
+ // array per call would be garbage.
126
+ if (!(Number.isFinite(x) && Number.isFinite(width) && Number.isFinite(floor) && Number.isFinite(floors)) || width <= 0 || floors < 1)
127
+ return null;
128
+ const mapW = Math.max(1, Math.floor(layout.width));
129
+ const mapH = Math.max(1, Math.floor(layout.height));
130
+ const rawLeft = tileToMapX(layout, x);
131
+ const rawRight = tileToMapX(layout, x + width);
132
+ const rawTop = lineToMapY(layout, floor + floors - 1);
133
+ const rawBottom = lineToMapY(layout, floor - 1);
134
+ // Off the map by the exact edges, before rounding can push a block that is
135
+ // inside the last column or row onto the border.
136
+ if (rawRight <= 0 || rawLeft >= layout.width || rawBottom <= 0 || rawTop >= layout.height)
137
+ return null;
138
+ const left = Math.round(rawLeft);
139
+ const right = Math.round(rawRight);
140
+ const top = Math.round(rawTop);
141
+ const bottom = Math.round(rawBottom);
142
+ const x0 = clamp(left, 0, mapW - 1);
143
+ const y0 = clamp(top, 0, mapH - 1);
144
+ const x1 = clamp(right, x0 + 1, mapW);
145
+ const y1 = clamp(bottom, y0 + 1, mapH);
146
+ return { x: x0, y: y0, w: x1 - x0, h: y1 - y0 };
147
+ }
148
+ // ---- the camera rectangle ----------------------------------------------
149
+ /**
150
+ * The visible area on the map, in map pixels, from the camera's world-pixel
151
+ * center and the viewport. It is clipped to the map, so a camera that sees past
152
+ * the lot edge (or past the sky) shows the part that is on the map. A
153
+ * non-positive zoom reads as 1, as `clampCameraY` reads it.
154
+ */
155
+ function viewportRect(layout, cam) {
156
+ const zoom = positive(cam.zoom, 1);
157
+ const halfW = positive(cam.viewWidth, 0) / 2 / zoom;
158
+ const halfH = positive(cam.viewHeight, 0) / 2 / zoom;
159
+ const posX = finite(cam.posX, 0);
160
+ const posY = finite(cam.posY, 0);
161
+ const { extent } = layout;
162
+ // Clip in world units, before the transforms: a tiny zoom or a huge viewport
163
+ // can overflow the edges to Infinity, which the transforms would read as 0,
164
+ // and a view taller than a cropped map must still cover all of it.
165
+ const mapRight = extent.leftTile + extent.width;
166
+ const leftTile = clamp((posX - halfW) / TILE, extent.leftTile, mapRight);
167
+ const rightTile = clamp((posX + halfW) / TILE, extent.leftTile, mapRight);
168
+ const topLine = clamp(-(posY - halfH) / FLOOR, extent.bottomLine, extent.topLine);
169
+ const bottomLine = clamp(-(posY + halfH) / FLOOR, extent.bottomLine, extent.topLine);
170
+ const x0 = clamp(tileToMapX(layout, leftTile), 0, layout.width);
171
+ const x1 = clamp(tileToMapX(layout, rightTile), 0, layout.width);
172
+ const y0 = clamp(lineToMapY(layout, topLine), 0, layout.height);
173
+ const y1 = clamp(lineToMapY(layout, bottomLine), 0, layout.height);
174
+ return { x: x0, y: y0, w: Math.max(0, x1 - x0), h: Math.max(0, y1 - y0) };
175
+ }
176
+ function clamp(n, lo, hi) {
177
+ return Math.max(lo, Math.min(hi, n));
178
+ }
179
+ /** Whether two rectangles are the same to within `eps` map pixels (half a
180
+ * device pixel by default), so the window can skip a repaint when the camera
181
+ * has not visibly moved. */
182
+ function sameRect(a, b, eps = 0.5) {
183
+ if (a === null || b === null)
184
+ return a === b;
185
+ return Math.abs(a.x - b.x) <= eps && Math.abs(a.y - b.y) <= eps && Math.abs(a.w - b.w) <= eps && Math.abs(a.h - b.h) <= eps;
186
+ }
187
+ // ---- map -> camera ------------------------------------------------------
188
+ /**
189
+ * The camera center for a point on the map, in the units `setCamera` and the
190
+ * save use. The point is clamped onto the map first, so a click or drag that
191
+ * leaves the map edge aims at the edge. A point in the margin beside the lot
192
+ * returns a tile in the margin (below 0, or past the lot's width). The
193
+ * renderer's own clamp still applies when the camera moves, and may keep the
194
+ * center further in than the point asks for: the camera cannot show past the
195
+ * sky or the ground, and `clamp` in `towerInputCamera.ts` holds its center
196
+ * between tile 0 and the lot's width, so a center asked for in the margin
197
+ * lands on the lot's nearer edge.
198
+ */
199
+ function mapPointToCenter(layout, mx, my) {
200
+ // NaN has no side to aim at and reads as the map's center; an infinite value
201
+ // clamps onto the edge it points to.
202
+ const x = Number.isNaN(mx) ? layout.width / 2 : clamp(mx, 0, layout.width);
203
+ const y = Number.isNaN(my) ? layout.height / 2 : clamp(my, 0, layout.height);
204
+ return { tile: mapXToTile(layout, x), floor: mapYToLine(layout, y) };
205
+ }
206
+ /**
207
+ * The camera center while the viewport rectangle is dragged. `start` is the
208
+ * camera's center when the drag began (the real camera; the rectangle is
209
+ * clipped to the map), `grab` is where on the map the pointer went
210
+ * down. The center moves by the pointer's travel since then, so the rectangle
211
+ * does not jump to the pointer when the drag starts. The result is kept on the
212
+ * map, except that a start outside it (a camera above the crop) is never
213
+ * pulled in or pushed further out by the drag: it moves only by the travel back
214
+ * toward the map. A non-finite grab or pointer reads as "no travel" on that axis.
215
+ *
216
+ * The renderer clamps the camera after each move, so at a clamp edge the
217
+ * rectangle can stop short of the pointer. The caller reads the camera again
218
+ * for each move instead of accumulating from `start` forever if it wants the
219
+ * rectangle to follow the pointer back off the edge.
220
+ */
221
+ function dragCenter(layout, start, grab, pointer) {
222
+ const dx = Number.isFinite(grab.x) && Number.isFinite(pointer.x) ? pointer.x - grab.x : 0;
223
+ const dy = Number.isFinite(grab.y) && Number.isFinite(pointer.y) ? pointer.y - grab.y : 0;
224
+ const { extent } = layout;
225
+ const tile0 = finite(start.tile, 0);
226
+ const floor0 = finite(start.floor, extent.topLine);
227
+ // A start already past an edge (a camera in the sky above the crop) stays
228
+ // where it is: the result may not go further out than the start, and is not
229
+ // pulled onto the map by a move along the other axis.
230
+ return {
231
+ tile: clamp(tile0 + dx / layout.pxPerTile, Math.min(extent.leftTile, tile0), Math.max(extent.leftTile + extent.width, tile0)),
232
+ floor: clamp(floor0 - dy / layout.pxPerFloor, Math.min(extent.bottomLine, floor0), Math.max(extent.topLine, floor0)),
233
+ };
234
+ }
235
+ /** Whether a map point lies inside a rectangle (edges included). An empty
236
+ * rectangle (no width or no height) contains nothing; the caller widens a
237
+ * small rectangle for touch before asking. */
238
+ function rectContains(rect, x, y) {
239
+ if (!(rect.w > 0) || !(rect.h > 0))
240
+ return false;
241
+ return x >= rect.x && x <= rect.x + rect.w && y >= rect.y && y <= rect.y + rect.h;
242
+ }
243
+
244
+ export { MAP_LINES_BELOW_LOWEST_FLOOR, blockRect, dragCenter, extentFloors, fitLayout, lineToMapY, mapExtent, mapPointToCenter, mapXToTile, mapYToLine, rectContains, sameRect, snappedBlock, tileToMapX, viewportRect };
245
+ //# sourceMappingURL=geometry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"geometry.js","sources":["../../../src/render/overviewMap/geometry.ts"],"sourcesContent":["/**\n * Pure geometry for the overview MAP window (#343): the transforms between the\n * world's tile and floor coordinates and the map's pixels, and the camera\n * rectangle drawn on it. No canvas, no Excalibur, no DOM, so it is unit-tested\n * on its own and the window code only calls it.\n *\n * Coordinates, as the renderer and the save use them:\n * - tile `t` spans world x `[t * TILE, (t + 1) * TILE]`;\n * - floor `f` spans world y `[-f * FLOOR, -f * FLOOR + FLOOR]`, so a floor's top\n * edge is the \"line\" `f` and its bottom edge is the line `f - 1` (floor 1 is\n * the ground, floor 0 is B1, floor -9 is B10);\n * - the camera is saved as its center: `{ tile: pos.x / TILE, floor: -pos.y / FLOOR }`.\n *\n * Map space has its origin at the top-left, x to the right and y downward, and\n * its unit is the DEVICE pixel: the window builds its layout from the canvas's\n * backing-store size (CSS size times `devicePixelRatio`), so snapping to whole\n * map pixels is snapping to whole device pixels at any ratio. `mapExtent` is\n * the whole world: the lot across, and vertically the same span the camera is\n * allowed to see (sky above the top floor, one floor of ground below the\n * deepest basement). The map draws the banded crop (`extent.ts`), which adds a\n * margin beside the lot (an extent may start left of tile 0) and is shorter, so\n * a camera can sit wholly or partly above or below it: `viewportRect` clips the\n * rectangle to the map and `viewPlacement` says which edge it passed.\n */\nimport { FLOOR, TILE } from \"../scale\";\n\n/** The map's bottom edge, as floor lines counted down from `minFloor` (the\n * lowest floor's top edge is line `minFloor`, its bottom edge `minFloor - 1`).\n * The value 2 matches the bottom clamp in `clampCameraY` (`cameraBounds.ts`,\n * `-(minFloor - 2) * floorPx`) and leaves one floor of ground under the\n * lowest floor. */\nexport const MAP_LINES_BELOW_LOWEST_FLOOR = 2;\n\n/** The world the map covers: the lot's width and its buildable floor range. */\nexport interface MapWorld {\n readonly lotWidth: number;\n readonly minFloor: number;\n readonly maxFloor: number;\n}\n\n/** What the map spans, in world units: `width` tiles across from the tile\n * `leftTile` at its left edge (below 0 when the map leaves a margin beside the\n * lot), and `topLine` and `bottomLine` are floor lines (the top edge of floor\n * `n` is line `n`). */\nexport interface MapExtent {\n readonly leftTile: number;\n readonly width: number;\n readonly topLine: number;\n readonly bottomLine: number;\n}\n\n/** A layout: the extent plus the pixels per tile and per floor, and the size in\n * pixels those scales give. */\nexport interface MapLayout {\n readonly extent: MapExtent;\n readonly pxPerTile: number;\n readonly pxPerFloor: number;\n readonly width: number;\n readonly height: number;\n}\n\n/** A rectangle in map pixels. */\nexport interface MapRect {\n readonly x: number;\n readonly y: number;\n readonly w: number;\n readonly h: number;\n}\n\n/** The camera as the renderer holds it: world-pixel center, zoom, and the\n * viewport size in screen pixels. */\nexport interface MapCamera {\n readonly posX: number;\n readonly posY: number;\n readonly zoom: number;\n readonly viewWidth: number;\n readonly viewHeight: number;\n}\n\n/** A camera center in the units the save stores. */\nexport interface MapCameraCenter {\n readonly tile: number;\n readonly floor: number;\n}\n\n/** A finite positive number, or `fallback`. */\nfunction positive(n: number, fallback: number): number {\n return Number.isFinite(n) && n > 0 ? n : fallback;\n}\n\n/** A finite number, or `fallback`. */\nfunction finite(n: number, fallback: number): number {\n return Number.isFinite(n) ? n : fallback;\n}\n\n/**\n * The extent the map spans for a world. `skyFloors` is the camera's sky\n * headroom above the top floor (`SKY_HEADROOM_FLOORS` in `cameraBounds.ts`); it\n * is a parameter so this module imports no sprite code.\n */\nexport function mapExtent(world: MapWorld, skyFloors: number): MapExtent {\n const width = positive(world.lotWidth, 1);\n const minFloor = finite(world.minFloor, 0);\n const maxFloor = Math.max(minFloor, finite(world.maxFloor, minFloor));\n const sky = Math.max(0, finite(skyFloors, 0));\n return { leftTile: 0, width, topLine: maxFloor + sky, bottomLine: minFloor - MAP_LINES_BELOW_LOWEST_FLOOR };\n}\n\n/** Floors the extent spans from top to bottom. Always at least 1. */\nexport function extentFloors(extent: MapExtent): number {\n const span = extent.topLine - extent.bottomLine;\n return Number.isFinite(span) ? Math.max(1, span) : 1;\n}\n\n/**\n * A layout that fills a box of `boxWidth` by `boxHeight` pixels exactly, with\n * the tile and floor scales set independently (the map is a schematic with its\n * own proportions). A non-finite or non-positive box falls back to 1 pixel so\n * the scales stay finite and positive.\n */\nexport function fitLayout(extent: MapExtent, boxWidth: number, boxHeight: number): MapLayout {\n const width = positive(boxWidth, 1);\n const height = positive(boxHeight, 1);\n // A hand-built extent is trusted no further than `mapExtent` would trust a\n // world: a width that is not a positive finite number reads as one tile\n // starting at tile 0 (a left edge set back for a margin would leave that one\n // tile wholly in the margin), an upside-down span reads as one floor, and a\n // left edge that is not finite reads as tile 0.\n const widthOk = Number.isFinite(extent.width) && extent.width > 0;\n const tiles = widthOk ? extent.width : 1;\n const leftTile = widthOk ? finite(extent.leftTile, 0) : 0;\n const floors = extentFloors(extent);\n return {\n extent: { leftTile, width: tiles, topLine: extent.topLine, bottomLine: extent.bottomLine },\n pxPerTile: width / tiles,\n pxPerFloor: height / floors,\n width,\n height,\n };\n}\n\n// ---- world <-> map ------------------------------------------------------\n\n/** Map x of a tile's left edge (tiles may be fractional: the camera's center is). */\nexport function tileToMapX(layout: MapLayout, tile: number): number {\n return (finite(tile, 0) - layout.extent.leftTile) * layout.pxPerTile;\n}\n\n/** Map y of a floor line: the top edge of floor `line` (a floor's bottom edge is\n * `line - 1`). */\nexport function lineToMapY(layout: MapLayout, line: number): number {\n return (layout.extent.topLine - finite(line, layout.extent.topLine)) * layout.pxPerFloor;\n}\n\n/** The tile a map x falls on, as a fractional tile (not rounded or clamped). */\nexport function mapXToTile(layout: MapLayout, x: number): number {\n return layout.extent.leftTile + finite(x, 0) / layout.pxPerTile;\n}\n\n/** The floor line a map y falls on (not rounded or clamped). */\nexport function mapYToLine(layout: MapLayout, y: number): number {\n return layout.extent.topLine - finite(y, 0) / layout.pxPerFloor;\n}\n\n/** The map rectangle of a block: `x` and `width` in tiles, `floor` its lowest\n * floor, `floors` how many floors tall it is (at least 1). */\nexport function blockRect(layout: MapLayout, x: number, width: number, floor: number, floors = 1): MapRect {\n const rows = Math.max(1, floors);\n return {\n x: tileToMapX(layout, x),\n y: lineToMapY(layout, floor + rows - 1),\n w: Math.max(0, finite(width, 0)) * layout.pxPerTile,\n h: rows * layout.pxPerFloor,\n };\n}\n\n/**\n * The map rectangle of a block, snapped to whole pixels for painting, or null\n * when the block cannot be drawn: any input is not a finite number, the width\n * or floor count is not positive, or the block lies wholly off the map.\n *\n * Both edges of each axis come from the same tile or floor line, so two blocks\n * that share an edge round it the same way and leave no seam. A block is never\n * thinner than one pixel and is clamped into the map, so a narrow shaft in the\n * last column or the bottom row still shows.\n */\nexport function snappedBlock(layout: MapLayout, x: number, width: number, floor: number, floors: number): MapRect | null {\n // One check at a time: this runs for every mark of a rebuild, and an\n // array per call would be garbage.\n if (!(Number.isFinite(x) && Number.isFinite(width) && Number.isFinite(floor) && Number.isFinite(floors)) || width <= 0 || floors < 1) return null;\n const mapW = Math.max(1, Math.floor(layout.width));\n const mapH = Math.max(1, Math.floor(layout.height));\n const rawLeft = tileToMapX(layout, x);\n const rawRight = tileToMapX(layout, x + width);\n const rawTop = lineToMapY(layout, floor + floors - 1);\n const rawBottom = lineToMapY(layout, floor - 1);\n // Off the map by the exact edges, before rounding can push a block that is\n // inside the last column or row onto the border.\n if (rawRight <= 0 || rawLeft >= layout.width || rawBottom <= 0 || rawTop >= layout.height) return null;\n const left = Math.round(rawLeft);\n const right = Math.round(rawRight);\n const top = Math.round(rawTop);\n const bottom = Math.round(rawBottom);\n const x0 = clamp(left, 0, mapW - 1);\n const y0 = clamp(top, 0, mapH - 1);\n const x1 = clamp(right, x0 + 1, mapW);\n const y1 = clamp(bottom, y0 + 1, mapH);\n return { x: x0, y: y0, w: x1 - x0, h: y1 - y0 };\n}\n\n// ---- the camera rectangle ----------------------------------------------\n\n/**\n * The visible area on the map, in map pixels, from the camera's world-pixel\n * center and the viewport. It is clipped to the map, so a camera that sees past\n * the lot edge (or past the sky) shows the part that is on the map. A\n * non-positive zoom reads as 1, as `clampCameraY` reads it.\n */\nexport function viewportRect(layout: MapLayout, cam: MapCamera): MapRect {\n const zoom = positive(cam.zoom, 1);\n const halfW = positive(cam.viewWidth, 0) / 2 / zoom;\n const halfH = positive(cam.viewHeight, 0) / 2 / zoom;\n const posX = finite(cam.posX, 0);\n const posY = finite(cam.posY, 0);\n const { extent } = layout;\n // Clip in world units, before the transforms: a tiny zoom or a huge viewport\n // can overflow the edges to Infinity, which the transforms would read as 0,\n // and a view taller than a cropped map must still cover all of it.\n const mapRight = extent.leftTile + extent.width;\n const leftTile = clamp((posX - halfW) / TILE, extent.leftTile, mapRight);\n const rightTile = clamp((posX + halfW) / TILE, extent.leftTile, mapRight);\n const topLine = clamp(-(posY - halfH) / FLOOR, extent.bottomLine, extent.topLine);\n const bottomLine = clamp(-(posY + halfH) / FLOOR, extent.bottomLine, extent.topLine);\n const x0 = clamp(tileToMapX(layout, leftTile), 0, layout.width);\n const x1 = clamp(tileToMapX(layout, rightTile), 0, layout.width);\n const y0 = clamp(lineToMapY(layout, topLine), 0, layout.height);\n const y1 = clamp(lineToMapY(layout, bottomLine), 0, layout.height);\n return { x: x0, y: y0, w: Math.max(0, x1 - x0), h: Math.max(0, y1 - y0) };\n}\n\nfunction clamp(n: number, lo: number, hi: number): number {\n return Math.max(lo, Math.min(hi, n));\n}\n\n/** Whether two rectangles are the same to within `eps` map pixels (half a\n * device pixel by default), so the window can skip a repaint when the camera\n * has not visibly moved. */\nexport function sameRect(a: MapRect | null, b: MapRect | null, eps = 0.5): boolean {\n if (a === null || b === null) return a === b;\n return Math.abs(a.x - b.x) <= eps && Math.abs(a.y - b.y) <= eps && Math.abs(a.w - b.w) <= eps && Math.abs(a.h - b.h) <= eps;\n}\n\n// ---- map -> camera ------------------------------------------------------\n\n/**\n * The camera center for a point on the map, in the units `setCamera` and the\n * save use. The point is clamped onto the map first, so a click or drag that\n * leaves the map edge aims at the edge. A point in the margin beside the lot\n * returns a tile in the margin (below 0, or past the lot's width). The\n * renderer's own clamp still applies when the camera moves, and may keep the\n * center further in than the point asks for: the camera cannot show past the\n * sky or the ground, and `clamp` in `towerInputCamera.ts` holds its center\n * between tile 0 and the lot's width, so a center asked for in the margin\n * lands on the lot's nearer edge.\n */\nexport function mapPointToCenter(layout: MapLayout, mx: number, my: number): MapCameraCenter {\n // NaN has no side to aim at and reads as the map's center; an infinite value\n // clamps onto the edge it points to.\n const x = Number.isNaN(mx) ? layout.width / 2 : clamp(mx, 0, layout.width);\n const y = Number.isNaN(my) ? layout.height / 2 : clamp(my, 0, layout.height);\n return { tile: mapXToTile(layout, x), floor: mapYToLine(layout, y) };\n}\n\n/**\n * The camera center while the viewport rectangle is dragged. `start` is the\n * camera's center when the drag began (the real camera; the rectangle is\n * clipped to the map), `grab` is where on the map the pointer went\n * down. The center moves by the pointer's travel since then, so the rectangle\n * does not jump to the pointer when the drag starts. The result is kept on the\n * map, except that a start outside it (a camera above the crop) is never\n * pulled in or pushed further out by the drag: it moves only by the travel back\n * toward the map. A non-finite grab or pointer reads as \"no travel\" on that axis.\n *\n * The renderer clamps the camera after each move, so at a clamp edge the\n * rectangle can stop short of the pointer. The caller reads the camera again\n * for each move instead of accumulating from `start` forever if it wants the\n * rectangle to follow the pointer back off the edge.\n */\nexport function dragCenter(\n layout: MapLayout,\n start: MapCameraCenter,\n grab: { readonly x: number; readonly y: number },\n pointer: { readonly x: number; readonly y: number },\n): MapCameraCenter {\n const dx = Number.isFinite(grab.x) && Number.isFinite(pointer.x) ? pointer.x - grab.x : 0;\n const dy = Number.isFinite(grab.y) && Number.isFinite(pointer.y) ? pointer.y - grab.y : 0;\n const { extent } = layout;\n const tile0 = finite(start.tile, 0);\n const floor0 = finite(start.floor, extent.topLine);\n // A start already past an edge (a camera in the sky above the crop) stays\n // where it is: the result may not go further out than the start, and is not\n // pulled onto the map by a move along the other axis.\n return {\n tile: clamp(tile0 + dx / layout.pxPerTile, Math.min(extent.leftTile, tile0), Math.max(extent.leftTile + extent.width, tile0)),\n floor: clamp(floor0 - dy / layout.pxPerFloor, Math.min(extent.bottomLine, floor0), Math.max(extent.topLine, floor0)),\n };\n}\n\n/** Whether a map point lies inside a rectangle (edges included). An empty\n * rectangle (no width or no height) contains nothing; the caller widens a\n * small rectangle for touch before asking. */\nexport function rectContains(rect: MapRect, x: number, y: number): boolean {\n if (!(rect.w > 0) || !(rect.h > 0)) return false;\n return x >= rect.x && x <= rect.x + rect.w && y >= rect.y && y <= rect.y + rect.h;\n}\n"],"names":[],"mappings":";;AAAA;;;;;;;;;;;;;;;;;;;;;;;AAuBG;AAGH;;;;AAIoB;AACb,M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 * The overview MAP window's Traffic and Occupancy views (#343 S9, #1727):
3
+ * each floor paints over the Edit map in the color of its band, from the
4
+ * engine's congestion or occupancy (`floorHeatmap`, the cells the sidebar's
5
+ * Floor heatmap drew over the main view before the Map took it over). The
6
+ * engine decides every severity, 0 good to 1 bad; this file only sorts each
7
+ * floor into one of three bands, places it and paints it.
8
+ *
9
+ * The bands split the severity in thirds, the way the old tint's ramp did
10
+ * (green, amber at two thirds, red). On the Traffic view two thirds is where
11
+ * the engine puts its churn point, the congestion where tenants start to
12
+ * leave (`CONGESTION_AMBER_SEVERITY`), so a "Jammed" floor is one past it.
13
+ * Color is not the only cue: the bands differ in pattern too, a floor row big
14
+ * enough to carry a pattern gets it, and the legend counts the floors in
15
+ * words. Both game modes use the same look.
16
+ *
17
+ * The cells are read once per game hour, on a change of the tower's revision
18
+ * (a build or a removal), and on the Traffic view on a change of the meal
19
+ * overlay's revision too, the triggers the old tint used (`OverviewMapViews`
20
+ * holds them). `HeatMarks.take` copies a read (one pass over the cells) and
21
+ * `HeatMarks.place` finds the rectangles (one pass over the kept floors).
22
+ */
23
+ import type { HeatCell, HeatmapMode } from "../../shared/engineTypes";
24
+ import { type MapLayout, type MapRect } from "./geometry";
25
+ import { type MapPaintContext, type PatternSource } from "./paint";
26
+ import type { MapKindStyle } from "./style";
27
+ /** The views this file paints. */
28
+ export type HeatViewId = "traffic" | "occupancy";
29
+ /** The engine's heat mode each view paints. */
30
+ export declare const HEAT_MODE_OF_VIEW: Readonly<Record<HeatViewId, HeatmapMode>>;
31
+ /** A floor's band: good, middling or bad. */
32
+ export type HeatBand = "good" | "middling" | "bad";
33
+ /** The severity a floor reads as middling from, and as bad from. On the
34
+ * Traffic view the bad line is the engine's churn point. */
35
+ export declare const HEAT_MIDDLING_FROM: number;
36
+ export declare const HEAT_BAD_FROM: number;
37
+ /** A cell's band. A severity that is not a number reads good, as the old
38
+ * tint's ramp read it. */
39
+ export declare function heatBand(severity: number): HeatBand;
40
+ /** How each band paints, the same in both views: green, amber and red, as
41
+ * the old tint's ramp, each with its own pattern and at least 3:1 against
42
+ * the Map's sky and ground, since a floor's row runs to the tower's edge. */
43
+ export declare const HEAT_VIEW_STYLE: Readonly<Record<HeatBand, MapKindStyle>>;
44
+ /** One legend entry: its label and the band it counts. */
45
+ export interface HeatLegendEntry {
46
+ readonly label: string;
47
+ readonly band: HeatBand;
48
+ readonly style: MapKindStyle;
49
+ }
50
+ /** The Traffic legend, clearest first. It counts floors. */
51
+ export declare const TRAFFIC_LEGEND: ReadonlyArray<HeatLegendEntry>;
52
+ /** The Occupancy legend, fullest first. It counts floors with rooms that
53
+ * take tenants or guests. */
54
+ export declare const OCCUPANCY_LEGEND: ReadonlyArray<HeatLegendEntry>;
55
+ /** The cell fields the views read. */
56
+ export type HeatCellView = Pick<HeatCell, "floor" | "minX" | "maxX" | "severity">;
57
+ /** The floors of the last read with their bands, and where each sits on the
58
+ * map. The rectangles are found again when the layout changes. */
59
+ export declare class HeatMarks {
60
+ private floors;
61
+ private lefts;
62
+ private rights;
63
+ private bands;
64
+ /** Placed floors: their rectangles and their bands, in the read's order. */
65
+ private rects;
66
+ private placedBands;
67
+ private readonly count;
68
+ /** Keep a read's cells (one pass over them). True when what they show
69
+ * differs from the cells kept before, so a read that found nothing new
70
+ * needs no repaint. */
71
+ take(cells: ReadonlyArray<HeatCellView>): boolean;
72
+ /** Place the kept floors on `layout` and count them by band. One pass over
73
+ * the kept floors; a floor off the map is left out. */
74
+ place(layout: MapLayout): void;
75
+ /** How many placed floors are in `band`. */
76
+ floorsIn(band: HeatBand): number;
77
+ /** How many floors are placed on the map. */
78
+ get size(): number;
79
+ /** The placed floor's band at `i`. */
80
+ bandAt(i: number): HeatBand;
81
+ /** The placed floor's rectangle at `i`. */
82
+ rectAt(i: number): MapRect;
83
+ /** Forget the floors (the window closed or another view is shown). */
84
+ clear(): void;
85
+ }
86
+ /**
87
+ * Paint the placed floors over the tower layer in their bands' styles. A row
88
+ * too small for a pattern paints plain. Returns how many `fillRect` calls it
89
+ * took.
90
+ */
91
+ export declare function paintHeatMarks(ctx: MapPaintContext, marks: HeatMarks, patterns: PatternSource): number;
@@ -0,0 +1,143 @@
1
+ import { snappedBlock } from './geometry.js';
2
+ import { MIN_PATTERN_SIDE } from './paint.js';
3
+
4
+ /** The engine's heat mode each view paints. */
5
+ const HEAT_MODE_OF_VIEW = {
6
+ traffic: "congestion",
7
+ occupancy: "occupancy",
8
+ };
9
+ /** The severity a floor reads as middling from, and as bad from. On the
10
+ * Traffic view the bad line is the engine's churn point. */
11
+ const HEAT_MIDDLING_FROM = 1 / 3;
12
+ const HEAT_BAD_FROM = 2 / 3;
13
+ /** A cell's band. A severity that is not a number reads good, as the old
14
+ * tint's ramp read it. */
15
+ function heatBand(severity) {
16
+ if (severity >= HEAT_BAD_FROM)
17
+ return "bad";
18
+ if (severity >= HEAT_MIDDLING_FROM)
19
+ return "middling";
20
+ return "good";
21
+ }
22
+ /** How each band paints, the same in both views: green, amber and red, as
23
+ * the old tint's ramp, each with its own pattern and at least 3:1 against
24
+ * the Map's sky and ground, since a floor's row runs to the tower's edge. */
25
+ const HEAT_VIEW_STYLE = {
26
+ good: { fill: "#2f8f46", pattern: "solid" },
27
+ middling: { fill: "#c27c12", pattern: "diagonal" },
28
+ bad: { fill: "#d23c3c", pattern: "grid" },
29
+ };
30
+ function entry(label, band) {
31
+ return { label, band, style: HEAT_VIEW_STYLE[band] };
32
+ }
33
+ /** The Traffic legend, clearest first. It counts floors. */
34
+ const TRAFFIC_LEGEND = [entry("Clear", "good"), entry("Busy", "middling"), entry("Jammed", "bad")];
35
+ /** The Occupancy legend, fullest first. It counts floors with rooms that
36
+ * take tenants or guests. */
37
+ const OCCUPANCY_LEGEND = [entry("Mostly full", "good"), entry("Half full", "middling"), entry("Mostly empty", "bad")];
38
+ /** The floors of the last read with their bands, and where each sits on the
39
+ * map. The rectangles are found again when the layout changes. */
40
+ class HeatMarks {
41
+ constructor() {
42
+ this.floors = [];
43
+ this.lefts = [];
44
+ this.rights = [];
45
+ this.bands = [];
46
+ /** Placed floors: their rectangles and their bands, in the read's order. */
47
+ this.rects = [];
48
+ this.placedBands = [];
49
+ this.count = { good: 0, middling: 0, bad: 0 };
50
+ }
51
+ /** Keep a read's cells (one pass over them). True when what they show
52
+ * differs from the cells kept before, so a read that found nothing new
53
+ * needs no repaint. */
54
+ take(cells) {
55
+ const n = cells.length;
56
+ let changed = n !== this.floors.length;
57
+ if (changed) {
58
+ this.floors = new Array(n);
59
+ this.lefts = new Array(n);
60
+ this.rights = new Array(n);
61
+ this.bands = new Array(n);
62
+ }
63
+ for (let i = 0; i < n; i++) {
64
+ const cell = cells[i];
65
+ const band = heatBand(cell.severity);
66
+ if (!changed && this.floors[i] === cell.floor && this.lefts[i] === cell.minX && this.rights[i] === cell.maxX && this.bands[i] === band)
67
+ continue;
68
+ changed = true;
69
+ this.floors[i] = cell.floor;
70
+ this.lefts[i] = cell.minX;
71
+ this.rights[i] = cell.maxX;
72
+ this.bands[i] = band;
73
+ }
74
+ return changed;
75
+ }
76
+ /** Place the kept floors on `layout` and count them by band. One pass over
77
+ * the kept floors; a floor off the map is left out. */
78
+ place(layout) {
79
+ this.rects = [];
80
+ this.placedBands = [];
81
+ this.count.good = 0;
82
+ this.count.middling = 0;
83
+ this.count.bad = 0;
84
+ for (let i = 0; i < this.floors.length; i++) {
85
+ const rect = snappedBlock(layout, this.lefts[i], this.rights[i] - this.lefts[i] + 1, this.floors[i], 1);
86
+ if (!rect)
87
+ continue;
88
+ this.rects.push(rect);
89
+ this.placedBands.push(this.bands[i]);
90
+ this.count[this.bands[i]]++;
91
+ }
92
+ }
93
+ /** How many placed floors are in `band`. */
94
+ floorsIn(band) {
95
+ return this.count[band];
96
+ }
97
+ /** How many floors are placed on the map. */
98
+ get size() {
99
+ return this.rects.length;
100
+ }
101
+ /** The placed floor's band at `i`. */
102
+ bandAt(i) {
103
+ return this.placedBands[i];
104
+ }
105
+ /** The placed floor's rectangle at `i`. */
106
+ rectAt(i) {
107
+ return this.rects[i];
108
+ }
109
+ /** Forget the floors (the window closed or another view is shown). */
110
+ clear() {
111
+ this.take([]);
112
+ this.rects = [];
113
+ this.placedBands = [];
114
+ this.count.good = 0;
115
+ this.count.middling = 0;
116
+ this.count.bad = 0;
117
+ }
118
+ }
119
+ /**
120
+ * Paint the placed floors over the tower layer in their bands' styles. A row
121
+ * too small for a pattern paints plain. Returns how many `fillRect` calls it
122
+ * took.
123
+ */
124
+ function paintHeatMarks(ctx, marks, patterns) {
125
+ let fills = 0;
126
+ let last = null;
127
+ for (let i = 0; i < marks.size; i++) {
128
+ const style = HEAT_VIEW_STYLE[marks.bandAt(i)];
129
+ const rect = marks.rectAt(i);
130
+ const small = rect.w < MIN_PATTERN_SIDE || rect.h < MIN_PATTERN_SIDE;
131
+ const fill = patterns.get(style.fill, small ? "solid" : style.pattern);
132
+ if (fill !== last) {
133
+ ctx.fillStyle = fill;
134
+ last = fill;
135
+ }
136
+ ctx.fillRect(rect.x, rect.y, rect.w, rect.h);
137
+ fills++;
138
+ }
139
+ return fills;
140
+ }
141
+
142
+ export { HEAT_BAD_FROM, HEAT_MIDDLING_FROM, HEAT_MODE_OF_VIEW, HEAT_VIEW_STYLE, HeatMarks, OCCUPANCY_LEGEND, TRAFFIC_LEGEND, heatBand, paintHeatMarks };
143
+ //# sourceMappingURL=heatView.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"heatView.js","sources":["../../../src/render/overviewMap/heatView.ts"],"sourcesContent":["/**\n * The overview MAP window's Traffic and Occupancy views (#343 S9, #1727):\n * each floor paints over the Edit map in the color of its band, from the\n * engine's congestion or occupancy (`floorHeatmap`, the cells the sidebar's\n * Floor heatmap drew over the main view before the Map took it over). The\n * engine decides every severity, 0 good to 1 bad; this file only sorts each\n * floor into one of three bands, places it and paints it.\n *\n * The bands split the severity in thirds, the way the old tint's ramp did\n * (green, amber at two thirds, red). On the Traffic view two thirds is where\n * the engine puts its churn point, the congestion where tenants start to\n * leave (`CONGESTION_AMBER_SEVERITY`), so a \"Jammed\" floor is one past it.\n * Color is not the only cue: the bands differ in pattern too, a floor row big\n * enough to carry a pattern gets it, and the legend counts the floors in\n * words. Both game modes use the same look.\n *\n * The cells are read once per game hour, on a change of the tower's revision\n * (a build or a removal), and on the Traffic view on a change of the meal\n * overlay's revision too, the triggers the old tint used (`OverviewMapViews`\n * holds them). `HeatMarks.take` copies a read (one pass over the cells) and\n * `HeatMarks.place` finds the rectangles (one pass over the kept floors).\n */\nimport type { HeatCell, HeatmapMode } from \"../../shared/engineTypes\";\nimport { snappedBlock, type MapLayout, type MapRect } from \"./geometry\";\nimport { MIN_PATTERN_SIDE, type MapPaintContext, type PatternSource } from \"./paint\";\nimport type { MapKindStyle } from \"./style\";\n\n/** The views this file paints. */\nexport type HeatViewId = \"traffic\" | \"occupancy\";\n\n/** The engine's heat mode each view paints. */\nexport const HEAT_MODE_OF_VIEW: Readonly<Record<HeatViewId, HeatmapMode>> = {\n traffic: \"congestion\",\n occupancy: \"occupancy\",\n};\n\n/** A floor's band: good, middling or bad. */\nexport type HeatBand = \"good\" | \"middling\" | \"bad\";\n\n/** The severity a floor reads as middling from, and as bad from. On the\n * Traffic view the bad line is the engine's churn point. */\nexport const HEAT_MIDDLING_FROM = 1 / 3;\nexport const HEAT_BAD_FROM = 2 / 3;\n\n/** A cell's band. A severity that is not a number reads good, as the old\n * tint's ramp read it. */\nexport function heatBand(severity: number): HeatBand {\n if (severity >= HEAT_BAD_FROM) return \"bad\";\n if (severity >= HEAT_MIDDLING_FROM) return \"middling\";\n return \"good\";\n}\n\n/** How each band paints, the same in both views: green, amber and red, as\n * the old tint's ramp, each with its own pattern and at least 3:1 against\n * the Map's sky and ground, since a floor's row runs to the tower's edge. */\nexport const HEAT_VIEW_STYLE: Readonly<Record<HeatBand, MapKindStyle>> = {\n good: { fill: \"#2f8f46\", pattern: \"solid\" },\n middling: { fill: \"#c27c12\", pattern: \"diagonal\" },\n bad: { fill: \"#d23c3c\", pattern: \"grid\" },\n};\n\n/** One legend entry: its label and the band it counts. */\nexport interface HeatLegendEntry {\n readonly label: string;\n readonly band: HeatBand;\n readonly style: MapKindStyle;\n}\n\nfunction entry(label: string, band: HeatBand): HeatLegendEntry {\n return { label, band, style: HEAT_VIEW_STYLE[band] };\n}\n\n/** The Traffic legend, clearest first. It counts floors. */\nexport const TRAFFIC_LEGEND: ReadonlyArray<HeatLegendEntry> = [entry(\"Clear\", \"good\"), entry(\"Busy\", \"middling\"), entry(\"Jammed\", \"bad\")];\n\n/** The Occupancy legend, fullest first. It counts floors with rooms that\n * take tenants or guests. */\nexport const OCCUPANCY_LEGEND: ReadonlyArray<HeatLegendEntry> = [entry(\"Mostly full\", \"good\"), entry(\"Half full\", \"middling\"), entry(\"Mostly empty\", \"bad\")];\n\n/** The cell fields the views read. */\nexport type HeatCellView = Pick<HeatCell, \"floor\" | \"minX\" | \"maxX\" | \"severity\">;\n\n/** The floors of the last read with their bands, and where each sits on the\n * map. The rectangles are found again when the layout changes. */\nexport class HeatMarks {\n private floors: number[] = [];\n private lefts: number[] = [];\n private rights: number[] = [];\n private bands: HeatBand[] = [];\n /** Placed floors: their rectangles and their bands, in the read's order. */\n private rects: MapRect[] = [];\n private placedBands: HeatBand[] = [];\n private readonly count: Record<HeatBand, number> = { good: 0, middling: 0, bad: 0 };\n\n /** Keep a read's cells (one pass over them). True when what they show\n * differs from the cells kept before, so a read that found nothing new\n * needs no repaint. */\n take(cells: ReadonlyArray<HeatCellView>): boolean {\n const n = cells.length;\n let changed = n !== this.floors.length;\n if (changed) {\n this.floors = new Array<number>(n);\n this.lefts = new Array<number>(n);\n this.rights = new Array<number>(n);\n this.bands = new Array<HeatBand>(n);\n }\n for (let i = 0; i < n; i++) {\n const cell = cells[i];\n const band = heatBand(cell.severity);\n if (!changed && this.floors[i] === cell.floor && this.lefts[i] === cell.minX && this.rights[i] === cell.maxX && this.bands[i] === band) continue;\n changed = true;\n this.floors[i] = cell.floor;\n this.lefts[i] = cell.minX;\n this.rights[i] = cell.maxX;\n this.bands[i] = band;\n }\n return changed;\n }\n\n /** Place the kept floors on `layout` and count them by band. One pass over\n * the kept floors; a floor off the map is left out. */\n place(layout: MapLayout): void {\n this.rects = [];\n this.placedBands = [];\n this.count.good = 0;\n this.count.middling = 0;\n this.count.bad = 0;\n for (let i = 0; i < this.floors.length; i++) {\n const rect = snappedBlock(layout, this.lefts[i], this.rights[i] - this.lefts[i] + 1, this.floors[i], 1);\n if (!rect) continue;\n this.rects.push(rect);\n this.placedBands.push(this.bands[i]);\n this.count[this.bands[i]]++;\n }\n }\n\n /** How many placed floors are in `band`. */\n floorsIn(band: HeatBand): number {\n return this.count[band];\n }\n\n /** How many floors are placed on the map. */\n get size(): number {\n return this.rects.length;\n }\n\n /** The placed floor's band at `i`. */\n bandAt(i: number): HeatBand {\n return this.placedBands[i];\n }\n\n /** The placed floor's rectangle at `i`. */\n rectAt(i: number): MapRect {\n return this.rects[i];\n }\n\n /** Forget the floors (the window closed or another view is shown). */\n clear(): void {\n this.take([]);\n this.rects = [];\n this.placedBands = [];\n this.count.good = 0;\n this.count.middling = 0;\n this.count.bad = 0;\n }\n}\n\n/**\n * Paint the placed floors over the tower layer in their bands' styles. A row\n * too small for a pattern paints plain. Returns how many `fillRect` calls it\n * took.\n */\nexport function paintHeatMarks(ctx: MapPaintContext, marks: HeatMarks, patterns: PatternSource): number {\n let fills = 0;\n let last: string | CanvasPattern | null = null;\n for (let i = 0; i < marks.size; i++) {\n const style = HEAT_VIEW_STYLE[marks.bandAt(i)];\n const rect = marks.rectAt(i);\n const small = rect.w < MIN_PATTERN_SIDE || rect.h < MIN_PATTERN_SIDE;\n const fill = patterns.get(style.fill, small ? \"solid\" : style.pattern);\n if (fill !== last) {\n ctx.fillStyle = fill;\n last = fill;\n }\n ctx.fillRect(rect.x, rect.y, rect.w, rect.h);\n fills++;\n }\n return fills;\n}\n"],"names":[],"mappings":";;;AA8BA;AACO,MAAM,iBAAiB,GAA8C;AAC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AO,GAAG,KAAK,CAAC,OAAO,CAAC;AACtE,QAAA,IAAI,IAAI,KAAK,IAAI,EAAE;AACjB,YAAA,GAAG,CAAC,SAAS,GAAG,IAAI;YACpB,IAAI,GAAG,IAAI;QACb;AACA,QAAA,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC;AAC5C,QAAA,KAAK,EAAE;IACT;AACA,IAAA,OAAO,KAAK;AACd;;"}
@@ -0,0 +1,82 @@
1
+ /**
2
+ * The overview MAP window's Hotel view (#343 S6, #1617): hotel rooms that need
3
+ * housekeeping paint in red over the Edit map, as the original's Hotel tab
4
+ * marks its dirty rooms. Everything else stays as the Edit view draws it.
5
+ *
6
+ * A room's state moves without a revision change, so the window cannot key
7
+ * this on the draw list. Instead the hotel rooms and their rectangles are
8
+ * collected once per rebuild (`buildHotelMarks`, one pass over the rooms, the
9
+ * per-command tier), and `HotelWatch.check` reads their states again once per
10
+ * game hour (one pass over the hotel rooms, the per-hour tier). Nothing here
11
+ * runs on a frame where neither happened.
12
+ *
13
+ * Both game modes tell dirty from infested by lightness and by pattern, in the
14
+ * Map's one look (owner, 2026-11-04). Color is not the only cue: each red is
15
+ * dark enough to stand 3:1 against the hotel colors it covers, a room big
16
+ * enough to carry a pattern gets a hatch, and the legend counts the rooms in
17
+ * words.
18
+ */
19
+ import type { FacilityKind, UnitState } from "../../shared/types";
20
+ import type { UnitView } from "../../simport/view";
21
+ import { type MapLayout, type MapRect } from "./geometry";
22
+ import { type MapPaintContext, type PatternSource } from "./paint";
23
+ import { type MapKindStyle } from "./style";
24
+ /** Why a hotel room shows in the Hotel view. */
25
+ export type HousekeepingNeed = "dirty" | "infested";
26
+ /** What a room's state asks of housekeeping, or null for a room that is fine. */
27
+ export declare function housekeepingNeed(state: UnitState): HousekeepingNeed | null;
28
+ /** Whether a kind is a hotel room (the style table's `hotels` group). */
29
+ export declare function isHotelKind(kind: FacilityKind): boolean;
30
+ /** How the Hotel view paints each need: two reds a step apart in lightness,
31
+ * each with its own pattern. */
32
+ export declare const HOTEL_VIEW_STYLE: Readonly<Record<HousekeepingNeed, MapKindStyle>>;
33
+ /** The Hotel view's legend entries, in order, one per need. Each lists the
34
+ * needs it counts. */
35
+ export declare const HOTEL_LEGEND: ReadonlyArray<{
36
+ readonly label: string;
37
+ readonly style: MapKindStyle;
38
+ readonly needs: ReadonlyArray<HousekeepingNeed>;
39
+ }>;
40
+ /** The room fields the Hotel view reads. `state` is read live each hour. */
41
+ export type HotelRoom = Pick<UnitView, "kind" | "floor" | "x" | "width" | "state">;
42
+ /** A hotel room and where it sits on the map. */
43
+ export interface HotelRoomMark {
44
+ readonly room: Pick<HotelRoom, "state">;
45
+ readonly rect: MapRect;
46
+ }
47
+ /** Every hotel room that can be drawn on `layout`, with its rectangle, in the
48
+ * rooms' order. One pass over the rooms; call it when the draw list rebuilds. */
49
+ export declare function buildHotelMarks(layout: MapLayout, rooms: ReadonlyArray<HotelRoom>, floorsOf: (kind: FacilityKind) => number): HotelRoomMark[];
50
+ /**
51
+ * The hotel rooms the Hotel view watches, with the state each had when last
52
+ * read. `check` reads them all again and says whether any changed, so the
53
+ * window repaints only then; the counts feed the legend.
54
+ */
55
+ export declare class HotelWatch {
56
+ private marks;
57
+ private seen;
58
+ private pending;
59
+ private readonly count;
60
+ /** Watch a new set of rooms. The next `check` reads them and answers true. */
61
+ watch(marks: ReadonlyArray<HotelRoomMark>): void;
62
+ /** Read every watched room's state again. True when what the view shows
63
+ * changed since the last call (or the rooms are new). One pass over the
64
+ * hotel rooms. */
65
+ check(): boolean;
66
+ /** How many rooms showed each need at the last `check`. */
67
+ rooms(need: HousekeepingNeed): number;
68
+ /** How many rooms are watched. */
69
+ get size(): number;
70
+ /** The watched room at `i`, in the rooms' order. */
71
+ markAt(i: number): HotelRoomMark;
72
+ /** What the room at `i` showed at the last `check`: its need, or null. */
73
+ needAt(i: number): HousekeepingNeed | null;
74
+ /** Forget the rooms (the window closed or the view changed). */
75
+ clear(): void;
76
+ }
77
+ /**
78
+ * Paint the rooms the watch last found needing housekeeping over the tower
79
+ * layer, in the view's style. A room too small for a pattern paints
80
+ * plain. Returns how many `fillRect` calls it took.
81
+ */
82
+ export declare function paintHotelMarks(ctx: MapPaintContext, watch: HotelWatch, patterns: PatternSource): number;