@verticopolis/components 0.0.0-stage → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (791) hide show
  1. package/ASSETS-LICENSE.md +49 -0
  2. package/LICENSE +21 -0
  3. package/README.md +121 -2
  4. package/lib/audio/Audio.d.ts +110 -0
  5. package/lib/audio/Audio.js +199 -0
  6. package/lib/audio/Audio.js.map +1 -0
  7. package/lib/audio/ToneAudioEngine.d.ts +125 -0
  8. package/lib/audio/ToneAudioEngine.js +452 -0
  9. package/lib/audio/ToneAudioEngine.js.map +1 -0
  10. package/lib/audio/audioAssets.d.ts +25 -0
  11. package/lib/audio/audioAssets.js +28 -0
  12. package/lib/audio/audioAssets.js.map +1 -0
  13. package/lib/audio/awayWatch.d.ts +17 -0
  14. package/lib/audio/awayWatch.js +33 -0
  15. package/lib/audio/awayWatch.js.map +1 -0
  16. package/lib/audio/firstCueLatch.d.ts +18 -0
  17. package/lib/audio/firstCueLatch.js +34 -0
  18. package/lib/audio/firstCueLatch.js.map +1 -0
  19. package/lib/audio/lightEnvelope.d.ts +64 -0
  20. package/lib/audio/lightEnvelope.js +124 -0
  21. package/lib/audio/lightEnvelope.js.map +1 -0
  22. package/lib/audio/lightSynth.d.ts +125 -0
  23. package/lib/audio/lightSynth.js +203 -0
  24. package/lib/audio/lightSynth.js.map +1 -0
  25. package/lib/audio/toneContext.d.ts +30 -0
  26. package/lib/audio/toneContext.js +79 -0
  27. package/lib/audio/toneContext.js.map +1 -0
  28. package/lib/audio/toneCrowd.d.ts +62 -0
  29. package/lib/audio/toneCrowd.js +429 -0
  30. package/lib/audio/toneCrowd.js.map +1 -0
  31. package/lib/audio/toneCrowdData.d.ts +144 -0
  32. package/lib/audio/toneCrowdData.js +317 -0
  33. package/lib/audio/toneCrowdData.js.map +1 -0
  34. package/lib/audio/toneCrowdPrograms.d.ts +71 -0
  35. package/lib/audio/toneCrowdPrograms.js +273 -0
  36. package/lib/audio/toneCrowdPrograms.js.map +1 -0
  37. package/lib/audio/toneCrowdVoices.d.ts +49 -0
  38. package/lib/audio/toneCrowdVoices.js +212 -0
  39. package/lib/audio/toneCrowdVoices.js.map +1 -0
  40. package/lib/audio/toneMusicVoices.d.ts +11 -0
  41. package/lib/audio/toneMusicVoices.js +31 -0
  42. package/lib/audio/toneMusicVoices.js.map +1 -0
  43. package/lib/audio/tonePercussion.d.ts +45 -0
  44. package/lib/audio/tonePercussion.js +97 -0
  45. package/lib/audio/tonePercussion.js.map +1 -0
  46. package/lib/audio/toneRain.d.ts +23 -0
  47. package/lib/audio/toneRain.js +39 -0
  48. package/lib/audio/toneRain.js.map +1 -0
  49. package/lib/audio/toneRecordingMock.d.ts +89 -0
  50. package/lib/audio/toneRecordingMock.js +145 -0
  51. package/lib/audio/toneRecordingMock.js.map +1 -0
  52. package/lib/audio/toneRoomTone.d.ts +11 -0
  53. package/lib/audio/toneRoomTone.js +27 -0
  54. package/lib/audio/toneRoomTone.js.map +1 -0
  55. package/lib/audio/toneScenes.d.ts +57 -0
  56. package/lib/audio/toneScenes.js +208 -0
  57. package/lib/audio/toneScenes.js.map +1 -0
  58. package/lib/audio/toneTracks.d.ts +50 -0
  59. package/lib/audio/toneTracks.js +356 -0
  60. package/lib/audio/toneTracks.js.map +1 -0
  61. package/lib/audio/toneVoices.d.ts +57 -0
  62. package/lib/audio/toneVoices.js +208 -0
  63. package/lib/audio/toneVoices.js.map +1 -0
  64. package/lib/catalog/catalogTypes.d.ts +428 -0
  65. package/lib/catalog/catalogTypes.js +102 -0
  66. package/lib/catalog/catalogTypes.js.map +1 -0
  67. package/lib/catalog/skyBridgeTypes.d.ts +25 -0
  68. package/lib/catalog/skyBridgeTypes.js +7 -0
  69. package/lib/catalog/skyBridgeTypes.js.map +1 -0
  70. package/lib/catalog/starDutyTypes.d.ts +22 -0
  71. package/lib/catalog/starDutyTypes.js +7 -0
  72. package/lib/catalog/starDutyTypes.js.map +1 -0
  73. package/lib/catalog/towerCatalog.d.ts +32 -0
  74. package/lib/catalog/towerCatalog.js +44 -0
  75. package/lib/catalog/towerCatalog.js.map +1 -0
  76. package/lib/engineBinding/binding.d.ts +36 -0
  77. package/lib/engineBinding/binding.js +90 -0
  78. package/lib/engineBinding/binding.js.map +1 -0
  79. package/lib/engineBinding/catalog.d.ts +24 -0
  80. package/lib/engineBinding/catalog.js +267 -0
  81. package/lib/engineBinding/catalog.js.map +1 -0
  82. package/lib/engineBinding/engine.d.ts +866 -0
  83. package/lib/engineBinding/exportTiers.d.ts +289 -0
  84. package/lib/engineBinding/exportTiers.js +283 -0
  85. package/lib/engineBinding/exportTiers.js.map +1 -0
  86. package/lib/engineBinding/toolingMethods.d.ts +12 -0
  87. package/lib/engineBinding/toolingMethods.js +20 -0
  88. package/lib/engineBinding/toolingMethods.js.map +1 -0
  89. package/lib/events/gameplayCatalog.d.ts +57 -0
  90. package/lib/events/gameplayCatalog.js +214 -0
  91. package/lib/events/gameplayCatalog.js.map +1 -0
  92. package/lib/events/gameplayEventRules.d.ts +4 -0
  93. package/lib/events/gameplayEventRules.js +32 -0
  94. package/lib/events/gameplayEventRules.js.map +1 -0
  95. package/lib/events/gameplayEvents.d.ts +284 -0
  96. package/lib/presentation/clockText.d.ts +28 -0
  97. package/lib/presentation/clockText.js +38 -0
  98. package/lib/presentation/clockText.js.map +1 -0
  99. package/lib/presentation/facilityPresentation.d.ts +20 -0
  100. package/lib/presentation/facilityPresentation.js +164 -0
  101. package/lib/presentation/facilityPresentation.js.map +1 -0
  102. package/lib/presentation/statsCopy.d.ts +20 -0
  103. package/lib/presentation/statsCopy.js +37 -0
  104. package/lib/presentation/statsCopy.js.map +1 -0
  105. package/lib/presentation/traffic.d.ts +75 -0
  106. package/lib/presentation/traffic.js +79 -0
  107. package/lib/presentation/traffic.js.map +1 -0
  108. package/lib/presentation/viewKinds.d.ts +33 -0
  109. package/lib/presentation/viewKinds.js +88 -0
  110. package/lib/presentation/viewKinds.js.map +1 -0
  111. package/lib/presentation/viewWorld.d.ts +29 -0
  112. package/lib/presentation/viewWorld.js +31 -0
  113. package/lib/presentation/viewWorld.js.map +1 -0
  114. package/lib/render/atlas/archive.d.ts +78 -0
  115. package/lib/render/atlas/archive.js +427 -0
  116. package/lib/render/atlas/archive.js.map +1 -0
  117. package/lib/render/atlas/bake.d.ts +132 -0
  118. package/lib/render/atlas/bake.js +331 -0
  119. package/lib/render/atlas/bake.js.map +1 -0
  120. package/lib/render/atlas/bakeAdditions.d.ts +24 -0
  121. package/lib/render/atlas/bakeAdditions.js +46 -0
  122. package/lib/render/atlas/bakeAdditions.js.map +1 -0
  123. package/lib/render/atlas/browserEntry.d.ts +12 -0
  124. package/lib/render/atlas/browserEntry.js +222 -0
  125. package/lib/render/atlas/browserEntry.js.map +1 -0
  126. package/lib/render/atlas/catalog.d.ts +118 -0
  127. package/lib/render/atlas/catalog.js +253 -0
  128. package/lib/render/atlas/catalog.js.map +1 -0
  129. package/lib/render/atlas/catalogExtras.d.ts +45 -0
  130. package/lib/render/atlas/catalogExtras.js +217 -0
  131. package/lib/render/atlas/catalogExtras.js.map +1 -0
  132. package/lib/render/atlas/compose.d.ts +30 -0
  133. package/lib/render/atlas/compose.js +125 -0
  134. package/lib/render/atlas/compose.js.map +1 -0
  135. package/lib/render/atlas/cycles.d.ts +25 -0
  136. package/lib/render/atlas/cycles.js +41 -0
  137. package/lib/render/atlas/cycles.js.map +1 -0
  138. package/lib/render/atlas/lookup.d.ts +65 -0
  139. package/lib/render/atlas/lookup.js +83 -0
  140. package/lib/render/atlas/lookup.js.map +1 -0
  141. package/lib/render/atlas/pack.d.ts +23 -0
  142. package/lib/render/atlas/pack.js +50 -0
  143. package/lib/render/atlas/pack.js.map +1 -0
  144. package/lib/render/atlas/paint.d.ts +120 -0
  145. package/lib/render/atlas/paint.js +154 -0
  146. package/lib/render/atlas/paint.js.map +1 -0
  147. package/lib/render/atlas/pixels.d.ts +46 -0
  148. package/lib/render/atlas/pixels.js +158 -0
  149. package/lib/render/atlas/pixels.js.map +1 -0
  150. package/lib/render/atlas/png.d.ts +3 -0
  151. package/lib/render/atlas/png.js +102 -0
  152. package/lib/render/atlas/png.js.map +1 -0
  153. package/lib/render/atlas/raster.d.ts +34 -0
  154. package/lib/render/atlas/raster.js +114 -0
  155. package/lib/render/atlas/raster.js.map +1 -0
  156. package/lib/render/atlas/recyclingFill.d.ts +5 -0
  157. package/lib/render/atlas/recyclingFill.js +65 -0
  158. package/lib/render/atlas/recyclingFill.js.map +1 -0
  159. package/lib/render/atlas/samples.d.ts +24 -0
  160. package/lib/render/atlas/samples.js +75 -0
  161. package/lib/render/atlas/samples.js.map +1 -0
  162. package/lib/render/atlas/scenery.d.ts +230 -0
  163. package/lib/render/atlas/scenery.js +242 -0
  164. package/lib/render/atlas/scenery.js.map +1 -0
  165. package/lib/render/atlas/schema.d.ts +189 -0
  166. package/lib/render/atlas/schema.js +31 -0
  167. package/lib/render/atlas/schema.js.map +1 -0
  168. package/lib/render/atlas/shellMarks.d.ts +16 -0
  169. package/lib/render/atlas/shellMarks.js +72 -0
  170. package/lib/render/atlas/shellMarks.js.map +1 -0
  171. package/lib/render/atlas/store.d.ts +75 -0
  172. package/lib/render/atlas/store.js +127 -0
  173. package/lib/render/atlas/store.js.map +1 -0
  174. package/lib/render/atlas/verify.d.ts +43 -0
  175. package/lib/render/atlas/verify.js +87 -0
  176. package/lib/render/atlas/verify.js.map +1 -0
  177. package/lib/render/atlas/verifyExtras.d.ts +19 -0
  178. package/lib/render/atlas/verifyExtras.js +310 -0
  179. package/lib/render/atlas/verifyExtras.js.map +1 -0
  180. package/lib/render/cameraBounds.d.ts +71 -0
  181. package/lib/render/cameraBounds.js +107 -0
  182. package/lib/render/cameraBounds.js.map +1 -0
  183. package/lib/render/carIndicator.d.ts +41 -0
  184. package/lib/render/carIndicator.js +45 -0
  185. package/lib/render/carIndicator.js.map +1 -0
  186. package/lib/render/carMotion.d.ts +33 -0
  187. package/lib/render/carMotion.js +42 -0
  188. package/lib/render/carMotion.js.map +1 -0
  189. package/lib/render/catalogScale.d.ts +40 -0
  190. package/lib/render/catalogScale.js +33 -0
  191. package/lib/render/catalogScale.js.map +1 -0
  192. package/lib/render/climbPath.d.ts +59 -0
  193. package/lib/render/climbPath.js +115 -0
  194. package/lib/render/climbPath.js.map +1 -0
  195. package/lib/render/depthPlanes.d.ts +55 -0
  196. package/lib/render/depthPlanes.js +58 -0
  197. package/lib/render/depthPlanes.js.map +1 -0
  198. package/lib/render/excalibur/TowerEngine.d.ts +348 -0
  199. package/lib/render/excalibur/TowerEngine.js +415 -0
  200. package/lib/render/excalibur/TowerEngine.js.map +1 -0
  201. package/lib/render/excalibur/cabGraphics.d.ts +75 -0
  202. package/lib/render/excalibur/cabGraphics.js +108 -0
  203. package/lib/render/excalibur/cabGraphics.js.map +1 -0
  204. package/lib/render/excalibur/cabParts.d.ts +32 -0
  205. package/lib/render/excalibur/cabParts.js +79 -0
  206. package/lib/render/excalibur/cabParts.js.map +1 -0
  207. package/lib/render/excalibur/cabRiders.d.ts +72 -0
  208. package/lib/render/excalibur/cabRiders.js +176 -0
  209. package/lib/render/excalibur/cabRiders.js.map +1 -0
  210. package/lib/render/excalibur/crowdCull.d.ts +34 -0
  211. package/lib/render/excalibur/crowdCull.js +72 -0
  212. package/lib/render/excalibur/crowdCull.js.map +1 -0
  213. package/lib/render/excalibur/crowdFigure.d.ts +42 -0
  214. package/lib/render/excalibur/crowdFigure.js +99 -0
  215. package/lib/render/excalibur/crowdFigure.js.map +1 -0
  216. package/lib/render/excalibur/crowdLook.d.ts +137 -0
  217. package/lib/render/excalibur/crowdLook.js +186 -0
  218. package/lib/render/excalibur/crowdLook.js.map +1 -0
  219. package/lib/render/excalibur/frameHold.d.ts +23 -0
  220. package/lib/render/excalibur/frameHold.js +30 -0
  221. package/lib/render/excalibur/frameHold.js.map +1 -0
  222. package/lib/render/excalibur/guardPosition.d.ts +17 -0
  223. package/lib/render/excalibur/guardPosition.js +37 -0
  224. package/lib/render/excalibur/guardPosition.js.map +1 -0
  225. package/lib/render/excalibur/keyboardHost.d.ts +15 -0
  226. package/lib/render/excalibur/keyboardHost.js +22 -0
  227. package/lib/render/excalibur/keyboardHost.js.map +1 -0
  228. package/lib/render/excalibur/longPress.d.ts +16 -0
  229. package/lib/render/excalibur/longPress.js +71 -0
  230. package/lib/render/excalibur/longPress.js.map +1 -0
  231. package/lib/render/excalibur/peopleGfx.d.ts +16 -0
  232. package/lib/render/excalibur/peopleGfx.js +46 -0
  233. package/lib/render/excalibur/peopleGfx.js.map +1 -0
  234. package/lib/render/excalibur/peopleWindow.d.ts +35 -0
  235. package/lib/render/excalibur/peopleWindow.js +38 -0
  236. package/lib/render/excalibur/peopleWindow.js.map +1 -0
  237. package/lib/render/excalibur/personFocus.d.ts +36 -0
  238. package/lib/render/excalibur/personFocus.js +169 -0
  239. package/lib/render/excalibur/personFocus.js.map +1 -0
  240. package/lib/render/excalibur/pointerButtonGuard.d.ts +35 -0
  241. package/lib/render/excalibur/pointerButtonGuard.js +86 -0
  242. package/lib/render/excalibur/pointerButtonGuard.js.map +1 -0
  243. package/lib/render/excalibur/pressLifecycle.d.ts +26 -0
  244. package/lib/render/excalibur/pressLifecycle.js +66 -0
  245. package/lib/render/excalibur/pressLifecycle.js.map +1 -0
  246. package/lib/render/excalibur/rainShelter.d.ts +16 -0
  247. package/lib/render/excalibur/rainShelter.js +94 -0
  248. package/lib/render/excalibur/rainShelter.js.map +1 -0
  249. package/lib/render/excalibur/roomSignature.d.ts +30 -0
  250. package/lib/render/excalibur/roomSignature.js +49 -0
  251. package/lib/render/excalibur/roomSignature.js.map +1 -0
  252. package/lib/render/excalibur/sceneBake.d.ts +9 -0
  253. package/lib/render/excalibur/sceneBake.js +12 -0
  254. package/lib/render/excalibur/sceneBake.js.map +1 -0
  255. package/lib/render/excalibur/thiefSpan.d.ts +18 -0
  256. package/lib/render/excalibur/thiefSpan.js +51 -0
  257. package/lib/render/excalibur/thiefSpan.js.map +1 -0
  258. package/lib/render/excalibur/towerBridgeTiles.d.ts +30 -0
  259. package/lib/render/excalibur/towerBridgeTiles.js +43 -0
  260. package/lib/render/excalibur/towerBridgeTiles.js.map +1 -0
  261. package/lib/render/excalibur/towerCrowd.d.ts +73 -0
  262. package/lib/render/excalibur/towerCrowd.js +464 -0
  263. package/lib/render/excalibur/towerCrowd.js.map +1 -0
  264. package/lib/render/excalibur/towerCrowdLayout.d.ts +40 -0
  265. package/lib/render/excalibur/towerCrowdLayout.js +77 -0
  266. package/lib/render/excalibur/towerCrowdLayout.js.map +1 -0
  267. package/lib/render/excalibur/towerFireResponse.d.ts +25 -0
  268. package/lib/render/excalibur/towerFireResponse.js +89 -0
  269. package/lib/render/excalibur/towerFireResponse.js.map +1 -0
  270. package/lib/render/excalibur/towerFrame.d.ts +8 -0
  271. package/lib/render/excalibur/towerFrame.js +57 -0
  272. package/lib/render/excalibur/towerFrame.js.map +1 -0
  273. package/lib/render/excalibur/towerGhostLabel.d.ts +9 -0
  274. package/lib/render/excalibur/towerGhostLabel.js +37 -0
  275. package/lib/render/excalibur/towerGhostLabel.js.map +1 -0
  276. package/lib/render/excalibur/towerHallDoors.d.ts +42 -0
  277. package/lib/render/excalibur/towerHallDoors.js +129 -0
  278. package/lib/render/excalibur/towerHallDoors.js.map +1 -0
  279. package/lib/render/excalibur/towerHaloRings.d.ts +34 -0
  280. package/lib/render/excalibur/towerHaloRings.js +45 -0
  281. package/lib/render/excalibur/towerHaloRings.js.map +1 -0
  282. package/lib/render/excalibur/towerInputCamera.d.ts +90 -0
  283. package/lib/render/excalibur/towerInputCamera.js +480 -0
  284. package/lib/render/excalibur/towerInputCamera.js.map +1 -0
  285. package/lib/render/excalibur/towerMetro.d.ts +31 -0
  286. package/lib/render/excalibur/towerMetro.js +115 -0
  287. package/lib/render/excalibur/towerMetro.js.map +1 -0
  288. package/lib/render/excalibur/towerNoiseReach.d.ts +32 -0
  289. package/lib/render/excalibur/towerNoiseReach.js +75 -0
  290. package/lib/render/excalibur/towerNoiseReach.js.map +1 -0
  291. package/lib/render/excalibur/towerOverlay.d.ts +59 -0
  292. package/lib/render/excalibur/towerOverlay.js +453 -0
  293. package/lib/render/excalibur/towerOverlay.js.map +1 -0
  294. package/lib/render/excalibur/towerReconcile.d.ts +17 -0
  295. package/lib/render/excalibur/towerReconcile.js +404 -0
  296. package/lib/render/excalibur/towerReconcile.js.map +1 -0
  297. package/lib/render/excalibur/towerRegions.d.ts +61 -0
  298. package/lib/render/excalibur/towerRegions.js +193 -0
  299. package/lib/render/excalibur/towerRegions.js.map +1 -0
  300. package/lib/render/excalibur/towerScene.d.ts +66 -0
  301. package/lib/render/excalibur/towerScene.js +443 -0
  302. package/lib/render/excalibur/towerScene.js.map +1 -0
  303. package/lib/render/excalibur/towerScenery.d.ts +12 -0
  304. package/lib/render/excalibur/towerScenery.js +299 -0
  305. package/lib/render/excalibur/towerScenery.js.map +1 -0
  306. package/lib/render/excalibur/towerSceneryDraw.d.ts +86 -0
  307. package/lib/render/excalibur/towerSceneryDraw.js +288 -0
  308. package/lib/render/excalibur/towerSceneryDraw.js.map +1 -0
  309. package/lib/render/excalibur/towerShaftNumbers.d.ts +23 -0
  310. package/lib/render/excalibur/towerShaftNumbers.js +90 -0
  311. package/lib/render/excalibur/towerShaftNumbers.js.map +1 -0
  312. package/lib/render/excalibur/towerStructTiles.d.ts +56 -0
  313. package/lib/render/excalibur/towerStructTiles.js +238 -0
  314. package/lib/render/excalibur/towerStructTiles.js.map +1 -0
  315. package/lib/render/excalibur/towerSyncSchedule.d.ts +84 -0
  316. package/lib/render/excalibur/towerSyncSchedule.js +137 -0
  317. package/lib/render/excalibur/towerSyncSchedule.js.map +1 -0
  318. package/lib/render/excalibur/towerWalkerBuild.d.ts +30 -0
  319. package/lib/render/excalibur/towerWalkerBuild.js +126 -0
  320. package/lib/render/excalibur/towerWalkerBuild.js.map +1 -0
  321. package/lib/render/excalibur/trafficSpotlight.d.ts +29 -0
  322. package/lib/render/excalibur/trafficSpotlight.js +64 -0
  323. package/lib/render/excalibur/trafficSpotlight.js.map +1 -0
  324. package/lib/render/facadeGeometry.d.ts +50 -0
  325. package/lib/render/facadeGeometry.js +79 -0
  326. package/lib/render/facadeGeometry.js.map +1 -0
  327. package/lib/render/groundEntrances.d.ts +44 -0
  328. package/lib/render/groundEntrances.js +118 -0
  329. package/lib/render/groundEntrances.js.map +1 -0
  330. package/lib/render/lateNight.d.ts +14 -0
  331. package/lib/render/lateNight.js +18 -0
  332. package/lib/render/lateNight.js.map +1 -0
  333. package/lib/render/lobbyHalls.d.ts +44 -0
  334. package/lib/render/lobbyHalls.js +63 -0
  335. package/lib/render/lobbyHalls.js.map +1 -0
  336. package/lib/render/metroTrainSchedule.d.ts +20 -0
  337. package/lib/render/metroTrainSchedule.js +65 -0
  338. package/lib/render/metroTrainSchedule.js.map +1 -0
  339. package/lib/render/overviewMap/drawList.d.ts +67 -0
  340. package/lib/render/overviewMap/drawList.js +103 -0
  341. package/lib/render/overviewMap/drawList.js.map +1 -0
  342. package/lib/render/overviewMap/extent.d.ts +70 -0
  343. package/lib/render/overviewMap/extent.js +155 -0
  344. package/lib/render/overviewMap/extent.js.map +1 -0
  345. package/lib/render/overviewMap/floorSpans.d.ts +27 -0
  346. package/lib/render/overviewMap/floorSpans.js +32 -0
  347. package/lib/render/overviewMap/floorSpans.js.map +1 -0
  348. package/lib/render/overviewMap/gaps.d.ts +48 -0
  349. package/lib/render/overviewMap/gaps.js +148 -0
  350. package/lib/render/overviewMap/gaps.js.map +1 -0
  351. package/lib/render/overviewMap/geometry.d.ts +139 -0
  352. package/lib/render/overviewMap/geometry.js +245 -0
  353. package/lib/render/overviewMap/geometry.js.map +1 -0
  354. package/lib/render/overviewMap/heatView.d.ts +91 -0
  355. package/lib/render/overviewMap/heatView.js +143 -0
  356. package/lib/render/overviewMap/heatView.js.map +1 -0
  357. package/lib/render/overviewMap/hotelView.d.ts +82 -0
  358. package/lib/render/overviewMap/hotelView.js +136 -0
  359. package/lib/render/overviewMap/hotelView.js.map +1 -0
  360. package/lib/render/overviewMap/model.d.ts +97 -0
  361. package/lib/render/overviewMap/model.js +116 -0
  362. package/lib/render/overviewMap/model.js.map +1 -0
  363. package/lib/render/overviewMap/paint.d.ts +63 -0
  364. package/lib/render/overviewMap/paint.js +168 -0
  365. package/lib/render/overviewMap/paint.js.map +1 -0
  366. package/lib/render/overviewMap/style.d.ts +46 -0
  367. package/lib/render/overviewMap/style.js +117 -0
  368. package/lib/render/overviewMap/style.js.map +1 -0
  369. package/lib/render/overviewMap/tierView.d.ts +103 -0
  370. package/lib/render/overviewMap/tierView.js +209 -0
  371. package/lib/render/overviewMap/tierView.js.map +1 -0
  372. package/lib/render/overviewMap/viewMark.d.ts +69 -0
  373. package/lib/render/overviewMap/viewMark.js +103 -0
  374. package/lib/render/overviewMap/viewMark.js.map +1 -0
  375. package/lib/render/overviewMap/views.d.ts +24 -0
  376. package/lib/render/overviewMap/views.js +29 -0
  377. package/lib/render/overviewMap/views.js.map +1 -0
  378. package/lib/render/pinchTracker.d.ts +91 -0
  379. package/lib/render/pinchTracker.js +145 -0
  380. package/lib/render/pinchTracker.js.map +1 -0
  381. package/lib/render/pixelSprites/amusements.d.ts +32 -0
  382. package/lib/render/pixelSprites/amusements.js +243 -0
  383. package/lib/render/pixelSprites/amusements.js.map +1 -0
  384. package/lib/render/pixelSprites/artScale.d.ts +97 -0
  385. package/lib/render/pixelSprites/artScale.js +151 -0
  386. package/lib/render/pixelSprites/artScale.js.map +1 -0
  387. package/lib/render/pixelSprites/boutique.d.ts +30 -0
  388. package/lib/render/pixelSprites/boutique.js +244 -0
  389. package/lib/render/pixelSprites/boutique.js.map +1 -0
  390. package/lib/render/pixelSprites/clinic.d.ts +30 -0
  391. package/lib/render/pixelSprites/clinic.js +184 -0
  392. package/lib/render/pixelSprites/clinic.js.map +1 -0
  393. package/lib/render/pixelSprites/common.d.ts +185 -0
  394. package/lib/render/pixelSprites/common.js +449 -0
  395. package/lib/render/pixelSprites/common.js.map +1 -0
  396. package/lib/render/pixelSprites/daycare.d.ts +3 -0
  397. package/lib/render/pixelSprites/daycare.js +99 -0
  398. package/lib/render/pixelSprites/daycare.js.map +1 -0
  399. package/lib/render/pixelSprites/dollhouse.d.ts +45 -0
  400. package/lib/render/pixelSprites/dollhouse.js +110 -0
  401. package/lib/render/pixelSprites/dollhouse.js.map +1 -0
  402. package/lib/render/pixelSprites/fitness.d.ts +30 -0
  403. package/lib/render/pixelSprites/fitness.js +176 -0
  404. package/lib/render/pixelSprites/fitness.js.map +1 -0
  405. package/lib/render/pixelSprites/food.d.ts +27 -0
  406. package/lib/render/pixelSprites/food.interiors.d.ts +38 -0
  407. package/lib/render/pixelSprites/food.interiors.js +516 -0
  408. package/lib/render/pixelSprites/food.interiors.js.map +1 -0
  409. package/lib/render/pixelSprites/food.js +36 -0
  410. package/lib/render/pixelSprites/food.js.map +1 -0
  411. package/lib/render/pixelSprites/food.kit.d.ts +50 -0
  412. package/lib/render/pixelSprites/food.kit.js +140 -0
  413. package/lib/render/pixelSprites/food.kit.js.map +1 -0
  414. package/lib/render/pixelSprites/food.looks.d.ts +45 -0
  415. package/lib/render/pixelSprites/food.looks.js +56 -0
  416. package/lib/render/pixelSprites/food.looks.js.map +1 -0
  417. package/lib/render/pixelSprites/layers.d.ts +49 -0
  418. package/lib/render/pixelSprites/layers.js +61 -0
  419. package/lib/render/pixelSprites/layers.js.map +1 -0
  420. package/lib/render/pixelSprites/nightclub.d.ts +3 -0
  421. package/lib/render/pixelSprites/nightclub.js +108 -0
  422. package/lib/render/pixelSprites/nightclub.js.map +1 -0
  423. package/lib/render/pixelSprites/people.d.ts +168 -0
  424. package/lib/render/pixelSprites/people.js +431 -0
  425. package/lib/render/pixelSprites/people.js.map +1 -0
  426. package/lib/render/pixelSprites/residential.d.ts +5 -0
  427. package/lib/render/pixelSprites/residential.js +506 -0
  428. package/lib/render/pixelSprites/residential.js.map +1 -0
  429. package/lib/render/pixelSprites/residential.looks.d.ts +40 -0
  430. package/lib/render/pixelSprites/residential.looks.js +43 -0
  431. package/lib/render/pixelSprites/residential.looks.js.map +1 -0
  432. package/lib/render/pixelSprites/residential.roaches.d.ts +38 -0
  433. package/lib/render/pixelSprites/residential.roaches.js +88 -0
  434. package/lib/render/pixelSprites/residential.roaches.js.map +1 -0
  435. package/lib/render/pixelSprites/residentialRentalSprites.d.ts +11 -0
  436. package/lib/render/pixelSprites/residentialRentalSprites.js +19 -0
  437. package/lib/render/pixelSprites/residentialRentalSprites.js.map +1 -0
  438. package/lib/render/pixelSprites/shop.d.ts +14 -0
  439. package/lib/render/pixelSprites/shop.interiors.d.ts +50 -0
  440. package/lib/render/pixelSprites/shop.interiors.js +382 -0
  441. package/lib/render/pixelSprites/shop.interiors.js.map +1 -0
  442. package/lib/render/pixelSprites/shop.js +72 -0
  443. package/lib/render/pixelSprites/shop.js.map +1 -0
  444. package/lib/render/pixelSprites/shop.looks.d.ts +17 -0
  445. package/lib/render/pixelSprites/shop.looks.js +24 -0
  446. package/lib/render/pixelSprites/shop.looks.js.map +1 -0
  447. package/lib/render/pixelSprites/skyBar.d.ts +11 -0
  448. package/lib/render/pixelSprites/skyBar.js +125 -0
  449. package/lib/render/pixelSprites/skyBar.js.map +1 -0
  450. package/lib/render/pixelSprites/spa.d.ts +3 -0
  451. package/lib/render/pixelSprites/spa.js +88 -0
  452. package/lib/render/pixelSprites/spa.js.map +1 -0
  453. package/lib/render/pixelSprites.d.ts +33 -0
  454. package/lib/render/pixelSprites.js +167 -0
  455. package/lib/render/pixelSprites.js.map +1 -0
  456. package/lib/render/regionGrid.d.ts +49 -0
  457. package/lib/render/regionGrid.js +82 -0
  458. package/lib/render/regionGrid.js.map +1 -0
  459. package/lib/render/regionPaint.d.ts +15 -0
  460. package/lib/render/regionPaint.js +33 -0
  461. package/lib/render/regionPaint.js.map +1 -0
  462. package/lib/render/renderSim.d.ts +104 -0
  463. package/lib/render/renderSim.js +2 -0
  464. package/lib/render/renderSim.js.map +1 -0
  465. package/lib/render/roomPortrait.d.ts +35 -0
  466. package/lib/render/roomPortrait.js +142 -0
  467. package/lib/render/roomPortrait.js.map +1 -0
  468. package/lib/render/roomShading.d.ts +29 -0
  469. package/lib/render/roomShading.js +43 -0
  470. package/lib/render/roomShading.js.map +1 -0
  471. package/lib/render/scale.d.ts +31 -0
  472. package/lib/render/scale.js +34 -0
  473. package/lib/render/scale.js.map +1 -0
  474. package/lib/render/sceneryLayout.d.ts +234 -0
  475. package/lib/render/sceneryLayout.js +199 -0
  476. package/lib/render/sceneryLayout.js.map +1 -0
  477. package/lib/render/sprites/common.d.ts +41 -0
  478. package/lib/render/sprites/common.js +46 -0
  479. package/lib/render/sprites/common.js.map +1 -0
  480. package/lib/render/sprites/escalator.d.ts +27 -0
  481. package/lib/render/sprites/escalator.js +156 -0
  482. package/lib/render/sprites/escalator.js.map +1 -0
  483. package/lib/render/sprites/events.d.ts +56 -0
  484. package/lib/render/sprites/events.js +280 -0
  485. package/lib/render/sprites/events.js.map +1 -0
  486. package/lib/render/sprites/facilities/garage.d.ts +23 -0
  487. package/lib/render/sprites/facilities/garage.js +230 -0
  488. package/lib/render/sprites/facilities/garage.js.map +1 -0
  489. package/lib/render/sprites/facilities/recycling.d.ts +3 -0
  490. package/lib/render/sprites/facilities/recycling.js +210 -0
  491. package/lib/render/sprites/facilities/recycling.js.map +1 -0
  492. package/lib/render/sprites/facilities/recyclingLook.d.ts +49 -0
  493. package/lib/render/sprites/facilities/recyclingLook.js +52 -0
  494. package/lib/render/sprites/facilities/recyclingLook.js.map +1 -0
  495. package/lib/render/sprites/facilities/service.d.ts +14 -0
  496. package/lib/render/sprites/facilities/service.js +437 -0
  497. package/lib/render/sprites/facilities/service.js.map +1 -0
  498. package/lib/render/sprites/facilities/serviceKit.d.ts +61 -0
  499. package/lib/render/sprites/facilities/serviceKit.js +113 -0
  500. package/lib/render/sprites/facilities/serviceKit.js.map +1 -0
  501. package/lib/render/sprites/facilities/vehicles.d.ts +38 -0
  502. package/lib/render/sprites/facilities/vehicles.js +276 -0
  503. package/lib/render/sprites/facilities/vehicles.js.map +1 -0
  504. package/lib/render/sprites/facilities/venue.d.ts +28 -0
  505. package/lib/render/sprites/facilities/venue.js +211 -0
  506. package/lib/render/sprites/facilities/venue.js.map +1 -0
  507. package/lib/render/sprites/facilities/weddingHall.d.ts +9 -0
  508. package/lib/render/sprites/facilities/weddingHall.js +410 -0
  509. package/lib/render/sprites/facilities/weddingHall.js.map +1 -0
  510. package/lib/render/sprites/facilities.d.ts +22 -0
  511. package/lib/render/sprites/facilities.js +24 -0
  512. package/lib/render/sprites/facilities.js.map +1 -0
  513. package/lib/render/sprites/helicopter.d.ts +11 -0
  514. package/lib/render/sprites/helicopter.js +60 -0
  515. package/lib/render/sprites/helicopter.js.map +1 -0
  516. package/lib/render/sprites/sky.d.ts +67 -0
  517. package/lib/render/sprites/sky.js +85 -0
  518. package/lib/render/sprites/sky.js.map +1 -0
  519. package/lib/render/sprites/spiralStair.d.ts +19 -0
  520. package/lib/render/sprites/spiralStair.js +111 -0
  521. package/lib/render/sprites/spiralStair.js.map +1 -0
  522. package/lib/render/sprites/structure/entrance.d.ts +35 -0
  523. package/lib/render/sprites/structure/entrance.js +347 -0
  524. package/lib/render/sprites/structure/entrance.js.map +1 -0
  525. package/lib/render/sprites/structure/lobby.d.ts +88 -0
  526. package/lib/render/sprites/structure/lobby.js +350 -0
  527. package/lib/render/sprites/structure/lobby.js.map +1 -0
  528. package/lib/render/sprites/structure/revolvingDoor.d.ts +53 -0
  529. package/lib/render/sprites/structure/revolvingDoor.js +184 -0
  530. package/lib/render/sprites/structure/revolvingDoor.js.map +1 -0
  531. package/lib/render/sprites/structure/rooftop.d.ts +93 -0
  532. package/lib/render/sprites/structure/rooftop.js +302 -0
  533. package/lib/render/sprites/structure/rooftop.js.map +1 -0
  534. package/lib/render/sprites/structure/shell.d.ts +19 -0
  535. package/lib/render/sprites/structure/shell.js +142 -0
  536. package/lib/render/sprites/structure/shell.js.map +1 -0
  537. package/lib/render/sprites/structure/skyBridge.d.ts +28 -0
  538. package/lib/render/sprites/structure/skyBridge.js +259 -0
  539. package/lib/render/sprites/structure/skyBridge.js.map +1 -0
  540. package/lib/render/sprites/structure/tallLobby.d.ts +8 -0
  541. package/lib/render/sprites/structure/tallLobby.js +166 -0
  542. package/lib/render/sprites/structure/tallLobby.js.map +1 -0
  543. package/lib/render/sprites/structure/tallLobbyPieces.d.ts +18 -0
  544. package/lib/render/sprites/structure/tallLobbyPieces.js +82 -0
  545. package/lib/render/sprites/structure/tallLobbyPieces.js.map +1 -0
  546. package/lib/render/sprites/structure.d.ts +15 -0
  547. package/lib/render/sprites/structure.js +16 -0
  548. package/lib/render/sprites/structure.js.map +1 -0
  549. package/lib/render/sprites/transport.d.ts +30 -0
  550. package/lib/render/sprites/transport.js +376 -0
  551. package/lib/render/sprites/transport.js.map +1 -0
  552. package/lib/render/sprites.d.ts +16 -0
  553. package/lib/render/sprites.js +108 -0
  554. package/lib/render/sprites.js.map +1 -0
  555. package/lib/render/venueFlights.d.ts +61 -0
  556. package/lib/render/venueFlights.js +50 -0
  557. package/lib/render/venueFlights.js.map +1 -0
  558. package/lib/shared/engineTypes.d.ts +256 -0
  559. package/lib/shared/engineTypes.js +8 -0
  560. package/lib/shared/engineTypes.js.map +1 -0
  561. package/lib/shared/floorRuns.d.ts +22 -0
  562. package/lib/shared/floorRuns.js +39 -0
  563. package/lib/shared/floorRuns.js.map +1 -0
  564. package/lib/shared/inputEvents.d.ts +18 -0
  565. package/lib/shared/inputEvents.js +23 -0
  566. package/lib/shared/inputEvents.js.map +1 -0
  567. package/lib/shared/serializedGame.d.ts +142 -0
  568. package/lib/shared/serializedGame.js +2 -0
  569. package/lib/shared/serializedGame.js.map +1 -0
  570. package/lib/shared/types.d.ts +298 -0
  571. package/lib/shared/types.js +47 -0
  572. package/lib/shared/types.js.map +1 -0
  573. package/lib/shared/unitState.d.ts +36 -0
  574. package/lib/shared/unitState.js +42 -0
  575. package/lib/shared/unitState.js.map +1 -0
  576. package/lib/shared/vacateReasonText.d.ts +20 -0
  577. package/lib/shared/vacateReasonText.js +23 -0
  578. package/lib/shared/vacateReasonText.js.map +1 -0
  579. package/lib/shared/viewZoom.d.ts +14 -0
  580. package/lib/shared/viewZoom.js +17 -0
  581. package/lib/shared/viewZoom.js.map +1 -0
  582. package/lib/shared/wellFormed.d.ts +14 -0
  583. package/lib/shared/wellFormed.js +19 -0
  584. package/lib/shared/wellFormed.js.map +1 -0
  585. package/lib/simport/cards.d.ts +26 -0
  586. package/lib/simport/cards.js +138 -0
  587. package/lib/simport/cards.js.map +1 -0
  588. package/lib/simport/clockView.d.ts +24 -0
  589. package/lib/simport/clockView.js +43 -0
  590. package/lib/simport/clockView.js.map +1 -0
  591. package/lib/simport/commands.d.ts +215 -0
  592. package/lib/simport/commands.js +2 -0
  593. package/lib/simport/commands.js.map +1 -0
  594. package/lib/simport/emergencyReads.d.ts +19 -0
  595. package/lib/simport/emergencyReads.js +47 -0
  596. package/lib/simport/emergencyReads.js.map +1 -0
  597. package/lib/simport/enginePort.d.ts +433 -0
  598. package/lib/simport/enginePort.js +11 -0
  599. package/lib/simport/enginePort.js.map +1 -0
  600. package/lib/simport/fixtures/catalog.classic.json +2137 -0
  601. package/lib/simport/fixtures/catalog.modern.json +2515 -0
  602. package/lib/simport/fixtures/viewLayout.json +927 -0
  603. package/lib/simport/headerClock.d.ts +31 -0
  604. package/lib/simport/headerClock.js +29 -0
  605. package/lib/simport/headerClock.js.map +1 -0
  606. package/lib/simport/panels.d.ts +243 -0
  607. package/lib/simport/panels.js +2 -0
  608. package/lib/simport/panels.js.map +1 -0
  609. package/lib/simport/personCards.d.ts +63 -0
  610. package/lib/simport/personCards.js +55 -0
  611. package/lib/simport/personCards.js.map +1 -0
  612. package/lib/simport/portCodes.d.ts +41 -0
  613. package/lib/simport/portCodes.js +49 -0
  614. package/lib/simport/portCodes.js.map +1 -0
  615. package/lib/simport/portEvents.d.ts +39 -0
  616. package/lib/simport/portEvents.js +43 -0
  617. package/lib/simport/portEvents.js.map +1 -0
  618. package/lib/simport/portRenderSim.d.ts +70 -0
  619. package/lib/simport/portRenderSim.js +129 -0
  620. package/lib/simport/portRenderSim.js.map +1 -0
  621. package/lib/simport/queries.d.ts +64 -0
  622. package/lib/simport/queries.js +30 -0
  623. package/lib/simport/queries.js.map +1 -0
  624. package/lib/simport/recyclingPort.d.ts +13 -0
  625. package/lib/simport/recyclingPort.js +2 -0
  626. package/lib/simport/recyclingPort.js.map +1 -0
  627. package/lib/simport/request.d.ts +44 -0
  628. package/lib/simport/request.js +214 -0
  629. package/lib/simport/request.js.map +1 -0
  630. package/lib/simport/roomTiers.d.ts +102 -0
  631. package/lib/simport/roomTiers.js +122 -0
  632. package/lib/simport/roomTiers.js.map +1 -0
  633. package/lib/simport/scheduleSlots.d.ts +19 -0
  634. package/lib/simport/scheduleSlots.js +87 -0
  635. package/lib/simport/scheduleSlots.js.map +1 -0
  636. package/lib/simport/skyBridgePort.d.ts +20 -0
  637. package/lib/simport/skyBridgePort.js +2 -0
  638. package/lib/simport/skyBridgePort.js.map +1 -0
  639. package/lib/simport/skyBridgeView.d.ts +15 -0
  640. package/lib/simport/skyBridgeView.js +42 -0
  641. package/lib/simport/skyBridgeView.js.map +1 -0
  642. package/lib/simport/statsSheet.d.ts +15 -0
  643. package/lib/simport/statsSheet.js +101 -0
  644. package/lib/simport/statsSheet.js.map +1 -0
  645. package/lib/simport/tdtRecords.d.ts +9 -0
  646. package/lib/simport/tdtRecords.js +112 -0
  647. package/lib/simport/tdtRecords.js.map +1 -0
  648. package/lib/simport/tdtReportFacts.d.ts +110 -0
  649. package/lib/simport/tdtReportFacts.js +8 -0
  650. package/lib/simport/tdtReportFacts.js.map +1 -0
  651. package/lib/simport/trafficPort.d.ts +22 -0
  652. package/lib/simport/trafficPort.js +2 -0
  653. package/lib/simport/trafficPort.js.map +1 -0
  654. package/lib/simport/view.d.ts +275 -0
  655. package/lib/simport/view.js +2 -0
  656. package/lib/simport/view.js.map +1 -0
  657. package/lib/simport/viewReader.d.ts +89 -0
  658. package/lib/simport/viewReader.js +426 -0
  659. package/lib/simport/viewReader.js.map +1 -0
  660. package/lib/styles/game/appearance.css +108 -0
  661. package/lib/styles/game/base.css +68 -0
  662. package/lib/styles/game/components.css +69 -0
  663. package/lib/styles/game/desk-title.css +183 -0
  664. package/lib/styles/game/desk.css +487 -0
  665. package/lib/styles/game/dialogs.css +360 -0
  666. package/lib/styles/game/editor-sidebar.css +116 -0
  667. package/lib/styles/game/elevator-schedule.css +217 -0
  668. package/lib/styles/game/file-dialog.css +470 -0
  669. package/lib/styles/game/help.css +141 -0
  670. package/lib/styles/game/launch-fireworks.css +17 -0
  671. package/lib/styles/game/media-landscape.css +333 -0
  672. package/lib/styles/game/media-phone.css +303 -0
  673. package/lib/styles/game/media-tablet-touch.css +177 -0
  674. package/lib/styles/game/menubar.css +158 -0
  675. package/lib/styles/game/new-tower.css +219 -0
  676. package/lib/styles/game/onboarding.css +32 -0
  677. package/lib/styles/game/screen-saver.css +85 -0
  678. package/lib/styles/game/splash.css +413 -0
  679. package/lib/styles/game/stats-saves.css +106 -0
  680. package/lib/styles/game/tools-stage.css +340 -0
  681. package/lib/styles/game/topbar.css +191 -0
  682. package/lib/styles/menu-bar.css +108 -0
  683. package/lib/styles/not-found.css +335 -0
  684. package/lib/styles/overview-map-views.css +88 -0
  685. package/lib/styles/overview-map.css +195 -0
  686. package/lib/styles/retro-components.css +179 -0
  687. package/lib/styles/retro-page.css +254 -0
  688. package/lib/styles/retro-tokens.css +122 -0
  689. package/lib/styles/schemes/high-contrast.css +173 -0
  690. package/lib/styles/schemes/skyline.css +134 -0
  691. package/lib/styles.css +66 -0
  692. package/lib/ui/desk/deskGeometry.d.ts +59 -0
  693. package/lib/ui/desk/deskGeometry.js +106 -0
  694. package/lib/ui/desk/deskGeometry.js.map +1 -0
  695. package/lib/ui/desk/deskWindow.d.ts +90 -0
  696. package/lib/ui/desk/deskWindow.js +253 -0
  697. package/lib/ui/desk/deskWindow.js.map +1 -0
  698. package/lib/ui/desk/deskWindowMenu.d.ts +55 -0
  699. package/lib/ui/desk/deskWindowMenu.js +143 -0
  700. package/lib/ui/desk/deskWindowMenu.js.map +1 -0
  701. package/lib/ui/escape.d.ts +1 -0
  702. package/lib/ui/escape.js +14 -0
  703. package/lib/ui/escape.js.map +1 -0
  704. package/lib/ui/format.d.ts +14 -0
  705. package/lib/ui/format.js +36 -0
  706. package/lib/ui/format.js.map +1 -0
  707. package/lib/ui/iconPaths.generated.d.ts +4 -0
  708. package/lib/ui/iconPaths.generated.js +68 -0
  709. package/lib/ui/iconPaths.generated.js.map +1 -0
  710. package/lib/ui/icons.d.ts +83 -0
  711. package/lib/ui/icons.js +156 -0
  712. package/lib/ui/icons.js.map +1 -0
  713. package/lib/ui/menuBar.d.ts +94 -0
  714. package/lib/ui/menuBar.js +361 -0
  715. package/lib/ui/menuBar.js.map +1 -0
  716. package/lib/ui/modalPrecedence.d.ts +108 -0
  717. package/lib/ui/modalPrecedence.js +165 -0
  718. package/lib/ui/modalPrecedence.js.map +1 -0
  719. package/lib/ui/movableWindow.d.ts +124 -0
  720. package/lib/ui/movableWindow.js +247 -0
  721. package/lib/ui/movableWindow.js.map +1 -0
  722. package/lib/ui/overviewMapInput.d.ts +109 -0
  723. package/lib/ui/overviewMapInput.js +135 -0
  724. package/lib/ui/overviewMapInput.js.map +1 -0
  725. package/lib/ui/uiModal.d.ts +38 -0
  726. package/lib/ui/uiModal.js +70 -0
  727. package/lib/ui/uiModal.js.map +1 -0
  728. package/lib/wasmhost/buildSection.d.ts +54 -0
  729. package/lib/wasmhost/buildSection.js +143 -0
  730. package/lib/wasmhost/buildSection.js.map +1 -0
  731. package/lib/wasmhost/catalogCheck.d.ts +11 -0
  732. package/lib/wasmhost/catalogCheck.js +43 -0
  733. package/lib/wasmhost/catalogCheck.js.map +1 -0
  734. package/lib/wasmhost/engineAssets.d.ts +57 -0
  735. package/lib/wasmhost/engineAssets.js +63 -0
  736. package/lib/wasmhost/engineAssets.js.map +1 -0
  737. package/lib/wasmhost/engineBoot.d.ts +165 -0
  738. package/lib/wasmhost/engineBoot.js +254 -0
  739. package/lib/wasmhost/engineBoot.js.map +1 -0
  740. package/lib/wasmhost/engineChoice.d.ts +6 -0
  741. package/lib/wasmhost/engineChoice.js +2 -0
  742. package/lib/wasmhost/engineChoice.js.map +1 -0
  743. package/lib/wasmhost/engineDiagnostics.d.ts +66 -0
  744. package/lib/wasmhost/engineDiagnostics.js +189 -0
  745. package/lib/wasmhost/engineDiagnostics.js.map +1 -0
  746. package/lib/wasmhost/engineDiagnosticsLive.d.ts +15 -0
  747. package/lib/wasmhost/engineDiagnosticsLive.js +31 -0
  748. package/lib/wasmhost/engineDiagnosticsLive.js.map +1 -0
  749. package/lib/wasmhost/engineIdentity.d.ts +30 -0
  750. package/lib/wasmhost/engineIdentity.js +59 -0
  751. package/lib/wasmhost/engineIdentity.js.map +1 -0
  752. package/lib/wasmhost/engineLabel.d.ts +40 -0
  753. package/lib/wasmhost/engineLabel.js +50 -0
  754. package/lib/wasmhost/engineLabel.js.map +1 -0
  755. package/lib/wasmhost/engineLoad.d.ts +48 -0
  756. package/lib/wasmhost/engineLoad.js +53 -0
  757. package/lib/wasmhost/engineLoad.js.map +1 -0
  758. package/lib/wasmhost/enginePackageCheck.d.ts +77 -0
  759. package/lib/wasmhost/enginePackageCheck.js +274 -0
  760. package/lib/wasmhost/enginePackageCheck.js.map +1 -0
  761. package/lib/wasmhost/enginePackageNames.d.ts +25 -0
  762. package/lib/wasmhost/enginePackageNames.js +28 -0
  763. package/lib/wasmhost/enginePackageNames.js.map +1 -0
  764. package/lib/wasmhost/enginePackageRecord.d.ts +78 -0
  765. package/lib/wasmhost/enginePackageRecord.js +108 -0
  766. package/lib/wasmhost/enginePackageRecord.js.map +1 -0
  767. package/lib/wasmhost/engineRepair.d.ts +55 -0
  768. package/lib/wasmhost/engineRepair.js +183 -0
  769. package/lib/wasmhost/engineRepair.js.map +1 -0
  770. package/lib/wasmhost/frameView.d.ts +87 -0
  771. package/lib/wasmhost/frameView.js +133 -0
  772. package/lib/wasmhost/frameView.js.map +1 -0
  773. package/lib/wasmhost/hostFault.d.ts +40 -0
  774. package/lib/wasmhost/hostFault.js +94 -0
  775. package/lib/wasmhost/hostFault.js.map +1 -0
  776. package/lib/wasmhost/loadEngineModule.d.ts +79 -0
  777. package/lib/wasmhost/loadEngineModule.js +66 -0
  778. package/lib/wasmhost/loadEngineModule.js.map +1 -0
  779. package/lib/wasmhost/packageHash.d.ts +48 -0
  780. package/lib/wasmhost/packageHash.js +436 -0
  781. package/lib/wasmhost/packageHash.js.map +1 -0
  782. package/lib/wasmhost/rustEngine.d.ts +49 -0
  783. package/lib/wasmhost/rustEngine.js +63 -0
  784. package/lib/wasmhost/rustEngine.js.map +1 -0
  785. package/lib/wasmhost/slotPopulation.d.ts +19 -0
  786. package/lib/wasmhost/slotPopulation.js +69 -0
  787. package/lib/wasmhost/slotPopulation.js.map +1 -0
  788. package/lib/wasmhost/telemetry.d.ts +31 -0
  789. package/lib/wasmhost/telemetry.js +13 -0
  790. package/lib/wasmhost/telemetry.js.map +1 -0
  791. package/package.json +80 -4
@@ -0,0 +1 @@
1
+ {"version":3,"file":"common.js","sources":["../../../src/render/pixelSprites/common.ts"],"sourcesContent":["import type { FacilityKind } from \"../../shared/types\";\nimport type { UnitView } from \"../../simport/view\";\nimport { viewWorld } from \"../../presentation/viewWorld\";\nimport { CAST, castIndex, drawPerson, type Dims } from \"./people\";\n\n/**\n * Shared primitives for the dollhouse room art: the signature palette, the\n * seeded-variety helpers, the room shell/floor, and the silhouette person.\n * Extracted verbatim from `pixelSprites.ts`; imported by every per-kind draw\n * module and by the `pixelSprites.ts` barrel.\n */\n\n// ---- Signature palette --------------------------------------------------\n\nexport const PAL = {\n wall: \"#E8E4D0\",\n floor: \"#C8C0A8\",\n slate: \"#5A6E8C\",\n brass: \"#D8B05A\",\n red: \"#C24A3A\",\n blue: \"#4FA0C8\",\n green: \"#5AA85A\",\n ink: \"#2A2E38\",\n white: \"#F4F0E4\",\n wood: \"#8C6E50\",\n // Overhaul additions (art bible \"Canonical palette\"). New keys only; the\n // anchors above stay byte-stable because residential/food/shop reference them\n // directly. No new key matches a reserved state color (see the guard test).\n warmWall: \"#ECDFC2\", // warm cream interior wall\n carpetGreen: \"#6E7A48\", // olive office carpet\n hotelPink: \"#E8B7A8\", // warm hotel bedding pink\n hotelRed: \"#A83C4A\", // deeper hotel red (headboard, drapes, trim)\n skyDay: \"#9CC4DE\", // day sky band in window views\n skyNight: \"#2A3350\", // night sky band in window views (background only)\n cityLight: \"#F3D08A\", // warm distant-window dot\n awningShadow: \"#5A4038\", // shaded band under awnings and canopies\n signWarm: \"#EE8844\", // warm marquee and sign fill\n glowLit: \"#F8E2B4\", // warm lamp glow, lit\n glowDim: \"#8A7A5C\", // same lamp, unlit or dim\n walnut: \"#6B4A2B\", // dark furniture wood (desks, headboards)\n oak: \"#A9743C\", // mid furniture wood\n};\n\n/** Reserved state-cue literals that decoration must never reuse. Exported so the\n * guard test can assert no NEW decoration `PAL` key and no `SHIRTS` entry\n * collides with one. The grandfathered anchor `PAL.red` is itself the stress\n * red (a state cue, not decoration), so the guard checks the new keys, not all\n * of `PAL`. Mirrors the art bible \"Reserved\" list. */\nexport const RESERVED_COLORS = [\n \"#C24A3A\", // stress red (fed-up mood)\n \"#C9CCC4\", // vacancy gray\n \"#B2B0A4\", // vacancy gray (darker)\n \"#E8A030\", // notice amber\n \"#D4623A\", // dirty tray\n \"#FFD86A\", // ready lamp\n \"#E0556B\", // closed sign\n] as const;\n\n// No shirt may reuse the stress red (#C24A3A); otherwise ~1-in-8 content\n// commuters look pixel-identical to a \"fed up\" one (F10). The former red shirt\n// is replaced with a muted teal so the stress tint reads unambiguously.\nexport const SHIRTS = [\"#5A6E8C\", \"#3E4654\", \"#6E5A4A\", \"#3F8C84\", \"#4FA0C8\", \"#5AA85A\", \"#D8B05A\", \"#9A5FB0\"];\nexport const SKIN = [\"#E8C9A0\", \"#C99A6E\", \"#A9774E\"];\n\nexport function shade(hex: string, amt: number): string {\n // Exported helpers take a bare color string; degrade a non-hex argument\n // gracefully instead of producing rgb(NaN,...). Every shipped caller passes a\n // #RRGGBB literal, so this leaves current output byte-identical.\n if (!/^#[0-9a-fA-F]{6}$/.test(hex)) return hex;\n const n = parseInt(hex.slice(1), 16);\n const c = (v: number) => Math.max(0, Math.min(255, v + amt));\n return `rgb(${c((n >> 16) & 255)},${c((n >> 8) & 255)},${c(n & 255)})`;\n}\nexport function hash(seed: number): number {\n let x = (seed * 2654435761) | 0;\n x = Math.imul(x ^ (x >>> 15), 0x2c1b3c6d);\n x = Math.imul(x ^ (x >>> 13), 0x297a2d39);\n return ((x ^ (x >>> 16)) >>> 0) / 4294967296;\n}\n\n/**\n * A room's occupancy as its art has to read it: whole people.\n *\n * A room's occupants minus those out for a meal can arrive fractional from a\n * forged save, because nothing upstream rounds it. Art cannot draw four fifths\n * of a person, so it has to pick a whole number, and a room that draws one\n * gated figure as well as a row (a barber's seated client, a spa's tub guest, a\n * golfer, the staff who appear because the room is open) has to pick it in one\n * place or the two halves disagree.\n *\n * The rule is the one every other room's `i < n` figure loop already follows,\n * and the one the atlas reader (`atlas/lookup.ts`) uses to pick a baked crowd:\n * round UP. Rounding down here while the atlas rounds up would show a native\n * frontend one more person than the web for the same room. A count that is not\n * finite reads as nobody, and a corrupt `outForMeal` reads as nobody out, again\n * as the atlas reads them. `roomOccupants.test.ts` holds the two in step.\n *\n * Every room painter reads its crowd through here, so none of them imports the\n * TypeScript engine for it and a corrupt `outForMeal` reads the same in each.\n *\n * The gameplay rule itself, who is out for a meal and how many people a room\n * shows, lives in the Rust engine (`Unit::visible_occupants` in\n * `engine-rs/src/tower_query_state.rs`, which gates spawns on it). The frame\n * carries both of its inputs, so this subtraction is drawing, not a second copy\n * of the rule: the `ceil` only matters for counts the engine never reports.\n */\nexport function roomOccupants(u: { occupants: number; outForMeal?: number }): number {\n const occupants = Number.isFinite(u.occupants) ? Math.max(0, u.occupants) : 0;\n const out = u.outForMeal !== undefined && Number.isFinite(u.outForMeal)\n ? Math.min(occupants, Math.max(0, u.outForMeal))\n : 0;\n return Math.ceil(Math.max(0, occupants - out));\n}\n\n/**\n * Which of a room's `stations` (stools, dance-floor spots, machines, mats,\n * bikes, places on a mat) have someone at them: a stable pseudo-random subset of\n * exactly `min(people, stations)` of them.\n *\n * The count is the point. Deciding each station on its own hash roll broke the\n * honest-occupancy rule in both directions at once: a hall with two visitors\n * could paint four figures at one column and none at the next, and where the\n * loop counted a skipped station against the occupancy anyway, people who were\n * in the room were simply never drawn.\n *\n * WHICH stations matters almost as much. Filling from one end would satisfy the\n * count and turn a quiet room into a solid block of figures against one wall\n * with an empty half beside it, so the subset is chosen by ranking the stations\n * on their hash and taking the busiest. That spreads a small crowd over the\n * whole row and is still a pure function of the room's own seed, which is what\n * lets these rooms bake to a cached sprite.\n */\nexport function busyStations(stations: number, people: number, seed: number): Set<number> {\n // Floored so a nonsense count can never claim a station it does not fill.\n // Every caller hands in a whole number from `roomOccupants`, which rounds a\n // fractional occupancy UP the way the atlas does; a raw fractional count is\n // not meant to reach here, and would come out one lower than the atlas.\n const want = Math.max(0, Math.min(Math.floor(people), stations));\n if (!(want > 0)) return new Set(); // nobody here, or a nonsense count\n // Mix the seed before the station index joins it (#1069). Callers pass\n // `figureSeed * k`, so with `hash(seed + i)` two rooms whose figure seeds\n // differ by one ranked station `i + k` of one like station `i` of the other,\n // and a floor of identical rooms showed one scatter shifted k seats along.\n const room = (hash(seed) * 4294967296) | 0;\n const rank = (i: number) => hash(room ^ Math.imul(i + 1, 0x9e3779b9));\n const ranked = Array.from({ length: stations }, (_, i) => i);\n ranked.sort((a, b) => rank(b) - rank(a) || a - b); // index breaks a tie\n return new Set(ranked.slice(0, want));\n}\n\n// ---- Per-unit variety (geo-seeded) ----------------------------------------\n//\n// Same-kind rooms vary like the 1994 original. The law (party-ratified after\n// the owner's call): a variant must differ in GEOMETRY first (layout,\n// furniture, or mirroring); color is support, and a palette-only variant is\n// not a variant. State cues never vary. Hotels are the deliberate exception:\n// real hotel rooms are uniform, so they take linen wall tints and a bed\n// mirror only, and their whole job stays broadcasting ready/asleep/dirty. The\n// seed is GEOGRAPHY rather than unit id: TDT import renumbers every id, but a room's\n// (floor, x) footprint survives save, load, export, and import, so the same\n// spot always wears the same look (\"your mauve corner office on 40 stays\n// mauve\"). Matches the lobbyVariant(x) precedent. Anchors are listed twice in\n// each table so the classic look stays the most common (seasoning rather\n// than patchwork). Hue varies, luminance holds (roughly +/-10 per channel around\n// each anchor) so the night scrim, heatmap tints, and lit/dark reads never\n// grow ambiguous, and no variety color enters the reserved state palette\n// (vacancy grays, notice amber, dirty tray, ready lamp, stress red).\n\n/** Deterministic per-room pick: kind + geography + axis -> [0, n). Pure\n * function of immutable unit fields, so it needs no bake-signature bit and\n * never touches the sim RNG stream. The kind salt (ratified formula) keeps a\n * bulldoze-and-rebuild of a different kind at the same footprint from\n * inheriting correlated picks. */\nexport function geoVariant(u: Pick<UnitView, \"kind\" | \"floor\" | \"x\">, axis: number, n: number): number {\n const kindSalt = (u.kind.length * 7919 + u.kind.charCodeAt(0) * 31) | 0;\n return Math.floor(hash(kindSalt + (u.floor - viewWorld().minFloor) * viewWorld().lotWidth + u.x + axis * 104729) * n);\n}\n\n/** Run `draw` mirrored horizontally inside the room rect when `flip` is set:\n * the cheapest true-geometry variant. Callers must not draw TEXT inside\n * `draw` (it would mirror); the hotel draws its \"z\" outside the wrapper. */\nexport function maybeMirrored(ctx: CanvasRenderingContext2D, flip: boolean, x: number, w: number, draw: () => void): void {\n if (!flip) return draw();\n ctx.save();\n ctx.translate(2 * x + w, 0);\n ctx.scale(-1, 1);\n draw();\n ctx.restore();\n}\n\nexport interface RoomCtx {\n ctx: CanvasRenderingContext2D;\n lit: boolean;\n anim: number;\n hour: number;\n}\n\n/**\n * The iconic SimTower sim: a solid silhouette. `s` is the unit pixel size\n * (figure is ~3*s wide head, ~6*s tall). Seated drops the legs.\n */\nexport function person(ctx: CanvasRenderingContext2D, x: number, footY: number, s: number, seed: number, seated = false, tint?: string): void {\n const head = Math.max(2, Math.round(2 * s));\n const bodyW = Math.max(2, Math.round(2.4 * s));\n const bodyH = Math.max(2, Math.round((seated ? 3 : 4) * s));\n const top = footY - bodyH - head;\n // A `tint` (e.g. a stress color) overrides the usual shirt color so crowds\n // can visibly turn \"angry\" when the tower's transport is overwhelmed.\n ctx.fillStyle = tint ?? SHIRTS[Math.abs(seed) % SHIRTS.length];\n ctx.fillRect(x, top + head, bodyW, bodyH);\n ctx.fillStyle = SKIN[Math.abs(seed >> 4) % SKIN.length];\n ctx.fillRect(x, top, head, head);\n ctx.fillStyle = \"rgba(30,24,20,0.65)\"; // hair\n ctx.fillRect(x, top, head, Math.max(1, Math.round(head * 0.4)));\n if (!seated) {\n ctx.fillStyle = PAL.ink; // little legs\n ctx.fillRect(x, footY - Math.max(1, s), Math.max(1, Math.round(s)), Math.max(1, s));\n ctx.fillRect(x + bodyW - Math.max(1, Math.round(s)), footY - Math.max(1, s), Math.max(1, Math.round(s)), Math.max(1, s));\n }\n}\n\n// ---- The person() family (finalized two-scale figures) --------------------\n//\n// The overhaul's finalized human builds (art bible, Figma pages 06 to 07). These\n// are fixed-size because every unit bakes at the same TILE=11 / FLOOR=44 scale,\n// so a build reads at the same fraction of a floor everywhere. The legacy\n// `person()` above stays byte-identical for existing callers; per-kind specs\n// adopt these named builds as they repaint, so no call site changes here.\n\nexport type PersonBuild = \"seated\" | \"standing\" | \"walker\" | \"hiVis\";\nexport type Mood = \"content\" | \"impatient\" | \"fedUp\";\n\nexport interface BuildSpec {\n head: number;\n torso: number;\n legs: number;\n width: number;\n hardhat?: boolean;\n}\n\n/** Geometry per build. Totals: seated 18, standing 24, walker 24, hi-vis 22\n * pixels tall. Standing and seated match the crowd's average person, so\n * someone walking into a room keeps their size (#2116). A car's riders have no build: they\n * are drawn at the size the crowd draws them (`personRider`). */\nexport const BUILDS: Record<PersonBuild, BuildSpec> = {\n seated: { head: 6, torso: 12, legs: 0, width: 6 },\n standing: { head: 6, torso: 11, legs: 7, width: 6 },\n walker: { head: 5, torso: 13, legs: 6, width: 7 },\n hiVis: { head: 5, torso: 12, legs: 5, width: 7, hardhat: true },\n};\n\n/** Torso fill for a figure's mood. Content wears the class `SHIRTS` color;\n * impatient warms to amber; fed up turns the reserved stress red. The impatient\n * amber `#E8862A` is deliberately distinct from the reserved notice amber\n * `#E8A030`. */\nexport function moodTint(mood: Mood, seed: number): string {\n if (mood === \"impatient\") return \"#E8862A\";\n if (mood === \"fedUp\") return \"#C24A3A\";\n return SHIRTS[Math.abs(seed) % SHIRTS.length];\n}\n\n/** The height overrides that keep a cast figure at its build's height: the\n * cast adds a neck and a row of hair, and a seated figure's lap one more.\n * A bun or curls stand a pixel taller, a bald head a pixel shorter. */\nexport function buildDims(build: PersonBuild): Dims {\n const b = BUILDS[build];\n // The torso is two narrower than the build so the arms land on its edges.\n if (b.legs === 0) return { legs: 0, torso: b.torso - 3, head: b.head, seated: true, width: b.width - 2 };\n return { legs: b.legs, torso: b.torso - 2, head: b.head, width: b.width - 2 };\n}\n\n/** Draw one figure in a room or a car, as a member of the cast (#2097).\n * `footY` is the baseline the feet stand on; the figure rises above it.\n * `fill` is the torso color: a mood color, or a uniform such as a\n * pharmacist's white coat. Integer pixels. */\nexport function personFigure(ctx: CanvasRenderingContext2D, x: number, footY: number, build: PersonBuild, fill: string, seed = 0): void {\n // A hi-vis build is a tradesperson: hard hat, uniform and reflective stripe.\n const trade = BUILDS[build].hardhat ? { hairStyle: \"hardhat\", topKind: \"uniform\", hiVis: true } as const : {};\n const look = { ...CAST[castIndex(seed)], ...trade, top: fill };\n drawPerson(ctx, x, footY, look, { lit: false, pose: \"stand\", empty: true, dims: buildDims(build) });\n}\n\n/** A cast member in a build, wearing their own outfit unless a mood colors it. */\nfunction castFigure(ctx: CanvasRenderingContext2D, x: number, footY: number, build: PersonBuild, seed: number, mood: Mood): void {\n drawPerson(ctx, x, footY, CAST[castIndex(seed)], { lit: false, pose: \"stand\", empty: true, mood, dims: buildDims(build) });\n}\n\n/** A cast member asleep on their back, drawn with the same head, hair and\n * face as the day figures (#2116): the head on the pillow with its crown at\n * `headX + 1`, the face turned up, and a blanket in `blanket` pulled to the\n * chin over the body. The sleeper fills rows `headY - 1` to `headY + 5`\n * and columns `headX - 1` to `headX + 4 + len` (a bed shorter than six\n * pixels of blanket still gets three). Used by a hotel bed and a condo sofa\n * at night. */\nexport function sleeper(ctx: CanvasRenderingContext2D, headX: number, headY: number, len: number, blanket: string, seed: number): void {\n const hx = Math.round(headX);\n const hy = Math.round(headY);\n // The head takes six columns; the blanket runs from the chin to the end.\n const blanketX = hx + 7;\n const blanketLen = Math.max(3, Math.round(len) - 3);\n // A seated build lying down: no legs, and a body that ends inside the\n // blanket. The crown sits head + neck + torso + lap (8 + torso) pixels\n // left of the foot point, so the foot point goes that far right of it.\n const torso = Math.max(1, blanketLen - 2);\n const dims: Dims = { legs: 0, torso, head: 6, seated: true, width: 4 };\n // Nightclothes: a plain top, so no tie, stripe or badge reaches past a\n // short body and out from under the blanket.\n const look = { ...CAST[castIndex(seed)], topKind: \"sweater\", hiVis: false, badge: false } as const;\n drawPerson(ctx, hx + 9 + torso, hy + 6, look, { lit: false, empty: true, pose: \"stand\", lying: true, dims });\n ctx.fillStyle = blanket;\n ctx.fillRect(blanketX, hy - 1, blanketLen, 7);\n ctx.fillStyle = shade(blanket, 24); // the turned-down edge at the chin\n ctx.fillRect(blanketX, hy - 1, 1, 7);\n ctx.fillStyle = shade(blanket, -18); // the fold where it meets the bed\n ctx.fillRect(blanketX + 1, hy + 5, blanketLen - 1, 1);\n}\n\n/** Named convenience builds. Each picks its cast member from the seed and\n * colors the top for the mood, so call sites read clearly:\n * `personWalker(ctx, x, y, seed)` or `personWalker(ctx, x, y, seed, \"fedUp\")`. */\nexport function personSeated(ctx: CanvasRenderingContext2D, x: number, footY: number, seed: number, mood: Mood = \"content\"): void {\n castFigure(ctx, x, footY, \"seated\", seed, mood);\n}\nexport function personStanding(ctx: CanvasRenderingContext2D, x: number, footY: number, seed: number, mood: Mood = \"content\"): void {\n castFigure(ctx, x, footY, \"standing\", seed, mood);\n}\nexport function personWalker(ctx: CanvasRenderingContext2D, x: number, footY: number, seed: number, mood: Mood = \"content\"): void {\n castFigure(ctx, x, footY, \"walker\", seed, mood);\n}\n/** A rider in an elevator car, at the size the crowd draws a person on a\n * floor, so someone stepping into a car does not shrink as they board. */\nexport function personRider(ctx: CanvasRenderingContext2D, x: number, footY: number, seed: number, mood: Mood = \"content\"): void {\n drawPerson(ctx, x, footY, CAST[castIndex(seed)], { lit: false, pose: \"stand\", empty: true, mood });\n}\nexport function personHiVis(ctx: CanvasRenderingContext2D, x: number, footY: number, seed: number, mood: Mood = \"content\"): void {\n personFigure(ctx, x, footY, \"hiVis\", moodTint(mood, seed), seed);\n}\n\n// ---- Shared room helpers (added, adopted per kind by later specs) ----------\n//\n// New shared helpers every enriched room can import. All key only on `lit` and\n// other bake-signature inputs, never `d.anim`, so a static room stays cacheable.\n// Unused by the current rooms; per-kind specs wire them in as they repaint.\n\n/** The warm lamp-glow color for the room's lit state. */\nexport function roomGlow(lit: boolean): string {\n return lit ? PAL.glowLit : PAL.glowDim;\n}\n\n/** A 1px contact shadow under a prop, at the given baseline. */\nexport function castShadow(ctx: CanvasRenderingContext2D, x: number, footY: number, w: number): void {\n ctx.fillStyle = \"rgba(0,0,0,0.18)\";\n ctx.fillRect(Math.round(x), Math.round(footY), Math.max(1, Math.round(w)), 1);\n}\n\n/** A small ceiling fixture centered over `w`, glowing warm when `lit`. */\nexport function ceilingFixture(ctx: CanvasRenderingContext2D, x: number, y: number, w: number, lit: boolean): void {\n const cx = Math.round(x + w / 2);\n const y0 = Math.round(y);\n ctx.fillStyle = PAL.ink;\n ctx.fillRect(cx - 1, y0, 2, 2);\n ctx.fillStyle = roomGlow(lit);\n ctx.fillRect(cx - 3, y0 + 2, 6, 2);\n}\n\n/** A wainscot dado: the lower wall below `railY` in a shaded panel with a wood\n * rail, so the lower wall reads as trim rather than a second floor. */\nexport function dado(ctx: CanvasRenderingContext2D, x: number, floorY: number, w: number, railY: number, wall: string): void {\n const x0 = Math.round(x);\n const ww = Math.max(1, Math.round(w));\n const ry = Math.round(railY);\n ctx.fillStyle = shade(wall, -13);\n ctx.fillRect(x0, ry, ww, Math.max(1, Math.round(floorY) - ry));\n ctx.fillStyle = PAL.walnut;\n ctx.fillRect(x0, ry - 1, ww, 2);\n ctx.fillStyle = PAL.oak;\n ctx.fillRect(x0, ry - 1, ww, 1);\n}\n\n/** A framed window high on the back wall showing a recessed city skyline. `lit`\n * is the codebase's evening/night flag: the sky is the night band when `lit`\n * and the day band otherwise, and the distant `cityLight` windows glow only at\n * night. The ink and slate mullion grid plus 1px sparse dots keep the view\n * reading as background, never as occupants. */\nexport function windowView(ctx: CanvasRenderingContext2D, x: number, y: number, w: number, h: number, lit: boolean, seed: number): void {\n const x0 = Math.round(x);\n const y0 = Math.round(y);\n const ww = Math.max(1, Math.round(w));\n const hh = Math.max(1, Math.round(h));\n ctx.fillStyle = lit ? PAL.skyNight : PAL.skyDay;\n ctx.fillRect(x0, y0, ww, hh);\n if (lit) {\n ctx.fillStyle = PAL.cityLight; // distant lit windows, night only\n for (let gx = 1; gx < ww - 1; gx += 3) {\n for (let gy = 1; gy < hh - 1; gy += 3) {\n if (hash(seed * 131 + gx * 17 + gy * 7) > 0.72) ctx.fillRect(x0 + gx, y0 + gy, 1, 1);\n }\n }\n }\n ctx.fillStyle = PAL.ink; // frame\n ctx.fillRect(x0, y0, ww, 1);\n ctx.fillRect(x0, y0 + hh - 1, ww, 1);\n ctx.fillRect(x0, y0, 1, hh);\n ctx.fillRect(x0 + ww - 1, y0, 1, hh);\n ctx.fillStyle = PAL.slate; // recessed mullion cross\n ctx.fillRect(x0 + (ww >> 1), y0, 1, hh);\n ctx.fillRect(x0, y0 + (hh >> 1), ww, 1);\n}\n\n/** Flat back wall + ceiling seam + hard floor line. Returns the floor-line Y. */\nexport function shell(ctx: CanvasRenderingContext2D, x: number, y: number, w: number, h: number, wall: string, floor: string): number {\n ctx.fillStyle = wall;\n ctx.fillRect(x, y, w, h);\n ctx.fillStyle = \"rgba(42,46,56,0.22)\"; // ceiling seam\n ctx.fillRect(x, y, w, 1);\n const fh = Math.max(3, Math.round(h * 0.12));\n const floorY = y + h - fh;\n ctx.fillStyle = shade(floor, -22);\n ctx.fillRect(x, floorY, w, fh);\n ctx.fillStyle = shade(floor, 18); // polished top edge\n ctx.fillRect(x, floorY, w, 1);\n return floorY;\n}\n\n/** Optional single small wall item, high on the wall (never repeating). */\nexport function wallItem(ctx: CanvasRenderingContext2D, x: number, y: number, w: number, color: string): void {\n const iw = Math.min(w * 0.34, 22);\n ctx.fillStyle = color;\n ctx.fillRect(x + 4, y + 4, iw, 3);\n}\n\n/** Rooms whose lights track whether anyone is actually inside. */\nexport const POPULATED = new Set<FacilityKind>([\"office\", \"condo\", \"rentalStudio\", \"rentalApartment\", \"hotelSingle\", \"hotelDouble\", \"hotelSuite\"]);\n\n/** Amber corner ribbon marking a `vacating` (on-notice) lease. */\nexport function noticeBadge(ctx: CanvasRenderingContext2D, x: number, y: number, w: number, h: number): void {\n const s = Math.min(12, w - 2, h - 2);\n if (s <= 0) return;\n ctx.fillStyle = \"#E8A030\";\n ctx.beginPath();\n ctx.moveTo(x + w - s, y);\n ctx.lineTo(x + w, y);\n ctx.lineTo(x + w, y + s);\n ctx.closePath();\n ctx.fill();\n // A small exclamation dash inside the ribbon.\n ctx.fillStyle = \"#2A1E06\";\n ctx.fillRect(x + w - 3, y + 2, 1, Math.max(2, s - 6));\n ctx.fillRect(x + w - 3, y + s - 3, 1, 1);\n}\n\nexport function vacancy(ctx: CanvasRenderingContext2D, x: number, y: number, w: number, h: number, label = \"LEASE\"): void {\n shell(ctx, x, y, w, h, \"#C9CCC4\", \"#B2B0A4\");\n ctx.strokeStyle = \"rgba(255,255,255,0.07)\";\n ctx.lineWidth = 1;\n for (let i = -h; i < w; i += 9) {\n ctx.beginPath();\n ctx.moveTo(x + i, y + h);\n ctx.lineTo(x + i + h, y);\n ctx.stroke();\n }\n if (w > 26) {\n ctx.fillStyle = \"#D9D2B0\";\n ctx.fillRect(x + w / 2 - 12, y + h / 2 - 5, 24, 10);\n ctx.fillStyle = \"#7a6b3a\";\n ctx.font = \"7px system-ui, sans-serif\";\n ctx.textAlign = \"center\";\n ctx.fillText(label, x + w / 2, y + h / 2 + 2);\n ctx.textAlign = \"left\";\n }\n}\n\nexport function closedShutter(d: RoomCtx, x: number, y: number, w: number, h: number, accent: string): void {\n const { ctx } = d;\n ctx.fillStyle = shade(accent, -60);\n ctx.fillRect(x, y, w, h);\n ctx.fillStyle = \"#3A3F48\";\n ctx.fillRect(x + 2, y + 4, w - 4, h - 7);\n ctx.strokeStyle = \"rgba(0,0,0,0.3)\";\n ctx.lineWidth = 1;\n for (let ly = y + 6; ly < y + h - 4; ly += 3) {\n ctx.beginPath();\n ctx.moveTo(x + 2, ly);\n ctx.lineTo(x + w - 2, ly);\n ctx.stroke();\n }\n if (w > 28) {\n ctx.fillStyle = \"#1b1f2a\";\n ctx.fillRect(x + w / 2 - 16, y + h / 2 - 5, 32, 10);\n ctx.fillStyle = \"#E0556B\";\n ctx.font = \"bold 7px system-ui, sans-serif\";\n ctx.textAlign = \"center\";\n ctx.fillText(\"CLOSED\", x + w / 2, y + h / 2 + 2);\n ctx.textAlign = \"left\";\n }\n}\n"],"names":[],"mappings":";;;AAKA;;;;;AAKG;AAEH;AAEO,MAAM,GAAG,GAAG;AACjB,IAAA,IAAI,EAAE,SAAS;AACf,IAAA,KAAK,EAAE,SAAS;AAChB,IAAA,KAAK,EAAE,SAAS;AAChB,IAAA,KAAK,EAAE,SAAS;AAChB,IAAA,GAAG,EAAE,SAAS;AACd,IAAA,IAAI,EAAE,SAAS;AACf,IAAA,KAAK,EAA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,EAAE,CAAC;AACnD,QAAA,GAAG,CAAC,SAAS,GAAG,SAAS;AACzB,QAAA,GAAG,CAAC,IAAI,GAAG,gCAAgC;AAC3C,QAAA,GAAG,CAAC,SAAS,GAAG,QAAQ;AACxB,QAAA,GAAG,CAAC,QAAQ,CAAC,QAAQ,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AAChD,QAAA,GAAG,CAAC,SAAS,GAAG,MAAM;IACxB;AACF;;"}
@@ -0,0 +1,3 @@
1
+ import type { UnitView } from "../../simport/view";
2
+ import { type RoomCtx } from "./common";
3
+ export declare function daycare(d: RoomCtx, u: UnitView, x: number, y: number, w: number, h: number): void;
@@ -0,0 +1,99 @@
1
+ import { shell, roomOccupants, shade, personStanding, busyStations } from './common.js';
2
+ import { authoredWidth, artRow } from './artScale.js';
3
+ import { layerBreak } from './layers.js';
4
+
5
+ /**
6
+ * Modern Daycare art: a bright, cheerful playroom with a soft play mat, a toy
7
+ * shelf, a row of little cots, and a caregiver, with small children that fill in
8
+ * with the real occupant count. Like the other Track-2 showpieces it has no
9
+ * subtypes, so this is one bespoke look. Modern-only (never exported to the 1994
10
+ * TDT). The room only ever draws while open (the closed shutter covers its off
11
+ * hours), so this is always the busy daytime scene.
12
+ *
13
+ * Drawing reads only bake-signature inputs (the real occupant count and a stable
14
+ * geography seed), so a placed room stays cacheable, an empty room reads quiet,
15
+ * and a TDT id renumber never reshuffles the children.
16
+ */
17
+ const WALL = "#FBE8B8"; // warm cream
18
+ const FLOOR = "#E6C98A"; // soft wood
19
+ const MAT = ["#E8785D", "#5DB4E8", "#6BD47A", "#F0C24A"]; // primary-color play mat
20
+ const SHELF = "#B07A46";
21
+ /** A stable per-room seed from GEOGRAPHY (floor, x), so the children and toys
22
+ * survive a save/export/import (which renumbers `u.id`). */
23
+ function figureSeed(u) {
24
+ return (u.floor * 137 + u.x * 19) >>> 0;
25
+ }
26
+ /** A small child: a shorter body than the adult silhouette, in a bright smock. */
27
+ function child(ctx, px, footY, seed) {
28
+ const c = MAT[seed % MAT.length];
29
+ ctx.fillStyle = "#000000";
30
+ ctx.globalAlpha = 0.22;
31
+ ctx.fillRect(px, footY - 3, 3, 3); // body block
32
+ ctx.globalAlpha = 1;
33
+ ctx.fillStyle = c;
34
+ ctx.fillRect(px, footY - 3, 3, 2); // smock
35
+ ctx.fillStyle = "#E8C9A0";
36
+ ctx.fillRect(px, footY - 5, 3, 2); // head
37
+ }
38
+ function daycare(d, u, x, y, w, h) {
39
+ const { ctx } = d;
40
+ const floorY = shell(ctx, x, y, w, h, WALL, FLOOR);
41
+ const seed = figureSeed(u);
42
+ const occ = roomOccupants(u);
43
+ // A bright bunting garland along the top wall.
44
+ for (let bx = x + 2, i = 0; bx + 4 < x + w - 2; bx += 6, i++) {
45
+ ctx.fillStyle = MAT[(i + seed) % MAT.length];
46
+ ctx.fillRect(bx, y + 3, 4, 3);
47
+ }
48
+ // A checkered soft play mat covering most of the floor. The mat is drawn at
49
+ // its screen size, but its AUTHORED width is what decides how many children it
50
+ // seats, so that is worked out separately and handed to the row.
51
+ const matX0 = x + 3, matX1 = x + Math.round(w * 0.62);
52
+ const matArtW = Math.round(authoredWidth(u.width) * 0.62) - 3;
53
+ for (let mx = matX0, k = 0; mx + 4 < matX1; mx += 5, k++) {
54
+ ctx.fillStyle = shade(MAT[(k + seed) % MAT.length], -8);
55
+ ctx.fillRect(mx, floorY - 2, 5, 2);
56
+ }
57
+ layerBreak(ctx); // the shell ends; the shelf, toys and people follow
58
+ // A toy shelf on the right with colorful bins.
59
+ const shX = x + Math.round(w * 0.66);
60
+ const shW = w - (shX - x) - 3;
61
+ ctx.fillStyle = SHELF;
62
+ ctx.fillRect(shX, floorY - 12, shW, 12);
63
+ ctx.fillStyle = shade(SHELF, 20);
64
+ ctx.fillRect(shX, floorY - 12, shW, 1);
65
+ ctx.fillRect(shX, floorY - 7, shW, 1);
66
+ for (let bx = shX + 1, i = 0; bx + 2 < shX + shW; bx += 4, i++) {
67
+ ctx.fillStyle = MAT[(i + seed + 1) % MAT.length];
68
+ ctx.fillRect(bx, floorY - 11, 3, 3); // upper bin of toys
69
+ ctx.fillRect(bx, floorY - 6, 3, 3); // lower bin
70
+ }
71
+ // A stack of blocks on the mat.
72
+ for (let i = 0; i < 3; i++) {
73
+ ctx.fillStyle = MAT[(seed + i) % MAT.length];
74
+ ctx.fillRect(matX0 + 2, floorY - 4 - i * 2, 3, 2);
75
+ }
76
+ // The caregiver (a standing adult) is present whenever the room is open. She
77
+ // is staff, not one of the children the room is counted in, so she does not
78
+ // come off the mat's places.
79
+ if (occ > 0)
80
+ personStanding(ctx, shX - 6, floorY, seed + 2);
81
+ // Places on the mat: the 6px pitch is authored art, counted against the MAT's
82
+ // authored run and fitted into the screen run by `artRow`. Read off the mat's
83
+ // pixel width the room lost two places when the tile narrowed, and two
84
+ // children who were in the room went undrawn.
85
+ // The row also stops short of the caregiver at the shelf's edge, which a
86
+ // narrow room (6 to 11 tiles) would otherwise seat a child under.
87
+ const places = artRow(matArtW - 3 - 4, matX0 + 3, Math.min(matX1 - 4, shX - 9), 6, 1, 3);
88
+ // Who is sitting where: the hash scatters them, the occupancy says how many.
89
+ // The old loop counted a hash-skipped place against the occupancy as if a
90
+ // child were there, so a room with five children could show two.
91
+ const sitting = busyStations(places.length, occ, seed * 23);
92
+ places.forEach((cx, i) => {
93
+ if (sitting.has(i))
94
+ child(ctx, cx, floorY, seed + i * 5);
95
+ });
96
+ }
97
+
98
+ export { daycare };
99
+ //# sourceMappingURL=daycare.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"daycare.js","sources":["../../../src/render/pixelSprites/daycare.ts"],"sourcesContent":["import type { UnitView } from \"../../simport/view\";\nimport { busyStations, personStanding, roomOccupants, shade, shell, type RoomCtx } from \"./common\";\nimport { artRow, authoredWidth } from \"./artScale\";\nimport { layerBreak } from \"./layers\";\n\n/**\n * Modern Daycare art: a bright, cheerful playroom with a soft play mat, a toy\n * shelf, a row of little cots, and a caregiver, with small children that fill in\n * with the real occupant count. Like the other Track-2 showpieces it has no\n * subtypes, so this is one bespoke look. Modern-only (never exported to the 1994\n * TDT). The room only ever draws while open (the closed shutter covers its off\n * hours), so this is always the busy daytime scene.\n *\n * Drawing reads only bake-signature inputs (the real occupant count and a stable\n * geography seed), so a placed room stays cacheable, an empty room reads quiet,\n * and a TDT id renumber never reshuffles the children.\n */\n\nconst WALL = \"#FBE8B8\"; // warm cream\nconst FLOOR = \"#E6C98A\"; // soft wood\nconst MAT = [\"#E8785D\", \"#5DB4E8\", \"#6BD47A\", \"#F0C24A\"]; // primary-color play mat\nconst SHELF = \"#B07A46\";\n\n/** A stable per-room seed from GEOGRAPHY (floor, x), so the children and toys\n * survive a save/export/import (which renumbers `u.id`). */\nfunction figureSeed(u: Pick<UnitView, \"floor\" | \"x\">): number {\n return (u.floor * 137 + u.x * 19) >>> 0;\n}\n\n/** A small child: a shorter body than the adult silhouette, in a bright smock. */\nfunction child(ctx: CanvasRenderingContext2D, px: number, footY: number, seed: number): void {\n const c = MAT[seed % MAT.length];\n ctx.fillStyle = \"#000000\";\n ctx.globalAlpha = 0.22;\n ctx.fillRect(px, footY - 3, 3, 3); // body block\n ctx.globalAlpha = 1;\n ctx.fillStyle = c;\n ctx.fillRect(px, footY - 3, 3, 2); // smock\n ctx.fillStyle = \"#E8C9A0\";\n ctx.fillRect(px, footY - 5, 3, 2); // head\n}\n\nexport function daycare(d: RoomCtx, u: UnitView, x: number, y: number, w: number, h: number): void {\n const { ctx } = d;\n const floorY = shell(ctx, x, y, w, h, WALL, FLOOR);\n const seed = figureSeed(u);\n const occ = roomOccupants(u);\n\n // A bright bunting garland along the top wall.\n for (let bx = x + 2, i = 0; bx + 4 < x + w - 2; bx += 6, i++) {\n ctx.fillStyle = MAT[(i + seed) % MAT.length];\n ctx.fillRect(bx, y + 3, 4, 3);\n }\n\n // A checkered soft play mat covering most of the floor. The mat is drawn at\n // its screen size, but its AUTHORED width is what decides how many children it\n // seats, so that is worked out separately and handed to the row.\n const matX0 = x + 3, matX1 = x + Math.round(w * 0.62);\n const matArtW = Math.round(authoredWidth(u.width) * 0.62) - 3;\n for (let mx = matX0, k = 0; mx + 4 < matX1; mx += 5, k++) {\n ctx.fillStyle = shade(MAT[(k + seed) % MAT.length], -8);\n ctx.fillRect(mx, floorY - 2, 5, 2);\n }\n\n layerBreak(ctx); // the shell ends; the shelf, toys and people follow\n\n // A toy shelf on the right with colorful bins.\n const shX = x + Math.round(w * 0.66);\n const shW = w - (shX - x) - 3;\n ctx.fillStyle = SHELF;\n ctx.fillRect(shX, floorY - 12, shW, 12);\n ctx.fillStyle = shade(SHELF, 20);\n ctx.fillRect(shX, floorY - 12, shW, 1); ctx.fillRect(shX, floorY - 7, shW, 1);\n for (let bx = shX + 1, i = 0; bx + 2 < shX + shW; bx += 4, i++) {\n ctx.fillStyle = MAT[(i + seed + 1) % MAT.length];\n ctx.fillRect(bx, floorY - 11, 3, 3); // upper bin of toys\n ctx.fillRect(bx, floorY - 6, 3, 3); // lower bin\n }\n // A stack of blocks on the mat.\n for (let i = 0; i < 3; i++) { ctx.fillStyle = MAT[(seed + i) % MAT.length]; ctx.fillRect(matX0 + 2, floorY - 4 - i * 2, 3, 2); }\n\n // The caregiver (a standing adult) is present whenever the room is open. She\n // is staff, not one of the children the room is counted in, so she does not\n // come off the mat's places.\n if (occ > 0) personStanding(ctx, shX - 6, floorY, seed + 2);\n\n // Places on the mat: the 6px pitch is authored art, counted against the MAT's\n // authored run and fitted into the screen run by `artRow`. Read off the mat's\n // pixel width the room lost two places when the tile narrowed, and two\n // children who were in the room went undrawn.\n // The row also stops short of the caregiver at the shelf's edge, which a\n // narrow room (6 to 11 tiles) would otherwise seat a child under.\n const places = artRow(matArtW - 3 - 4, matX0 + 3, Math.min(matX1 - 4, shX - 9), 6, 1, 3);\n // Who is sitting where: the hash scatters them, the occupancy says how many.\n // The old loop counted a hash-skipped place against the occupancy as if a\n // child were there, so a room with five children could show two.\n const sitting = busyStations(places.length, occ, seed * 23);\n places.forEach((cx, i) => {\n if (sitting.has(i)) child(ctx, cx, floorY, seed + i * 5);\n });\n}\n"],"names":[],"mappings":";;;;AAKA;;;;;;;;;;;AAWG;AAEH,MAAM,IAAI,GAAG,SAAS,CAAC;AACvB,MAAM,KAAK,GAAG,SAAS,CAAC;AACxB,MAAM,GAAG,GAAG,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC;AACzD,MAAM,KAAK,GAAG,SAAS;AAEvB;AAC6D;AAC7D,SAAS,UAAU,CAAC,CAAgC,EAAA;AAClD,IAAA,OAAO,CAAC,CAAC,CAAC,KAAK,GAAG,GAAG,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,MAAM,CAAC;AACzC;AAEA;AACA,SAAS,KAAK,CAAC,GAA6B,EAAE,EAAU,EAAE,KAAa,EAAE,IAAY,EAAA;IACnF,MAAM,CAAC,GAAG,GAAG,CAAC,IAAI,GAAG,GAAG,CAAC,MAAM,CAAC;AAChC,IAAA,GAAG,CAAC,SAAS,GAAG,SAAS;AACzB,IAAA,GAAG,CAAC,WAAW,GAAG,IAAI;AACtB,IAAA,GAAG,CAAC,QAAQ,CAAC,EAAE,EAAE,KAAK,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;AAClC,IAAA,GAAG,CAAC,WAAW,GAAG,CAAC;AACnB,IAAA,GAAG,CAAC,SAAS,GAAG,CAAC;AACjB,IAAA,GAAG,CAAC,QAAQ,CAAC,EAAE,EAAE,KAAK,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;AAClC,IAAA,GAAG,CAAC,SAAS,GAAG,SAAS;AACzB,IAAA,GAAG,CAAC,QAAQ,CAAC,EAAE,EAAE,KAAK,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;AACpC;AAEM,SAAU,OAAO,CAAC,CAAU,EAAE,CAAW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CAAC;IACrC;;AAEA,IAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE;AAAE,QAAA,GAAG,CAAC,SAAS,GAAG,GAAG,CAAC,CAAC,IAAI,GAAG,CAAC,IAAI,GAAG,CAAC,MAAM,CAAC;AAAE,QAAA,GAAG,CAAC,QAAQ,CAAC,KAAK,GAAG,CAAC,EAAE,MAAM,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;IAAE;;;;IAK/H,IAAI,GAAG,GAAG,CAAC;AAAE,QAAA,cAAc,CAAC,GAAG,EAAE,GAAG,GAAG,CAAC,EAAE,MAAM,EAAE,IAAI,GAAG,CAAC,CAAC;;;;;;;AAQ3D,IAAA,MAAM,MAAM,GAAG,MAAM,CAAC,OAAO,GAAG,CAAC,GAAG,CAAC,EAAE,KAAK,GAAG,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,KAAK,GAAG,CAAC,EAAE,GAAG,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;;;;AAIxF,IAAA,MAAM,OAAO,GAAG,YAAY,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,EAAE,IAAI,GAAG,EAAE,CAAC;IAC3D,MAAM,CAAC,OAAO,CAAC,CAAC,EAAE,EAAE,CAAC,KAAI;AACvB,QAAA,IAAI,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC;AAAE,YAAA,KAAK,CAAC,GAAG,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC;AAC1D,IAAA,CAAC,CAAC;AACJ;;"}
@@ -0,0 +1,45 @@
1
+ /**
2
+ * Dollhouse composition primitives, ported one-to-one from the ratified page-02
3
+ * build script (`pixelart-figma/build-scripts/page-02-offices-residential.build.js`),
4
+ * where each `F(A,x,y,w,h,c,o)` rectangle maps directly to a Canvas 2D fill.
5
+ * These are the pieces the shared `common.ts` set does not already cover
6
+ * (`windowView`, `dado`, `ceilingFixture`, `roomGlow`, `castShadow` live there);
7
+ * the tenant-room routines compose from both. Later food, retail, and lobby
8
+ * specs can reuse these too.
9
+ *
10
+ * Every helper keys only on bake-signature inputs (lit, occupancy), never on
11
+ * per-frame animation, so a static room stays cacheable. Integer pixel
12
+ * coordinates only.
13
+ */
14
+ /** One integer-aligned rectangle at an optional alpha, the port of the build
15
+ * `F`: rounds x and y, clamps width and height to at least 1px, and always
16
+ * restores `globalAlpha` to 1 so a translucent fill never bleeds into the next
17
+ * opaque draw (the shared and per-kind helpers assume alpha 1). */
18
+ export declare function fill(ctx: CanvasRenderingContext2D, x: number, y: number, w: number, h: number, color: string, alpha?: number): void;
19
+ /** A beveled furniture box: drop shadow, base fill, lit top and left edges,
20
+ * shaded bottom and right (build `box`). The shared prop primitive for desks,
21
+ * tables, sofas, headboards, and cabinets. */
22
+ export declare function bevelBox(ctx: CanvasRenderingContext2D, x: number, y: number, w: number, h: number, base: string): void;
23
+ /** Nested translucent squares: a soft warm lamp glow (build `glow`). Pass
24
+ * `PAL.glowLit` when the source is active, `PAL.glowDim` when it is not. Never
25
+ * place a `glowLit` glow adjacent to a `#FFD86A` ready lamp (legibility rule:
26
+ * the ready lamp keeps its own ink socket ring so it reads as a state cue). */
27
+ export declare function glow(ctx: CanvasRenderingContext2D, cx: number, cy: number, color: string): void;
28
+ /** Interior wall band: base fill, an upper-wall highlight, faint horizontal
29
+ * courses, and an optional pinstripe / paper speckle (build `iwall`). */
30
+ export declare function interiorWall(ctx: CanvasRenderingContext2D, x: number, y: number, w: number, h: number, base: string, patterned: boolean): void;
31
+ /** Crown-molding ceiling cap: a shaded band with a lit lower lip (build `ceil`). */
32
+ export declare function ceilingCap(ctx: CanvasRenderingContext2D, x: number, y: number, w: number, base: string): void;
33
+ /** A row of evenly spaced ceiling downlights that glow warm when `lit`, dim when
34
+ * not (build `lights`). `lit` is an occupancy or lighting flag from the bake
35
+ * signature, never animation. */
36
+ export declare function downlights(ctx: CanvasRenderingContext2D, x: number, y: number, w: number, lit: boolean): void;
37
+ /** A plank floor: base fill, polished top edge, a shaded seam, a dark base line,
38
+ * and vertical plank seams (build `pfloor`). `floorY` is the floor line and `h`
39
+ * the floor-band height. Office passes `PAL.carpetGreen`. */
40
+ export declare function plankFloor(ctx: CanvasRenderingContext2D, x: number, floorY: number, w: number, h: number, base: string): void;
41
+ /** A drawn-back curtain down one side of a window (build `curtain`). */
42
+ export declare function curtain(ctx: CanvasRenderingContext2D, x: number, y: number, h: number, color: string): void;
43
+ /** A framed picture on the wall: a beveled walnut frame around a muted subject
44
+ * with a lit top edge (build `art`). */
45
+ export declare function framedArt(ctx: CanvasRenderingContext2D, x: number, y: number, w: number, h: number, pic: string): void;
@@ -0,0 +1,110 @@
1
+ import { shade, PAL } from './common.js';
2
+
3
+ /**
4
+ * Dollhouse composition primitives, ported one-to-one from the ratified page-02
5
+ * build script (`pixelart-figma/build-scripts/page-02-offices-residential.build.js`),
6
+ * where each `F(A,x,y,w,h,c,o)` rectangle maps directly to a Canvas 2D fill.
7
+ * These are the pieces the shared `common.ts` set does not already cover
8
+ * (`windowView`, `dado`, `ceilingFixture`, `roomGlow`, `castShadow` live there);
9
+ * the tenant-room routines compose from both. Later food, retail, and lobby
10
+ * specs can reuse these too.
11
+ *
12
+ * Every helper keys only on bake-signature inputs (lit, occupancy), never on
13
+ * per-frame animation, so a static room stays cacheable. Integer pixel
14
+ * coordinates only.
15
+ */
16
+ /** One integer-aligned rectangle at an optional alpha, the port of the build
17
+ * `F`: rounds x and y, clamps width and height to at least 1px, and always
18
+ * restores `globalAlpha` to 1 so a translucent fill never bleeds into the next
19
+ * opaque draw (the shared and per-kind helpers assume alpha 1). */
20
+ function fill(ctx, x, y, w, h, color, alpha = 1) {
21
+ ctx.globalAlpha = alpha;
22
+ ctx.fillStyle = color;
23
+ ctx.fillRect(Math.round(x), Math.round(y), Math.max(1, Math.round(w)), Math.max(1, Math.round(h)));
24
+ ctx.globalAlpha = 1;
25
+ }
26
+ /** A beveled furniture box: drop shadow, base fill, lit top and left edges,
27
+ * shaded bottom and right (build `box`). The shared prop primitive for desks,
28
+ * tables, sofas, headboards, and cabinets. */
29
+ function bevelBox(ctx, x, y, w, h, base) {
30
+ const x0 = Math.round(x), y0 = Math.round(y), ww = Math.max(1, Math.round(w)), hh = Math.max(1, Math.round(h));
31
+ fill(ctx, x0, y0 + hh, ww, 1, "#000000", 0.18);
32
+ fill(ctx, x0, y0, ww, hh, base);
33
+ fill(ctx, x0, y0, ww, 1, shade(base, 22));
34
+ fill(ctx, x0, y0, 1, hh, shade(base, 12));
35
+ fill(ctx, x0 + ww - 1, y0, 1, hh, shade(base, -16));
36
+ fill(ctx, x0, y0 + hh - 1, ww, 1, shade(base, -22));
37
+ }
38
+ /** Nested translucent squares: a soft warm lamp glow (build `glow`). Pass
39
+ * `PAL.glowLit` when the source is active, `PAL.glowDim` when it is not. Never
40
+ * place a `glowLit` glow adjacent to a `#FFD86A` ready lamp (legibility rule:
41
+ * the ready lamp keeps its own ink socket ring so it reads as a state cue). */
42
+ function glow(ctx, cx, cy, color) {
43
+ const x = Math.round(cx), y = Math.round(cy);
44
+ const rings = [[4, 0.1], [3, 0.16], [2, 0.3], [1, 0.6]];
45
+ for (const [s, a] of rings)
46
+ fill(ctx, x - s, y - s, s * 2, s * 2, color, a);
47
+ }
48
+ /** Interior wall band: base fill, an upper-wall highlight, faint horizontal
49
+ * courses, and an optional pinstripe / paper speckle (build `iwall`). */
50
+ function interiorWall(ctx, x, y, w, h, base, patterned) {
51
+ const x0 = Math.round(x), y0 = Math.round(y), ww = Math.max(1, Math.round(w)), hh = Math.max(1, Math.round(h));
52
+ fill(ctx, x0, y0, ww, hh, base);
53
+ fill(ctx, x0, y0, ww, Math.round(hh * 0.45), shade(base, 7));
54
+ for (let py = y0 + 4; py < y0 + hh; py += 6)
55
+ fill(ctx, x0, py, ww, 1, shade(base, -7), 0.4);
56
+ if (patterned) {
57
+ for (let dx = x0 + 4, i = 0; dx < x0 + ww; dx += 8, i++) {
58
+ for (let dy = y0 + 4 + (i % 2) * 3; dy < y0 + hh - 2; dy += 6)
59
+ fill(ctx, dx, dy, 1, 1, shade(base, 13), 0.5);
60
+ }
61
+ }
62
+ }
63
+ /** Crown-molding ceiling cap: a shaded band with a lit lower lip (build `ceil`). */
64
+ function ceilingCap(ctx, x, y, w, base) {
65
+ const x0 = Math.round(x), y0 = Math.round(y), ww = Math.max(1, Math.round(w));
66
+ fill(ctx, x0, y0, ww, 2, shade(base, -24));
67
+ fill(ctx, x0, y0 + 2, ww, 1, shade(base, 16));
68
+ }
69
+ /** A row of evenly spaced ceiling downlights that glow warm when `lit`, dim when
70
+ * not (build `lights`). `lit` is an occupancy or lighting flag from the bake
71
+ * signature, never animation. */
72
+ function downlights(ctx, x, y, w, lit) {
73
+ const x0 = Math.round(x), y0 = Math.round(y), ww = Math.max(1, Math.round(w));
74
+ const n = Math.max(2, Math.round(ww / 24));
75
+ for (let i = 0; i < n; i++) {
76
+ const lx = Math.round(x0 + (ww * (i + 0.5)) / n);
77
+ fill(ctx, lx - 1, y0, 3, 1, lit ? PAL.glowLit : "#C8BCA0");
78
+ if (lit)
79
+ glow(ctx, lx, y0 + 2, PAL.glowLit);
80
+ }
81
+ }
82
+ /** A plank floor: base fill, polished top edge, a shaded seam, a dark base line,
83
+ * and vertical plank seams (build `pfloor`). `floorY` is the floor line and `h`
84
+ * the floor-band height. Office passes `PAL.carpetGreen`. */
85
+ function plankFloor(ctx, x, floorY, w, h, base) {
86
+ const x0 = Math.round(x), fy = Math.round(floorY), ww = Math.max(1, Math.round(w)), hh = Math.max(1, Math.round(h));
87
+ fill(ctx, x0, fy, ww, hh, base);
88
+ fill(ctx, x0, fy, ww, 1, shade(base, 18));
89
+ fill(ctx, x0, fy + 1, ww, 1, shade(base, -8));
90
+ fill(ctx, x0, fy + hh - 1, ww, 1, shade(base, -24));
91
+ for (let px = x0 + 8; px < x0 + ww; px += 14)
92
+ fill(ctx, px, fy + 1, 1, hh - 2, shade(base, -14));
93
+ }
94
+ /** A drawn-back curtain down one side of a window (build `curtain`). */
95
+ function curtain(ctx, x, y, h, color) {
96
+ const x0 = Math.round(x), y0 = Math.round(y), hh = Math.max(1, Math.round(h));
97
+ fill(ctx, x0 - 2, y0 - 1, 3, hh + 2, color);
98
+ fill(ctx, x0 - 2, y0 - 1, 1, hh + 2, shade(color, 18));
99
+ }
100
+ /** A framed picture on the wall: a beveled walnut frame around a muted subject
101
+ * with a lit top edge (build `art`). */
102
+ function framedArt(ctx, x, y, w, h, pic) {
103
+ const x0 = Math.round(x), y0 = Math.round(y), ww = Math.max(1, Math.round(w)), hh = Math.max(1, Math.round(h));
104
+ bevelBox(ctx, x0, y0, ww, hh, "#7A5A38");
105
+ fill(ctx, x0 + 1, y0 + 1, ww - 2, hh - 2, pic);
106
+ fill(ctx, x0 + 1, y0 + 1, ww - 2, 1, shade(pic, 18));
107
+ }
108
+
109
+ export { bevelBox, ceilingCap, curtain, downlights, fill, framedArt, glow, interiorWall, plankFloor };
110
+ //# sourceMappingURL=dollhouse.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dollhouse.js","sources":["../../../src/render/pixelSprites/dollhouse.ts"],"sourcesContent":["import { PAL, shade } from \"./common\";\n\n/**\n * Dollhouse composition primitives, ported one-to-one from the ratified page-02\n * build script (`pixelart-figma/build-scripts/page-02-offices-residential.build.js`),\n * where each `F(A,x,y,w,h,c,o)` rectangle maps directly to a Canvas 2D fill.\n * These are the pieces the shared `common.ts` set does not already cover\n * (`windowView`, `dado`, `ceilingFixture`, `roomGlow`, `castShadow` live there);\n * the tenant-room routines compose from both. Later food, retail, and lobby\n * specs can reuse these too.\n *\n * Every helper keys only on bake-signature inputs (lit, occupancy), never on\n * per-frame animation, so a static room stays cacheable. Integer pixel\n * coordinates only.\n */\n\n/** One integer-aligned rectangle at an optional alpha, the port of the build\n * `F`: rounds x and y, clamps width and height to at least 1px, and always\n * restores `globalAlpha` to 1 so a translucent fill never bleeds into the next\n * opaque draw (the shared and per-kind helpers assume alpha 1). */\nexport function fill(ctx: CanvasRenderingContext2D, x: number, y: number, w: number, h: number, color: string, alpha = 1): void {\n ctx.globalAlpha = alpha;\n ctx.fillStyle = color;\n ctx.fillRect(Math.round(x), Math.round(y), Math.max(1, Math.round(w)), Math.max(1, Math.round(h)));\n ctx.globalAlpha = 1;\n}\n\n/** A beveled furniture box: drop shadow, base fill, lit top and left edges,\n * shaded bottom and right (build `box`). The shared prop primitive for desks,\n * tables, sofas, headboards, and cabinets. */\nexport function bevelBox(ctx: CanvasRenderingContext2D, x: number, y: number, w: number, h: number, base: string): void {\n const x0 = Math.round(x), y0 = Math.round(y), ww = Math.max(1, Math.round(w)), hh = Math.max(1, Math.round(h));\n fill(ctx, x0, y0 + hh, ww, 1, \"#000000\", 0.18);\n fill(ctx, x0, y0, ww, hh, base);\n fill(ctx, x0, y0, ww, 1, shade(base, 22));\n fill(ctx, x0, y0, 1, hh, shade(base, 12));\n fill(ctx, x0 + ww - 1, y0, 1, hh, shade(base, -16));\n fill(ctx, x0, y0 + hh - 1, ww, 1, shade(base, -22));\n}\n\n/** Nested translucent squares: a soft warm lamp glow (build `glow`). Pass\n * `PAL.glowLit` when the source is active, `PAL.glowDim` when it is not. Never\n * place a `glowLit` glow adjacent to a `#FFD86A` ready lamp (legibility rule:\n * the ready lamp keeps its own ink socket ring so it reads as a state cue). */\nexport function glow(ctx: CanvasRenderingContext2D, cx: number, cy: number, color: string): void {\n const x = Math.round(cx), y = Math.round(cy);\n const rings: [number, number][] = [[4, 0.1], [3, 0.16], [2, 0.3], [1, 0.6]];\n for (const [s, a] of rings) fill(ctx, x - s, y - s, s * 2, s * 2, color, a);\n}\n\n/** Interior wall band: base fill, an upper-wall highlight, faint horizontal\n * courses, and an optional pinstripe / paper speckle (build `iwall`). */\nexport function interiorWall(ctx: CanvasRenderingContext2D, x: number, y: number, w: number, h: number, base: string, patterned: boolean): void {\n const x0 = Math.round(x), y0 = Math.round(y), ww = Math.max(1, Math.round(w)), hh = Math.max(1, Math.round(h));\n fill(ctx, x0, y0, ww, hh, base);\n fill(ctx, x0, y0, ww, Math.round(hh * 0.45), shade(base, 7));\n for (let py = y0 + 4; py < y0 + hh; py += 6) fill(ctx, x0, py, ww, 1, shade(base, -7), 0.4);\n if (patterned) {\n for (let dx = x0 + 4, i = 0; dx < x0 + ww; dx += 8, i++) {\n for (let dy = y0 + 4 + (i % 2) * 3; dy < y0 + hh - 2; dy += 6) fill(ctx, dx, dy, 1, 1, shade(base, 13), 0.5);\n }\n }\n}\n\n/** Crown-molding ceiling cap: a shaded band with a lit lower lip (build `ceil`). */\nexport function ceilingCap(ctx: CanvasRenderingContext2D, x: number, y: number, w: number, base: string): void {\n const x0 = Math.round(x), y0 = Math.round(y), ww = Math.max(1, Math.round(w));\n fill(ctx, x0, y0, ww, 2, shade(base, -24));\n fill(ctx, x0, y0 + 2, ww, 1, shade(base, 16));\n}\n\n/** A row of evenly spaced ceiling downlights that glow warm when `lit`, dim when\n * not (build `lights`). `lit` is an occupancy or lighting flag from the bake\n * signature, never animation. */\nexport function downlights(ctx: CanvasRenderingContext2D, x: number, y: number, w: number, lit: boolean): void {\n const x0 = Math.round(x), y0 = Math.round(y), ww = Math.max(1, Math.round(w));\n const n = Math.max(2, Math.round(ww / 24));\n for (let i = 0; i < n; i++) {\n const lx = Math.round(x0 + (ww * (i + 0.5)) / n);\n fill(ctx, lx - 1, y0, 3, 1, lit ? PAL.glowLit : \"#C8BCA0\");\n if (lit) glow(ctx, lx, y0 + 2, PAL.glowLit);\n }\n}\n\n/** A plank floor: base fill, polished top edge, a shaded seam, a dark base line,\n * and vertical plank seams (build `pfloor`). `floorY` is the floor line and `h`\n * the floor-band height. Office passes `PAL.carpetGreen`. */\nexport function plankFloor(ctx: CanvasRenderingContext2D, x: number, floorY: number, w: number, h: number, base: string): void {\n const x0 = Math.round(x), fy = Math.round(floorY), ww = Math.max(1, Math.round(w)), hh = Math.max(1, Math.round(h));\n fill(ctx, x0, fy, ww, hh, base);\n fill(ctx, x0, fy, ww, 1, shade(base, 18));\n fill(ctx, x0, fy + 1, ww, 1, shade(base, -8));\n fill(ctx, x0, fy + hh - 1, ww, 1, shade(base, -24));\n for (let px = x0 + 8; px < x0 + ww; px += 14) fill(ctx, px, fy + 1, 1, hh - 2, shade(base, -14));\n}\n\n/** A drawn-back curtain down one side of a window (build `curtain`). */\nexport function curtain(ctx: CanvasRenderingContext2D, x: number, y: number, h: number, color: string): void {\n const x0 = Math.round(x), y0 = Math.round(y), hh = Math.max(1, Math.round(h));\n fill(ctx, x0 - 2, y0 - 1, 3, hh + 2, color);\n fill(ctx, x0 - 2, y0 - 1, 1, hh + 2, shade(color, 18));\n}\n\n/** A framed picture on the wall: a beveled walnut frame around a muted subject\n * with a lit top edge (build `art`). */\nexport function framedArt(ctx: CanvasRenderingContext2D, x: number, y: number, w: number, h: number, pic: string): void {\n const x0 = Math.round(x), y0 = Math.round(y), ww = Math.max(1, Math.round(w)), hh = Math.max(1, Math.round(h));\n bevelBox(ctx, x0, y0, ww, hh, \"#7A5A38\");\n fill(ctx, x0 + 1, y0 + 1, ww - 2, hh - 2, pic);\n fill(ctx, x0 + 1, y0 + 1, ww - 2, 1, shade(pic, 18));\n}\n"],"names":[],"mappings":";;AAEA;;;;;;;;;;;;AAYG;AAEH;;;AAGoE;SACpD,IAAI,CAAC,GAA6B,EAAE,CAAS,EAAE,CAAS,EAAE,CAAS,EAAE,CAAS,EAAE,KAAa,EAAE,KAAK,GAAG,CAAC,EAAA;AACtH,IAAA,GAAG,CAAC,WAAW,GAAG,KAAK;AACvB,IAAA,GAAG,CAAC,SAAS,GAAG,KAAK;IACrB,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI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C;IAC9C,IAAI,CAAC,GAAG,EAAE,EAAE,GAAG,CAAC,EAAE,EAAE,GAAG,CAAC,EAAE,EAAE,GAAG,CAAC,EAAE,CAAC,EAAE,KAAK,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;AACtD;;"}
@@ -0,0 +1,30 @@
1
+ import type { UnitView } from "../../simport/view";
2
+ import { type RoomCtx } from "./common";
3
+ /**
4
+ * Modern Fitness Club art: a members' gym in one of five formats (a weight
5
+ * floor, a yoga studio, a spin studio, a boxing gym, a climbing wall). Every
6
+ * format keeps one anchor shape, the wall-mirror strip along the top, and its
7
+ * subtype furnishes its own equipment, so a Weight Floor and a Climbing Wall
8
+ * read as clearly different rooms. Modern-only (never exported to the 1994 TDT),
9
+ * so nothing here carries an ordinal.
10
+ *
11
+ * Drawing reads only bake-signature inputs (subtype via the look, the real
12
+ * occupant count, `lit`, and a stable geography seed), so a placed room stays
13
+ * cacheable, an empty club reads empty, and a TDT id renumber never reshuffles
14
+ * the figures.
15
+ */
16
+ export interface FitnessLook {
17
+ wall: string;
18
+ floor: string;
19
+ /** The mirror-strip / accent color; the equipment picks its own colors, but
20
+ * the shared anchor reads this. */
21
+ accent: string;
22
+ /** Which format fills the club. 1:1 with the subtype, so the look table stays
23
+ * trivially pairwise-distinct. */
24
+ format: "weights" | "yoga" | "spin" | "boxing" | "climb";
25
+ }
26
+ export declare const FITNESS_DEFAULT: FitnessLook;
27
+ export declare const FITNESS_LOOKS: Record<string, FitnessLook>;
28
+ /** The Modern Fitness Club. Reused for every format subtype; the look's `format`
29
+ * discriminant picks the interior so each format renders as its own room. */
30
+ export declare function fitnessClub(d: RoomCtx, u: UnitView, x: number, y: number, w: number, h: number): void;
@@ -0,0 +1,176 @@
1
+ import { shade, personSeated, castShadow, personStanding, busyStations, hash, shell, roomOccupants } from './common.js';
2
+ import { artRow, authoredWidth } from './artScale.js';
3
+ import { layerBreak } from './layers.js';
4
+
5
+ const FITNESS_DEFAULT = { wall: "#3A3E48", floor: "#2E323A", accent: "#C86A3A", format: "weights" };
6
+ const FITNESS_LOOKS = {
7
+ "Weight Floor": { wall: "#3A3E48", floor: "#2E323A", accent: "#C86A3A", format: "weights" },
8
+ "Yoga Studio": { wall: "#E8E0EC", floor: "#C8B8A0", accent: "#8AB86A", format: "yoga" },
9
+ "Spin Studio": { wall: "#201828", floor: "#2A2030", accent: "#E0407A", format: "spin" },
10
+ "Boxing Gym": { wall: "#4A2A2A", floor: "#3A2820", accent: "#D03A3A", format: "boxing" },
11
+ "Climbing Wall": { wall: "#2A3A44", floor: "#24303A", accent: "#E0C040", format: "climb" },
12
+ };
13
+ /** A stable per-room seed from GEOGRAPHY (floor, x), so the figures survive a
14
+ * save/export/import (which renumbers `u.id`). */
15
+ function figureSeed(u) {
16
+ return (u.floor * 131 + u.x * 17) | 0;
17
+ }
18
+ /** The mirror strip: the shared anchor. A bright glass band with a thin accent
19
+ * frame along the upper wall, the one shape every gym keeps. Returns the Y just
20
+ * below it. */
21
+ function mirrorStrip(ctx, x, y, w, wall, accent, lit) {
22
+ const band = 6;
23
+ ctx.fillStyle = shade(wall, lit ? 30 : 14); // glass
24
+ ctx.fillRect(x + 2, y + 2, w - 4, band);
25
+ ctx.fillStyle = shade(wall, 46); // bright highlight streak
26
+ ctx.fillRect(x + 3, y + 3, Math.max(1, Math.round((w - 6) * 0.4)), 1);
27
+ ctx.fillStyle = accent; // accent frame under the mirror
28
+ ctx.fillRect(x + 2, y + band + 2, w - 4, 1);
29
+ return y + band + 3;
30
+ }
31
+ function drawWeights(ctx, x, floorY, w, look, occ, seed) {
32
+ // A dumbbell rack along the back and a flat bench with a lifter.
33
+ ctx.fillStyle = shade(look.wall, 24); // rack frame
34
+ ctx.fillRect(x + 3, floorY - 12, w - 6, 2);
35
+ for (let dx = x + 5; dx + 4 < x + w - 4; dx += 6) {
36
+ ctx.fillStyle = look.accent; // dumbbell ends
37
+ ctx.fillRect(dx, floorY - 11, 2, 4);
38
+ ctx.fillRect(dx + 3, floorY - 11, 2, 4);
39
+ ctx.fillStyle = shade(look.wall, 40); // bar
40
+ ctx.fillRect(dx + 2, floorY - 10, 1, 2);
41
+ }
42
+ // A flat bench.
43
+ const bX = x + Math.round(w * 0.3);
44
+ ctx.fillStyle = "#2A2A30";
45
+ ctx.fillRect(bX, floorY - 5, 14, 3);
46
+ ctx.fillRect(bX + 1, floorY - 2, 2, 2);
47
+ ctx.fillRect(bX + 11, floorY - 2, 2, 2);
48
+ if (occ > 0)
49
+ personSeated(ctx, bX + 4, floorY - 3, seed); // a lifter on the bench
50
+ castShadow(ctx, bX, floorY, 14);
51
+ }
52
+ function drawYoga(ctx, x, floorY, w, aw, look, occ, seed) {
53
+ // A calm studio: mats laid on the floor, standing figures mid-pose, a plant.
54
+ // Mat anchors: the 12px pitch is authored art, counted against the authored
55
+ // run and fitted into the screen run by `artRow`. Read off the room's pixel width
56
+ // the studio lost two mats when the tile narrowed, and two members standing on
57
+ // them went undrawn. A class fills its mats from the front by design, which is
58
+ // why this row counts in order rather than scattering like the others: every
59
+ // mat is drawn either way, so an empty mat still reads as an empty mat.
60
+ // `occ` is already whole (`roomOccupants`), rounded the way every row reads it.
61
+ const members = Math.max(0, occ);
62
+ artRow(aw - 5 - 14, x + 5, x + w - 14, 12, 1, 9).forEach((mx, i) => {
63
+ ctx.fillStyle = i % 2 === 0 ? look.accent : shade(look.accent, 30); // rolled/laid mats
64
+ ctx.fillRect(mx, floorY - 2, 9, 2);
65
+ if (i < members)
66
+ personStanding(ctx, mx + 2, floorY - 1, seed + i * 7);
67
+ });
68
+ // A potted plant in the corner.
69
+ const pX = x + w - 6;
70
+ ctx.fillStyle = "#7A5A3A";
71
+ ctx.fillRect(pX, floorY - 4, 4, 4);
72
+ ctx.fillStyle = "#4A9A56";
73
+ ctx.fillRect(pX, floorY - 9, 4, 5);
74
+ }
75
+ function drawSpin(ctx, x, floorY, w, aw, look, occ, seed) {
76
+ // A dim room of stationary bikes lit by an accent glow, riders on some.
77
+ ctx.fillStyle = shade(look.accent, -30); // floor light wash
78
+ ctx.fillRect(x + 2, floorY - 1, w - 4, 1);
79
+ // Bike anchors: the 8px pitch is authored art, counted against the authored
80
+ // run and fitted into the screen run by `artRow`, so a narrower tile tightens
81
+ // the row instead of wheeling a bike out of the studio.
82
+ const bikes = artRow(aw - 5 - 9, x + 5, x + w - 9, 8, 1, 6);
83
+ // Which bikes have riders: the hash scatters them, the occupancy says how
84
+ // many. Rolling the hash per bike left riders who were in the class undrawn,
85
+ // so a full studio could show a handful of people on twenty bikes.
86
+ const riding = busyStations(bikes.length, occ, seed * 13);
87
+ bikes.forEach((bx, i) => {
88
+ ctx.fillStyle = "#14141A"; // bike frame
89
+ ctx.fillRect(bx, floorY - 9, 5, 9);
90
+ ctx.fillStyle = look.accent; // flywheel accent
91
+ ctx.fillRect(bx + 1, floorY - 7, 3, 3);
92
+ ctx.fillStyle = "#2A2A32"; // handlebar
93
+ ctx.fillRect(bx, floorY - 11, 3, 1);
94
+ if (riding.has(i))
95
+ personSeated(ctx, bx, floorY - 6, seed + i * 5);
96
+ });
97
+ }
98
+ function drawBoxing(ctx, x, floorY, w, look, occ, seed) {
99
+ // A heavy bag hanging from the ceiling, a ring corner post with ropes, a boxer.
100
+ const bagX = x + Math.round(w * 0.34);
101
+ ctx.fillStyle = "#4A4A52"; // chain
102
+ ctx.fillRect(bagX + 2, floorY - 20, 1, 4);
103
+ ctx.fillStyle = shade(look.accent, -10); // the bag
104
+ ctx.fillRect(bagX, floorY - 16, 5, 12);
105
+ ctx.fillStyle = shade(look.accent, 26);
106
+ ctx.fillRect(bagX, floorY - 16, 5, 1);
107
+ if (occ > 0)
108
+ personStanding(ctx, bagX - 6, floorY, seed); // a boxer working the bag
109
+ // A ring corner: a post and two rope lines.
110
+ const rX = x + w - 5;
111
+ ctx.fillStyle = "#C8C4B8"; // post
112
+ ctx.fillRect(rX, floorY - 14, 2, 14);
113
+ ctx.fillStyle = look.accent; // ropes
114
+ ctx.fillRect(x + Math.round(w * 0.6), floorY - 12, rX - (x + Math.round(w * 0.6)), 1);
115
+ ctx.fillRect(x + Math.round(w * 0.6), floorY - 8, rX - (x + Math.round(w * 0.6)), 1);
116
+ castShadow(ctx, bagX, floorY, 5);
117
+ }
118
+ function drawClimb(ctx, x, floorY, w, top, look, occ, seed) {
119
+ // A tall bouldering wall studded with colorful holds, a climber part-way up.
120
+ const wallX = x + 4;
121
+ const wallW = Math.round(w * 0.5);
122
+ ctx.fillStyle = shade(look.wall, 18); // the wall panel
123
+ ctx.fillRect(wallX, top, wallW, floorY - top);
124
+ const holdHues = ["#E0407A", "#40C0E0", "#E0C040", "#60D060"];
125
+ // The holds key on the room's seed and each hold's row and column on the
126
+ // wall, so the region compositor paints the same wall wherever the room's
127
+ // region starts. The seed goes through `hash` first:
128
+ // taken raw modulo the palette, walls on one floor four columns apart would
129
+ // always match, and a basement room's negative seed would index out of range.
130
+ const holdShift = Math.floor(hash(seed) * holdHues.length);
131
+ for (let hy = top + 3, row = 0; hy < floorY - 3; hy += 5, row++) {
132
+ for (let hx = wallX + 3, col = 0; hx + 2 < wallX + wallW - 1; hx += 7, col++) {
133
+ ctx.fillStyle = holdHues[(row + col + holdShift) % holdHues.length];
134
+ ctx.fillRect(hx + (row % 2), hy, 2, 2);
135
+ }
136
+ }
137
+ if (occ > 0)
138
+ personStanding(ctx, wallX + Math.round(wallW * 0.5), floorY - Math.round((floorY - top) * 0.35), seed);
139
+ // A crash mat at the base.
140
+ ctx.fillStyle = shade(look.accent, -20);
141
+ ctx.fillRect(wallX - 1, floorY - 2, wallW + 2, 2);
142
+ }
143
+ /** The Modern Fitness Club. Reused for every format subtype; the look's `format`
144
+ * discriminant picks the interior so each format renders as its own room. */
145
+ function fitnessClub(d, u, x, y, w, h) {
146
+ const { ctx } = d;
147
+ const look = (u.subtype !== undefined && FITNESS_LOOKS[u.subtype]) || FITNESS_DEFAULT;
148
+ const floorY = shell(ctx, x, y, w, h, look.wall, look.floor);
149
+ const top = mirrorStrip(ctx, x, y, w, look.wall, look.accent, d.lit);
150
+ layerBreak(ctx); // the shell ends; the equipment and members follow
151
+ const occ = roomOccupants(u);
152
+ const seed = figureSeed(u);
153
+ // The room's authored width comes from its TILES, not its pixels, so a row's
154
+ // capacity is the same whatever scale the caller draws at.
155
+ const aw = authoredWidth(u.width);
156
+ switch (look.format) {
157
+ case "weights":
158
+ drawWeights(ctx, x, floorY, w, look, occ, seed);
159
+ break;
160
+ case "yoga":
161
+ drawYoga(ctx, x, floorY, w, aw, look, occ, seed);
162
+ break;
163
+ case "spin":
164
+ drawSpin(ctx, x, floorY, w, aw, look, occ, seed);
165
+ break;
166
+ case "boxing":
167
+ drawBoxing(ctx, x, floorY, w, look, occ, seed);
168
+ break;
169
+ case "climb":
170
+ drawClimb(ctx, x, floorY, w, top, look, occ, seed);
171
+ break;
172
+ }
173
+ }
174
+
175
+ export { FITNESS_DEFAULT, FITNESS_LOOKS, fitnessClub };
176
+ //# sourceMappingURL=fitness.js.map