@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,37 @@
1
+ import { TILE } from '../scale.js';
2
+ import { ESCAPE_W } from '../sprites/structure/rooftop.js';
3
+
4
+ /** How far left of a run's first tile a climbing guard stands, in tiles:
5
+ * the middle of the fire escape hung off that side of the floor. */
6
+ const ON_THE_ESCAPE = ESCAPE_W / 2 / TILE;
7
+ /** Where a guard is at minute `now`: on the emergency stairs until
8
+ * `arrive`, then walking the rooms left to right until `done`. On the
9
+ * stairs it follows the engine's `route` corner to corner, so a guard
10
+ * crossing to another tower walks to a floor they share and over instead
11
+ * of climbing through the sky between them. The stairs time is split by
12
+ * floors; crossing a shared floor takes none. `floor` may be fractional on
13
+ * the stairs, where `x` is on the fire escape left of the route's stairs
14
+ * tile; `x` is in tiles. */
15
+ function guardPosition(g, now) {
16
+ const part = (a, b) => (b > a ? Math.min(1, Math.max(0, (now - a) / (b - a))) : 1);
17
+ if (now < g.arrive) {
18
+ const route = g.route.length > 1 ? g.route : [[g.from, g.left], [g.floor, g.left]];
19
+ let floors = 0;
20
+ for (let i = 1; i < route.length; i++)
21
+ floors += Math.abs(route[i][0] - route[i - 1][0]);
22
+ let along = part(g.start, g.arrive) * floors;
23
+ for (let i = 1; i < route.length; i++) {
24
+ const [f0, x] = route[i - 1];
25
+ const leg = Math.abs(route[i][0] - f0);
26
+ if (along < leg || i === route.length - 1) {
27
+ const floor = f0 + Math.sign(route[i][0] - f0) * Math.min(along, leg);
28
+ return { floor, x: x - ON_THE_ESCAPE, climbing: true };
29
+ }
30
+ along -= leg;
31
+ }
32
+ }
33
+ return { floor: g.floor, x: g.left + (g.right - g.left) * part(g.arrive, g.done), climbing: false };
34
+ }
35
+
36
+ export { ON_THE_ESCAPE, guardPosition };
37
+ //# sourceMappingURL=guardPosition.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"guardPosition.js","sources":["../../../src/render/excalibur/guardPosition.ts"],"sourcesContent":["import type { BombSearchGuard } from \"../../simport/view\";\nimport { TILE } from \"../scale\";\nimport { ESCAPE_W } from \"../sprites/structure/rooftop\";\n\n/** How far left of a run's first tile a climbing guard stands, in tiles:\n * the middle of the fire escape hung off that side of the floor. */\nexport const ON_THE_ESCAPE = ESCAPE_W / 2 / TILE;\n\n/** Where a guard is at minute `now`: on the emergency stairs until\n * `arrive`, then walking the rooms left to right until `done`. On the\n * stairs it follows the engine's `route` corner to corner, so a guard\n * crossing to another tower walks to a floor they share and over instead\n * of climbing through the sky between them. The stairs time is split by\n * floors; crossing a shared floor takes none. `floor` may be fractional on\n * the stairs, where `x` is on the fire escape left of the route's stairs\n * tile; `x` is in tiles. */\nexport function guardPosition(g: BombSearchGuard, now: number): { floor: number; x: number; climbing: boolean } {\n const part = (a: number, b: number): number => (b > a ? Math.min(1, Math.max(0, (now - a) / (b - a))) : 1);\n if (now < g.arrive) {\n const route = g.route.length > 1 ? g.route : [[g.from, g.left] as const, [g.floor, g.left] as const];\n let floors = 0;\n for (let i = 1; i < route.length; i++) floors += Math.abs(route[i]![0] - route[i - 1]![0]);\n let along = part(g.start, g.arrive) * floors;\n for (let i = 1; i < route.length; i++) {\n const [f0, x] = route[i - 1]!;\n const leg = Math.abs(route[i]![0] - f0);\n if (along < leg || i === route.length - 1) {\n const floor = f0 + Math.sign(route[i]![0] - f0) * Math.min(along, leg);\n return { floor, x: x - ON_THE_ESCAPE, climbing: true };\n }\n along -= leg;\n }\n }\n return { floor: g.floor, x: g.left + (g.right - g.left) * part(g.arrive, g.done), climbing: false };\n}\n"],"names":[],"mappings":";;;AAIA;AACqE;MACxD,aAAa,GAAG,QAAQ,GAAG,CAAC,GAAG;AAE5C;;;;;;;AAO6B;AACvB,SAAU,aAAa,CAAC,CAAkB,EAAE,GAAW,EAAA;IAC3D,MAAM,IAAI,GAAG,CAAC,CAAS,EAAE,CAAS,MAAc,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;AAC1G,IAAA,IAAI,GAAG,GAAG,CAAC,CAAC,MAAM,EAAE;AAClB,QAAA,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,GAAG,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,CAAU,EAAE,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,IAAI,CAAU,CAAC;QACpG,IAAI,MAAM,GAAG,CAAC;AACd,QAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE;YAAE,MAAM,IAAI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 * The object Excalibur's keyboard listens on, instead of `window` (#322).
3
+ *
4
+ * The game reads keys with its own handlers (`src/game/inputKeys.ts`) and
5
+ * never asks Excalibur's `Keyboard` anything. Excalibur still attaches a
6
+ * `keydown`, a `keyup` and a `blur` listener to its `global` for the engine and
7
+ * again for each scene, and `Engine.dispose()` only switches them off. The
8
+ * `blur` one is an anonymous arrow, so nothing outside Excalibur can detach
9
+ * it. On `window`, each in-place context-loss recovery (a new engine) leaves
10
+ * those listeners behind, and each one keeps its dead `Keyboard` alive.
11
+ * Handing the engine this private target keeps them off `window`, so they go
12
+ * away with the engine. `focus` still focuses the window, as Excalibur's
13
+ * `grabWindowFocus` did with the default global.
14
+ */
15
+ export declare function keyboardHost(): GlobalEventHandlers;
@@ -0,0 +1,22 @@
1
+ /**
2
+ * The object Excalibur's keyboard listens on, instead of `window` (#322).
3
+ *
4
+ * The game reads keys with its own handlers (`src/game/inputKeys.ts`) and
5
+ * never asks Excalibur's `Keyboard` anything. Excalibur still attaches a
6
+ * `keydown`, a `keyup` and a `blur` listener to its `global` for the engine and
7
+ * again for each scene, and `Engine.dispose()` only switches them off. The
8
+ * `blur` one is an anonymous arrow, so nothing outside Excalibur can detach
9
+ * it. On `window`, each in-place context-loss recovery (a new engine) leaves
10
+ * those listeners behind, and each one keeps its dead `Keyboard` alive.
11
+ * Handing the engine this private target keeps them off `window`, so they go
12
+ * away with the engine. `focus` still focuses the window, as Excalibur's
13
+ * `grabWindowFocus` did with the default global.
14
+ */
15
+ function keyboardHost() {
16
+ const host = new EventTarget();
17
+ host.focus = () => window.focus();
18
+ return host;
19
+ }
20
+
21
+ export { keyboardHost };
22
+ //# sourceMappingURL=keyboardHost.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"keyboardHost.js","sources":["../../../src/render/excalibur/keyboardHost.ts"],"sourcesContent":["/**\n * The object Excalibur's keyboard listens on, instead of `window` (#322).\n *\n * The game reads keys with its own handlers (`src/game/inputKeys.ts`) and\n * never asks Excalibur's `Keyboard` anything. Excalibur still attaches a\n * `keydown`, a `keyup` and a `blur` listener to its `global` for the engine and\n * again for each scene, and `Engine.dispose()` only switches them off. The\n * `blur` one is an anonymous arrow, so nothing outside Excalibur can detach\n * it. On `window`, each in-place context-loss recovery (a new engine) leaves\n * those listeners behind, and each one keeps its dead `Keyboard` alive.\n * Handing the engine this private target keeps them off `window`, so they go\n * away with the engine. `focus` still focuses the window, as Excalibur's\n * `grabWindowFocus` did with the default global.\n */\nexport function keyboardHost(): GlobalEventHandlers {\n const host = new EventTarget() as EventTarget & { focus(): void };\n host.focus = () => window.focus();\n return host as unknown as GlobalEventHandlers;\n}\n"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;AAaG;SACa,YAAY,GAAA;AAC1B,IAAA,MAAM,IAAI,GAAG,IAAI,WAAW,EAAqC;IACjE,IAAI,CAAC,KAAK,GAAG,MAAM,MAAM,CAAC,KAAK,EAAE;AACjC,IAAA,OAAO,IAAsC;AAC/C;;"}
@@ -0,0 +1,16 @@
1
+ import type { Picked, TowerEngine } from "./TowerEngine";
2
+ /** Arm the hold for a touch press over the given cell/entity. The captured
3
+ * values are used when the timer fires, so a peek reports the press point, not
4
+ * wherever a late event lands. No-op off touch or with no peek hook installed. */
5
+ export declare function armLongPress(engine: TowerEngine, tile: number, floor: number, picked: Picked | null, touch: boolean): void;
6
+ /** Cancel a pending peek timer (a second finger, a drag past slop, or a release
7
+ * before the knee). Leaves longPressFired alone: a fired peek is torn down by
8
+ * {@link finishLongPress}, not here. */
9
+ export declare function clearLongPress(engine: TowerEngine): void;
10
+ /** On a move, cancel a pending peek once the finger travels past the tap slop
11
+ * from where it landed: it is aiming a tool or panning, not holding to read. */
12
+ export declare function cancelLongPressOnMove(engine: TowerEngine, sx: number, sy: number): void;
13
+ /** On a release, cancel any pending peek. If a peek already fired, dismiss it
14
+ * and return true so the caller swallows the tap/action (a glance never places
15
+ * or opens the editor); onLongPress already cleared the anchors it fired over. */
16
+ export declare function finishLongPress(engine: TowerEngine): boolean;
@@ -0,0 +1,71 @@
1
+ /**
2
+ * Touch long-press ("peek"): the hold timer and its lifecycle, as friend
3
+ * functions taking the engine. A stationary finger held on a facility past
4
+ * {@link LONG_PRESS_MS} raises the inspector card (the touch equivalent of a
5
+ * desktop hover), then the release dismisses it. Split out of towerInputCamera
6
+ * so the pointer file stays focused on gesture routing; the call sites there
7
+ * are one-liners. All state lives on the engine (longPressTimer / longPressFired
8
+ * / downSx / downSy).
9
+ */
10
+ /** How long a touch must hold still on a facility before it peeks. Long enough
11
+ * that a normal tap (well under 200ms) never crosses it, short enough that the
12
+ * glance feels responsive. Tunable feel. */
13
+ const LONG_PRESS_MS = 450;
14
+ /** Travel (screen px, Manhattan) from the press origin that cancels a pending
15
+ * peek: past this the gesture is a drag/pan, not a hold. Matches the touch tap
16
+ * slop, so the motion that turns a tap into a drag also cancels the peek. */
17
+ const LONG_PRESS_SLOP = 14;
18
+ /** Arm the hold for a touch press over the given cell/entity. The captured
19
+ * values are used when the timer fires, so a peek reports the press point, not
20
+ * wherever a late event lands. No-op off touch or with no peek hook installed. */
21
+ function armLongPress(engine, tile, floor, picked, touch) {
22
+ clearLongPress(engine);
23
+ if (!touch || !engine.onLongPress)
24
+ return;
25
+ // Only a real facility peeks. Empty space and bare floor/lobby tiles raise no
26
+ // card, so arming there would latch the peek and swallow the release for no
27
+ // gain (stealing a slow tap-place or tap-bulldoze). Mirrors pickedAt's rule.
28
+ if (!picked || picked.kind === "floor" || picked.kind === "lobby")
29
+ return;
30
+ engine.longPressTimer = setTimeout(() => {
31
+ engine.longPressTimer = null;
32
+ engine.longPressFired = true;
33
+ // A fired peek owns the gesture to release: drop the classified gesture so a
34
+ // later move neither pans nor re-drives the tool (pointerMove also guards on
35
+ // longPressFired, this keeps the two consistent).
36
+ engine.gesture = null;
37
+ engine.onLongPress?.(tile, floor, picked);
38
+ }, LONG_PRESS_MS);
39
+ }
40
+ /** Cancel a pending peek timer (a second finger, a drag past slop, or a release
41
+ * before the knee). Leaves longPressFired alone: a fired peek is torn down by
42
+ * {@link finishLongPress}, not here. */
43
+ function clearLongPress(engine) {
44
+ if (engine.longPressTimer !== null) {
45
+ clearTimeout(engine.longPressTimer);
46
+ engine.longPressTimer = null;
47
+ }
48
+ }
49
+ /** On a move, cancel a pending peek once the finger travels past the tap slop
50
+ * from where it landed: it is aiming a tool or panning, not holding to read. */
51
+ function cancelLongPressOnMove(engine, sx, sy) {
52
+ if (engine.longPressTimer === null)
53
+ return;
54
+ if (Math.abs(sx - engine.downSx) + Math.abs(sy - engine.downSy) >= LONG_PRESS_SLOP)
55
+ clearLongPress(engine);
56
+ }
57
+ /** On a release, cancel any pending peek. If a peek already fired, dismiss it
58
+ * and return true so the caller swallows the tap/action (a glance never places
59
+ * or opens the editor); onLongPress already cleared the anchors it fired over. */
60
+ function finishLongPress(engine) {
61
+ clearLongPress(engine);
62
+ if (!engine.longPressFired)
63
+ return false;
64
+ engine.longPressFired = false;
65
+ engine.onLongPressEnd?.();
66
+ engine.gesture = null;
67
+ return true;
68
+ }
69
+
70
+ export { armLongPress, cancelLongPressOnMove, clearLongPress, finishLongPress };
71
+ //# sourceMappingURL=longPress.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"longPress.js","sources":["../../../src/render/excalibur/longPress.ts"],"sourcesContent":["import type { Picked, TowerEngine } from \"./TowerEngine\";\n\n/**\n * Touch long-press (\"peek\"): the hold timer and its lifecycle, as friend\n * functions taking the engine. A stationary finger held on a facility past\n * {@link LONG_PRESS_MS} raises the inspector card (the touch equivalent of a\n * desktop hover), then the release dismisses it. Split out of towerInputCamera\n * so the pointer file stays focused on gesture routing; the call sites there\n * are one-liners. All state lives on the engine (longPressTimer / longPressFired\n * / downSx / downSy).\n */\n\n/** How long a touch must hold still on a facility before it peeks. Long enough\n * that a normal tap (well under 200ms) never crosses it, short enough that the\n * glance feels responsive. Tunable feel. */\nconst LONG_PRESS_MS = 450;\n/** Travel (screen px, Manhattan) from the press origin that cancels a pending\n * peek: past this the gesture is a drag/pan, not a hold. Matches the touch tap\n * slop, so the motion that turns a tap into a drag also cancels the peek. */\nconst LONG_PRESS_SLOP = 14;\n\n/** Arm the hold for a touch press over the given cell/entity. The captured\n * values are used when the timer fires, so a peek reports the press point, not\n * wherever a late event lands. No-op off touch or with no peek hook installed. */\nexport function armLongPress(engine: TowerEngine, tile: number, floor: number, picked: Picked | null, touch: boolean): void {\n clearLongPress(engine);\n if (!touch || !engine.onLongPress) return;\n // Only a real facility peeks. Empty space and bare floor/lobby tiles raise no\n // card, so arming there would latch the peek and swallow the release for no\n // gain (stealing a slow tap-place or tap-bulldoze). Mirrors pickedAt's rule.\n if (!picked || picked.kind === \"floor\" || picked.kind === \"lobby\") return;\n engine.longPressTimer = setTimeout(() => {\n engine.longPressTimer = null;\n engine.longPressFired = true;\n // A fired peek owns the gesture to release: drop the classified gesture so a\n // later move neither pans nor re-drives the tool (pointerMove also guards on\n // longPressFired, this keeps the two consistent).\n engine.gesture = null;\n engine.onLongPress?.(tile, floor, picked);\n }, LONG_PRESS_MS);\n}\n\n/** Cancel a pending peek timer (a second finger, a drag past slop, or a release\n * before the knee). Leaves longPressFired alone: a fired peek is torn down by\n * {@link finishLongPress}, not here. */\nexport function clearLongPress(engine: TowerEngine): void {\n if (engine.longPressTimer !== null) {\n clearTimeout(engine.longPressTimer);\n engine.longPressTimer = null;\n }\n}\n\n/** On a move, cancel a pending peek once the finger travels past the tap slop\n * from where it landed: it is aiming a tool or panning, not holding to read. */\nexport function cancelLongPressOnMove(engine: TowerEngine, sx: number, sy: number): void {\n if (engine.longPressTimer === null) return;\n if (Math.abs(sx - engine.downSx) + Math.abs(sy - engine.downSy) >= LONG_PRESS_SLOP) clearLongPress(engine);\n}\n\n/** On a release, cancel any pending peek. If a peek already fired, dismiss it\n * and return true so the caller swallows the tap/action (a glance never places\n * or opens the editor); onLongPress already cleared the anchors it fired over. */\nexport function finishLongPress(engine: TowerEngine): boolean {\n clearLongPress(engine);\n if (!engine.longPressFired)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E,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,eAAe;QAAE,cAAc,CAAC,MAAM,CAAC;AAC5G;AAEA;;AAEmF;AAC7E,SAAU,eAAe,CAAC,MAAmB,EAAA;IACjD,cAAc,CAAC,MAAM,CAAC;IACtB,IAAI,CAAC,MAAM,CAAC,cAAc;AAAE,QAAA,OAAO,KAAK;AACxC,IAAA,MAAM,CAAC,cAAc,GAAG,KAAK;AAC7B,IAAA,MAAM,CAAC,cAAc,IAAI;AACzB,IAAA,MAAM,CAAC,OAAO,GAAG,IAAI;AACrB,IAAA,OAAO,IAAI;AACb;;"}
@@ -0,0 +1,16 @@
1
+ import * as ex from "excalibur";
2
+ /** Every moving figure bakes into one canvas size, so the actor's footprint
3
+ * never depends on the pose: wide enough for a pushed cart on the right and a
4
+ * pulled suitcase on the left, tall enough for arms thrown up. */
5
+ export declare const FIGURE_W = 30;
6
+ export declare const FIGURE_H = 31;
7
+ /** The foot line (the contact shadow's first row). */
8
+ export declare const FIGURE_FOOT = 29;
9
+ /** The actor anchor that puts the foot line where the old 25px bake's was. */
10
+ export declare const FIGURE_ANCHOR: ex.Vector;
11
+ /** The baked figures, made on first use and kept: a frame looks one up by
12
+ * its numeric key (`figureKey`) and allocates nothing once it is baked. */
13
+ export interface PeopleGraphics {
14
+ get(key: number): ex.Graphic;
15
+ }
16
+ export declare function bakePeople(): PeopleGraphics;
@@ -0,0 +1,46 @@
1
+ import * as ex from 'excalibur';
2
+ import { drawPerson, LOOKS } from '../pixelSprites/people.js';
3
+ import { figureOf } from './crowdLook.js';
4
+
5
+ /** Every moving figure bakes into one canvas size, so the actor's footprint
6
+ * never depends on the pose: wide enough for a pushed cart on the right and a
7
+ * pulled suitcase on the left, tall enough for arms thrown up. */
8
+ const FIGURE_W = 30;
9
+ const FIGURE_H = 31;
10
+ /** The foot line (the contact shadow's first row). */
11
+ const FIGURE_FOOT = 29;
12
+ /** Where the body's left edge sits, so the body is centered and a mirrored
13
+ * figure stands on the same spot. */
14
+ const BODY_X = 11;
15
+ /** The actor anchor that puts the foot line where the old 25px bake's was. */
16
+ const FIGURE_ANCHOR = ex.vec(0.5, (FIGURE_FOOT + 1) / FIGURE_H);
17
+ function bakePeople() {
18
+ const cache = new Map();
19
+ return {
20
+ get(key) {
21
+ let canvas = cache.get(key);
22
+ if (!canvas) {
23
+ const f = figureOf(key);
24
+ canvas = new ex.Canvas({
25
+ width: FIGURE_W,
26
+ height: FIGURE_H,
27
+ cache: true,
28
+ draw: (ctx) => {
29
+ ctx.save();
30
+ if (f.left) {
31
+ ctx.translate(FIGURE_W, 0);
32
+ ctx.scale(-1, 1);
33
+ }
34
+ drawPerson(ctx, BODY_X, FIGURE_FOOT, LOOKS[f.look], { lit: f.lit, frame: f.frame, pose: f.pose, mood: f.mood });
35
+ ctx.restore();
36
+ },
37
+ });
38
+ cache.set(key, canvas);
39
+ }
40
+ return canvas;
41
+ },
42
+ };
43
+ }
44
+
45
+ export { FIGURE_ANCHOR, FIGURE_FOOT, FIGURE_H, FIGURE_W, bakePeople };
46
+ //# sourceMappingURL=peopleGfx.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"peopleGfx.js","sources":["../../../src/render/excalibur/peopleGfx.ts"],"sourcesContent":["import * as ex from \"excalibur\";\nimport { drawPerson, LOOKS } from \"../pixelSprites/people\";\nimport { figureOf } from \"./crowdLook\";\n\n/** Every moving figure bakes into one canvas size, so the actor's footprint\n * never depends on the pose: wide enough for a pushed cart on the right and a\n * pulled suitcase on the left, tall enough for arms thrown up. */\nexport const FIGURE_W = 30;\nexport const FIGURE_H = 31;\n/** The foot line (the contact shadow's first row). */\nexport const FIGURE_FOOT = 29;\n/** Where the body's left edge sits, so the body is centered and a mirrored\n * figure stands on the same spot. */\nconst BODY_X = 11;\n/** The actor anchor that puts the foot line where the old 25px bake's was. */\nexport const FIGURE_ANCHOR = ex.vec(0.5, (FIGURE_FOOT + 1) / FIGURE_H);\n\n/** The baked figures, made on first use and kept: a frame looks one up by\n * its numeric key (`figureKey`) and allocates nothing once it is baked. */\nexport interface PeopleGraphics {\n get(key: number): ex.Graphic;\n}\n\nexport function bakePeople(): PeopleGraphics {\n const cache = new Map<number, ex.Canvas>();\n return {\n get(key: number): ex.Graphic {\n let canvas = cache.get(key);\n if (!canvas) {\n const f = figureOf(key);\n canvas = new ex.Canvas({\n width: FIGURE_W,\n height: FIGURE_H,\n cache: true,\n draw: (ctx) => {\n ctx.save();\n if (f.left) {\n ctx.translate(FIGURE_W, 0);\n ctx.scale(-1, 1);\n }\n drawPerson(ctx, BODY_X, FIGURE_FOOT, LOOKS[f.look], { lit: f.lit, frame: f.frame, pose: f.pose, mood: f.mood });\n ctx.restore();\n },\n });\n cache.set(key, canvas);\n }\n return canvas;\n },\n };\n}\n"],"names":[],"mappings":";;;;AAIA;;AAEmE;AAC5D,MAAM,QAAQ,GAAG;AACjB,MAAM,QAAQ,GAAG;AACxB;AACO,MAAM,WAAW,GAAG;AAC3B;AACsC;AACtC,MAAM,MAAM,GAAG,EAAE;AACjB;AACO,MAAM,aAAa,GAAG,EAAE,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,WAAW,GAAG,CAAC,IAAI,QAAQ;SAQrD,UAAU,GAAA;AACxB,IAAA,MAAM,KAAK,GAAG,IAAI,GAAG,EAAqB;IAC1C,OAAO;AACL,QAAA,GAAG,CAAC,GAAW,EAAA;YACb,IAAI,MAAM,GAAG,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC;YAC3B,IAAI,CAAC,MAAM,EAAE;AACX,gBAAA,MAAM,CAAC,GAAG,QAAQ,CAAC,GAAG,CAAC;AACvB,gBAAA,MAAM,GAAG,IAAI,EAAE,CAAC,MAAM,CAAC;AACrB,oBAAA,KAAK,EAAE,QAAQ;AACf,oBAAA,MAAM,EAAE,QAAQ;AAChB,oBAAA,KAAK,EAAE,IAAI;AACX,oBAAA,IAAI,EAAE,CAAC,GAAG,KAAI;wBACZ,GAAG,CAAC,IAAI,EAAE;AACV,wBAAA,IAAI,CAAC,CAAC,IAAI,EAAE;AACV,4BAAA,GAAG,CAAC,SAAS,CAAC,QAAQ,EAAE,CAAC,CAAC;4BAC1B,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;wBAClB;AACA,wBAAA,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,WAAW,EAAE,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE,GAAG,EAAE,CAAC,CAAC,GAAG,EAAE,KAAK,EAAE,CAAC,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;wBAC/G,GAAG,CAAC,OAAO,EAAE;oBACf,CAAC;AACF,iBAAA,CAAC;AACF,gBAAA,KAAK,CAAC,GAAG,CAAC,GAAG,EAAE,MAAM,CAAC;YACxB;AACA,YAAA,OAAO,MAAM;QACf,CAAC;KACF;AACH;;"}
@@ -0,0 +1,35 @@
1
+ import type { TowerEngine } from "./TowerEngine";
2
+ /** How far past the screen the people window reaches: tiles past each side,
3
+ * floors past the top and the bottom, so a figure walking in is already in
4
+ * the frame when it shows. The engine adds its own pad on top, so every
5
+ * rider of a car on screen comes along (`view::PeopleWindow::padded`). */
6
+ export declare const WINDOW_MARGIN: {
7
+ readonly tiles: 2;
8
+ readonly floors: 1;
9
+ };
10
+ /** The floors and tiles the engine's frame sends people for. */
11
+ export interface PeopleWindow {
12
+ floorLo: number;
13
+ floorHi: number;
14
+ xLo: number;
15
+ xHi: number;
16
+ }
17
+ type Camera = Pick<TowerEngine, "screenToTile" | "screenToFloor" | "viewWidth" | "viewHeight">;
18
+ /** The part of the tower on screen, plus {@link WINDOW_MARGIN}. The 1994 game
19
+ * draws every person in its scrolling window and none outside it, so the
20
+ * frame carries the people the view shows: its size follows the screen and
21
+ * stays flat as the crowd grows. */
22
+ export declare function peopleWindow(camera: Camera): PeopleWindow;
23
+ /** A window that holds nobody: floors far below any lot. The engine reads a
24
+ * window it cannot use as every person (`view::PeopleWindow::new`), so an
25
+ * empty frame needs a real window with nobody in it. */
26
+ export declare const NO_PEOPLE: PeopleWindow;
27
+ type FrameCamera = Camera & Pick<TowerEngine, "cam" | "crowdCulled">;
28
+ /** The window this frame's view sends people for. While the zoom cull hides
29
+ * the crowd (`crowdCull.ts`), nobody crosses from the engine, since no
30
+ * figure is drawn; the frame where the cull lifts already reads the screen,
31
+ * because the cull is judged from this frame's zoom without moving the
32
+ * latch. A followed person keeps the window, so the camera glides with
33
+ * their record at any zoom (#2151). */
34
+ export declare function frameWindow(engine: FrameCamera): PeopleWindow;
35
+ export {};
@@ -0,0 +1,38 @@
1
+ import { crowdCullNext } from './crowdCull.js';
2
+ import { focusedPerson } from './personFocus.js';
3
+
4
+ /** How far past the screen the people window reaches: tiles past each side,
5
+ * floors past the top and the bottom, so a figure walking in is already in
6
+ * the frame when it shows. The engine adds its own pad on top, so every
7
+ * rider of a car on screen comes along (`view::PeopleWindow::padded`). */
8
+ const WINDOW_MARGIN = { tiles: 2, floors: 1 };
9
+ /** The part of the tower on screen, plus {@link WINDOW_MARGIN}. The 1994 game
10
+ * draws every person in its scrolling window and none outside it, so the
11
+ * frame carries the people the view shows: its size follows the screen and
12
+ * stays flat as the crowd grows. */
13
+ function peopleWindow(camera) {
14
+ return {
15
+ floorLo: camera.screenToFloor(camera.viewHeight) - WINDOW_MARGIN.floors,
16
+ floorHi: camera.screenToFloor(0) + WINDOW_MARGIN.floors,
17
+ xLo: camera.screenToTile(0) - WINDOW_MARGIN.tiles,
18
+ xHi: camera.screenToTile(camera.viewWidth) + WINDOW_MARGIN.tiles,
19
+ };
20
+ }
21
+ /** A window that holds nobody: floors far below any lot. The engine reads a
22
+ * window it cannot use as every person (`view::PeopleWindow::new`), so an
23
+ * empty frame needs a real window with nobody in it. */
24
+ const NO_PEOPLE = { floorLo: -1e6, floorHi: -1e6, xLo: 0, xHi: 0 };
25
+ /** The window this frame's view sends people for. While the zoom cull hides
26
+ * the crowd (`crowdCull.ts`), nobody crosses from the engine, since no
27
+ * figure is drawn; the frame where the cull lifts already reads the screen,
28
+ * because the cull is judged from this frame's zoom without moving the
29
+ * latch. A followed person keeps the window, so the camera glides with
30
+ * their record at any zoom (#2151). */
31
+ function frameWindow(engine) {
32
+ const culled = crowdCullNext(engine.cam.zoom, engine.crowdCulled);
33
+ const following = focusedPerson(engine)?.follow === true;
34
+ return culled && !following ? NO_PEOPLE : peopleWindow(engine);
35
+ }
36
+
37
+ export { NO_PEOPLE, WINDOW_MARGIN, frameWindow, peopleWindow };
38
+ //# sourceMappingURL=peopleWindow.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"peopleWindow.js","sources":["../../../src/render/excalibur/peopleWindow.ts"],"sourcesContent":["import { crowdCullNext } from \"./crowdCull\";\nimport { focusedPerson } from \"./personFocus\";\nimport type { TowerEngine } from \"./TowerEngine\";\n\n/** How far past the screen the people window reaches: tiles past each side,\n * floors past the top and the bottom, so a figure walking in is already in\n * the frame when it shows. The engine adds its own pad on top, so every\n * rider of a car on screen comes along (`view::PeopleWindow::padded`). */\nexport const WINDOW_MARGIN = { tiles: 2, floors: 1 } as const;\n\n/** The floors and tiles the engine's frame sends people for. */\nexport interface PeopleWindow {\n floorLo: number;\n floorHi: number;\n xLo: number;\n xHi: number;\n}\n\ntype Camera = Pick<TowerEngine, \"screenToTile\" | \"screenToFloor\" | \"viewWidth\" | \"viewHeight\">;\n\n/** The part of the tower on screen, plus {@link WINDOW_MARGIN}. The 1994 game\n * draws every person in its scrolling window and none outside it, so the\n * frame carries the people the view shows: its size follows the screen and\n * stays flat as the crowd grows. */\nexport function peopleWindow(camera: Camera): PeopleWindow {\n return {\n floorLo: camera.screenToFloor(camera.viewHeight) - WINDOW_MARGIN.floors,\n floorHi: camera.screenToFloor(0) + WINDOW_MARGIN.floors,\n xLo: camera.screenToTile(0) - WINDOW_MARGIN.tiles,\n xHi: camera.screenToTile(camera.viewWidth) + WINDOW_MARGIN.tiles,\n };\n}\n\n/** A window that holds nobody: floors far below any lot. The engine reads a\n * window it cannot use as every person (`view::PeopleWindow::new`), so an\n * empty frame needs a real window with nobody in it. */\nexport const NO_PEOPLE: PeopleWindow = { floorLo: -1e6, floorHi: -1e6, xLo: 0, xHi: 0 };\n\ntype FrameCamera = Camera & Pick<TowerEngine, \"cam\" | \"crowdCulled\">;\n\n/** The window this frame's view sends people for. While the zoom cull hides\n * the crowd (`crowdCull.ts`), nobody crosses from the engine, since no\n * figure is drawn; the frame where the cull lifts already reads the screen,\n * because the cull is judged from this frame's zoom without moving the\n * latch. A followed person keeps the window, so the camera glides with\n * their record at any zoom (#2151). */\nexport function frameWindow(engine: FrameCamera): PeopleWindow {\n const culled = crowdCullNext(engine.cam.zoom, engine.crowdCulled);\n const following = focusedPerson(engine as TowerEngine)?.follow === true;\n return culled && !following ? NO_PEOPLE : peopleWindow(engine);\n}\n"],"names":[],"mappings":";;;AAIA;;;AAG2E;AACpE,MAAM,aAAa,GAAG,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC;AAYlD;;;AAGqC;AAC/B,SAAU,YAAY,CAAC,MAAc,EAAA;IACzC,OAAO;AACL,QAAA,OAAO,EAAE,MAAM,CAAC,aAAa,CAAC,MAAM,CAAC,UAAU,CAAC,GAAG,aAAa,CAAC,MAAM;QACvE,OAAO,EAAE,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC,GAAG,aAAa,CAAC,MAAM;QACvD,GAAG,EAAE,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC,GAAG,aAAa,CAAC,KAAK;AACjD,QAAA,GAAG,EAAE,MAAM,CAAC,YAAY,CAAC,MAAM,CAAC,SAAS,CAAC,GAAG,aAAa,CAAC,KAAK;KACjE;AACH;AAEA;;AAEyD;MAC5C,SAAS,GAAiB,EAAE,OAAO,EAAE,CAAC,GAAG,EAAE,OAAO,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC;AAIrF;;;;;AAKwC;AAClC,SAAU,WAAW,CAAC,MAAmB,EAAA;AAC7C,IAAA,MAAM,MAAM,GAAG,aAAa,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,EAAE,MAAM,CAAC,WAAW,CAAC;IACjE,MAAM,SAAS,GAAG,aAAa,CAAC,MAAqB,CAAC,EAAE,MAAM,KAAK,IAAI;AACvE,IAAA,OAAO,MAAM,IAAI,CAAC,SAAS,GAAG,SAAS,GAAG,YAAY,CAAC,MAAM,CAAC;AAChE;;"}
@@ -0,0 +1,36 @@
1
+ import * as ex from "excalibur";
2
+ import type { TowerEngine } from "./TowerEngine";
3
+ /** The figure the world point lands on, nearest first, or null. A rider
4
+ * inside a car is hidden in the cab and picks the car instead. */
5
+ export declare function pickPersonAt(engine: TowerEngine, world: ex.Vector): number | null;
6
+ export declare function focusPerson(engine: TowerEngine, id: number): void;
7
+ /** The engine's own word on where the picked person is, from their card. */
8
+ export declare function notePersonPlace(engine: TowerEngine, x: number, floor: number): void;
9
+ export declare function clearPersonFocus(engine: TowerEngine): void;
10
+ export declare function focusedPerson(engine: TowerEngine): {
11
+ id: number;
12
+ follow: boolean;
13
+ } | undefined;
14
+ export declare function setFollow(engine: TowerEngine, on: boolean): void;
15
+ /** The picked person's drawn spot in world pixels (their feet): their figure,
16
+ * else the view's record, else the engine's last word from the card; null
17
+ * before any. A rider hidden in a car still has a spot: their glide follows
18
+ * the engine. */
19
+ export declare function focusSpot(engine: TowerEngine): ex.Vector | null;
20
+ /** One frame of the follow: a pan, or any other move of the camera, hands it
21
+ * back to the player; otherwise the camera glides toward the person.
22
+ *
23
+ * `nowMs` is the page's clock (`performance.now()`), and the glide runs on
24
+ * the time since the last step. The engine's frame time is not used: the
25
+ * render clock turns any frame over 200 ms into 1 ms, so on a device that
26
+ * draws slower than five frames a second the camera would barely move. */
27
+ export declare function stepFollow(engine: TowerEngine, nowMs: number): void;
28
+ /** The ring around the picked person, on the overlay canvas. */
29
+ export declare function drawPersonRing(engine: TowerEngine, ctx: CanvasRenderingContext2D): void;
30
+ /** The picked person's on-screen box (top edge), for the card to anchor
31
+ * beside. */
32
+ export declare function focusScreenRect(engine: TowerEngine): {
33
+ x: number;
34
+ y: number;
35
+ w: number;
36
+ } | null;
@@ -0,0 +1,169 @@
1
+ import * as ex from 'excalibur';
2
+ import { FLOOR, TILE } from '../scale.js';
3
+ import { FIGURE_ANCHOR, FIGURE_W, FIGURE_H } from './peopleGfx.js';
4
+
5
+ const focus = new WeakMap();
6
+ /** Extra reach around a figure, in screen pixels, so a tap on a two-pixel
7
+ * arm still lands. */
8
+ const PICK_SLOP_PX = 6;
9
+ /** How fast the camera closes on a followed person: the share of the gap
10
+ * left after one second. Small enough to glide, large enough to keep up
11
+ * with a rider in an express car. */
12
+ const FOLLOW_LEFT_AFTER_SECOND = 0.02;
13
+ /** The longest frame one step of the follow catches up, so the camera
14
+ * glides on a slow device and does not leap after a stalled tab. */
15
+ const FOLLOW_STEP_CAP_MS = 250;
16
+ /** The first step's length, before there is a last step to measure from. */
17
+ const FOLLOW_FIRST_STEP_MS = 1000 / 60;
18
+ /** A pan, or any other camera move, of more than this (screen pixels) takes
19
+ * the camera back. */
20
+ const FOLLOW_PAN_SLOP_PX = 14;
21
+ /** A camera move the follow did not make, past this (screen pixels), hands
22
+ * the camera back: small enough to catch a keyboard nudge of one tile at
23
+ * any zoom, large enough to ignore rounding. */
24
+ const FOLLOW_MOVED_PX = 2;
25
+ /** The figure the world point lands on, nearest first, or null. A rider
26
+ * inside a car is hidden in the cab and picks the car instead. */
27
+ function pickPersonAt(engine, world) {
28
+ const slop = PICK_SLOP_PX / Math.max(engine.cam.zoom, 0.01);
29
+ const left = FIGURE_ANCHOR.x * FIGURE_W + slop;
30
+ const right = (1 - FIGURE_ANCHOR.x) * FIGURE_W + slop;
31
+ const above = FIGURE_ANCHOR.y * FIGURE_H + slop;
32
+ const below = (1 - FIGURE_ANCHOR.y) * FIGURE_H + slop;
33
+ let best = null;
34
+ let bestD = Infinity;
35
+ for (const [id, rec] of engine.crowdActors) {
36
+ const a = rec.actor;
37
+ if (!a.graphics.isVisible || a.isKilled)
38
+ continue;
39
+ const dx = world.x - a.pos.x;
40
+ const dy = world.y - a.pos.y;
41
+ if (dx < -left || dx > right || dy < -above || dy > below)
42
+ continue;
43
+ // Measured to the body's middle, so of two overlapping figures the one
44
+ // under the pointer wins.
45
+ const d = Math.abs(dx) + Math.abs(dy + above / 2);
46
+ if (d < bestD) {
47
+ bestD = d;
48
+ best = id;
49
+ }
50
+ }
51
+ return best;
52
+ }
53
+ function focusPerson(engine, id) {
54
+ focus.set(engine, { id, follow: false, at: null, cam: null, steppedAt: null });
55
+ }
56
+ /** The engine's own word on where the picked person is, from their card. */
57
+ function notePersonPlace(engine, x, floor) {
58
+ const f = focus.get(engine);
59
+ if (f)
60
+ f.at = { x, floor };
61
+ }
62
+ function clearPersonFocus(engine) {
63
+ focus.delete(engine);
64
+ }
65
+ function focusedPerson(engine) {
66
+ return focus.get(engine);
67
+ }
68
+ function setFollow(engine, on) {
69
+ const f = focus.get(engine);
70
+ if (f) {
71
+ f.follow = on;
72
+ f.cam = null;
73
+ f.steppedAt = null;
74
+ }
75
+ }
76
+ /** The picked person's drawn spot in world pixels (their feet): their figure,
77
+ * else the view's record, else the engine's last word from the card; null
78
+ * before any. A rider hidden in a car still has a spot: their glide follows
79
+ * the engine. */
80
+ function focusSpot(engine) {
81
+ const f = focus.get(engine);
82
+ if (!f)
83
+ return null;
84
+ const rec = engine.crowdActors.get(f.id);
85
+ if (rec)
86
+ return ex.vec(engine.worldX(rec.glide.x), engine.worldYTop(rec.glide.fy) + FLOOR - 3);
87
+ const p = viewPerson(engine, f.id);
88
+ if (p)
89
+ return ex.vec(engine.worldX(p.x), engine.worldYTop(p.fy) + FLOOR - 3);
90
+ // Off the drawn window: the card's last answer brings the camera back to
91
+ // them, and the view takes over once they are drawn again.
92
+ return f.at ? ex.vec(engine.worldX(f.at.x), engine.worldYTop(f.at.floor) + FLOOR - 3) : null;
93
+ }
94
+ function viewPerson(engine, id) {
95
+ for (const p of engine.sim.crowd.people)
96
+ if (p.id === id)
97
+ return p;
98
+ return undefined;
99
+ }
100
+ /** True when something other than the follow moved the camera since its
101
+ * last frame. A zoom alone keeps the follow: it re-centers on the person. */
102
+ function movedByPlayer(engine, f) {
103
+ const c = f.cam;
104
+ if (!c || c.zoom !== engine.cam.zoom)
105
+ return false;
106
+ const pos = engine.cam.pos;
107
+ return Math.hypot(pos.x - c.x, pos.y - c.y) * engine.cam.zoom > FOLLOW_MOVED_PX;
108
+ }
109
+ /** One frame of the follow: a pan, or any other move of the camera, hands it
110
+ * back to the player; otherwise the camera glides toward the person.
111
+ *
112
+ * `nowMs` is the page's clock (`performance.now()`), and the glide runs on
113
+ * the time since the last step. The engine's frame time is not used: the
114
+ * render clock turns any frame over 200 ms into 1 ms, so on a device that
115
+ * draws slower than five frames a second the camera would barely move. */
116
+ function stepFollow(engine, nowMs) {
117
+ const f = focus.get(engine);
118
+ if (!f?.follow)
119
+ return;
120
+ if ((engine.gesture === "pan" && engine.moved > FOLLOW_PAN_SLOP_PX) || movedByPlayer(engine, f)) {
121
+ f.follow = false;
122
+ f.cam = null;
123
+ f.steppedAt = null;
124
+ return;
125
+ }
126
+ const elapsedMs = f.steppedAt === null ? FOLLOW_FIRST_STEP_MS : Math.min(Math.max(0, nowMs - f.steppedAt), FOLLOW_STEP_CAP_MS);
127
+ f.steppedAt = nowMs;
128
+ const spot = focusSpot(engine);
129
+ if (!spot)
130
+ return;
131
+ const keep = Math.pow(FOLLOW_LEFT_AFTER_SECOND, elapsedMs / 1000);
132
+ const target = ex.vec(spot.x, spot.y - FIGURE_H / 2);
133
+ const pos = engine.cam.pos;
134
+ const x = target.x + (pos.x - target.x) * keep;
135
+ const y = target.y + (pos.y - target.y) * keep;
136
+ // Through applyView, so the camera stays inside the lot like any move.
137
+ engine.applyView({ tile: x / TILE, floor: -y / FLOOR, zoom: engine.cam.zoom });
138
+ f.cam = { x: engine.cam.pos.x, y: engine.cam.pos.y, zoom: engine.cam.zoom };
139
+ }
140
+ /** The ring around the picked person, on the overlay canvas. */
141
+ function drawPersonRing(engine, ctx) {
142
+ const spot = focusSpot(engine);
143
+ if (!spot)
144
+ return;
145
+ const s = engine.engine.worldToScreenCoordinates(spot);
146
+ const z = engine.cam.zoom;
147
+ const r = Math.max(6, (FIGURE_H / 2) * z);
148
+ ctx.save();
149
+ ctx.strokeStyle = "#ffd24a";
150
+ ctx.lineWidth = 2;
151
+ ctx.beginPath();
152
+ ctx.ellipse(s.x, s.y - r * 0.9, r * 0.75, r * 1.05, 0, 0, Math.PI * 2);
153
+ ctx.stroke();
154
+ ctx.restore();
155
+ }
156
+ /** The picked person's on-screen box (top edge), for the card to anchor
157
+ * beside. */
158
+ function focusScreenRect(engine) {
159
+ const spot = focusSpot(engine);
160
+ if (!spot)
161
+ return null;
162
+ const z = engine.cam.zoom;
163
+ const s = engine.engine.worldToScreenCoordinates(spot);
164
+ const w = FIGURE_W * z * 0.5;
165
+ return { x: s.x - w / 2, y: s.y - FIGURE_H * z, w };
166
+ }
167
+
168
+ export { clearPersonFocus, drawPersonRing, focusPerson, focusScreenRect, focusSpot, focusedPerson, notePersonPlace, pickPersonAt, setFollow, stepFollow };
169
+ //# sourceMappingURL=personFocus.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"personFocus.js","sources":["../../../src/render/excalibur/personFocus.ts"],"sourcesContent":["import * as ex from \"excalibur\";\nimport type { PersonView } from \"../../simport/view\";\nimport { FLOOR, TILE } from \"../scale\";\nimport { FIGURE_ANCHOR, FIGURE_H, FIGURE_W } from \"./peopleGfx\";\nimport type { TowerEngine } from \"./TowerEngine\";\n\n/**\n * The person the player picked (#2092): picking a walking figure, the ring\n * drawn around them, and the camera that follows them while the player asks.\n * The state lives here, keyed by engine, so `TowerEngine` stays a thin shell.\n *\n * Every read walks only the drawn people (the camera's people window, #2149),\n * never the whole crowd, and only while a person is picked.\n */\n\ninterface Focus {\n id: number;\n follow: boolean;\n /** Where the engine last placed them (tile, floor), for when the view does\n * not carry them: the camera is far off and their figure is not drawn. */\n at: { x: number; floor: number } | null;\n /** Where the follow last left the camera, so a move by anything else (a\n * drag, the keyboard, the Map) hands it back to the player. */\n cam: { x: number; y: number; zoom: number } | null;\n /** The page time of the follow's last step, so it glides by wall time. */\n steppedAt: number | null;\n}\n\nconst focus = new WeakMap<TowerEngine, Focus>();\n\n/** Extra reach around a figure, in screen pixels, so a tap on a two-pixel\n * arm still lands. */\nconst PICK_SLOP_PX = 6;\n/** How fast the camera closes on a followed person: the share of the gap\n * left after one second. Small enough to glide, large enough to keep up\n * with a rider in an express car. */\nconst FOLLOW_LEFT_AFTER_SECOND = 0.02;\n/** The longest frame one step of the follow catches up, so the camera\n * glides on a slow device and does not leap after a stalled tab. */\nconst FOLLOW_STEP_CAP_MS = 250;\n/** The first step's length, before there is a last step to measure from. */\nconst FOLLOW_FIRST_STEP_MS = 1000 / 60;\n/** A pan, or any other camera move, of more than this (screen pixels) takes\n * the camera back. */\nconst FOLLOW_PAN_SLOP_PX = 14;\n/** A camera move the follow did not make, past this (screen pixels), hands\n * the camera back: small enough to catch a keyboard nudge of one tile at\n * any zoom, large enough to ignore rounding. */\nconst FOLLOW_MOVED_PX = 2;\n\n/** The figure the world point lands on, nearest first, or null. A rider\n * inside a car is hidden in the cab and picks the car instead. */\nexport function pickPersonAt(engine: TowerEngine, world: ex.Vector): number | null {\n const slop = PICK_SLOP_PX / Math.max(engine.cam.zoom, 0.01);\n const left = FIGURE_ANCHOR.x * FIGURE_W + slop;\n const right = (1 - FIGURE_ANCHOR.x) * FIGURE_W + slop;\n const above = FIGURE_ANCHOR.y * FIGURE_H + slop;\n const below = (1 - FIGURE_ANCHOR.y) * FIGURE_H + slop;\n let best: number | null = null;\n let bestD = Infinity;\n for (const [id, rec] of engine.crowdActors) {\n const a = rec.actor;\n if (!a.graphics.isVisible || a.isKilled) continue;\n const dx = world.x - a.pos.x;\n const dy = world.y - a.pos.y;\n if (dx < -left || dx > right || dy < -above || dy > below) continue;\n // Measured to the body's middle, so of two overlapping figures the one\n // under the pointer wins.\n const d = Math.abs(dx) + Math.abs(dy + above / 2);\n if (d < bestD) {\n bestD = d;\n best = id;\n }\n }\n return best;\n}\n\nexport function focusPerson(engine: TowerEngine, id: number): void {\n focus.set(engine, { id, follow: false, at: null, cam: null, steppedAt: null });\n}\n\n/** The engine's own word on where the picked person is, from their card. */\nexport function notePersonPlace(engine: TowerEngine, x: number, floor: number): void {\n const f = focus.get(engine);\n if (f) f.at = { x, floor };\n}\n\nexport function clearPersonFocus(engine: TowerEngine): void {\n focus.delete(engine);\n}\n\nexport function focusedPerson(engine: TowerEngine): { id: number; follow: boolean } | undefined {\n return focus.get(engine);\n}\n\nexport function setFollow(engine: TowerEngine, on: boolean): void {\n const f = focus.get(engine);\n if (f) {\n f.follow = on;\n f.cam = null;\n f.steppedAt = null;\n }\n}\n\n/** The picked person's drawn spot in world pixels (their feet): their figure,\n * else the view's record, else the engine's last word from the card; null\n * before any. A rider hidden in a car still has a spot: their glide follows\n * the engine. */\nexport function focusSpot(engine: TowerEngine): ex.Vector | null {\n const f = focus.get(engine);\n if (!f) return null;\n const rec = engine.crowdActors.get(f.id);\n if (rec) return ex.vec(engine.worldX(rec.glide.x), engine.worldYTop(rec.glide.fy) + FLOOR - 3);\n const p = viewPerson(engine, f.id);\n if (p) return ex.vec(engine.worldX(p.x), engine.worldYTop(p.fy) + FLOOR - 3);\n // Off the drawn window: the card's last answer brings the camera back to\n // them, and the view takes over once they are drawn again.\n return f.at ? ex.vec(engine.worldX(f.at.x), engine.worldYTop(f.at.floor) + FLOOR - 3) : null;\n}\n\nfunction viewPerson(engine: TowerEngine, id: number): PersonView | undefined {\n for (const p of engine.sim.crowd.people) if (p.id === id) return p;\n return undefined;\n}\n\n/** True when something other than the follow moved the camera since its\n * last frame. A zoom alone keeps the follow: it re-centers on the person. */\nfunction movedByPlayer(engine: TowerEngine, f: Focus): boolean {\n const c = f.cam;\n if (!c || c.zoom !== engine.cam.zoom) return false;\n const pos = engine.cam.pos;\n return Math.hypot(pos.x - c.x, pos.y - c.y) * engine.cam.zoom > FOLLOW_MOVED_PX;\n}\n\n/** One frame of the follow: a pan, or any other move of the camera, hands it\n * back to the player; otherwise the camera glides toward the person.\n *\n * `nowMs` is the page's clock (`performance.now()`), and the glide runs on\n * the time since the last step. The engine's frame time is not used: the\n * render clock turns any frame over 200 ms into 1 ms, so on a device that\n * draws slower than five frames a second the camera would barely move. */\nexport function stepFollow(engine: TowerEngine, nowMs: number): void {\n const f = focus.get(engine);\n if (!f?.follow) return;\n if ((engine.gesture === \"pan\" && engine.moved > FOLLOW_PAN_SLOP_PX) || movedByPlayer(engine, f)) {\n f.follow = false;\n f.cam = null;\n f.steppedAt = null;\n return;\n }\n const elapsedMs = f.steppedAt === null ? FOLLOW_FIRST_STEP_MS : Math.min(Math.max(0, nowMs - f.steppedAt), FOLLOW_STEP_CAP_MS);\n f.steppedAt = nowMs;\n const spot = focusSpot(engine);\n if (!spot) return;\n const keep = Math.pow(FOLLOW_LEFT_AFTER_SECOND, elapsedMs / 1000);\n const target = ex.vec(spot.x, spot.y - FIGURE_H / 2);\n const pos = engine.cam.pos;\n const x = target.x + (pos.x - target.x) * keep;\n const y = target.y + (pos.y - target.y) * keep;\n // Through applyView, so the camera stays inside the lot like any move.\n engine.applyView({ tile: x / TILE, floor: -y / FLOOR, zoom: engine.cam.zoom });\n f.cam = { x: engine.cam.pos.x, y: engine.cam.pos.y, zoom: engine.cam.zoom };\n}\n\n/** The ring around the picked person, on the overlay canvas. */\nexport function drawPersonRing(engine: TowerEngine, ctx: CanvasRenderingContext2D): void {\n const spot = focusSpot(engine);\n if (!spot) return;\n const s = engine.engine.worldToScreenCoordinates(spot);\n const z = engine.cam.zoom;\n const r = Math.max(6, (FIGURE_H / 2) * z);\n ctx.save();\n ctx.strokeStyle = \"#ffd24a\";\n ctx.lineWidth = 2;\n ctx.beginPath();\n ctx.ellipse(s.x, s.y - r * 0.9, r * 0.75, r * 1.05, 0, 0, Math.PI * 2);\n ctx.stroke();\n ctx.restore();\n}\n\n/** The picked person's on-screen box (top edge), for the card to anchor\n * beside. */\nexport function focusScreenRect(engine: TowerEngine): { x: number; y: number; w: number } | null {\n const spot = focusSpot(engine);\n if (!spot) return null;\n const z = engine.cam.zoom;\n const s = engine.engine.worldToScreenCoordinates(spot);\n const w = FIGURE_W * z * 0.5;\n return { x: s.x - w / 2, y: s.y - FIGURE_H * z, w };\n}\n"],"names":[],"mappings":";;;;AA4BA,MAAM,KAAK,GAAG,IAAI,OAAO,EAAsB;AAE/C;AACuB;AACvB,MAAM,YAAY,GAAG,CAAC;AACtB;;AAEsC;AACtC,MAAM,wBAAwB,GAAG,IAAI;AACrC;AACqE;AACrE,MAAM,kBAAkB,GAAG,GAAG;AAC9B;AACA,MAAM,oBAAoB,GAAG,IAAI,GAAG,EAAE;AACtC;AACuB;AACvB,MAAM,kBAAkB,GAAG,EAAE;AAC7B;;AAEiD;AACjD,MAAM,eAAe,GAAG,CAAC;AAEzB;AACmE;AAC7D,SAAU,YAAY,CAAC,MAAmB,EAAE,KAAgB,EAAA;AAChE,IAAA,MAAM,IAAI,GAAG,YAAY,GAAG,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,EAAE,IAAI,CAAC;IAC3D,MAAM,IAAI,GAAG,aAAa,CAAC,CAAC,GAAG,QAAQ,GAAG,IAAI;AAC9C,IAAA,MAAM,KAAK,GAAG,CAAC,CAAC,GAAG,aAAa,CAAC,CAAC,IAAI,QAAQ,GAAG,IAAI;IACrD,MAAM,KAAK,GAAG,aAAa,CAAC,CAAC,GAAG,QAAQ,GAAG,IAAI;AAC/C,IAAA,MAAM,KAAK,GAAG,CAAC,CAAC,GAAG,aAAa,CAAC,CAAC,IAAI,QAAQ,GAAG,IAAI;IACrD,IAAI,IAAI,GAAkB,IAAI;IAC9B,IAAI,KAAK,GA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,GAAG,QAAQ,GAAG,CAAC,GAAG,GAAG;IAC5B,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,QAAQ,GAAG,CAAC,EAAE,CAAC,EAAE;AACrD;;"}
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Keep pointer buttons Excalibur cannot name away from its input handler.
3
+ *
4
+ * Excalibur 0.32's pointer receiver maps the DOM `PointerEvent.button` code to
5
+ * its own enum and throws on any code it does not list: it knows "no button"
6
+ * (-1), left (0), middle (1), right (2) and back (3), and calls `fail(button)`
7
+ * for anything else. A mouse's forward side button reports 4 and a pen's
8
+ * eraser reports 5, so pressing either over the tower canvas threw an uncaught
9
+ * `Error: 4` from inside the vendor handler (seen in production after the
10
+ * 2026-11-12 launch traffic). The game gives those buttons no meaning, so the
11
+ * guard swallows the event before Excalibur sees it, except that the last up
12
+ * of a pointer is handed on with no button named, so a press never sticks.
13
+ *
14
+ * It listens in the capture phase on the canvas itself, which Excalibur also
15
+ * listens on (the default `PointerScope.Canvas`), so it runs first and
16
+ * `stopImmediatePropagation` keeps the event from reaching Excalibur's handler.
17
+ * It also prevents the default action, as Excalibur does for every other
18
+ * pointer event on the canvas.
19
+ */
20
+ /** The DOM `PointerEvent.button` codes Excalibur's receiver can map. */
21
+ export declare const EXCALIBUR_POINTER_BUTTONS: {
22
+ readonly none: -1;
23
+ readonly left: 0;
24
+ readonly middle: 1;
25
+ readonly right: 2;
26
+ readonly back: 3;
27
+ };
28
+ /** True when Excalibur's pointer receiver can map this DOM button code. */
29
+ export declare function excaliburCanMapButton(button: number): boolean;
30
+ /**
31
+ * Install the guard on the canvas Excalibur reads pointer input from. Call it
32
+ * before the engine is constructed so the guard is registered first. Safe to
33
+ * call again for the same canvas: it installs once.
34
+ */
35
+ export declare function guardPointerButtons(target: EventTarget): void;