@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,44 @@
1
+ /**
2
+ * Lobby halls (#308, #2068): the engine's `lobbyHeights()` quads as the
3
+ * renderer reads them. A hall is a row of lobby tiles of one height on one
4
+ * floor. Each tall hall is one `[floor, x0, x1, height]` run, `x1` its last
5
+ * column; a one-story hall is in none. In Modern two halls of different
6
+ * heights can sit side by side, and the wall between them carries a
7
+ * revolving door, at the column where the right-hand hall starts.
8
+ */
9
+ /** One lobby hall taller than one story: `x1` is its last column. */
10
+ export interface HallRun {
11
+ readonly floor: number;
12
+ readonly x0: number;
13
+ readonly x1: number;
14
+ readonly height: number;
15
+ }
16
+ /** Where two lobby halls of different heights meet on a floor. */
17
+ export interface HallDoor {
18
+ readonly floor: number;
19
+ /** The first column of the right-hand hall: the wall stands on its left edge. */
20
+ readonly x: number;
21
+ /** The taller hall's height, which the wall rises to. */
22
+ readonly tall: number;
23
+ /** The shorter hall's height, where its ceiling meets the wall. */
24
+ readonly short: number;
25
+ /** Whether the taller hall is the left-hand one. */
26
+ readonly tallOnLeft: boolean;
27
+ }
28
+ /** The lobby halls taller than one story, read once per structure pass. */
29
+ export interface LobbyHalls {
30
+ readonly runs: readonly HallRun[];
31
+ /** The height in stories of the lobby laid on `floor` at column `x`, or 1
32
+ * where no tall hall covers it. */
33
+ heightAt(floor: number, x: number): number;
34
+ }
35
+ /** No tall hall anywhere. */
36
+ export declare const NO_TALL_HALLS: LobbyHalls;
37
+ /** The port's flat `[floor, x0, x1, height, ...]` quads as halls. A floor
38
+ * holds a few runs at most, so `heightAt` walks that floor's list. */
39
+ export declare function lobbyHalls(quads: ArrayLike<number>): LobbyHalls;
40
+ /** Every wall between two lobby halls of different heights, given the
41
+ * floors' lobby columns (`lobbyAt`) and the halls. Only a tall hall's ends
42
+ * can meet a hall of another height, so this looks at each run's two ends
43
+ * alone. Sorted by floor and column, each wall once. */
44
+ export declare function hallDoors(halls: LobbyHalls, lobbyAt: (floor: number, x: number) => boolean): HallDoor[];
@@ -0,0 +1,63 @@
1
+ /**
2
+ * Lobby halls (#308, #2068): the engine's `lobbyHeights()` quads as the
3
+ * renderer reads them. A hall is a row of lobby tiles of one height on one
4
+ * floor. Each tall hall is one `[floor, x0, x1, height]` run, `x1` its last
5
+ * column; a one-story hall is in none. In Modern two halls of different
6
+ * heights can sit side by side, and the wall between them carries a
7
+ * revolving door, at the column where the right-hand hall starts.
8
+ */
9
+ /** No tall hall anywhere. */
10
+ const NO_TALL_HALLS = { runs: [], heightAt: () => 1 };
11
+ /** The port's flat `[floor, x0, x1, height, ...]` quads as halls. A floor
12
+ * holds a few runs at most, so `heightAt` walks that floor's list. */
13
+ function lobbyHalls(quads) {
14
+ const runs = [];
15
+ const byFloor = new Map();
16
+ for (let i = 0; i + 3 < quads.length; i += 4) {
17
+ const run = { floor: quads[i], x0: quads[i + 1], x1: quads[i + 2], height: quads[i + 3] };
18
+ runs.push(run);
19
+ const list = byFloor.get(run.floor);
20
+ if (list)
21
+ list.push(run);
22
+ else
23
+ byFloor.set(run.floor, [run]);
24
+ }
25
+ if (runs.length === 0)
26
+ return NO_TALL_HALLS;
27
+ return {
28
+ runs,
29
+ heightAt(floor, x) {
30
+ const list = byFloor.get(floor);
31
+ if (!list)
32
+ return 1;
33
+ for (const r of list)
34
+ if (r.x0 <= x && x <= r.x1)
35
+ return r.height;
36
+ return 1;
37
+ },
38
+ };
39
+ }
40
+ /** Every wall between two lobby halls of different heights, given the
41
+ * floors' lobby columns (`lobbyAt`) and the halls. Only a tall hall's ends
42
+ * can meet a hall of another height, so this looks at each run's two ends
43
+ * alone. Sorted by floor and column, each wall once. */
44
+ function hallDoors(halls, lobbyAt) {
45
+ const doors = new Map();
46
+ const meet = (floor, left) => {
47
+ const right = left + 1;
48
+ if (!lobbyAt(floor, left) || !lobbyAt(floor, right))
49
+ return;
50
+ const a = halls.heightAt(floor, left);
51
+ const b = halls.heightAt(floor, right);
52
+ if (a !== b)
53
+ doors.set(`${floor}:${right}`, { floor, x: right, tall: Math.max(a, b), short: Math.min(a, b), tallOnLeft: a > b });
54
+ };
55
+ for (const r of halls.runs) {
56
+ meet(r.floor, r.x0 - 1);
57
+ meet(r.floor, r.x1);
58
+ }
59
+ return [...doors.values()].sort((p, q) => p.floor - q.floor || p.x - q.x);
60
+ }
61
+
62
+ export { NO_TALL_HALLS, hallDoors, lobbyHalls };
63
+ //# sourceMappingURL=lobbyHalls.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lobbyHalls.js","sources":["../../src/render/lobbyHalls.ts"],"sourcesContent":["/**\n * Lobby halls (#308, #2068): the engine's `lobbyHeights()` quads as the\n * renderer reads them. A hall is a row of lobby tiles of one height on one\n * floor. Each tall hall is one `[floor, x0, x1, height]` run, `x1` its last\n * column; a one-story hall is in none. In Modern two halls of different\n * heights can sit side by side, and the wall between them carries a\n * revolving door, at the column where the right-hand hall starts.\n */\n\n/** One lobby hall taller than one story: `x1` is its last column. */\nexport interface HallRun {\n readonly floor: number;\n readonly x0: number;\n readonly x1: number;\n readonly height: number;\n}\n\n/** Where two lobby halls of different heights meet on a floor. */\nexport interface HallDoor {\n readonly floor: number;\n /** The first column of the right-hand hall: the wall stands on its left edge. */\n readonly x: number;\n /** The taller hall's height, which the wall rises to. */\n readonly tall: number;\n /** The shorter hall's height, where its ceiling meets the wall. */\n readonly short: number;\n /** Whether the taller hall is the left-hand one. */\n readonly tallOnLeft: boolean;\n}\n\n/** The lobby halls taller than one story, read once per structure pass. */\nexport interface LobbyHalls {\n readonly runs: readonly HallRun[];\n /** The height in stories of the lobby laid on `floor` at column `x`, or 1\n * where no tall hall covers it. */\n heightAt(floor: number, x: number): number;\n}\n\n/** No tall hall anywhere. */\nexport const NO_TALL_HALLS: LobbyHalls = { runs: [], heightAt: () => 1 };\n\n/** The port's flat `[floor, x0, x1, height, ...]` quads as halls. A floor\n * holds a few runs at most, so `heightAt` walks that floor's list. */\nexport function lobbyHalls(quads: ArrayLike<number>): LobbyHalls {\n const runs: HallRun[] = [];\n const byFloor = new Map<number, HallRun[]>();\n for (let i = 0; i + 3 < quads.length; i += 4) {\n const run = { floor: quads[i], x0: quads[i + 1], x1: quads[i + 2], height: quads[i + 3] };\n runs.push(run);\n const list = byFloor.get(run.floor);\n if (list) list.push(run);\n else byFloor.set(run.floor, [run]);\n }\n if (runs.length === 0) return NO_TALL_HALLS;\n return {\n runs,\n heightAt(floor, x) {\n const list = byFloor.get(floor);\n if (!list) return 1;\n for (const r of list) if (r.x0 <= x && x <= r.x1) return r.height;\n return 1;\n },\n };\n}\n\n/** Every wall between two lobby halls of different heights, given the\n * floors' lobby columns (`lobbyAt`) and the halls. Only a tall hall's ends\n * can meet a hall of another height, so this looks at each run's two ends\n * alone. Sorted by floor and column, each wall once. */\nexport function hallDoors(halls: LobbyHalls, lobbyAt: (floor: number, x: number) => boolean): HallDoor[] {\n const doors = new Map<string, HallDoor>();\n const meet = (floor: number, left: number) => {\n const right = left + 1;\n if (!lobbyAt(floor, left) || !lobbyAt(floor, right)) return;\n const a = halls.heightAt(floor, left);\n const b = halls.heightAt(floor, right);\n if (a !== b) doors.set(`${floor}:${right}`, { floor, x: right, tall: Math.max(a, b), short: Math.min(a, b), tallOnLeft: a > b });\n };\n for (const r of halls.runs) {\n meet(r.floor, r.x0 - 1);\n meet(r.floor, r.x1);\n }\n return [...doors.values()].sort((p, q) => p.floor - q.floor || p.x - q.x);\n}\n"],"names":[],"mappings":"AAAA;;;;;;;AAOG;AA+BH;AACO,MAAM,aAAa,GAAe,EAAE,IAAI,EAAE,EAAE,EAAE,QAAQ,EAAE,MAAM,CAAC;AAEtE;AACuE;AACjE,SAAU,UAAU,CAAC,KAAwB,EAAA;IACjD,MAAM,IAAI,GAAc,EAAE;AAC1B,IAAA,MAAM,OAAO,GAAG,IAAI,GAAG,EAAqB;AAC5C,IAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC,EAAE;AAC5C,QAAA,MAAM,GAAG,GAAG,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE;AACzF,QAAA,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC;QACd,MAAM,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC;AACnC,QAAA,IAAI,IAAI;AAAE,YAAA,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC;;YACnB,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC,GAAG,C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AAE,UAAU,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC;AAClI,IAAA,CAAC;AACD,IAAA,KAAK,MAAM,CAAC,IAAI,KAAK,CAAC,IAAI,EAAE;QAC1B,IAAI,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;QACvB,IAAI,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,EAAE,CAAC;IACrB;AACA,IAAA,OAAO,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AAC3E;;"}
@@ -0,0 +1,20 @@
1
+ import type { CatalogMetroTrain } from "../catalog/catalogTypes";
2
+ /** How long the train takes between two calls (or a tunnel mouth and a call)
3
+ * and how long it waits at each, on a line of `stops` stations. One station
4
+ * waits the timetable's full dwell; more stations share the hour, so the
5
+ * train waits less at each and is gone before the next hour's run. The
6
+ * engine works out the same (`crowd::metro_train::line_times`). */
7
+ export declare function metroLineTimes(timetable: CatalogMetroTrain, stops: number): Readonly<{
8
+ leg: number;
9
+ dwell: number;
10
+ }>;
11
+ /**
12
+ * Where the one train on a line is at `minuteOfDay`: the left edge it would
13
+ * have in a station's canvas, in the same units as `stops`, the left edges of
14
+ * the stations along the line from left to right. It comes out of the left
15
+ * tunnel into the first station, waits, runs through the tunnel to the next,
16
+ * and so on, then leaves out the right tunnel past the last. Only one station
17
+ * has the train at a time. Outside the timetable's hours, and once it has
18
+ * gone, it waits in the tunnel `span` left of the first station.
19
+ */
20
+ export declare function metroTrainAt(minuteOfDay: number, stops: readonly number[], span: number, timetable: CatalogMetroTrain): number;
@@ -0,0 +1,65 @@
1
+ /**
2
+ * Where the Metro's train is, on game time, drawn from the engine's timetable
3
+ * (the catalog's `world.metroTrain`, which riders leaving by train keep too).
4
+ * One train runs each line and calls each game hour from `firstHour` to
5
+ * `lastHour`; none runs overnight. It slides in from the left tunnel mouth,
6
+ * waits at each station in turn, then leaves out the right one. Pure, so the
7
+ * schedule is pinned without a renderer.
8
+ */
9
+ /** Each timetable's line timings by line length, worked out once. */
10
+ const lineTimes = new WeakMap();
11
+ /** How long the train takes between two calls (or a tunnel mouth and a call)
12
+ * and how long it waits at each, on a line of `stops` stations. One station
13
+ * waits the timetable's full dwell; more stations share the hour, so the
14
+ * train waits less at each and is gone before the next hour's run. The
15
+ * engine works out the same (`crowd::metro_train::line_times`). */
16
+ function metroLineTimes(timetable, stops) {
17
+ const n = Math.max(1, stops);
18
+ // Asked every frame for every station, so each line length's answer is kept.
19
+ let known = lineTimes.get(timetable);
20
+ if (!known)
21
+ lineTimes.set(timetable, (known = new Map()));
22
+ const kept = known.get(n);
23
+ if (kept)
24
+ return kept;
25
+ const { legMinutes: leg, dwellMinutes, runMinutes } = timetable;
26
+ const dwell = Math.min(dwellMinutes, Math.floor((runMinutes - leg * (n + 1)) / n));
27
+ const even = runMinutes / (2 * n + 1);
28
+ const times = Object.freeze(dwell >= 1 ? { leg, dwell } : { leg: even, dwell: even });
29
+ known.set(n, times);
30
+ return times;
31
+ }
32
+ /**
33
+ * Where the one train on a line is at `minuteOfDay`: the left edge it would
34
+ * have in a station's canvas, in the same units as `stops`, the left edges of
35
+ * the stations along the line from left to right. It comes out of the left
36
+ * tunnel into the first station, waits, runs through the tunnel to the next,
37
+ * and so on, then leaves out the right tunnel past the last. Only one station
38
+ * has the train at a time. Outside the timetable's hours, and once it has
39
+ * gone, it waits in the tunnel `span` left of the first station.
40
+ */
41
+ function metroTrainAt(minuteOfDay, stops, span, timetable) {
42
+ const first = stops[0] ?? 0;
43
+ const hour = Math.floor((((minuteOfDay % 1440) + 1440) % 1440) / 60);
44
+ if (hour < timetable.firstHour || hour > timetable.lastHour || stops.length === 0)
45
+ return first - span;
46
+ const { leg, dwell } = metroLineTimes(timetable, stops.length);
47
+ let t = ((minuteOfDay % 60) + 60) % 60;
48
+ if (t < leg)
49
+ return first - span * (1 - t / leg);
50
+ t -= leg;
51
+ for (let i = 0; i < stops.length; i++) {
52
+ const here = stops[i];
53
+ if (t < dwell)
54
+ return here;
55
+ t -= dwell;
56
+ const next = i + 1 < stops.length ? stops[i + 1] : here + span;
57
+ if (t < leg)
58
+ return here + (next - here) * (t / leg);
59
+ t -= leg;
60
+ }
61
+ return first - span;
62
+ }
63
+
64
+ export { metroLineTimes, metroTrainAt };
65
+ //# sourceMappingURL=metroTrainSchedule.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"metroTrainSchedule.js","sources":["../../src/render/metroTrainSchedule.ts"],"sourcesContent":["import type { CatalogMetroTrain } from \"../catalog/catalogTypes\";\n\n/**\n * Where the Metro's train is, on game time, drawn from the engine's timetable\n * (the catalog's `world.metroTrain`, which riders leaving by train keep too).\n * One train runs each line and calls each game hour from `firstHour` to\n * `lastHour`; none runs overnight. It slides in from the left tunnel mouth,\n * waits at each station in turn, then leaves out the right one. Pure, so the\n * schedule is pinned without a renderer.\n */\n\n/** Each timetable's line timings by line length, worked out once. */\nconst lineTimes = new WeakMap<CatalogMetroTrain, Map<number, Readonly<{ leg: number; dwell: number }>>>();\n\n/** How long the train takes between two calls (or a tunnel mouth and a call)\n * and how long it waits at each, on a line of `stops` stations. One station\n * waits the timetable's full dwell; more stations share the hour, so the\n * train waits less at each and is gone before the next hour's run. The\n * engine works out the same (`crowd::metro_train::line_times`). */\nexport function metroLineTimes(timetable: CatalogMetroTrain, stops: number): Readonly<{ leg: number; dwell: number }> {\n const n = Math.max(1, stops);\n // Asked every frame for every station, so each line length's answer is kept.\n let known = lineTimes.get(timetable);\n if (!known) lineTimes.set(timetable, (known = new Map()));\n const kept = known.get(n);\n if (kept) return kept;\n const { legMinutes: leg, dwellMinutes, runMinutes } = timetable;\n const dwell = Math.min(dwellMinutes, Math.floor((runMinutes - leg * (n + 1)) / n));\n const even = runMinutes / (2 * n + 1);\n const times = Object.freeze(dwell >= 1 ? { leg, dwell } : { leg: even, dwell: even });\n known.set(n, times);\n return times;\n}\n\n/**\n * Where the one train on a line is at `minuteOfDay`: the left edge it would\n * have in a station's canvas, in the same units as `stops`, the left edges of\n * the stations along the line from left to right. It comes out of the left\n * tunnel into the first station, waits, runs through the tunnel to the next,\n * and so on, then leaves out the right tunnel past the last. Only one station\n * has the train at a time. Outside the timetable's hours, and once it has\n * gone, it waits in the tunnel `span` left of the first station.\n */\nexport function metroTrainAt(minuteOfDay: number, stops: readonly number[], span: number, timetable: CatalogMetroTrain): number {\n const first = stops[0] ?? 0;\n const hour = Math.floor((((minuteOfDay % 1440) + 1440) % 1440) / 60);\n if (hour < timetable.firstHour || hour > timetable.lastHour || stops.length === 0) return first - span;\n const { leg, dwell } = metroLineTimes(timetable, stops.length);\n let t = ((minuteOfDay % 60) + 60) % 60;\n if (t < leg) return first - span * (1 - t / leg);\n t -= leg;\n for (let i = 0; i < stops.length; i++) {\n const here = stops[i];\n if (t < dwell) return here;\n t -= dwell;\n const next = i + 1 < stops.length ? stops[i + 1] : here + span;\n if (t < leg) return here + (next - here) * (t / leg);\n t -= leg;\n }\n return first - span;\n}\n"],"names":[],"mappings":"AAEA;;;;;;;AAOG;AAEH;AACA,MAAM,SAAS,GAAG,IAAI,OAAO,EAA4E;AAEzG;;;;AAIoE;AAC9D,SAAU,cAAc,CAAC,SAA4B,EAAE,KAAa,EAAA;IACxE,MAAM,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,CAAC;;IAE5B,IAAI,KAAK,GAAG,SAAS,CAAC,GAAG,CAAC,SAAS,CAAC;AACpC,IAAA,IAAI,CAAC,KAAK;AAAE,QAAA,SAAS,CAAC,GAAG,CAAC,SAAS,GAAG,KAAK,GAAG,IAAI,GAAG,EAAE,EAAE;IACzD,MAAM,IAAI,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC;AACzB,IAAA,IAAI,IA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,IAAI,CAAC,GAAG,GAAG;QAAE,OAAO,KAAK,GAAG,IAAI,IAAI,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC;IAChD,CAAC,IAAI,GAAG;AACR,IAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;AACrC,QAAA,MAAM,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC;QACrB,IAAI,CAAC,GAAG,KAAK;AAAE,YAAA,OAAO,IAAI;QAC1B,CAAC,IAAI,KAAK;QACV,MAAM,IAAI,GAAG,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,MAAM,GAAG,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,IAAI,GAAG,IAAI;QAC9D,IAAI,CAAC,GAAG,GAAG;AAAE,YAAA,OAAO,IAAI,GAAG,CAAC,IAAI,GAAG,IAAI,KAAK,CAAC,GAAG,GAAG,CAAC;QACpD,CAAC,IAAI,GAAG;IACV;IACA,OAAO,KAAK,GAAG,IAAI;AACrB;;"}
@@ -0,0 +1,67 @@
1
+ /**
2
+ * The overview MAP window's draw list (#343): every mark the tower layer shows,
3
+ * as a kind and a rectangle in map pixels. A pure function of the view and a
4
+ * layout, so the window rebuilds it only when the identity of `rooms`,
5
+ * `structure` or `transports` or the layout changes (not on `tower.revision`
6
+ * alone, since a host can repeat a revision, #1296), and the list is
7
+ * unit-tested without a canvas.
8
+ *
9
+ * The list is as long as the tower has structure runs, rooms and shafts (about
10
+ * 3,000 marks for the large perf fixture's 43,000 units), because the view
11
+ * already joins floor and lobby tiles into runs. A lobby hall taller than one
12
+ * story (#308, #2068) adds one lobby mark that covers its raised stories, so
13
+ * the map shows the hall at its full height as the tower view draws it.
14
+ *
15
+ * Painting order is the list's order: structure first, then rooms over it, then
16
+ * shafts and stairs over both. The unit of a rectangle is the map's device pixel
17
+ * (see `geometry.ts`).
18
+ */
19
+ import type { FacilityKind } from "../../shared/types";
20
+ import type { StructureRunView, TransportView, UnitView } from "../../simport/view";
21
+ import type { HallRun } from "../lobbyHalls";
22
+ import type { FloorSpans } from "./floorSpans";
23
+ import { type MapLayout, type MapRect } from "./geometry";
24
+ /** Which painting layer a mark belongs to. */
25
+ export type MapLayer = "structure" | "room" | "transport";
26
+ export interface MapMark {
27
+ readonly layer: MapLayer;
28
+ readonly kind: FacilityKind;
29
+ /** In map (device) pixels, snapped to whole pixels, inside the map. */
30
+ readonly rect: MapRect;
31
+ }
32
+ /** What the draw list reads from the view. `floorsOf` is the kind's height in
33
+ * floors, read from the engine's catalog by the caller through
34
+ * `findViewKind(kind)?.floors` in `src/presentation/viewKinds.ts` (the map
35
+ * holds no facility table of its own). It is asked once per kind per build.
36
+ * `tallLobbies` is the engine's lobby halls taller than one story
37
+ * (`RenderTower.tallLobbies().runs`), asked once per build. */
38
+ export interface MapSource {
39
+ readonly structure: ReadonlyArray<Pick<StructureRunView, "kind" | "floor" | "x" | "width" | "count">>;
40
+ readonly rooms: ReadonlyArray<Pick<UnitView, "kind" | "floor" | "x" | "width">>;
41
+ readonly transports: ReadonlyArray<Pick<TransportView, "kind" | "x" | "width" | "bottom" | "top">>;
42
+ floorsOf(kind: FacilityKind): number;
43
+ tallLobbies(): ReadonlyArray<HallRun>;
44
+ }
45
+ /**
46
+ * The kind's height in floors, as the caller's catalog read answers it, asked
47
+ * once per kind into `memo`. A non-finite or sub-floor answer (a kind the
48
+ * catalog does not list) draws as one floor.
49
+ */
50
+ export declare function floorsFor(source: Pick<MapSource, "floorsOf">, kind: FacilityKind, memo: Map<FacilityKind, number>): number;
51
+ /**
52
+ * Build the draw list for a source and a layout. An entry that cannot be drawn
53
+ * (a non-finite coordinate, no width, wholly off the map) is dropped; nothing
54
+ * throws on odd input.
55
+ *
56
+ * Within the structure and room layers the marks are grouped by kind, so the
57
+ * painter changes its fill style about once per kind instead of once per room.
58
+ * Rooms and floor runs do not overlap inside a layer, so the grouping changes no
59
+ * pixel. Shafts keep their order, since a stairway can cross a shaft's column.
60
+ * The layers still paint in order: structure, rooms, then shafts.
61
+ *
62
+ * Given `spans`, the same walk records each floor's built space there, for
63
+ * the gaps between buildings (`gaps.ts`): a run once, a tall hall's stories
64
+ * and a tall room's upper floors (a room's bottom floor stands on runs the
65
+ * walk already recorded).
66
+ */
67
+ export declare function buildMapDrawList(layout: MapLayout, source: MapSource, spans?: FloorSpans): MapMark[];
@@ -0,0 +1,103 @@
1
+ import { snappedBlock } from './geometry.js';
2
+
3
+ /**
4
+ * The kind's height in floors, as the caller's catalog read answers it, asked
5
+ * once per kind into `memo`. A non-finite or sub-floor answer (a kind the
6
+ * catalog does not list) draws as one floor.
7
+ */
8
+ function floorsFor(source, kind, memo) {
9
+ let floors = memo.get(kind);
10
+ if (floors === undefined) {
11
+ const asked = source.floorsOf(kind);
12
+ floors = Number.isFinite(asked) && asked >= 1 ? Math.floor(asked) : 1;
13
+ memo.set(kind, floors);
14
+ }
15
+ return floors;
16
+ }
17
+ /**
18
+ * Build the draw list for a source and a layout. An entry that cannot be drawn
19
+ * (a non-finite coordinate, no width, wholly off the map) is dropped; nothing
20
+ * throws on odd input.
21
+ *
22
+ * Within the structure and room layers the marks are grouped by kind, so the
23
+ * painter changes its fill style about once per kind instead of once per room.
24
+ * Rooms and floor runs do not overlap inside a layer, so the grouping changes no
25
+ * pixel. Shafts keep their order, since a stairway can cross a shaft's column.
26
+ * The layers still paint in order: structure, rooms, then shafts.
27
+ *
28
+ * Given `spans`, the same walk records each floor's built space there, for
29
+ * the gaps between buildings (`gaps.ts`): a run once, a tall hall's stories
30
+ * and a tall room's upper floors (a room's bottom floor stands on runs the
31
+ * walk already recorded).
32
+ */
33
+ function buildMapDrawList(layout, source, spans) {
34
+ const heights = new Map();
35
+ const structure = new Map();
36
+ const rooms = new Map();
37
+ const transports = [];
38
+ const bucket = (kind) => {
39
+ let list = structure.get(kind);
40
+ if (!list)
41
+ structure.set(kind, (list = []));
42
+ return list;
43
+ };
44
+ for (const run of source.structure) {
45
+ // A run's width is its tile width times its tile count; a bad count draws nothing.
46
+ if (!(run.count >= 1) || !Number.isFinite(run.count))
47
+ continue;
48
+ spans?.add(run.floor, run.x, run.x + run.width * run.count);
49
+ const rect = snappedBlock(layout, run.x, run.width * run.count, run.floor, 1);
50
+ if (rect)
51
+ bucket(run.kind).push({ layer: "structure", kind: run.kind, rect });
52
+ }
53
+ // A tall hall's lobby tiles sit on its floor alone, so the runs above drew
54
+ // one story of it. The hall's own mark covers every story, columns `x0` to
55
+ // `x1` both included. It overlaps the one-story run under it with the same
56
+ // solid lobby fill, which changes no pixel there.
57
+ for (const hall of source.tallLobbies()) {
58
+ if (!(hall.height > 1) || !(hall.x1 >= hall.x0))
59
+ continue;
60
+ if (spans)
61
+ for (let story = 1; story < hall.height; story++)
62
+ spans.add(hall.floor + story, hall.x0, hall.x1 + 1);
63
+ const rect = snappedBlock(layout, hall.x0, hall.x1 - hall.x0 + 1, hall.floor, Math.floor(hall.height));
64
+ if (rect)
65
+ bucket("lobby").push({ layer: "structure", kind: "lobby", rect });
66
+ }
67
+ for (const room of source.rooms) {
68
+ // One lookup a room: the kind's height and its marks together.
69
+ let kind = rooms.get(room.kind);
70
+ if (!kind)
71
+ rooms.set(room.kind, (kind = { floors: floorsFor(source, room.kind, heights), marks: [] }));
72
+ const floors = kind.floors;
73
+ if (spans)
74
+ for (let story = 1; story < floors; story++)
75
+ spans.add(room.floor + story, room.x, room.x + room.width);
76
+ const rect = snappedBlock(layout, room.x, room.width, room.floor, floors);
77
+ if (rect)
78
+ kind.marks.push({ layer: "room", kind: room.kind, rect });
79
+ }
80
+ for (const t of source.transports) {
81
+ // A shaft serves every floor from `bottom` to `top`, both included, whichever
82
+ // way round the two come.
83
+ const lo = Math.min(t.bottom, t.top);
84
+ const hi = Math.max(t.bottom, t.top);
85
+ const rect = snappedBlock(layout, t.x, t.width, lo, hi - lo + 1);
86
+ if (rect)
87
+ transports.push({ layer: "transport", kind: t.kind, rect });
88
+ }
89
+ // One array, filled in painting order, with no copies on the way.
90
+ const out = [];
91
+ for (const list of structure.values())
92
+ for (const mark of list)
93
+ out.push(mark);
94
+ for (const kind of rooms.values())
95
+ for (const mark of kind.marks)
96
+ out.push(mark);
97
+ for (const mark of transports)
98
+ out.push(mark);
99
+ return out;
100
+ }
101
+
102
+ export { buildMapDrawList, floorsFor };
103
+ //# sourceMappingURL=drawList.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"drawList.js","sources":["../../../src/render/overviewMap/drawList.ts"],"sourcesContent":["/**\n * The overview MAP window's draw list (#343): every mark the tower layer shows,\n * as a kind and a rectangle in map pixels. A pure function of the view and a\n * layout, so the window rebuilds it only when the identity of `rooms`,\n * `structure` or `transports` or the layout changes (not on `tower.revision`\n * alone, since a host can repeat a revision, #1296), and the list is\n * unit-tested without a canvas.\n *\n * The list is as long as the tower has structure runs, rooms and shafts (about\n * 3,000 marks for the large perf fixture's 43,000 units), because the view\n * already joins floor and lobby tiles into runs. A lobby hall taller than one\n * story (#308, #2068) adds one lobby mark that covers its raised stories, so\n * the map shows the hall at its full height as the tower view draws it.\n *\n * Painting order is the list's order: structure first, then rooms over it, then\n * shafts and stairs over both. The unit of a rectangle is the map's device pixel\n * (see `geometry.ts`).\n */\nimport type { FacilityKind } from \"../../shared/types\";\nimport type { StructureRunView, TransportView, UnitView } from \"../../simport/view\";\nimport type { HallRun } from \"../lobbyHalls\";\nimport type { FloorSpans } from \"./floorSpans\";\nimport { snappedBlock, type MapLayout, type MapRect } from \"./geometry\";\n\n/** Which painting layer a mark belongs to. */\nexport type MapLayer = \"structure\" | \"room\" | \"transport\";\n\nexport interface MapMark {\n readonly layer: MapLayer;\n readonly kind: FacilityKind;\n /** In map (device) pixels, snapped to whole pixels, inside the map. */\n readonly rect: MapRect;\n}\n\n/** What the draw list reads from the view. `floorsOf` is the kind's height in\n * floors, read from the engine's catalog by the caller through\n * `findViewKind(kind)?.floors` in `src/presentation/viewKinds.ts` (the map\n * holds no facility table of its own). It is asked once per kind per build.\n * `tallLobbies` is the engine's lobby halls taller than one story\n * (`RenderTower.tallLobbies().runs`), asked once per build. */\nexport interface MapSource {\n readonly structure: ReadonlyArray<Pick<StructureRunView, \"kind\" | \"floor\" | \"x\" | \"width\" | \"count\">>;\n readonly rooms: ReadonlyArray<Pick<UnitView, \"kind\" | \"floor\" | \"x\" | \"width\">>;\n readonly transports: ReadonlyArray<Pick<TransportView, \"kind\" | \"x\" | \"width\" | \"bottom\" | \"top\">>;\n floorsOf(kind: FacilityKind): number;\n tallLobbies(): ReadonlyArray<HallRun>;\n}\n\n/**\n * The kind's height in floors, as the caller's catalog read answers it, asked\n * once per kind into `memo`. A non-finite or sub-floor answer (a kind the\n * catalog does not list) draws as one floor.\n */\nexport function floorsFor(source: Pick<MapSource, \"floorsOf\">, kind: FacilityKind, memo: Map<FacilityKind, number>): number {\n let floors = memo.get(kind);\n if (floors === undefined) {\n const asked = source.floorsOf(kind);\n floors = Number.isFinite(asked) && asked >= 1 ? Math.floor(asked) : 1;\n memo.set(kind, floors);\n }\n return floors;\n}\n\n/**\n * Build the draw list for a source and a layout. An entry that cannot be drawn\n * (a non-finite coordinate, no width, wholly off the map) is dropped; nothing\n * throws on odd input.\n *\n * Within the structure and room layers the marks are grouped by kind, so the\n * painter changes its fill style about once per kind instead of once per room.\n * Rooms and floor runs do not overlap inside a layer, so the grouping changes no\n * pixel. Shafts keep their order, since a stairway can cross a shaft's column.\n * The layers still paint in order: structure, rooms, then shafts.\n *\n * Given `spans`, the same walk records each floor's built space there, for\n * the gaps between buildings (`gaps.ts`): a run once, a tall hall's stories\n * and a tall room's upper floors (a room's bottom floor stands on runs the\n * walk already recorded).\n */\nexport function buildMapDrawList(layout: MapLayout, source: MapSource, spans?: FloorSpans): MapMark[] {\n const heights = new Map<FacilityKind, number>();\n const structure = new Map<FacilityKind, MapMark[]>();\n const rooms = new Map<FacilityKind, { readonly floors: number; readonly marks: MapMark[] }>();\n const transports: MapMark[] = [];\n const bucket = (kind: FacilityKind): MapMark[] => {\n let list = structure.get(kind);\n if (!list) structure.set(kind, (list = []));\n return list;\n };\n for (const run of source.structure) {\n // A run's width is its tile width times its tile count; a bad count draws nothing.\n if (!(run.count >= 1) || !Number.isFinite(run.count)) continue;\n spans?.add(run.floor, run.x, run.x + run.width * run.count);\n const rect = snappedBlock(layout, run.x, run.width * run.count, run.floor, 1);\n if (rect) bucket(run.kind).push({ layer: \"structure\", kind: run.kind, rect });\n }\n // A tall hall's lobby tiles sit on its floor alone, so the runs above drew\n // one story of it. The hall's own mark covers every story, columns `x0` to\n // `x1` both included. It overlaps the one-story run under it with the same\n // solid lobby fill, which changes no pixel there.\n for (const hall of source.tallLobbies()) {\n if (!(hall.height > 1) || !(hall.x1 >= hall.x0)) continue;\n if (spans) for (let story = 1; story < hall.height; story++) spans.add(hall.floor + story, hall.x0, hall.x1 + 1);\n const rect = snappedBlock(layout, hall.x0, hall.x1 - hall.x0 + 1, hall.floor, Math.floor(hall.height));\n if (rect) bucket(\"lobby\").push({ layer: \"structure\", kind: \"lobby\", rect });\n }\n for (const room of source.rooms) {\n // One lookup a room: the kind's height and its marks together.\n let kind = rooms.get(room.kind);\n if (!kind) rooms.set(room.kind, (kind = { floors: floorsFor(source, room.kind, heights), marks: [] }));\n const floors = kind.floors;\n if (spans) for (let story = 1; story < floors; story++) spans.add(room.floor + story, room.x, room.x + room.width);\n const rect = snappedBlock(layout, room.x, room.width, room.floor, floors);\n if (rect) kind.marks.push({ layer: \"room\", kind: room.kind, rect });\n }\n for (const t of source.transports) {\n // A shaft serves every floor from `bottom` to `top`, both included, whichever\n // way round the two come.\n const lo = Math.min(t.bottom, t.top);\n const hi = Math.max(t.bottom, t.top);\n const rect = snappedBlock(layout, t.x, t.width, lo, hi - lo + 1);\n if (rect) transports.push({ layer: \"transport\", kind: t.kind, rect });\n }\n // One array, filled in painting order, with no copies on the way.\n const out: MapMark[] = [];\n for (const list of structure.values()) for (const mark of list) out.push(mark);\n for (const kind of rooms.values())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AG,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,GAAG,CAAC;QACpC,MAAM,IAAI,GAAG,YAAY,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,EAAE,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;AAChE,QAAA,IAAI,IAAI;AAAE,YAAA,UAAU,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC;IACvE;;IAEA,MAAM,GAAG,GAAc,EAAE;AACzB,IAAA,KAAK,MAAM,IAAI,IAAI,SAAS,CAAC,MAAM,EAAE;QAAE,KAAK,MAAM,IAAI,IAAI,IAAI;AAAE,YAAA,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC;AAC9E,IAAA,KAAK,MAAM,IAAI,IAAI,KAAK,CAAC,MAAM,EAAE;AAAE,QAAA,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,KAAK;AAAE,YAAA,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC;IAChF,KAAK,MAAM,IAAI,IAAI,UAAU;AAAE,QAAA,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC;AAC7C,IAAA,OAAO,GAAG;AACZ;;"}
@@ -0,0 +1,70 @@
1
+ import { type MapCamera, type MapExtent, type MapLayout, type MapRect, type MapWorld } from "./geometry";
2
+ /** The crop's top rounds up to a multiple of this many floor lines. */
3
+ export declare const MAP_BAND_FLOORS = 10;
4
+ /** The crop is at least this many floors tall, unless the world itself is
5
+ * shorter (the crop never goes past the world's top). */
6
+ export declare const MAP_MIN_FLOORS = 30;
7
+ /** The margin beside the lot on each side, as a share of the lot's width. */
8
+ export declare const MAP_SIDE_MARGIN_SHARE = 0.04;
9
+ /** The margin beside a lot of `lotWidth` tiles on each side, in whole tiles:
10
+ * `MAP_SIDE_MARGIN_SHARE` of the lot rounded up, so any lot gets at least one
11
+ * tile. A width that is not a positive finite number gets one tile. */
12
+ export declare function mapSideMarginTiles(lotWidth: number): number;
13
+ /** The floors the tower has built, as `SimView.tower` reports them. */
14
+ export interface BuiltFloors {
15
+ readonly lowestFloor: number;
16
+ readonly highestFloor: number;
17
+ }
18
+ /**
19
+ * The banded crop for a world and the floors built in it, with the side
20
+ * margins. A missing range, or a lowest floor that is not finite, reads as the
21
+ * ground floor; a top that is not finite, or under the lowest, reads as the
22
+ * lowest; a range outside the world is held inside it. So a bad view still
23
+ * gives a usable map. A lot so wide that the margins would take the width
24
+ * past a finite number gets no margin, so the extent always has a finite,
25
+ * positive width and `fitLayout` reads it as it is.
26
+ *
27
+ * `reserve` is the strip at the top of a box `boxHeight` tall that a view's
28
+ * legend covers (#1769): the crop grows upward by just enough floors of sky
29
+ * that the strip holds only those, so the legend hides no floor of the crop.
30
+ * The strip is held to half the box, and a strip that is not a positive
31
+ * number, or a box that is not, adds nothing.
32
+ */
33
+ export declare function bandedExtent(world: MapWorld, built: BuiltFloors | null, skyFloors: number, boxHeight?: number, reserve?: number): MapExtent;
34
+ /** Whether two extents are the same, so the window rebuilds its layout only when
35
+ * a band is crossed. */
36
+ export declare function sameExtent(a: MapExtent, b: MapExtent): boolean;
37
+ /** Where the main view sits against the map's extent. */
38
+ export type ViewOutside = "none" | "above" | "below";
39
+ export interface ViewPlacement {
40
+ /** The visible area clipped to the map (see `viewportRect`). */
41
+ readonly rect: MapRect;
42
+ /** Whether any of the view lies past the map's top or bottom edge (true too
43
+ * when all of it does). The lot's sides are not counted: the camera clamp
44
+ * keeps the view's center on the lot, and `rect` is clipped to the sides on
45
+ * its own. */
46
+ readonly clipped: boolean;
47
+ /** Whether the whole view lies past one edge, so `rect` has no height and
48
+ * the window draws the edge band with a chevron instead. */
49
+ readonly outside: ViewOutside;
50
+ /** The floor line the view's center falls on (floor `f` spans the lines
51
+ * `f - 1`, exclusive, to `f`), or null when the camera's position is not a
52
+ * finite number. It can be past the built floors (in the sky or the ground);
53
+ * the text summary says so. */
54
+ readonly centerFloor: number | null;
55
+ }
56
+ /**
57
+ * The view against the map. A camera the clamp lets sit in the sky above the
58
+ * crop is `outside: "above"`. The camera is read the way `viewportRect` reads
59
+ * it (a bad zoom is 1, a bad position 0, a bad viewport size 0), so `outside`
60
+ * and `rect` agree: a view outside has a `rect` with no height.
61
+ */
62
+ export declare function viewPlacement(layout: MapLayout, cam: MapCamera): ViewPlacement;
63
+ /**
64
+ * The band drawn on the map's edge when the whole view lies past it: the view's
65
+ * horizontal span (at least `minWidth` so it can be seen, and at least a pixel
66
+ * each way unless the map itself is smaller), `thickness` tall,
67
+ * against the top edge for a view above the map and the bottom edge for one
68
+ * below. Null when the view is on the map.
69
+ */
70
+ export declare function edgeBand(layout: MapLayout, placement: ViewPlacement, thickness: number, minWidth?: number): MapRect | null;
@@ -0,0 +1,155 @@
1
+ import { FLOOR } from '../scale.js';
2
+ import { mapExtent, MAP_LINES_BELOW_LOWEST_FLOOR, viewportRect } from './geometry.js';
3
+
4
+ /**
5
+ * What the overview MAP window (#343) spans, and where the main view sits
6
+ * against it. Pure, like `geometry.ts`, so the window only calls it.
7
+ *
8
+ * The map shows a banded crop of the built tower (SPEC, Constraints), in both
9
+ * game modes (owner, 2026-11-04): from one floor of ground under the lowest
10
+ * built floor to the top built floor plus the sky headroom, with the top
11
+ * rounded up to the next band of `MAP_BAND_FLOORS` floors, at least
12
+ * `MAP_MIN_FLOORS` tall, and never past the world's top or bottom. Across, it
13
+ * is the whole lot plus a margin of `mapSideMarginTiles` on each side, so it
14
+ * does reach past the world there: a tower built from edge to edge does not
15
+ * touch the map's sides (as the main view shows sky beside the lot). Building
16
+ * inside a band leaves the extent alone, so the map does not rescale on every
17
+ * new floor. The camera clamp still covers the whole world, so the view can
18
+ * sit above the crop; `viewPlacement` says when.
19
+ */
20
+ /** The crop's top rounds up to a multiple of this many floor lines. */
21
+ const MAP_BAND_FLOORS = 10;
22
+ /** The crop is at least this many floors tall, unless the world itself is
23
+ * shorter (the crop never goes past the world's top). */
24
+ const MAP_MIN_FLOORS = 30;
25
+ /** The margin beside the lot on each side, as a share of the lot's width. */
26
+ const MAP_SIDE_MARGIN_SHARE = 0.04;
27
+ /** The margin beside a lot of `lotWidth` tiles on each side, in whole tiles:
28
+ * `MAP_SIDE_MARGIN_SHARE` of the lot rounded up, so any lot gets at least one
29
+ * tile. A width that is not a positive finite number gets one tile. */
30
+ function mapSideMarginTiles(lotWidth) {
31
+ if (!(Number.isFinite(lotWidth) && lotWidth > 0))
32
+ return 1;
33
+ return Math.max(1, Math.ceil(lotWidth * MAP_SIDE_MARGIN_SHARE));
34
+ }
35
+ /**
36
+ * The banded crop for a world and the floors built in it, with the side
37
+ * margins. A missing range, or a lowest floor that is not finite, reads as the
38
+ * ground floor; a top that is not finite, or under the lowest, reads as the
39
+ * lowest; a range outside the world is held inside it. So a bad view still
40
+ * gives a usable map. A lot so wide that the margins would take the width
41
+ * past a finite number gets no margin, so the extent always has a finite,
42
+ * positive width and `fitLayout` reads it as it is.
43
+ *
44
+ * `reserve` is the strip at the top of a box `boxHeight` tall that a view's
45
+ * legend covers (#1769): the crop grows upward by just enough floors of sky
46
+ * that the strip holds only those, so the legend hides no floor of the crop.
47
+ * The strip is held to half the box, and a strip that is not a positive
48
+ * number, or a box that is not, adds nothing.
49
+ */
50
+ function bandedExtent(world, built, skyFloors, boxHeight = 0, reserve = 0) {
51
+ const whole = mapExtent(world, skyFloors);
52
+ // The same sky `mapExtent` used (it reads a bad value as no sky), so the world's
53
+ // top floor below falls out of `whole` exactly.
54
+ const sky = Math.max(0, Number.isFinite(skyFloors) ? skyFloors : 0);
55
+ const worldLowest = whole.bottomLine + MAP_LINES_BELOW_LOWEST_FLOOR;
56
+ const worldHighest = whole.topLine - sky;
57
+ const lowest = withinWorld(built?.lowestFloor, 1, worldLowest, worldHighest);
58
+ const highest = Math.max(lowest, withinWorld(built?.highestFloor, lowest, worldLowest, worldHighest));
59
+ const bottomLine = lowest - MAP_LINES_BELOW_LOWEST_FLOOR;
60
+ // Both candidates for the top sit on the band grid, so a small tower that the
61
+ // minimum height holds up does not rescale one floor at a time either. The
62
+ // minimum is measured from the ground's bottom line (or the crop's, if that is
63
+ // higher), so digging basements under a small tower never lowers the top.
64
+ const groundBottom = 1 - MAP_LINES_BELOW_LOWEST_FLOOR;
65
+ const minTop = toBand(Math.max(bottomLine, groundBottom) + MAP_MIN_FLOORS);
66
+ const cropTop = Math.min(whole.topLine, Math.max(toBand(highest + sky), minTop));
67
+ const topLine = cropTop + floorsUnder(Math.min(reserve, boxHeight / 2), boxHeight, cropTop - bottomLine);
68
+ // `whole.width` is the lot as `mapExtent` trusts it (a bad width reads as 1).
69
+ const margin = mapSideMarginTiles(whole.width);
70
+ const width = whole.width + 2 * margin;
71
+ if (!(Number.isFinite(width) && width > 0))
72
+ return { leftTile: 0, width: whole.width, topLine, bottomLine };
73
+ return { leftTile: -margin, width, topLine, bottomLine };
74
+ }
75
+ /** How many floors to add over `floors` so that the top `strip` of a box
76
+ * `box` tall covers only them: `a` with `a * box / (floors + a) >= strip`.
77
+ * Zero for a strip or box that is not a positive finite number. */
78
+ function floorsUnder(strip, box, floors) {
79
+ if (!(strip > 0 && Number.isFinite(box) && box > 0 && floors > 0))
80
+ return 0;
81
+ return Math.ceil((strip * floors) / (box - strip));
82
+ }
83
+ /** A floor line rounded up onto the band grid. */
84
+ function toBand(line) {
85
+ return Math.ceil(line / MAP_BAND_FLOORS) * MAP_BAND_FLOORS;
86
+ }
87
+ function withinWorld(n, fallback, lo, hi) {
88
+ const v = n !== undefined && Number.isFinite(n) ? Math.floor(n) : fallback;
89
+ return Math.max(lo, Math.min(hi, v));
90
+ }
91
+ /** Whether two extents are the same, so the window rebuilds its layout only when
92
+ * a band is crossed. */
93
+ function sameExtent(a, b) {
94
+ return a.leftTile === b.leftTile && a.width === b.width && a.topLine === b.topLine && a.bottomLine === b.bottomLine;
95
+ }
96
+ /**
97
+ * The view against the map. A camera the clamp lets sit in the sky above the
98
+ * crop is `outside: "above"`. The camera is read the way `viewportRect` reads
99
+ * it (a bad zoom is 1, a bad position 0, a bad viewport size 0), so `outside`
100
+ * and `rect` agree: a view outside has a `rect` with no height.
101
+ */
102
+ function viewPlacement(layout, cam) {
103
+ const rect = viewportRect(layout, cam);
104
+ const zoom = Number.isFinite(cam.zoom) && cam.zoom > 0 ? cam.zoom : 1;
105
+ const posY = Number.isFinite(cam.posY) ? cam.posY : 0;
106
+ const halfFloors = Math.max(0, Number.isFinite(cam.viewHeight) ? cam.viewHeight : 0) / 2 / zoom / FLOOR;
107
+ const centerLine = -posY / FLOOR;
108
+ const viewTop = centerLine + halfFloors;
109
+ const viewBottom = centerLine - halfFloors;
110
+ const { topLine, bottomLine } = layout.extent;
111
+ // A view with height is outside when its clipped rectangle has none and the
112
+ // view reaches past an edge, so the two can never disagree by a rounding
113
+ // error at an edge; its center says which side. (A view thinner than float
114
+ // precision inside the map has no rectangle either, and stays on the map.) A
115
+ // view with no height that sits exactly on an edge line is on the map.
116
+ const clipped = viewTop > topLine || viewBottom < bottomLine;
117
+ let outside = "none";
118
+ if (halfFloors > 0) {
119
+ if (!(rect.h > 0) && clipped)
120
+ outside = centerLine >= (topLine + bottomLine) / 2 ? "above" : "below";
121
+ }
122
+ else if (viewBottom > topLine)
123
+ outside = "above";
124
+ else if (viewTop < bottomLine)
125
+ outside = "below";
126
+ return {
127
+ rect,
128
+ clipped,
129
+ outside,
130
+ // The line's ceiling is the floor it falls on; `|| 0` turns -0 into 0.
131
+ centerFloor: Number.isFinite(cam.posY) ? Math.ceil(centerLine) || 0 : null,
132
+ };
133
+ }
134
+ /**
135
+ * The band drawn on the map's edge when the whole view lies past it: the view's
136
+ * horizontal span (at least `minWidth` so it can be seen, and at least a pixel
137
+ * each way unless the map itself is smaller), `thickness` tall,
138
+ * against the top edge for a view above the map and the bottom edge for one
139
+ * below. Null when the view is on the map.
140
+ */
141
+ function edgeBand(layout, placement, thickness, minWidth = thickness) {
142
+ if (placement.outside === "none")
143
+ return null;
144
+ // At least a pixel each way, whatever the caller asks for.
145
+ const atLeastOne = (n) => (Number.isFinite(n) && n > 1 ? n : 1);
146
+ const h = Math.min(layout.height, atLeastOne(thickness));
147
+ const spanW = Number.isFinite(placement.rect.w) ? placement.rect.w : 0;
148
+ const spanX = Number.isFinite(placement.rect.x) ? placement.rect.x : 0;
149
+ const w = Math.min(layout.width, Math.max(atLeastOne(minWidth), spanW));
150
+ const x = Math.max(0, Math.min(layout.width - w, spanX + spanW / 2 - w / 2));
151
+ return { x, y: placement.outside === "above" ? 0 : layout.height - h, w, h };
152
+ }
153
+
154
+ export { MAP_BAND_FLOORS, MAP_MIN_FLOORS, MAP_SIDE_MARGIN_SHARE, bandedExtent, edgeBand, mapSideMarginTiles, sameExtent, viewPlacement };
155
+ //# sourceMappingURL=extent.js.map