1681-engine 0.0.0-stage → 0.5.8

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 (1014) hide show
  1. package/CHANGELOG.md +304 -0
  2. package/LICENSE +21 -0
  3. package/README.md +164 -2
  4. package/dist/1681-engine.js +417 -0
  5. package/dist/1681-engine.js.map +1 -0
  6. package/dist/ambient/ColorGrade.js +41 -0
  7. package/dist/ambient/ColorGrade.js.map +1 -0
  8. package/dist/ambient/DayClock.js +57 -0
  9. package/dist/ambient/DayClock.js.map +1 -0
  10. package/dist/ambient/WeatherLayer.js +91 -0
  11. package/dist/ambient/WeatherLayer.js.map +1 -0
  12. package/dist/ambient/grade.js +13 -0
  13. package/dist/ambient/grade.js.map +1 -0
  14. package/dist/ambient/weather.js +52 -0
  15. package/dist/ambient/weather.js.map +1 -0
  16. package/dist/anim/AnimStateMachine.js +164 -0
  17. package/dist/anim/AnimStateMachine.js.map +1 -0
  18. package/dist/anim/Animator.js +67 -0
  19. package/dist/anim/Animator.js.map +1 -0
  20. package/dist/anim/animStateCompile.js +113 -0
  21. package/dist/anim/animStateCompile.js.map +1 -0
  22. package/dist/anim/animStateSystem.js +17 -0
  23. package/dist/anim/animStateSystem.js.map +1 -0
  24. package/dist/anim/animationSystem.js +15 -0
  25. package/dist/anim/animationSystem.js.map +1 -0
  26. package/dist/anim/asepriteSlices.js +22 -0
  27. package/dist/anim/asepriteSlices.js.map +1 -0
  28. package/dist/anim/asepriteTags.js +35 -0
  29. package/dist/anim/asepriteTags.js.map +1 -0
  30. package/dist/anim/parseAseprite.js +83 -0
  31. package/dist/anim/parseAseprite.js.map +1 -0
  32. package/dist/assets/AssetLoader.js +104 -0
  33. package/dist/assets/AssetLoader.js.map +1 -0
  34. package/dist/assets/loadAseprite.js +50 -0
  35. package/dist/assets/loadAseprite.js.map +1 -0
  36. package/dist/assets/takeCleanerWorker-DTcI_Jqr.js +31 -0
  37. package/dist/assets/takeCleanerWorker-DTcI_Jqr.js.map +1 -0
  38. package/dist/audio/Footsteps.js +26 -0
  39. package/dist/audio/Footsteps.js.map +1 -0
  40. package/dist/audio/MusicPlayer.js +78 -0
  41. package/dist/audio/MusicPlayer.js.map +1 -0
  42. package/dist/audio/SoundEngine.js +119 -0
  43. package/dist/audio/SoundEngine.js.map +1 -0
  44. package/dist/audio/cleanTake.js +30 -0
  45. package/dist/audio/cleanTake.js.map +1 -0
  46. package/dist/audio/music/ElementVoice.js +35 -0
  47. package/dist/audio/music/ElementVoice.js.map +1 -0
  48. package/dist/audio/music/GraphVoice.js +39 -0
  49. package/dist/audio/music/GraphVoice.js.map +1 -0
  50. package/dist/audio/music/MusicChannel.js +58 -0
  51. package/dist/audio/music/MusicChannel.js.map +1 -0
  52. package/dist/audio/music/musicVoice.js +13 -0
  53. package/dist/audio/music/musicVoice.js.map +1 -0
  54. package/dist/audio/sampleBank.js +82 -0
  55. package/dist/audio/sampleBank.js.map +1 -0
  56. package/dist/audio/soundTable.js +9 -0
  57. package/dist/audio/soundTable.js.map +1 -0
  58. package/dist/audio/synth.js +36 -0
  59. package/dist/audio/synth.js.map +1 -0
  60. package/dist/core/BitmapLabel.js +49 -0
  61. package/dist/core/BitmapLabel.js.map +1 -0
  62. package/dist/core/Camera.js +150 -0
  63. package/dist/core/Camera.js.map +1 -0
  64. package/dist/core/Clock.js +30 -0
  65. package/dist/core/Clock.js.map +1 -0
  66. package/dist/core/Graphics.js +69 -0
  67. package/dist/core/Graphics.js.map +1 -0
  68. package/dist/core/Group.js +29 -0
  69. package/dist/core/Group.js.map +1 -0
  70. package/dist/core/Image.js +51 -0
  71. package/dist/core/Image.js.map +1 -0
  72. package/dist/core/ObjectFactory.js +55 -0
  73. package/dist/core/ObjectFactory.js.map +1 -0
  74. package/dist/core/Pointer.js +58 -0
  75. package/dist/core/Pointer.js.map +1 -0
  76. package/dist/core/Rectangle.js +51 -0
  77. package/dist/core/Rectangle.js.map +1 -0
  78. package/dist/core/Stage.js +86 -0
  79. package/dist/core/Stage.js.map +1 -0
  80. package/dist/core/Text.js +22 -0
  81. package/dist/core/Text.js.map +1 -0
  82. package/dist/core/TextureRegistry.js +111 -0
  83. package/dist/core/TextureRegistry.js.map +1 -0
  84. package/dist/core/Timeline.js +211 -0
  85. package/dist/core/Timeline.js.map +1 -0
  86. package/dist/core/TimelineBuilder.js +73 -0
  87. package/dist/core/TimelineBuilder.js.map +1 -0
  88. package/dist/core/TimelineChild.js +84 -0
  89. package/dist/core/TimelineChild.js.map +1 -0
  90. package/dist/core/Tweener.js +136 -0
  91. package/dist/core/Tweener.js.map +1 -0
  92. package/dist/core/atlas.js +38 -0
  93. package/dist/core/atlas.js.map +1 -0
  94. package/dist/core/atlasPlan.js +22 -0
  95. package/dist/core/atlasPlan.js.map +1 -0
  96. package/dist/core/eases.js +21 -0
  97. package/dist/core/eases.js.map +1 -0
  98. package/dist/core/gameObject.js +115 -0
  99. package/dist/core/gameObject.js.map +1 -0
  100. package/dist/core/pixiPatches.js +18 -0
  101. package/dist/core/pixiPatches.js.map +1 -0
  102. package/dist/core/timelinePlace.js +24 -0
  103. package/dist/core/timelinePlace.js.map +1 -0
  104. package/dist/core/tweenProps.js +12 -0
  105. package/dist/core/tweenProps.js.map +1 -0
  106. package/dist/debug/DebugOverlay.js +94 -0
  107. package/dist/debug/DebugOverlay.js.map +1 -0
  108. package/dist/debug/DrawCallCounter.js +41 -0
  109. package/dist/debug/DrawCallCounter.js.map +1 -0
  110. package/dist/debug/ErrorLog.js +22 -0
  111. package/dist/debug/ErrorLog.js.map +1 -0
  112. package/dist/debug/FrameStats.js +42 -0
  113. package/dist/debug/FrameStats.js.map +1 -0
  114. package/dist/debug/inspectWorld.js +29 -0
  115. package/dist/debug/inspectWorld.js.map +1 -0
  116. package/dist/diagnostics/ErrorDeduper.js +27 -0
  117. package/dist/diagnostics/ErrorDeduper.js.map +1 -0
  118. package/dist/diagnostics/FrameSampler.js +42 -0
  119. package/dist/diagnostics/FrameSampler.js.map +1 -0
  120. package/dist/diagnostics/bootWatch.js +21 -0
  121. package/dist/diagnostics/bootWatch.js.map +1 -0
  122. package/dist/diagnostics/captureErrors.js +27 -0
  123. package/dist/diagnostics/captureErrors.js.map +1 -0
  124. package/dist/diagnostics/contextLoss.js +25 -0
  125. package/dist/diagnostics/contextLoss.js.map +1 -0
  126. package/dist/diagnostics/frameStats.js +31 -0
  127. package/dist/diagnostics/frameStats.js.map +1 -0
  128. package/dist/diagnostics/gpuInfo.js +22 -0
  129. package/dist/diagnostics/gpuInfo.js.map +1 -0
  130. package/dist/diagnostics/renderGuard.js +24 -0
  131. package/dist/diagnostics/renderGuard.js.map +1 -0
  132. package/dist/ecs/SparseSet.js +55 -0
  133. package/dist/ecs/SparseSet.js.map +1 -0
  134. package/dist/ecs/World.js +307 -0
  135. package/dist/ecs/World.js.map +1 -0
  136. package/dist/ecs/fields.js +26 -0
  137. package/dist/ecs/fields.js.map +1 -0
  138. package/dist/engine/Engine.js +82 -0
  139. package/dist/engine/Engine.js.map +1 -0
  140. package/dist/engine/FixedLoop.js +37 -0
  141. package/dist/engine/FixedLoop.js.map +1 -0
  142. package/dist/engine/Scene.js +79 -0
  143. package/dist/engine/Scene.js.map +1 -0
  144. package/dist/engine/SceneManager.js +73 -0
  145. package/dist/engine/SceneManager.js.map +1 -0
  146. package/dist/events/EventBus.js +42 -0
  147. package/dist/events/EventBus.js.map +1 -0
  148. package/dist/fx/FloatingText.js +72 -0
  149. package/dist/fx/FloatingText.js.map +1 -0
  150. package/dist/fx/hitStop.js +28 -0
  151. package/dist/fx/hitStop.js.map +1 -0
  152. package/dist/fx/viewCull.js +10 -0
  153. package/dist/fx/viewCull.js.map +1 -0
  154. package/dist/i18n/Translator.js +72 -0
  155. package/dist/i18n/Translator.js.map +1 -0
  156. package/dist/i18n/extractStrings.js +58 -0
  157. package/dist/i18n/extractStrings.js.map +1 -0
  158. package/dist/i18n/formatMessage.js +19 -0
  159. package/dist/i18n/formatMessage.js.map +1 -0
  160. package/dist/input/Actions.js +131 -0
  161. package/dist/input/Actions.js.map +1 -0
  162. package/dist/input/AimGesture.js +75 -0
  163. package/dist/input/AimGesture.js.map +1 -0
  164. package/dist/input/Keyboard.js +54 -0
  165. package/dist/input/Keyboard.js.map +1 -0
  166. package/dist/input/Keymap.js +171 -0
  167. package/dist/input/Keymap.js.map +1 -0
  168. package/dist/input/TargetLock.js +73 -0
  169. package/dist/input/TargetLock.js.map +1 -0
  170. package/dist/input/aimAxis.js +8 -0
  171. package/dist/input/aimAxis.js.map +1 -0
  172. package/dist/input/keyChord.js +29 -0
  173. package/dist/input/keyChord.js.map +1 -0
  174. package/dist/input/longPress.js +32 -0
  175. package/dist/input/longPress.js.map +1 -0
  176. package/dist/input/stickAxis.js +23 -0
  177. package/dist/input/stickAxis.js.map +1 -0
  178. package/dist/input/touchDetect.js +7 -0
  179. package/dist/input/touchDetect.js.map +1 -0
  180. package/dist/light/LightLayer.js +84 -0
  181. package/dist/light/LightLayer.js.map +1 -0
  182. package/dist/nav/MinHeap.js +39 -0
  183. package/dist/nav/MinHeap.js.map +1 -0
  184. package/dist/nav/findPath.js +78 -0
  185. package/dist/nav/findPath.js.map +1 -0
  186. package/dist/nav/navGrid.js +36 -0
  187. package/dist/nav/navGrid.js.map +1 -0
  188. package/dist/nav/nearestOpen.js +19 -0
  189. package/dist/nav/nearestOpen.js.map +1 -0
  190. package/dist/nav/straightenPath.js +51 -0
  191. package/dist/nav/straightenPath.js.map +1 -0
  192. package/dist/net/Connection.js +84 -0
  193. package/dist/net/Connection.js.map +1 -0
  194. package/dist/net/InterpolationBuffer.js +57 -0
  195. package/dist/net/InterpolationBuffer.js.map +1 -0
  196. package/dist/net/PredictedMover.js +61 -0
  197. package/dist/net/PredictedMover.js.map +1 -0
  198. package/dist/net/Room.js +92 -0
  199. package/dist/net/Room.js.map +1 -0
  200. package/dist/net/RoomHost.js +101 -0
  201. package/dist/net/RoomHost.js.map +1 -0
  202. package/dist/net/cadence.js +22 -0
  203. package/dist/net/cadence.js.map +1 -0
  204. package/dist/net/constants.js +11 -0
  205. package/dist/net/constants.js.map +1 -0
  206. package/dist/net/lobby/LobbyClient.js +124 -0
  207. package/dist/net/lobby/LobbyClient.js.map +1 -0
  208. package/dist/net/lobby/LobbyHost.js +366 -0
  209. package/dist/net/lobby/LobbyHost.js.map +1 -0
  210. package/dist/net/lobby/LobbyRooms.js +66 -0
  211. package/dist/net/lobby/LobbyRooms.js.map +1 -0
  212. package/dist/net/lobby/Matchmaker.js +106 -0
  213. package/dist/net/lobby/Matchmaker.js.map +1 -0
  214. package/dist/net/movement.js +83 -0
  215. package/dist/net/movement.js.map +1 -0
  216. package/dist/net/protocol.js +11 -0
  217. package/dist/net/protocol.js.map +1 -0
  218. package/dist/net/serverClock.js +22 -0
  219. package/dist/net/serverClock.js.map +1 -0
  220. package/dist/net/snapshotCodec.js +92 -0
  221. package/dist/net/snapshotCodec.js.map +1 -0
  222. package/dist/parallax/Parallax.js +32 -0
  223. package/dist/parallax/Parallax.js.map +1 -0
  224. package/dist/parallax/ParallaxLayer.js +70 -0
  225. package/dist/parallax/ParallaxLayer.js.map +1 -0
  226. package/dist/parallax/parallaxMath.js +27 -0
  227. package/dist/parallax/parallaxMath.js.map +1 -0
  228. package/dist/particles/Emitter.js +108 -0
  229. package/dist/particles/Emitter.js.map +1 -0
  230. package/dist/particles/ParticleBudget.js +32 -0
  231. package/dist/particles/ParticleBudget.js.map +1 -0
  232. package/dist/particles/ParticleSim.js +60 -0
  233. package/dist/particles/ParticleSim.js.map +1 -0
  234. package/dist/particles/particleCurves.js +48 -0
  235. package/dist/particles/particleCurves.js.map +1 -0
  236. package/dist/particles/particleSampling.js +30 -0
  237. package/dist/particles/particleSampling.js.map +1 -0
  238. package/dist/physics/Body.js +202 -0
  239. package/dist/physics/Body.js.map +1 -0
  240. package/dist/physics/BroadPhase.js +56 -0
  241. package/dist/physics/BroadPhase.js.map +1 -0
  242. package/dist/physics/Contact.js +76 -0
  243. package/dist/physics/Contact.js.map +1 -0
  244. package/dist/physics/ContactSolver.js +70 -0
  245. package/dist/physics/ContactSolver.js.map +1 -0
  246. package/dist/physics/PhysicsWorld.js +221 -0
  247. package/dist/physics/PhysicsWorld.js.map +1 -0
  248. package/dist/physics/SpatialHash.js +39 -0
  249. package/dist/physics/SpatialHash.js.map +1 -0
  250. package/dist/physics/collide.js +76 -0
  251. package/dist/physics/collide.js.map +1 -0
  252. package/dist/physics/collidePolygon.js +94 -0
  253. package/dist/physics/collidePolygon.js.map +1 -0
  254. package/dist/physics/contactReport.js +14 -0
  255. package/dist/physics/contactReport.js.map +1 -0
  256. package/dist/physics/drawColliders.js +31 -0
  257. package/dist/physics/drawColliders.js.map +1 -0
  258. package/dist/physics/physicsSystem.js +8 -0
  259. package/dist/physics/physicsSystem.js.map +1 -0
  260. package/dist/physics/polygon.js +80 -0
  261. package/dist/physics/polygon.js.map +1 -0
  262. package/dist/physics/raycast.js +62 -0
  263. package/dist/physics/raycast.js.map +1 -0
  264. package/dist/physics/syncToBody.js +19 -0
  265. package/dist/physics/syncToBody.js.map +1 -0
  266. package/dist/physics/tileBodies.js +59 -0
  267. package/dist/physics/tileBodies.js.map +1 -0
  268. package/dist/physics/types.js +8 -0
  269. package/dist/physics/types.js.map +1 -0
  270. package/dist/pixel/Darkness.js +166 -0
  271. package/dist/pixel/Darkness.js.map +1 -0
  272. package/dist/pixel/DitherVignette.js +57 -0
  273. package/dist/pixel/DitherVignette.js.map +1 -0
  274. package/dist/pixel/Evaporation.js +85 -0
  275. package/dist/pixel/Evaporation.js.map +1 -0
  276. package/dist/pixel/NightShade.js +34 -0
  277. package/dist/pixel/NightShade.js.map +1 -0
  278. package/dist/pixel/PixelLayer.js +211 -0
  279. package/dist/pixel/PixelLayer.js.map +1 -0
  280. package/dist/pixel/SwayProp.js +75 -0
  281. package/dist/pixel/SwayProp.js.map +1 -0
  282. package/dist/pixel/lights.js +44 -0
  283. package/dist/pixel/lights.js.map +1 -0
  284. package/dist/pixel/nineSlice.js +62 -0
  285. package/dist/pixel/nineSlice.js.map +1 -0
  286. package/dist/pixel/paintLayer.js +36 -0
  287. package/dist/pixel/paintLayer.js.map +1 -0
  288. package/dist/pixel/palette.js +57 -0
  289. package/dist/pixel/palette.js.map +1 -0
  290. package/dist/pixel/pixel.js +278 -0
  291. package/dist/pixel/pixel.js.map +1 -0
  292. package/dist/pixel/pixelPaint.js +194 -0
  293. package/dist/pixel/pixelPaint.js.map +1 -0
  294. package/dist/pixel/pixelTone.js +164 -0
  295. package/dist/pixel/pixelTone.js.map +1 -0
  296. package/dist/pixel/propKit.js +41 -0
  297. package/dist/pixel/propKit.js.map +1 -0
  298. package/dist/pixel/ramp.js +102 -0
  299. package/dist/pixel/ramp.js.map +1 -0
  300. package/dist/pixel/selout.js +35 -0
  301. package/dist/pixel/selout.js.map +1 -0
  302. package/dist/pixel/spritePixels.js +59 -0
  303. package/dist/pixel/spritePixels.js.map +1 -0
  304. package/dist/pixel/swayRig.js +87 -0
  305. package/dist/pixel/swayRig.js.map +1 -0
  306. package/dist/pixel/vignetteMask.js +24 -0
  307. package/dist/pixel/vignetteMask.js.map +1 -0
  308. package/dist/pixel/weatherArt.js +61 -0
  309. package/dist/pixel/weatherArt.js.map +1 -0
  310. package/dist/pixel.js +90 -0
  311. package/dist/pixel.js.map +1 -0
  312. package/dist/platform/touch.js +33 -0
  313. package/dist/platform/touch.js.map +1 -0
  314. package/dist/postfx/BloomFilter.js +65 -0
  315. package/dist/postfx/BloomFilter.js.map +1 -0
  316. package/dist/postfx/ChromaticAberrationFilter.js +25 -0
  317. package/dist/postfx/ChromaticAberrationFilter.js.map +1 -0
  318. package/dist/postfx/ColorAdjustFilter.js +76 -0
  319. package/dist/postfx/ColorAdjustFilter.js.map +1 -0
  320. package/dist/postfx/CrtFilter.js +42 -0
  321. package/dist/postfx/CrtFilter.js.map +1 -0
  322. package/dist/postfx/PixelateFilter.js +27 -0
  323. package/dist/postfx/PixelateFilter.js.map +1 -0
  324. package/dist/postfx/PostFx.js +123 -0
  325. package/dist/postfx/PostFx.js.map +1 -0
  326. package/dist/postfx/ShockwaveFilter.js +49 -0
  327. package/dist/postfx/ShockwaveFilter.js.map +1 -0
  328. package/dist/postfx/VignetteFilter.js +37 -0
  329. package/dist/postfx/VignetteFilter.js.map +1 -0
  330. package/dist/postfx/fxAnimator.js +38 -0
  331. package/dist/postfx/fxAnimator.js.map +1 -0
  332. package/dist/postfx/fxShader.js +128 -0
  333. package/dist/postfx/fxShader.js.map +1 -0
  334. package/dist/postfx.js +26 -0
  335. package/dist/postfx.js.map +1 -0
  336. package/dist/react/ChoiceDialog.js +51 -0
  337. package/dist/react/ChoiceDialog.js.map +1 -0
  338. package/dist/react/ConfirmDialog.js +53 -0
  339. package/dist/react/ConfirmDialog.js.map +1 -0
  340. package/dist/react/Glyph.js +63 -0
  341. package/dist/react/Glyph.js.map +1 -0
  342. package/dist/react/Modal.js +38 -0
  343. package/dist/react/Modal.js.map +1 -0
  344. package/dist/react/Panel.js +24 -0
  345. package/dist/react/Panel.js.map +1 -0
  346. package/dist/react/PixelImage.js +24 -0
  347. package/dist/react/PixelImage.js.map +1 -0
  348. package/dist/react/Select.js +99 -0
  349. package/dist/react/Select.js.map +1 -0
  350. package/dist/react/Slider.js +62 -0
  351. package/dist/react/Slider.js.map +1 -0
  352. package/dist/react/SplitPane.js +24 -0
  353. package/dist/react/SplitPane.js.map +1 -0
  354. package/dist/react/TabStrip.js +32 -0
  355. package/dist/react/TabStrip.js.map +1 -0
  356. package/dist/react/TitleTips.js +42 -0
  357. package/dist/react/TitleTips.js.map +1 -0
  358. package/dist/react/Tooltip.js +28 -0
  359. package/dist/react/Tooltip.js.map +1 -0
  360. package/dist/react/UiProvider.js +50 -0
  361. package/dist/react/UiProvider.js.map +1 -0
  362. package/dist/react/baseCss.js +222 -0
  363. package/dist/react/baseCss.js.map +1 -0
  364. package/dist/react/choiceStore.js +23 -0
  365. package/dist/react/choiceStore.js.map +1 -0
  366. package/dist/react/classNames.js +19 -0
  367. package/dist/react/classNames.js.map +1 -0
  368. package/dist/react/confirmStore.js +30 -0
  369. package/dist/react/confirmStore.js.map +1 -0
  370. package/dist/react/labels.js +18 -0
  371. package/dist/react/labels.js.map +1 -0
  372. package/dist/react/placement.js +49 -0
  373. package/dist/react/placement.js.map +1 -0
  374. package/dist/react/useFillSheet.js +23 -0
  375. package/dist/react/useFillSheet.js.map +1 -0
  376. package/dist/react/useFitToViewport.js +29 -0
  377. package/dist/react/useFitToViewport.js.map +1 -0
  378. package/dist/react/usePicked.js +13 -0
  379. package/dist/react/usePicked.js.map +1 -0
  380. package/dist/react/useStore.js +9 -0
  381. package/dist/react/useStore.js.map +1 -0
  382. package/dist/react/useViewport.js +17 -0
  383. package/dist/react/useViewport.js.map +1 -0
  384. package/dist/react.js +78 -0
  385. package/dist/react.js.map +1 -0
  386. package/dist/rig/PosePlayer.js +92 -0
  387. package/dist/rig/PosePlayer.js.map +1 -0
  388. package/dist/rig/RigView.js +125 -0
  389. package/dist/rig/RigView.js.map +1 -0
  390. package/dist/rig/Skeleton.js +31 -0
  391. package/dist/rig/Skeleton.js.map +1 -0
  392. package/dist/rig/humanoid.js +6 -0
  393. package/dist/rig/humanoid.js.map +1 -0
  394. package/dist/rig/humanoid.json.js +30 -0
  395. package/dist/rig/humanoid.json.js.map +1 -0
  396. package/dist/rig/humanoidPoses.js +30 -0
  397. package/dist/rig/humanoidPoses.js.map +1 -0
  398. package/dist/rig/poseMath.js +54 -0
  399. package/dist/rig/poseMath.js.map +1 -0
  400. package/dist/rig/poses.json.js +150 -0
  401. package/dist/rig/poses.json.js.map +1 -0
  402. package/dist/save/Autosaver.js +54 -0
  403. package/dist/save/Autosaver.js.map +1 -0
  404. package/dist/save/MemoryBackend.js +19 -0
  405. package/dist/save/MemoryBackend.js.map +1 -0
  406. package/dist/save/SaveStore.js +103 -0
  407. package/dist/save/SaveStore.js.map +1 -0
  408. package/dist/save/WebStorageBackend.js +27 -0
  409. package/dist/save/WebStorageBackend.js.map +1 -0
  410. package/dist/save/checksum.js +10 -0
  411. package/dist/save/checksum.js.map +1 -0
  412. package/dist/save/migrateSave.js +27 -0
  413. package/dist/save/migrateSave.js.map +1 -0
  414. package/dist/settings.js +27 -0
  415. package/dist/settings.js.map +1 -0
  416. package/dist/tilemap/TilemapView.js +69 -0
  417. package/dist/tilemap/TilemapView.js.map +1 -0
  418. package/dist/tilemap/collision.js +25 -0
  419. package/dist/tilemap/collision.js.map +1 -0
  420. package/dist/tilemap/tiled.js +138 -0
  421. package/dist/tilemap/tiled.js.map +1 -0
  422. package/dist/transitions/CrossfadeTransition.js +24 -0
  423. package/dist/transitions/CrossfadeTransition.js.map +1 -0
  424. package/dist/transitions/DitherWipeTransition.js +70 -0
  425. package/dist/transitions/DitherWipeTransition.js.map +1 -0
  426. package/dist/transitions/FadeTransition.js +34 -0
  427. package/dist/transitions/FadeTransition.js.map +1 -0
  428. package/dist/transitions/Letterbox.js +42 -0
  429. package/dist/transitions/Letterbox.js.map +1 -0
  430. package/dist/transitions/ditherMask.js +15 -0
  431. package/dist/transitions/ditherMask.js.map +1 -0
  432. package/dist/transitions/transitionTo.js +28 -0
  433. package/dist/transitions/transitionTo.js.map +1 -0
  434. package/dist/transitions/tweenDone.js +15 -0
  435. package/dist/transitions/tweenDone.js.map +1 -0
  436. package/dist/types/ambient/ColorGrade.d.ts +41 -0
  437. package/dist/types/ambient/ColorGrade.d.ts.map +1 -0
  438. package/dist/types/ambient/DayClock.d.ts +80 -0
  439. package/dist/types/ambient/DayClock.d.ts.map +1 -0
  440. package/dist/types/ambient/WeatherLayer.d.ts +78 -0
  441. package/dist/types/ambient/WeatherLayer.d.ts.map +1 -0
  442. package/dist/types/ambient/grade.d.ts +22 -0
  443. package/dist/types/ambient/grade.d.ts.map +1 -0
  444. package/dist/types/ambient/weather.d.ts +49 -0
  445. package/dist/types/ambient/weather.d.ts.map +1 -0
  446. package/dist/types/anim/AnimStateMachine.d.ts +80 -0
  447. package/dist/types/anim/AnimStateMachine.d.ts.map +1 -0
  448. package/dist/types/anim/Animator.d.ts +50 -0
  449. package/dist/types/anim/Animator.d.ts.map +1 -0
  450. package/dist/types/anim/animStateCompile.d.ts +52 -0
  451. package/dist/types/anim/animStateCompile.d.ts.map +1 -0
  452. package/dist/types/anim/animStateSystem.d.ts +10 -0
  453. package/dist/types/anim/animStateSystem.d.ts.map +1 -0
  454. package/dist/types/anim/animStateTypes.d.ts +50 -0
  455. package/dist/types/anim/animStateTypes.d.ts.map +1 -0
  456. package/dist/types/anim/animationSystem.d.ts +13 -0
  457. package/dist/types/anim/animationSystem.d.ts.map +1 -0
  458. package/dist/types/anim/asepriteSlices.d.ts +19 -0
  459. package/dist/types/anim/asepriteSlices.d.ts.map +1 -0
  460. package/dist/types/anim/asepriteTags.d.ts +16 -0
  461. package/dist/types/anim/asepriteTags.d.ts.map +1 -0
  462. package/dist/types/anim/asepriteTypes.d.ts +159 -0
  463. package/dist/types/anim/asepriteTypes.d.ts.map +1 -0
  464. package/dist/types/anim/parseAseprite.d.ts +21 -0
  465. package/dist/types/anim/parseAseprite.d.ts.map +1 -0
  466. package/dist/types/assets/AssetLoader.d.ts +85 -0
  467. package/dist/types/assets/AssetLoader.d.ts.map +1 -0
  468. package/dist/types/assets/loadAseprite.d.ts +27 -0
  469. package/dist/types/assets/loadAseprite.d.ts.map +1 -0
  470. package/dist/types/audio/Footsteps.d.ts +33 -0
  471. package/dist/types/audio/Footsteps.d.ts.map +1 -0
  472. package/dist/types/audio/MusicPlayer.d.ts +65 -0
  473. package/dist/types/audio/MusicPlayer.d.ts.map +1 -0
  474. package/dist/types/audio/SoundEngine.d.ts +42 -0
  475. package/dist/types/audio/SoundEngine.d.ts.map +1 -0
  476. package/dist/types/audio/cleanTake.d.ts +3 -0
  477. package/dist/types/audio/cleanTake.d.ts.map +1 -0
  478. package/dist/types/audio/music/ElementVoice.d.ts +14 -0
  479. package/dist/types/audio/music/ElementVoice.d.ts.map +1 -0
  480. package/dist/types/audio/music/GraphVoice.d.ts +22 -0
  481. package/dist/types/audio/music/GraphVoice.d.ts.map +1 -0
  482. package/dist/types/audio/music/MusicChannel.d.ts +35 -0
  483. package/dist/types/audio/music/MusicChannel.d.ts.map +1 -0
  484. package/dist/types/audio/music/musicVoice.d.ts +26 -0
  485. package/dist/types/audio/music/musicVoice.d.ts.map +1 -0
  486. package/dist/types/audio/sampleBank.d.ts +27 -0
  487. package/dist/types/audio/sampleBank.d.ts.map +1 -0
  488. package/dist/types/audio/soundTable.d.ts +14 -0
  489. package/dist/types/audio/soundTable.d.ts.map +1 -0
  490. package/dist/types/audio/synth.d.ts +34 -0
  491. package/dist/types/audio/synth.d.ts.map +1 -0
  492. package/dist/types/audio/takeCleanerWorker.d.ts +2 -0
  493. package/dist/types/audio/takeCleanerWorker.d.ts.map +1 -0
  494. package/dist/types/core/BitmapLabel.d.ts +36 -0
  495. package/dist/types/core/BitmapLabel.d.ts.map +1 -0
  496. package/dist/types/core/Camera.d.ts +115 -0
  497. package/dist/types/core/Camera.d.ts.map +1 -0
  498. package/dist/types/core/Clock.d.ts +11 -0
  499. package/dist/types/core/Clock.d.ts.map +1 -0
  500. package/dist/types/core/Graphics.d.ts +37 -0
  501. package/dist/types/core/Graphics.d.ts.map +1 -0
  502. package/dist/types/core/Group.d.ts +15 -0
  503. package/dist/types/core/Group.d.ts.map +1 -0
  504. package/dist/types/core/Image.d.ts +25 -0
  505. package/dist/types/core/Image.d.ts.map +1 -0
  506. package/dist/types/core/ObjectFactory.d.ts +34 -0
  507. package/dist/types/core/ObjectFactory.d.ts.map +1 -0
  508. package/dist/types/core/Pointer.d.ts +27 -0
  509. package/dist/types/core/Pointer.d.ts.map +1 -0
  510. package/dist/types/core/Rectangle.d.ts +26 -0
  511. package/dist/types/core/Rectangle.d.ts.map +1 -0
  512. package/dist/types/core/Stage.d.ts +58 -0
  513. package/dist/types/core/Stage.d.ts.map +1 -0
  514. package/dist/types/core/Text.d.ts +22 -0
  515. package/dist/types/core/Text.d.ts.map +1 -0
  516. package/dist/types/core/TextureRegistry.d.ts +51 -0
  517. package/dist/types/core/TextureRegistry.d.ts.map +1 -0
  518. package/dist/types/core/Timeline.d.ts +115 -0
  519. package/dist/types/core/Timeline.d.ts.map +1 -0
  520. package/dist/types/core/TimelineBuilder.d.ts +53 -0
  521. package/dist/types/core/TimelineBuilder.d.ts.map +1 -0
  522. package/dist/types/core/TimelineChild.d.ts +51 -0
  523. package/dist/types/core/TimelineChild.d.ts.map +1 -0
  524. package/dist/types/core/Tweener.d.ts +70 -0
  525. package/dist/types/core/Tweener.d.ts.map +1 -0
  526. package/dist/types/core/atlas.d.ts +16 -0
  527. package/dist/types/core/atlas.d.ts.map +1 -0
  528. package/dist/types/core/atlasPlan.d.ts +34 -0
  529. package/dist/types/core/atlasPlan.d.ts.map +1 -0
  530. package/dist/types/core/eases.d.ts +3 -0
  531. package/dist/types/core/eases.d.ts.map +1 -0
  532. package/dist/types/core/gameObject.d.ts +42 -0
  533. package/dist/types/core/gameObject.d.ts.map +1 -0
  534. package/dist/types/core/pixiPatches.d.ts +9 -0
  535. package/dist/types/core/pixiPatches.d.ts.map +1 -0
  536. package/dist/types/core/timelinePlace.d.ts +23 -0
  537. package/dist/types/core/timelinePlace.d.ts.map +1 -0
  538. package/dist/types/core/tweenProps.d.ts +8 -0
  539. package/dist/types/core/tweenProps.d.ts.map +1 -0
  540. package/dist/types/core/types.d.ts +4 -0
  541. package/dist/types/core/types.d.ts.map +1 -0
  542. package/dist/types/debug/DebugOverlay.d.ts +63 -0
  543. package/dist/types/debug/DebugOverlay.d.ts.map +1 -0
  544. package/dist/types/debug/DrawCallCounter.d.ts +20 -0
  545. package/dist/types/debug/DrawCallCounter.d.ts.map +1 -0
  546. package/dist/types/debug/ErrorLog.d.ts +20 -0
  547. package/dist/types/debug/ErrorLog.d.ts.map +1 -0
  548. package/dist/types/debug/FrameStats.d.ts +21 -0
  549. package/dist/types/debug/FrameStats.d.ts.map +1 -0
  550. package/dist/types/debug/inspectWorld.d.ts +14 -0
  551. package/dist/types/debug/inspectWorld.d.ts.map +1 -0
  552. package/dist/types/diagnostics/ErrorDeduper.d.ts +17 -0
  553. package/dist/types/diagnostics/ErrorDeduper.d.ts.map +1 -0
  554. package/dist/types/diagnostics/FrameSampler.d.ts +37 -0
  555. package/dist/types/diagnostics/FrameSampler.d.ts.map +1 -0
  556. package/dist/types/diagnostics/bootWatch.d.ts +25 -0
  557. package/dist/types/diagnostics/bootWatch.d.ts.map +1 -0
  558. package/dist/types/diagnostics/captureErrors.d.ts +24 -0
  559. package/dist/types/diagnostics/captureErrors.d.ts.map +1 -0
  560. package/dist/types/diagnostics/contextLoss.d.ts +35 -0
  561. package/dist/types/diagnostics/contextLoss.d.ts.map +1 -0
  562. package/dist/types/diagnostics/frameStats.d.ts +30 -0
  563. package/dist/types/diagnostics/frameStats.d.ts.map +1 -0
  564. package/dist/types/diagnostics/gpuInfo.d.ts +9 -0
  565. package/dist/types/diagnostics/gpuInfo.d.ts.map +1 -0
  566. package/dist/types/diagnostics/renderGuard.d.ts +12 -0
  567. package/dist/types/diagnostics/renderGuard.d.ts.map +1 -0
  568. package/dist/types/ecs/SparseSet.d.ts +25 -0
  569. package/dist/types/ecs/SparseSet.d.ts.map +1 -0
  570. package/dist/types/ecs/World.d.ts +137 -0
  571. package/dist/types/ecs/World.d.ts.map +1 -0
  572. package/dist/types/ecs/fields.d.ts +34 -0
  573. package/dist/types/ecs/fields.d.ts.map +1 -0
  574. package/dist/types/engine/Engine.d.ts +80 -0
  575. package/dist/types/engine/Engine.d.ts.map +1 -0
  576. package/dist/types/engine/FixedLoop.d.ts +32 -0
  577. package/dist/types/engine/FixedLoop.d.ts.map +1 -0
  578. package/dist/types/engine/Scene.d.ts +67 -0
  579. package/dist/types/engine/Scene.d.ts.map +1 -0
  580. package/dist/types/engine/SceneManager.d.ts +36 -0
  581. package/dist/types/engine/SceneManager.d.ts.map +1 -0
  582. package/dist/types/events/EventBus.d.ts +20 -0
  583. package/dist/types/events/EventBus.d.ts.map +1 -0
  584. package/dist/types/fx/FloatingText.d.ts +71 -0
  585. package/dist/types/fx/FloatingText.d.ts.map +1 -0
  586. package/dist/types/fx/hitStop.d.ts +20 -0
  587. package/dist/types/fx/hitStop.d.ts.map +1 -0
  588. package/dist/types/fx/viewCull.d.ts +14 -0
  589. package/dist/types/fx/viewCull.d.ts.map +1 -0
  590. package/dist/types/i18n/Translator.d.ts +52 -0
  591. package/dist/types/i18n/Translator.d.ts.map +1 -0
  592. package/dist/types/i18n/extractStrings.d.ts +25 -0
  593. package/dist/types/i18n/extractStrings.d.ts.map +1 -0
  594. package/dist/types/i18n/formatMessage.d.ts +10 -0
  595. package/dist/types/i18n/formatMessage.d.ts.map +1 -0
  596. package/dist/types/index.d.ts +149 -0
  597. package/dist/types/index.d.ts.map +1 -0
  598. package/dist/types/input/Actions.d.ts +94 -0
  599. package/dist/types/input/Actions.d.ts.map +1 -0
  600. package/dist/types/input/AimGesture.d.ts +106 -0
  601. package/dist/types/input/AimGesture.d.ts.map +1 -0
  602. package/dist/types/input/Keyboard.d.ts +30 -0
  603. package/dist/types/input/Keyboard.d.ts.map +1 -0
  604. package/dist/types/input/Keymap.d.ts +85 -0
  605. package/dist/types/input/Keymap.d.ts.map +1 -0
  606. package/dist/types/input/TargetLock.d.ts +56 -0
  607. package/dist/types/input/TargetLock.d.ts.map +1 -0
  608. package/dist/types/input/aimAxis.d.ts +9 -0
  609. package/dist/types/input/aimAxis.d.ts.map +1 -0
  610. package/dist/types/input/keyChord.d.ts +15 -0
  611. package/dist/types/input/keyChord.d.ts.map +1 -0
  612. package/dist/types/input/longPress.d.ts +21 -0
  613. package/dist/types/input/longPress.d.ts.map +1 -0
  614. package/dist/types/input/stickAxis.d.ts +26 -0
  615. package/dist/types/input/stickAxis.d.ts.map +1 -0
  616. package/dist/types/input/touchDetect.d.ts +18 -0
  617. package/dist/types/input/touchDetect.d.ts.map +1 -0
  618. package/dist/types/light/LightLayer.d.ts +65 -0
  619. package/dist/types/light/LightLayer.d.ts.map +1 -0
  620. package/dist/types/nav/MinHeap.d.ts +15 -0
  621. package/dist/types/nav/MinHeap.d.ts.map +1 -0
  622. package/dist/types/nav/findPath.d.ts +38 -0
  623. package/dist/types/nav/findPath.d.ts.map +1 -0
  624. package/dist/types/nav/navGrid.d.ts +48 -0
  625. package/dist/types/nav/navGrid.d.ts.map +1 -0
  626. package/dist/types/nav/nearestOpen.d.ts +8 -0
  627. package/dist/types/nav/nearestOpen.d.ts.map +1 -0
  628. package/dist/types/nav/straightenPath.d.ts +13 -0
  629. package/dist/types/nav/straightenPath.d.ts.map +1 -0
  630. package/dist/types/net/Connection.d.ts +66 -0
  631. package/dist/types/net/Connection.d.ts.map +1 -0
  632. package/dist/types/net/InterpolationBuffer.d.ts +36 -0
  633. package/dist/types/net/InterpolationBuffer.d.ts.map +1 -0
  634. package/dist/types/net/PredictedMover.d.ts +43 -0
  635. package/dist/types/net/PredictedMover.d.ts.map +1 -0
  636. package/dist/types/net/Room.d.ts +69 -0
  637. package/dist/types/net/Room.d.ts.map +1 -0
  638. package/dist/types/net/RoomHost.d.ts +74 -0
  639. package/dist/types/net/RoomHost.d.ts.map +1 -0
  640. package/dist/types/net/cadence.d.ts +22 -0
  641. package/dist/types/net/cadence.d.ts.map +1 -0
  642. package/dist/types/net/constants.d.ts +24 -0
  643. package/dist/types/net/constants.d.ts.map +1 -0
  644. package/dist/types/net/lobby/LobbyClient.d.ts +107 -0
  645. package/dist/types/net/lobby/LobbyClient.d.ts.map +1 -0
  646. package/dist/types/net/lobby/LobbyHost.d.ts +147 -0
  647. package/dist/types/net/lobby/LobbyHost.d.ts.map +1 -0
  648. package/dist/types/net/lobby/LobbyRooms.d.ts +56 -0
  649. package/dist/types/net/lobby/LobbyRooms.d.ts.map +1 -0
  650. package/dist/types/net/lobby/Matchmaker.d.ts +57 -0
  651. package/dist/types/net/lobby/Matchmaker.d.ts.map +1 -0
  652. package/dist/types/net/lobby/index.d.ts +6 -0
  653. package/dist/types/net/lobby/index.d.ts.map +1 -0
  654. package/dist/types/net/lobby/lobbyProtocol.d.ts +143 -0
  655. package/dist/types/net/lobby/lobbyProtocol.d.ts.map +1 -0
  656. package/dist/types/net/movement.d.ts +50 -0
  657. package/dist/types/net/movement.d.ts.map +1 -0
  658. package/dist/types/net/protocol.d.ts +59 -0
  659. package/dist/types/net/protocol.d.ts.map +1 -0
  660. package/dist/types/net/serverClock.d.ts +14 -0
  661. package/dist/types/net/serverClock.d.ts.map +1 -0
  662. package/dist/types/net/snapshotCodec.d.ts +55 -0
  663. package/dist/types/net/snapshotCodec.d.ts.map +1 -0
  664. package/dist/types/parallax/Parallax.d.ts +37 -0
  665. package/dist/types/parallax/Parallax.d.ts.map +1 -0
  666. package/dist/types/parallax/ParallaxLayer.d.ts +80 -0
  667. package/dist/types/parallax/ParallaxLayer.d.ts.map +1 -0
  668. package/dist/types/parallax/parallaxMath.d.ts +50 -0
  669. package/dist/types/parallax/parallaxMath.d.ts.map +1 -0
  670. package/dist/types/particles/Emitter.d.ts +97 -0
  671. package/dist/types/particles/Emitter.d.ts.map +1 -0
  672. package/dist/types/particles/ParticleBudget.d.ts +28 -0
  673. package/dist/types/particles/ParticleBudget.d.ts.map +1 -0
  674. package/dist/types/particles/ParticleSim.d.ts +38 -0
  675. package/dist/types/particles/ParticleSim.d.ts.map +1 -0
  676. package/dist/types/particles/particleCurves.d.ts +21 -0
  677. package/dist/types/particles/particleCurves.d.ts.map +1 -0
  678. package/dist/types/particles/particleSampling.d.ts +20 -0
  679. package/dist/types/particles/particleSampling.d.ts.map +1 -0
  680. package/dist/types/physics/Body.d.ts +130 -0
  681. package/dist/types/physics/Body.d.ts.map +1 -0
  682. package/dist/types/physics/BroadPhase.d.ts +26 -0
  683. package/dist/types/physics/BroadPhase.d.ts.map +1 -0
  684. package/dist/types/physics/Contact.d.ts +62 -0
  685. package/dist/types/physics/Contact.d.ts.map +1 -0
  686. package/dist/types/physics/ContactSolver.d.ts +29 -0
  687. package/dist/types/physics/ContactSolver.d.ts.map +1 -0
  688. package/dist/types/physics/PhysicsWorld.d.ts +78 -0
  689. package/dist/types/physics/PhysicsWorld.d.ts.map +1 -0
  690. package/dist/types/physics/PhysicsWorldOptions.d.ts +24 -0
  691. package/dist/types/physics/PhysicsWorldOptions.d.ts.map +1 -0
  692. package/dist/types/physics/SpatialHash.d.ts +23 -0
  693. package/dist/types/physics/SpatialHash.d.ts.map +1 -0
  694. package/dist/types/physics/collide.d.ts +27 -0
  695. package/dist/types/physics/collide.d.ts.map +1 -0
  696. package/dist/types/physics/collidePolygon.d.ts +14 -0
  697. package/dist/types/physics/collidePolygon.d.ts.map +1 -0
  698. package/dist/types/physics/contactReport.d.ts +8 -0
  699. package/dist/types/physics/contactReport.d.ts.map +1 -0
  700. package/dist/types/physics/drawColliders.d.ts +43 -0
  701. package/dist/types/physics/drawColliders.d.ts.map +1 -0
  702. package/dist/types/physics/physicsSystem.d.ts +5 -0
  703. package/dist/types/physics/physicsSystem.d.ts.map +1 -0
  704. package/dist/types/physics/polygon.d.ts +28 -0
  705. package/dist/types/physics/polygon.d.ts.map +1 -0
  706. package/dist/types/physics/raycast.d.ts +19 -0
  707. package/dist/types/physics/raycast.d.ts.map +1 -0
  708. package/dist/types/physics/syncToBody.d.ts +16 -0
  709. package/dist/types/physics/syncToBody.d.ts.map +1 -0
  710. package/dist/types/physics/tileBodies.d.ts +36 -0
  711. package/dist/types/physics/tileBodies.d.ts.map +1 -0
  712. package/dist/types/physics/types.d.ts +116 -0
  713. package/dist/types/physics/types.d.ts.map +1 -0
  714. package/dist/types/pixel/Darkness.d.ts +78 -0
  715. package/dist/types/pixel/Darkness.d.ts.map +1 -0
  716. package/dist/types/pixel/DitherVignette.d.ts +35 -0
  717. package/dist/types/pixel/DitherVignette.d.ts.map +1 -0
  718. package/dist/types/pixel/Evaporation.d.ts +30 -0
  719. package/dist/types/pixel/Evaporation.d.ts.map +1 -0
  720. package/dist/types/pixel/NightShade.d.ts +38 -0
  721. package/dist/types/pixel/NightShade.d.ts.map +1 -0
  722. package/dist/types/pixel/PixelLayer.d.ts +85 -0
  723. package/dist/types/pixel/PixelLayer.d.ts.map +1 -0
  724. package/dist/types/pixel/SwayProp.d.ts +52 -0
  725. package/dist/types/pixel/SwayProp.d.ts.map +1 -0
  726. package/dist/types/pixel/index.d.ts +31 -0
  727. package/dist/types/pixel/index.d.ts.map +1 -0
  728. package/dist/types/pixel/lights.d.ts +34 -0
  729. package/dist/types/pixel/lights.d.ts.map +1 -0
  730. package/dist/types/pixel/nineSlice.d.ts +71 -0
  731. package/dist/types/pixel/nineSlice.d.ts.map +1 -0
  732. package/dist/types/pixel/paintLayer.d.ts +35 -0
  733. package/dist/types/pixel/paintLayer.d.ts.map +1 -0
  734. package/dist/types/pixel/palette.d.ts +58 -0
  735. package/dist/types/pixel/palette.d.ts.map +1 -0
  736. package/dist/types/pixel/pixel.d.ts +80 -0
  737. package/dist/types/pixel/pixel.d.ts.map +1 -0
  738. package/dist/types/pixel/pixelPaint.d.ts +43 -0
  739. package/dist/types/pixel/pixelPaint.d.ts.map +1 -0
  740. package/dist/types/pixel/pixelTone.d.ts +51 -0
  741. package/dist/types/pixel/pixelTone.d.ts.map +1 -0
  742. package/dist/types/pixel/propKit.d.ts +26 -0
  743. package/dist/types/pixel/propKit.d.ts.map +1 -0
  744. package/dist/types/pixel/ramp.d.ts +57 -0
  745. package/dist/types/pixel/ramp.d.ts.map +1 -0
  746. package/dist/types/pixel/selout.d.ts +3 -0
  747. package/dist/types/pixel/selout.d.ts.map +1 -0
  748. package/dist/types/pixel/spritePixels.d.ts +29 -0
  749. package/dist/types/pixel/spritePixels.d.ts.map +1 -0
  750. package/dist/types/pixel/swayRig.d.ts +72 -0
  751. package/dist/types/pixel/swayRig.d.ts.map +1 -0
  752. package/dist/types/pixel/vignetteMask.d.ts +16 -0
  753. package/dist/types/pixel/vignetteMask.d.ts.map +1 -0
  754. package/dist/types/pixel/weatherArt.d.ts +29 -0
  755. package/dist/types/pixel/weatherArt.d.ts.map +1 -0
  756. package/dist/types/platform/touch.d.ts +10 -0
  757. package/dist/types/platform/touch.d.ts.map +1 -0
  758. package/dist/types/postfx/BloomFilter.d.ts +33 -0
  759. package/dist/types/postfx/BloomFilter.d.ts.map +1 -0
  760. package/dist/types/postfx/ChromaticAberrationFilter.d.ts +11 -0
  761. package/dist/types/postfx/ChromaticAberrationFilter.d.ts.map +1 -0
  762. package/dist/types/postfx/ColorAdjustFilter.d.ts +32 -0
  763. package/dist/types/postfx/ColorAdjustFilter.d.ts.map +1 -0
  764. package/dist/types/postfx/CrtFilter.d.ts +16 -0
  765. package/dist/types/postfx/CrtFilter.d.ts.map +1 -0
  766. package/dist/types/postfx/PixelateFilter.d.ts +8 -0
  767. package/dist/types/postfx/PixelateFilter.d.ts.map +1 -0
  768. package/dist/types/postfx/PostFx.d.ts +92 -0
  769. package/dist/types/postfx/PostFx.d.ts.map +1 -0
  770. package/dist/types/postfx/ShockwaveFilter.d.ts +20 -0
  771. package/dist/types/postfx/ShockwaveFilter.d.ts.map +1 -0
  772. package/dist/types/postfx/VignetteFilter.d.ts +19 -0
  773. package/dist/types/postfx/VignetteFilter.d.ts.map +1 -0
  774. package/dist/types/postfx/fxAnimator.d.ts +32 -0
  775. package/dist/types/postfx/fxAnimator.d.ts.map +1 -0
  776. package/dist/types/postfx/fxShader.d.ts +49 -0
  777. package/dist/types/postfx/fxShader.d.ts.map +1 -0
  778. package/dist/types/postfx/index.d.ts +11 -0
  779. package/dist/types/postfx/index.d.ts.map +1 -0
  780. package/dist/types/react/ChoiceDialog.d.ts +8 -0
  781. package/dist/types/react/ChoiceDialog.d.ts.map +1 -0
  782. package/dist/types/react/ConfirmDialog.d.ts +9 -0
  783. package/dist/types/react/ConfirmDialog.d.ts.map +1 -0
  784. package/dist/types/react/Glyph.d.ts +54 -0
  785. package/dist/types/react/Glyph.d.ts.map +1 -0
  786. package/dist/types/react/Modal.d.ts +22 -0
  787. package/dist/types/react/Modal.d.ts.map +1 -0
  788. package/dist/types/react/Panel.d.ts +29 -0
  789. package/dist/types/react/Panel.d.ts.map +1 -0
  790. package/dist/types/react/PixelImage.d.ts +19 -0
  791. package/dist/types/react/PixelImage.d.ts.map +1 -0
  792. package/dist/types/react/Select.d.ts +27 -0
  793. package/dist/types/react/Select.d.ts.map +1 -0
  794. package/dist/types/react/Slider.d.ts +24 -0
  795. package/dist/types/react/Slider.d.ts.map +1 -0
  796. package/dist/types/react/SplitPane.d.ts +26 -0
  797. package/dist/types/react/SplitPane.d.ts.map +1 -0
  798. package/dist/types/react/TabStrip.d.ts +31 -0
  799. package/dist/types/react/TabStrip.d.ts.map +1 -0
  800. package/dist/types/react/TitleTips.d.ts +15 -0
  801. package/dist/types/react/TitleTips.d.ts.map +1 -0
  802. package/dist/types/react/Tooltip.d.ts +22 -0
  803. package/dist/types/react/Tooltip.d.ts.map +1 -0
  804. package/dist/types/react/UiProvider.d.ts +52 -0
  805. package/dist/types/react/UiProvider.d.ts.map +1 -0
  806. package/dist/types/react/baseCss.d.ts +27 -0
  807. package/dist/types/react/baseCss.d.ts.map +1 -0
  808. package/dist/types/react/choiceStore.d.ts +34 -0
  809. package/dist/types/react/choiceStore.d.ts.map +1 -0
  810. package/dist/types/react/classNames.d.ts +12 -0
  811. package/dist/types/react/classNames.d.ts.map +1 -0
  812. package/dist/types/react/confirmStore.d.ts +30 -0
  813. package/dist/types/react/confirmStore.d.ts.map +1 -0
  814. package/dist/types/react/index.d.ts +33 -0
  815. package/dist/types/react/index.d.ts.map +1 -0
  816. package/dist/types/react/labels.d.ts +24 -0
  817. package/dist/types/react/labels.d.ts.map +1 -0
  818. package/dist/types/react/placement.d.ts +59 -0
  819. package/dist/types/react/placement.d.ts.map +1 -0
  820. package/dist/types/react/useFillSheet.d.ts +9 -0
  821. package/dist/types/react/useFillSheet.d.ts.map +1 -0
  822. package/dist/types/react/useFitToViewport.d.ts +20 -0
  823. package/dist/types/react/useFitToViewport.d.ts.map +1 -0
  824. package/dist/types/react/usePicked.d.ts +9 -0
  825. package/dist/types/react/usePicked.d.ts.map +1 -0
  826. package/dist/types/react/useStore.d.ts +8 -0
  827. package/dist/types/react/useStore.d.ts.map +1 -0
  828. package/dist/types/react/useViewport.d.ts +4 -0
  829. package/dist/types/react/useViewport.d.ts.map +1 -0
  830. package/dist/types/rig/PosePlayer.d.ts +64 -0
  831. package/dist/types/rig/PosePlayer.d.ts.map +1 -0
  832. package/dist/types/rig/RigView.d.ts +68 -0
  833. package/dist/types/rig/RigView.d.ts.map +1 -0
  834. package/dist/types/rig/Skeleton.d.ts +14 -0
  835. package/dist/types/rig/Skeleton.d.ts.map +1 -0
  836. package/dist/types/rig/humanoid.d.ts +4 -0
  837. package/dist/types/rig/humanoid.d.ts.map +1 -0
  838. package/dist/types/rig/humanoidPoses.d.ts +117 -0
  839. package/dist/types/rig/humanoidPoses.d.ts.map +1 -0
  840. package/dist/types/rig/poseMath.d.ts +14 -0
  841. package/dist/types/rig/poseMath.d.ts.map +1 -0
  842. package/dist/types/rig/rigTypes.d.ts +82 -0
  843. package/dist/types/rig/rigTypes.d.ts.map +1 -0
  844. package/dist/types/save/Autosaver.d.ts +43 -0
  845. package/dist/types/save/Autosaver.d.ts.map +1 -0
  846. package/dist/types/save/MemoryBackend.d.ts +10 -0
  847. package/dist/types/save/MemoryBackend.d.ts.map +1 -0
  848. package/dist/types/save/SaveBackend.d.ts +14 -0
  849. package/dist/types/save/SaveBackend.d.ts.map +1 -0
  850. package/dist/types/save/SaveStore.d.ts +73 -0
  851. package/dist/types/save/SaveStore.d.ts.map +1 -0
  852. package/dist/types/save/WebStorageBackend.d.ts +14 -0
  853. package/dist/types/save/WebStorageBackend.d.ts.map +1 -0
  854. package/dist/types/save/checksum.d.ts +7 -0
  855. package/dist/types/save/checksum.d.ts.map +1 -0
  856. package/dist/types/save/migrateSave.d.ts +17 -0
  857. package/dist/types/save/migrateSave.d.ts.map +1 -0
  858. package/dist/types/settings.d.ts +25 -0
  859. package/dist/types/settings.d.ts.map +1 -0
  860. package/dist/types/tilemap/TilemapView.d.ts +42 -0
  861. package/dist/types/tilemap/TilemapView.d.ts.map +1 -0
  862. package/dist/types/tilemap/collision.d.ts +16 -0
  863. package/dist/types/tilemap/collision.d.ts.map +1 -0
  864. package/dist/types/tilemap/tiled.d.ts +104 -0
  865. package/dist/types/tilemap/tiled.d.ts.map +1 -0
  866. package/dist/types/transitions/CrossfadeTransition.d.ts +20 -0
  867. package/dist/types/transitions/CrossfadeTransition.d.ts.map +1 -0
  868. package/dist/types/transitions/DitherWipeTransition.d.ts +35 -0
  869. package/dist/types/transitions/DitherWipeTransition.d.ts.map +1 -0
  870. package/dist/types/transitions/FadeTransition.d.ts +20 -0
  871. package/dist/types/transitions/FadeTransition.d.ts.map +1 -0
  872. package/dist/types/transitions/Letterbox.d.ts +33 -0
  873. package/dist/types/transitions/Letterbox.d.ts.map +1 -0
  874. package/dist/types/transitions/Transition.d.ts +22 -0
  875. package/dist/types/transitions/Transition.d.ts.map +1 -0
  876. package/dist/types/transitions/ditherMask.d.ts +13 -0
  877. package/dist/types/transitions/ditherMask.d.ts.map +1 -0
  878. package/dist/types/transitions/transitionTo.d.ts +16 -0
  879. package/dist/types/transitions/transitionTo.d.ts.map +1 -0
  880. package/dist/types/transitions/tweenDone.d.ts +5 -0
  881. package/dist/types/transitions/tweenDone.d.ts.map +1 -0
  882. package/dist/types/ui/Bar.d.ts +41 -0
  883. package/dist/types/ui/Bar.d.ts.map +1 -0
  884. package/dist/types/ui/Button.d.ts +47 -0
  885. package/dist/types/ui/Button.d.ts.map +1 -0
  886. package/dist/types/ui/Dialog.d.ts +47 -0
  887. package/dist/types/ui/Dialog.d.ts.map +1 -0
  888. package/dist/types/ui/FocusManager.d.ts +53 -0
  889. package/dist/types/ui/FocusManager.d.ts.map +1 -0
  890. package/dist/types/ui/Label.d.ts +24 -0
  891. package/dist/types/ui/Label.d.ts.map +1 -0
  892. package/dist/types/ui/List.d.ts +23 -0
  893. package/dist/types/ui/List.d.ts.map +1 -0
  894. package/dist/types/ui/Panel.d.ts +38 -0
  895. package/dist/types/ui/Panel.d.ts.map +1 -0
  896. package/dist/types/ui/ScrollView.d.ts +56 -0
  897. package/dist/types/ui/ScrollView.d.ts.map +1 -0
  898. package/dist/types/ui/Slider.d.ts +47 -0
  899. package/dist/types/ui/Slider.d.ts.map +1 -0
  900. package/dist/types/ui/Stack.d.ts +16 -0
  901. package/dist/types/ui/Stack.d.ts.map +1 -0
  902. package/dist/types/ui/Toggle.d.ts +31 -0
  903. package/dist/types/ui/Toggle.d.ts.map +1 -0
  904. package/dist/types/ui/UiHost.d.ts +18 -0
  905. package/dist/types/ui/UiHost.d.ts.map +1 -0
  906. package/dist/types/ui/UiPointerGate.d.ts +17 -0
  907. package/dist/types/ui/UiPointerGate.d.ts.map +1 -0
  908. package/dist/types/ui/UiRoot.d.ts +73 -0
  909. package/dist/types/ui/UiRoot.d.ts.map +1 -0
  910. package/dist/types/ui/Widget.d.ts +56 -0
  911. package/dist/types/ui/Widget.d.ts.map +1 -0
  912. package/dist/types/ui/dom/DomOverlay.d.ts +52 -0
  913. package/dist/types/ui/dom/DomOverlay.d.ts.map +1 -0
  914. package/dist/types/ui/dom/DomWorldAnchors.d.ts +50 -0
  915. package/dist/types/ui/dom/DomWorldAnchors.d.ts.map +1 -0
  916. package/dist/types/ui/dom/InputShield.d.ts +20 -0
  917. package/dist/types/ui/dom/InputShield.d.ts.map +1 -0
  918. package/dist/types/ui/dom/createStore.d.ts +22 -0
  919. package/dist/types/ui/dom/createStore.d.ts.map +1 -0
  920. package/dist/types/ui/dom/shieldDecision.d.ts +34 -0
  921. package/dist/types/ui/dom/shieldDecision.d.ts.map +1 -0
  922. package/dist/types/ui/dom/worldToScreen.d.ts +24 -0
  923. package/dist/types/ui/dom/worldToScreen.d.ts.map +1 -0
  924. package/dist/types/ui/index.d.ts +38 -0
  925. package/dist/types/ui/index.d.ts.map +1 -0
  926. package/dist/types/ui/layout/anchor.d.ts +9 -0
  927. package/dist/types/ui/layout/anchor.d.ts.map +1 -0
  928. package/dist/types/ui/layout/barDrain.d.ts +25 -0
  929. package/dist/types/ui/layout/barDrain.d.ts.map +1 -0
  930. package/dist/types/ui/layout/fitToViewport.d.ts +32 -0
  931. package/dist/types/ui/layout/fitToViewport.d.ts.map +1 -0
  932. package/dist/types/ui/layout/focusNav.d.ts +13 -0
  933. package/dist/types/ui/layout/focusNav.d.ts.map +1 -0
  934. package/dist/types/ui/layout/geometry.d.ts +35 -0
  935. package/dist/types/ui/layout/geometry.d.ts.map +1 -0
  936. package/dist/types/ui/layout/listWidth.d.ts +13 -0
  937. package/dist/types/ui/layout/listWidth.d.ts.map +1 -0
  938. package/dist/types/ui/layout/placeTooltip.d.ts +23 -0
  939. package/dist/types/ui/layout/placeTooltip.d.ts.map +1 -0
  940. package/dist/types/ui/layout/scroll.d.ts +17 -0
  941. package/dist/types/ui/layout/scroll.d.ts.map +1 -0
  942. package/dist/types/ui/layout/slider.d.ts +7 -0
  943. package/dist/types/ui/layout/slider.d.ts.map +1 -0
  944. package/dist/types/ui/layout/stack.d.ts +26 -0
  945. package/dist/types/ui/layout/stack.d.ts.map +1 -0
  946. package/dist/types/ui/layout/wrapRow.d.ts +6 -0
  947. package/dist/types/ui/layout/wrapRow.d.ts.map +1 -0
  948. package/dist/ui/Bar.js +54 -0
  949. package/dist/ui/Bar.js.map +1 -0
  950. package/dist/ui/Button.js +58 -0
  951. package/dist/ui/Button.js.map +1 -0
  952. package/dist/ui/Dialog.js +56 -0
  953. package/dist/ui/Dialog.js.map +1 -0
  954. package/dist/ui/FocusManager.js +97 -0
  955. package/dist/ui/FocusManager.js.map +1 -0
  956. package/dist/ui/Label.js +36 -0
  957. package/dist/ui/Label.js.map +1 -0
  958. package/dist/ui/List.js +45 -0
  959. package/dist/ui/List.js.map +1 -0
  960. package/dist/ui/Panel.js +38 -0
  961. package/dist/ui/Panel.js.map +1 -0
  962. package/dist/ui/ScrollView.js +96 -0
  963. package/dist/ui/ScrollView.js.map +1 -0
  964. package/dist/ui/Slider.js +55 -0
  965. package/dist/ui/Slider.js.map +1 -0
  966. package/dist/ui/Stack.js +28 -0
  967. package/dist/ui/Stack.js.map +1 -0
  968. package/dist/ui/Toggle.js +37 -0
  969. package/dist/ui/Toggle.js.map +1 -0
  970. package/dist/ui/UiHost.js +9 -0
  971. package/dist/ui/UiHost.js.map +1 -0
  972. package/dist/ui/UiPointerGate.js +25 -0
  973. package/dist/ui/UiPointerGate.js.map +1 -0
  974. package/dist/ui/UiRoot.js +93 -0
  975. package/dist/ui/UiRoot.js.map +1 -0
  976. package/dist/ui/Widget.js +90 -0
  977. package/dist/ui/Widget.js.map +1 -0
  978. package/dist/ui/dom/DomOverlay.js +59 -0
  979. package/dist/ui/dom/DomOverlay.js.map +1 -0
  980. package/dist/ui/dom/DomWorldAnchors.js +59 -0
  981. package/dist/ui/dom/DomWorldAnchors.js.map +1 -0
  982. package/dist/ui/dom/InputShield.js +27 -0
  983. package/dist/ui/dom/InputShield.js.map +1 -0
  984. package/dist/ui/dom/createStore.js +42 -0
  985. package/dist/ui/dom/createStore.js.map +1 -0
  986. package/dist/ui/dom/shieldDecision.js +36 -0
  987. package/dist/ui/dom/shieldDecision.js.map +1 -0
  988. package/dist/ui/dom/worldToScreen.js +11 -0
  989. package/dist/ui/dom/worldToScreen.js.map +1 -0
  990. package/dist/ui/layout/anchor.js +20 -0
  991. package/dist/ui/layout/anchor.js.map +1 -0
  992. package/dist/ui/layout/barDrain.js +25 -0
  993. package/dist/ui/layout/barDrain.js.map +1 -0
  994. package/dist/ui/layout/fitToViewport.js +17 -0
  995. package/dist/ui/layout/fitToViewport.js.map +1 -0
  996. package/dist/ui/layout/focusNav.js +42 -0
  997. package/dist/ui/layout/focusNav.js.map +1 -0
  998. package/dist/ui/layout/geometry.js +21 -0
  999. package/dist/ui/layout/geometry.js.map +1 -0
  1000. package/dist/ui/layout/listWidth.js +10 -0
  1001. package/dist/ui/layout/listWidth.js.map +1 -0
  1002. package/dist/ui/layout/placeTooltip.js +28 -0
  1003. package/dist/ui/layout/placeTooltip.js.map +1 -0
  1004. package/dist/ui/layout/scroll.js +24 -0
  1005. package/dist/ui/layout/scroll.js.map +1 -0
  1006. package/dist/ui/layout/slider.js +20 -0
  1007. package/dist/ui/layout/slider.js.map +1 -0
  1008. package/dist/ui/layout/stack.js +27 -0
  1009. package/dist/ui/layout/stack.js.map +1 -0
  1010. package/dist/ui/layout/wrapRow.js +13 -0
  1011. package/dist/ui/layout/wrapRow.js.map +1 -0
  1012. package/dist/ui.js +85 -0
  1013. package/dist/ui.js.map +1 -0
  1014. package/package.json +115 -4
@@ -0,0 +1,23 @@
1
+ import type { Body } from './Body.js';
2
+ /**
3
+ * Broad phase: a uniform grid hashed into a map, each cell listing the bodies whose bounds touch it. A body spans
4
+ * as many cells as its bounds cover, so a long merged floor sits in a row of cells and is still one body.
5
+ *
6
+ * Cells are keyed by their coordinates packed into one number (16 bits each, wrapping): two cells 65,536 cells
7
+ * apart share a list, which only costs a few extra narrow-phase tests, never a missed pair.
8
+ */
9
+ export declare class SpatialHash {
10
+ readonly cellSize: number;
11
+ private readonly inv;
12
+ private readonly cells;
13
+ /** Lists emptied by `clear`, kept for reuse so a rebuild every step allocates nothing once warm. */
14
+ private readonly spare;
15
+ constructor(cellSize: number);
16
+ static key(cx: number, cy: number): number;
17
+ cellOf(v: number): number;
18
+ clear(): void;
19
+ insert(body: Body, margin?: number): void;
20
+ /** The bodies listed in one cell (undefined when empty). Do not keep or edit the array. */
21
+ at(cx: number, cy: number): readonly Body[] | undefined;
22
+ }
23
+ //# sourceMappingURL=SpatialHash.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SpatialHash.d.ts","sourceRoot":"","sources":["../../../src/physics/SpatialHash.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAEnC;;;;;;GAMG;AACH,qBAAa,WAAW;IACtB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAS;IAC7B,OAAO,CAAC,QAAQ,CAAC,KAAK,CAA6B;IACnD,oGAAoG;IACpG,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAgB;gBAE1B,QAAQ,EAAE,MAAM;IAM5B,MAAM,CAAC,GAAG,CAAC,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,MAAM;IAI1C,MAAM,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM;IAIzB,KAAK,IAAI,IAAI;IAQb,MAAM,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,SAAI,GAAG,IAAI;IAkBpC,2FAA2F;IAC3F,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,SAAS,IAAI,EAAE,GAAG,SAAS;CAGxD"}
@@ -0,0 +1,27 @@
1
+ import type { Body } from './Body.js';
2
+ /**
3
+ * The result of a narrow-phase test: the normal points from `a` to `b`, `depth` > 0 is overlap, < 0 a gap (the
4
+ * deepest of the points). Up to two contact points, each with its own depth and a feature id that stays the same
5
+ * while the same corners touch, so the solver can carry each point's impulse over from step to step.
6
+ */
7
+ export interface Manifold {
8
+ nx: number;
9
+ ny: number;
10
+ depth: number;
11
+ count: number;
12
+ readonly px: [number, number];
13
+ readonly py: [number, number];
14
+ readonly pd: [number, number];
15
+ readonly id: [number, number];
16
+ }
17
+ export declare function emptyManifold(): Manifold;
18
+ /**
19
+ * Narrow phase. Fills `out` and returns true when the two shapes overlap or lie closer than `margin`. The margin
20
+ * keeps a resting contact alive while the solver holds the bodies a hair apart, so a body standing on the ground is
21
+ * grounded on every step instead of flickering between touching and not.
22
+ *
23
+ * Two bodies that never turn and sit square (boxes at no angle, circles) take the axis-aligned tests, which know the
24
+ * internal faces of merged tile boxes; anything turned or turning takes the polygon tests (`collidePolygon.ts`).
25
+ */
26
+ export declare function collide(a: Body, b: Body, margin: number, out: Manifold): boolean;
27
+ //# sourceMappingURL=collide.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"collide.d.ts","sourceRoot":"","sources":["../../../src/physics/collide.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAInC;;;;GAIG;AACH,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC9B,QAAQ,CAAC,EAAE,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC9B,QAAQ,CAAC,EAAE,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC9B,QAAQ,CAAC,EAAE,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC/B;AAED,wBAAgB,aAAa,IAAI,QAAQ,CAExC;AAED;;;;;;;GAOG;AACH,wBAAgB,OAAO,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,QAAQ,GAAG,OAAO,CA+BhF"}
@@ -0,0 +1,14 @@
1
+ import type { Body } from './Body.js';
2
+ import type { Manifold } from './collide.js';
3
+ /**
4
+ * Two convex shapes (boxes or polygons, turned or not) by the separating axis test, then the incident edge clipped
5
+ * against the reference face's sides (Box2D's manifold), giving one or two points. A normal out of a merged tile box's
6
+ * internal face is never used, so a turned crate slides over the seams of a tile floor like a square one does.
7
+ */
8
+ export declare function polygonPolygon(a: Body, b: Body, margin: number, out: Manifold): boolean;
9
+ /**
10
+ * A circle against a box or polygon that is turned (or turns): the face the centre lies furthest out of, then that
11
+ * face's middle or one of its corners. `circleIsA` says which way round the pair is, so the normal runs from a to b.
12
+ */
13
+ export declare function circlePolygon(circle: Body, radius: number, poly: Body, margin: number, circleIsA: boolean, out: Manifold): boolean;
14
+ //# sourceMappingURL=collidePolygon.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"collidePolygon.d.ts","sourceRoot":"","sources":["../../../src/physics/collidePolygon.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AACnC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAsE1C;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,QAAQ,GAAG,OAAO,CA+DvF;AA6BD;;;GAGG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,GAAG,OAAO,CAiDlI"}
@@ -0,0 +1,8 @@
1
+ import type { Body } from './Body.js';
2
+ import type { Contact } from './Contact.js';
3
+ import type { ContactInfo } from './types.js';
4
+ /** Marks `body` as standing on `ground` through contact `c`; the first ground found in a step wins. */
5
+ export declare function setGround(body: Body, ground: Body, c: Contact): void;
6
+ /** A copy for an event: the contact itself changes on the next step. */
7
+ export declare function info(c: Contact): ContactInfo;
8
+ //# sourceMappingURL=contactReport.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contactReport.d.ts","sourceRoot":"","sources":["../../../src/physics/contactReport.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AACnC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE3C,uGAAuG;AACvG,wBAAgB,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,GAAG,IAAI,CAOpE;AAED,wEAAwE;AACxE,wBAAgB,IAAI,CAAC,CAAC,EAAE,OAAO,GAAG,WAAW,CAE5C"}
@@ -0,0 +1,43 @@
1
+ import type { Body } from './Body.js';
2
+ import type { PhysicsWorld } from './PhysicsWorld.js';
3
+ /** Colours `drawColliders` gives each kind of body. */
4
+ export interface ColliderColors {
5
+ static: number;
6
+ kinematic: number;
7
+ /** A dynamic body standing on something. */
8
+ grounded: number;
9
+ /** A dynamic body in the air. */
10
+ airborne: number;
11
+ /** A dynamic body asleep (only with `allowSleep`). */
12
+ sleeping: number;
13
+ sensor: number;
14
+ }
15
+ export declare const COLLIDER_COLORS: Readonly<ColliderColors>;
16
+ /**
17
+ * Draws one box in world coordinates. The same shape as `DebugOverlay`'s `BoxDrawer`, written out here so the physics
18
+ * module stays free of anything that draws.
19
+ */
20
+ export type ColliderBoxDrawer = (x: number, y: number, width: number, height: number, color?: number) => void;
21
+ /** Draws one line in world coordinates (`DebugOverlay`'s `LineDrawer`). */
22
+ export type ColliderLineDrawer = (x0: number, y0: number, x1: number, y1: number, color?: number) => void;
23
+ /**
24
+ * Draws every body's bounding box, coloured by what it is: the usual body of a `DebugOverlay`'s `colliders` callback,
25
+ * which otherwise made every game keep a list of its own bodies just to show them.
26
+ *
27
+ * ```ts
28
+ * new DebugOverlay(engine, { colliders: (draw) => drawColliders(physics, draw) });
29
+ * ```
30
+ *
31
+ * `colorOf` picks a game's own colour for a body (a one-way plank, a hazard), or returns undefined for the default.
32
+ * A circle is drawn as its bounding box: the overlay draws boxes, and a box round a circle still shows where it is.
33
+ * Given `line` (the overlay hands it over as its second argument), a turned box or a polygon is drawn as its own
34
+ * outline, and a circle that rotates gets a spoke showing its angle.
35
+ *
36
+ * ```ts
37
+ * new DebugOverlay(engine, { colliders: (draw, line) => drawColliders(physics, draw, {}, undefined, line) });
38
+ * ```
39
+ */
40
+ export declare function drawColliders(world: PhysicsWorld, draw: ColliderBoxDrawer, colors?: Partial<ColliderColors>, colorOf?: (body: Body) => number | undefined, line?: ColliderLineDrawer): void;
41
+ /** The default colour of one body. */
42
+ export declare function colliderColor(b: Body, c?: ColliderColors): number;
43
+ //# sourceMappingURL=drawColliders.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"drawColliders.d.ts","sourceRoot":"","sources":["../../../src/physics/drawColliders.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AACnC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEnD,uDAAuD;AACvD,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,4CAA4C;IAC5C,QAAQ,EAAE,MAAM,CAAC;IACjB,iCAAiC;IACjC,QAAQ,EAAE,MAAM,CAAC;IACjB,sDAAsD;IACtD,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,cAAc,CAOpD,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;AAE9G,2EAA2E;AAC3E,MAAM,MAAM,kBAAkB,GAAG,CAAC,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;AAE1G;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,aAAa,CAC3B,KAAK,EAAE,YAAY,EACnB,IAAI,EAAE,iBAAiB,EACvB,MAAM,GAAE,OAAO,CAAC,cAAc,CAAM,EACpC,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,MAAM,GAAG,SAAS,EAC5C,IAAI,CAAC,EAAE,kBAAkB,GACxB,IAAI,CAcN;AAED,sCAAsC;AACtC,wBAAgB,aAAa,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,GAAE,cAAgC,GAAG,MAAM,CAMlF"}
@@ -0,0 +1,5 @@
1
+ import { type System } from '../ecs/World.js';
2
+ import type { PhysicsWorld } from './PhysicsWorld.js';
3
+ /** A `fixed` system that steps `physics` once per simulation step, by the loop's own dt. */
4
+ export declare function physicsSystem(physics: PhysicsWorld, name?: string): System;
5
+ //# sourceMappingURL=physicsSystem.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"physicsSystem.d.ts","sourceRoot":"","sources":["../../../src/physics/physicsSystem.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,KAAK,MAAM,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEnD,4FAA4F;AAC5F,wBAAgB,aAAa,CAAC,OAAO,EAAE,YAAY,EAAE,IAAI,SAAY,GAAG,MAAM,CAE7E"}
@@ -0,0 +1,28 @@
1
+ import type { BoxShape, PolygonShape, Vec2 } from './types.js';
2
+ /** The most corners a polygon shape may have. */
3
+ export declare const MAX_POLYGON_VERTICES = 16;
4
+ /** The centroid of the convex hull of `points`: where to put the body so a `polygonShape(points)` lands on them. */
5
+ export declare function polygonCentroid(points: readonly Vec2[]): Vec2;
6
+ /**
7
+ * A convex polygon shape from any points: their convex hull, in the order the solver keeps, moved so its centroid is
8
+ * the body's position. Give points round the origin, or anywhere and place the body at `polygonCentroid(points)`.
9
+ */
10
+ export declare function polygonShape(points: readonly Vec2[]): PolygonShape;
11
+ /** A regular polygon of `sides` corners on a circle of `radius`, its first corner straight up. */
12
+ export declare function regularPolygon(sides: number, radius: number): PolygonShape;
13
+ /** Local outward normals and the solver's mass terms of a polygon, worked out once per shape object. */
14
+ export interface PolygonData {
15
+ readonly vertices: readonly Vec2[];
16
+ readonly normals: readonly Vec2[];
17
+ /** Second moment of area about the centroid per unit of area-mass: inertia = mass × this. */
18
+ readonly inertiaPerMass: number;
19
+ /** The furthest corner from the centre. */
20
+ readonly radius: number;
21
+ /** The nearest face to the centre: how far the body may move in one sub-step without passing through anything. */
22
+ readonly inradius: number;
23
+ }
24
+ /** The data of a polygon shape, checked (convex, in order) the first time it is asked for. */
25
+ export declare function polygonData(shape: PolygonShape): PolygonData;
26
+ /** A box as the four corners the polygon tests use: top-left first, clockwise on screen, so face i is top, right, bottom, left. */
27
+ export declare function boxCorners(s: BoxShape): Vec2[];
28
+ //# sourceMappingURL=polygon.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"polygon.d.ts","sourceRoot":"","sources":["../../../src/physics/polygon.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAE5D,iDAAiD;AACjD,eAAO,MAAM,oBAAoB,KAAK,CAAC;AAavC,oHAAoH;AACpH,wBAAgB,eAAe,CAAC,MAAM,EAAE,SAAS,IAAI,EAAE,GAAG,IAAI,CAe7D;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,SAAS,IAAI,EAAE,GAAG,YAAY,CAMlE;AAED,kGAAkG;AAClG,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,YAAY,CAQ1E;AAsBD,wGAAwG;AACxG,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,QAAQ,EAAE,SAAS,IAAI,EAAE,CAAC;IACnC,QAAQ,CAAC,OAAO,EAAE,SAAS,IAAI,EAAE,CAAC;IAClC,6FAA6F;IAC7F,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,2CAA2C;IAC3C,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,kHAAkH;IAClH,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;CAC3B;AAID,8FAA8F;AAC9F,wBAAgB,WAAW,CAAC,KAAK,EAAE,YAAY,GAAG,WAAW,CA+B5D;AAED,mIAAmI;AACnI,wBAAgB,UAAU,CAAC,CAAC,EAAE,QAAQ,GAAG,IAAI,EAAE,CAO9C"}
@@ -0,0 +1,19 @@
1
+ import type { Body } from './Body.js';
2
+ import type { SpatialHash } from './SpatialHash.js';
3
+ import type { RayHit, RaycastOptions } from './types.js';
4
+ /** Where a ray from (ox, oy) along (dx, dy) — not normalised, t = 1 at its end — first enters a body. */
5
+ interface ShapeHit {
6
+ t: number;
7
+ nx: number;
8
+ ny: number;
9
+ }
10
+ /** A ray starting inside the shape misses it, so a body can cast from its own centre without hitting itself. */
11
+ export declare function rayShape(body: Body, ox: number, oy: number, dx: number, dy: number, maxT: number, out: ShapeHit): boolean;
12
+ /**
13
+ * The first body a segment from (x0, y0) to (x1, y1) meets, walking the broad phase's cells in the ray's order
14
+ * (Amanatides–Woo) and stopping once the next cell lies beyond the best hit so far; a long ray over a large map
15
+ * looks only at the cells it crosses.
16
+ */
17
+ export declare function castRay(hashes: readonly SpatialHash[], x0: number, y0: number, x1: number, y1: number, options?: RaycastOptions): RayHit | null;
18
+ export {};
19
+ //# sourceMappingURL=raycast.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"raycast.d.ts","sourceRoot":"","sources":["../../../src/physics/raycast.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AACnC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,KAAK,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAEtD,yGAAyG;AACzG,UAAU,QAAQ;IAChB,CAAC,EAAE,MAAM,CAAC;IACV,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;CACZ;AAID,gHAAgH;AAChH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,QAAQ,GAAG,OAAO,CAmDzH;AAqCD;;;;GAIG;AACH,wBAAgB,OAAO,CAAC,MAAM,EAAE,SAAS,WAAW,EAAE,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,OAAO,GAAE,cAAmB,GAAG,MAAM,GAAG,IAAI,CAuDnJ"}
@@ -0,0 +1,16 @@
1
+ import type { Body } from './Body.js';
2
+ /** Anything with a settable position: a Pixi container, a sprite, a plain object. */
3
+ export interface Positioned {
4
+ x: number;
5
+ y: number;
6
+ /** Set to the body's angle when the body rotates or stands at an angle; left alone otherwise. */
7
+ rotation?: number;
8
+ }
9
+ /**
10
+ * Places `view` where `body` is drawn this frame: between its last two step positions by the loop's `alpha`
11
+ * (`SystemContext.alpha` in a `frame` system), so motion is smooth at any refresh rate even though physics steps
12
+ * at a fixed rate. Pass `round` for pixel art, so the view lands on whole pixels. A body that rotates (or was placed
13
+ * at an angle) turns the view too, by the shorter way between its last two angles; the offset is turned with it.
14
+ */
15
+ export declare function syncToBody(view: Positioned, body: Body, alpha: number, offsetX?: number, offsetY?: number, round?: boolean): void;
16
+ //# sourceMappingURL=syncToBody.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"syncToBody.d.ts","sourceRoot":"","sources":["../../../src/physics/syncToBody.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAEnC,qFAAqF;AACrF,MAAM,WAAW,UAAU;IACzB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,iGAAiG;IACjG,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,SAAI,EAAE,OAAO,SAAI,EAAE,KAAK,UAAQ,GAAG,IAAI,CAoBrH"}
@@ -0,0 +1,36 @@
1
+ import type { CollisionGrid } from '../net/movement.js';
2
+ import { Body } from './Body.js';
3
+ export interface TileBodiesOptions {
4
+ /** World position of tile (0, 0)'s top-left corner (default 0, 0). */
5
+ originX?: number;
6
+ originY?: number;
7
+ friction?: number;
8
+ restitution?: number;
9
+ layer?: number;
10
+ mask?: number;
11
+ userData?: unknown;
12
+ }
13
+ /** A rectangle of solid tiles, in tiles, both ends inclusive. */
14
+ export interface TileRect {
15
+ x0: number;
16
+ y0: number;
17
+ x1: number;
18
+ y1: number;
19
+ }
20
+ /**
21
+ * Covers the solid cells of a tile grid with as few rectangles as a cheap greedy pass finds: runs along each row,
22
+ * then a run is grown downwards while the row below has exactly the same run. A floor becomes one box and a wall
23
+ * one tall box, so a body sliding along either crosses no seam to snag on.
24
+ */
25
+ export declare function mergeTileRects(width: number, height: number, solid: (tx: number, ty: number) => boolean): TileRect[];
26
+ /**
27
+ * Static boxes for the solid tiles of a grid, ready for `PhysicsWorld.add`. Each box marks the faces that lie
28
+ * wholly against more solid tiles as internal, so a body is never pushed out through a face that is inside the
29
+ * ground (the seam between a floor and the wall standing on it).
30
+ *
31
+ * Outside the grid counts as open, so the edges of the map collide like any other face.
32
+ */
33
+ export declare function tileBodies(width: number, height: number, tileSize: number, solid: (tx: number, ty: number) => boolean, options?: TileBodiesOptions): Body[];
34
+ /** `tileBodies` for the engine's `CollisionGrid` (from `createCollisionGrid` or a Tiled map's `collisionFromTiled`). */
35
+ export declare function tileBodiesFromGrid(grid: CollisionGrid, options?: TileBodiesOptions): Body[];
36
+ //# sourceMappingURL=tileBodies.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tileBodies.d.ts","sourceRoot":"","sources":["../../../src/physics/tileBodies.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAG9B,MAAM,WAAW,iBAAiB;IAChC,sEAAsE;IACtE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,iEAAiE;AACjE,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;CACZ;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,KAAK,OAAO,GAAG,QAAQ,EAAE,CA4BpH;AAED;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,KAAK,OAAO,EAAE,OAAO,GAAE,iBAAsB,GAAG,IAAI,EAAE,CA0B/J;AAED,wHAAwH;AACxH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,aAAa,EAAE,OAAO,GAAE,iBAAsB,GAAG,IAAI,EAAE,CAE/F"}
@@ -0,0 +1,116 @@
1
+ import type { Body } from './Body.js';
2
+ /**
3
+ * The shapes a body may have, each centred on the body's position. A body turns only when it is made with
4
+ * `rotates: true`; a platformer's bodies need no rotation, and a body that never turns keeps the cheap axis-aligned
5
+ * tests and the steadiest stacks.
6
+ */
7
+ export type Shape = CircleShape | BoxShape | PolygonShape;
8
+ export interface CircleShape {
9
+ readonly kind: 'circle';
10
+ radius: number;
11
+ }
12
+ export interface BoxShape {
13
+ readonly kind: 'box';
14
+ halfWidth: number;
15
+ halfHeight: number;
16
+ }
17
+ /** A point or a vector in world or body pixels, y down. */
18
+ export interface Vec2 {
19
+ x: number;
20
+ y: number;
21
+ }
22
+ /**
23
+ * A convex polygon, its vertices relative to the body's position, which must be the polygon's centroid (make one with
24
+ * `polygonShape`, which orders the points and moves them there). Up to `MAX_POLYGON_VERTICES` corners.
25
+ */
26
+ export interface PolygonShape {
27
+ readonly kind: 'polygon';
28
+ readonly vertices: readonly Vec2[];
29
+ }
30
+ /**
31
+ * - `dynamic`: moved by gravity, forces and contacts;
32
+ * - `static`: never moves (ground, walls); cheapest, kept in a broad phase of its own;
33
+ * - `kinematic`: moved only by its velocity (a moving platform), pushes dynamic bodies and is never pushed.
34
+ */
35
+ export type BodyType = 'dynamic' | 'static' | 'kinematic';
36
+ export interface BodyOptions {
37
+ type?: BodyType;
38
+ shape: Shape;
39
+ x?: number;
40
+ y?: number;
41
+ vx?: number;
42
+ vy?: number;
43
+ /**
44
+ * Whether contacts and torques turn the body (default false). A body that does not rotate may still be placed at an
45
+ * `angle`, and keeps it.
46
+ */
47
+ rotates?: boolean;
48
+ /** Radians, clockwise on screen (y grows downwards). */
49
+ angle?: number;
50
+ /** Radians per second. */
51
+ angularVelocity?: number;
52
+ /** Turning lost per second, as a share (default 0.05): a rolling ball slows down without rolling friction. */
53
+ angularDamping?: number;
54
+ /** Mass of a dynamic body (default 1). Ignored for static and kinematic bodies, whose mass is infinite. */
55
+ mass?: number;
56
+ /** Bounce, 0–1 (default 0). A pair bounces by the larger of its two. */
57
+ restitution?: number;
58
+ /** Coulomb friction coefficient (default 0.5). A pair uses the geometric mean of its two. */
59
+ friction?: number;
60
+ /** Velocity lost per second, as a share (default 0): air drag. */
61
+ linearDamping?: number;
62
+ /** Multiplies the world's gravity for this body (default 1; 0 floats). */
63
+ gravityScale?: number;
64
+ /** A sensor reports overlaps (contact events) but is never pushed and pushes nothing. */
65
+ sensor?: boolean;
66
+ /** Category bits this body is in (default 1). */
67
+ layer?: number;
68
+ /** Category bits this body collides with (default all). A pair collides when each one's layer is in the other's mask. */
69
+ mask?: number;
70
+ /** Anything the game wants to find again from a contact or a ray hit (an entity id, an object). */
71
+ userData?: unknown;
72
+ }
73
+ /** Faces of a box that lie against more solid ground (bits), never used as a contact normal. */
74
+ export declare const FACE_LEFT = 1;
75
+ export declare const FACE_RIGHT = 2;
76
+ export declare const FACE_TOP = 4;
77
+ export declare const FACE_BOTTOM = 8;
78
+ /** A contact as events and queries report it. The normal points from `a` towards `b`; y grows downwards. */
79
+ export interface ContactInfo {
80
+ readonly a: Body;
81
+ readonly b: Body;
82
+ readonly nx: number;
83
+ readonly ny: number;
84
+ /** Overlap along the normal, px (slightly negative while resting just apart). */
85
+ readonly depth: number;
86
+ /** Either body is a sensor: reported, never resolved. */
87
+ readonly sensor: boolean;
88
+ /** Where the two touch, world px: one or two points (two where an edge lies along an edge). */
89
+ readonly points: readonly Vec2[];
90
+ }
91
+ export interface PhysicsEvents {
92
+ /** Two bodies started touching (or a sensor started overlapping). Emitted after the step. */
93
+ begin: ContactInfo;
94
+ /** Two bodies stopped touching, or one of them was removed. Emitted after the step. */
95
+ end: ContactInfo;
96
+ }
97
+ export interface RayHit {
98
+ body: Body;
99
+ /** Where the ray met the body. */
100
+ x: number;
101
+ y: number;
102
+ /** Surface normal there, pointing back towards the ray's start. */
103
+ nx: number;
104
+ ny: number;
105
+ /** Share of the ray's length at the hit, 0–1. */
106
+ fraction: number;
107
+ }
108
+ export interface RaycastOptions {
109
+ /** Only bodies whose layer shares a bit with this (default all). */
110
+ mask?: number;
111
+ /** Sensors are skipped unless this is true. */
112
+ includeSensors?: boolean;
113
+ /** Skip bodies this returns false for (the caster itself, say). */
114
+ filter?: (body: Body) => boolean;
115
+ }
116
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/physics/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAEnC;;;;GAIG;AACH,MAAM,MAAM,KAAK,GAAG,WAAW,GAAG,QAAQ,GAAG,YAAY,CAAC;AAE1D,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IACxB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,QAAQ;IACvB,QAAQ,CAAC,IAAI,EAAE,KAAK,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,2DAA2D;AAC3D,MAAM,WAAW,IAAI;IACnB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX;AAED;;;GAGG;AACH,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IACzB,QAAQ,CAAC,QAAQ,EAAE,SAAS,IAAI,EAAE,CAAC;CACpC;AAED;;;;GAIG;AACH,MAAM,MAAM,QAAQ,GAAG,SAAS,GAAG,QAAQ,GAAG,WAAW,CAAC;AAE1D,MAAM,WAAW,WAAW;IAC1B,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,KAAK,EAAE,KAAK,CAAC;IACb,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,wDAAwD;IACxD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,0BAA0B;IAC1B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,8GAA8G;IAC9G,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,2GAA2G;IAC3G,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,wEAAwE;IACxE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,6FAA6F;IAC7F,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,kEAAkE;IAClE,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,0EAA0E;IAC1E,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,yFAAyF;IACzF,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,iDAAiD;IACjD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,yHAAyH;IACzH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,mGAAmG;IACnG,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,gGAAgG;AAChG,eAAO,MAAM,SAAS,IAAI,CAAC;AAC3B,eAAO,MAAM,UAAU,IAAI,CAAC;AAC5B,eAAO,MAAM,QAAQ,IAAI,CAAC;AAC1B,eAAO,MAAM,WAAW,IAAI,CAAC;AAE7B,4GAA4G;AAC5G,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,CAAC,EAAE,IAAI,CAAC;IACjB,QAAQ,CAAC,CAAC,EAAE,IAAI,CAAC;IACjB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,iFAAiF;IACjF,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,yDAAyD;IACzD,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IACzB,+FAA+F;IAC/F,QAAQ,CAAC,MAAM,EAAE,SAAS,IAAI,EAAE,CAAC;CAClC;AAED,MAAM,WAAW,aAAa;IAC5B,6FAA6F;IAC7F,KAAK,EAAE,WAAW,CAAC;IACnB,uFAAuF;IACvF,GAAG,EAAE,WAAW,CAAC;CAClB;AAED,MAAM,WAAW,MAAM;IACrB,IAAI,EAAE,IAAI,CAAC;IACX,kCAAkC;IAClC,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,mEAAmE;IACnE,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,iDAAiD;IACjD,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,cAAc;IAC7B,oEAAoE;IACpE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,+CAA+C;IAC/C,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,mEAAmE;IACnE,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,OAAO,CAAC;CAClC"}
@@ -0,0 +1,78 @@
1
+ import type { Stage } from '../core/Stage.js';
2
+ /** A plain light's colour (a lamp nobody named one for, the light a body carries): warm, as flame is. */
3
+ export declare const WARM_LIGHT = 16761466;
4
+ export declare class Darkness {
5
+ private readonly stage;
6
+ private color;
7
+ private alpha;
8
+ private readonly scratch;
9
+ private readonly sheet;
10
+ /** Every hole is erased before any colour is laid, or a later hole would wipe an earlier light's colour away. */
11
+ private readonly holes;
12
+ private readonly washes;
13
+ private readonly lamps;
14
+ /** The transient lights (`lights.ts`), reused frame to frame. */
15
+ private readonly flashes;
16
+ private rt;
17
+ /**
18
+ * On the screen layer, laid over the world with its exact transform by the camera (`Camera.follow`), shake included:
19
+ * the night is drawn in world pixels round the unshaken camera and only this layer moves with a shake, so a shaking
20
+ * screen does not redraw the night every frame.
21
+ */
22
+ private readonly layer;
23
+ private readonly view;
24
+ /** The light the player carries: the only one that follows them, and the last one they lose. */
25
+ private readonly carried;
26
+ private readonly unsubscribeResize;
27
+ /** Lamps that flicker: while one does (or the player carries a light) every frame differs. */
28
+ private flickering;
29
+ /** Something other than the camera changed what the night looks like (a lamp added, dimmed, the window resized). */
30
+ private dirty;
31
+ /** What the last drawn frame was drawn from: the texture, the camera's texel and the shade. */
32
+ private drawn;
33
+ /** The carried light's place at the last redraw (it follows the body). */
34
+ private carriedAt;
35
+ /** When the sheet was last redrawn. */
36
+ private drawnAt;
37
+ /** The world pixel the night's top-left texel stands on. */
38
+ private ox;
39
+ private oy;
40
+ /** The night texture's size in world pixels, and the zoom it was made for. */
41
+ private rtKey;
42
+ /** The lamps' colour turned down (`setLampsDimmed`). */
43
+ private dimLamps;
44
+ /** A phone redraws the night at most `PHONE_MS` apart, whatever moves (`isTouchUi`). */
45
+ private readonly phone;
46
+ constructor(stage: Stage, color: number, alpha: number);
47
+ /** A hole and its colour, added to the night's layers. */
48
+ private light;
49
+ /** A lamp fixed in the world: a torch on a wall, the seep in its chamber, a crystal in a seam, in its own colour. */
50
+ addLamp(x: number, y: number, radius: number, flicker?: number, color?: number): void;
51
+ /**
52
+ * Changes how dark and what colour the sheet is (the outdoor night, `NightShade`, deepens and lifts with the
53
+ * world clock). A sheet with no alpha left is neither drawn nor redrawn, so a map at noon pays nothing for its night.
54
+ */
55
+ setShade(color: number, alpha: number): void;
56
+ /**
57
+ * Dimmed lamps lay only `LAMP_DIM` of their colour on the dark (a "fewer ambient lights" setting). The holes they
58
+ * cut stay as wide, so a dark place is still seen by them.
59
+ */
60
+ setLampsDimmed(dim: boolean): void;
61
+ /**
62
+ * The night's own texture, one texel a world pixel and `MARGIN` to spare on each side (a shake, or a camera that
63
+ * moved while a phone waits for its next redraw, never shows its edge), remade when the window or the zoom changes:
64
+ * at zoom 2 or 3 it is a quarter or a ninth of the screen's pixels. True when it was remade.
65
+ */
66
+ private fit;
67
+ /** Redraws the night with this frame's holes in it, when anything in it changed. `px`/`py` is where the player stands. */
68
+ update(now: number, px: number, py: number, carriedRadius: number): void;
69
+ private hide;
70
+ /** Lays light `l` at world (wx, wy), `r` px across its radius, in the night's world-pixel grid. */
71
+ private place;
72
+ destroy(): void;
73
+ }
74
+ /** What is left of a lamp's glow and colour while lamps are dimmed (`setLampsDimmed`). */
75
+ export declare const LAMP_DIM = 0.35;
76
+ /** World units of light the player carries underground — about five tiles of certainty in any direction. */
77
+ export declare const CARRIED_LIGHT: number;
78
+ //# sourceMappingURL=Darkness.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Darkness.d.ts","sourceRoot":"","sources":["../../../src/pixel/Darkness.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AA2C3C,yGAAyG;AACzG,eAAO,MAAM,UAAU,WAAW,CAAC;AAsEnC,qBAAa,QAAQ;IAyCjB,OAAO,CAAC,QAAQ,CAAC,KAAK;IACtB,OAAO,CAAC,KAAK;IACb,OAAO,CAAC,KAAK;IA1Cf,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAmB;IAC3C,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAS;IAC/B,iHAAiH;IACjH,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAmB;IACzC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAmB;IAC1C,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAqF;IAC3G,iEAAiE;IACjE,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAsB;IAC9C,OAAO,CAAC,EAAE,CAAgB;IAC1B;;;;OAIG;IACH,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAmB;IACzC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAS;IAC9B,gGAAgG;IAChG,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAe;IACvC,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAa;IAC/C,8FAA8F;IAC9F,OAAO,CAAC,UAAU,CAAK;IACvB,oHAAoH;IACpH,OAAO,CAAC,KAAK,CAAQ;IACrB,+FAA+F;IAC/F,OAAO,CAAC,KAAK,CAAM;IACnB,0EAA0E;IAC1E,OAAO,CAAC,SAAS,CAAM;IACvB,uCAAuC;IACvC,OAAO,CAAC,OAAO,CAAa;IAC5B,4DAA4D;IAC5D,OAAO,CAAC,EAAE,CAAK;IACf,OAAO,CAAC,EAAE,CAAK;IACf,8EAA8E;IAC9E,OAAO,CAAC,KAAK,CAAM;IACnB,wDAAwD;IACxD,OAAO,CAAC,QAAQ,CAAS;IACzB,wFAAwF;IACxF,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAe;gBAGlB,KAAK,EAAE,KAAK,EACrB,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,MAAM;IAgBvB,0DAA0D;IAC1D,OAAO,CAAC,KAAK;IAUb,qHAAqH;IACrH,OAAO,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,SAAI,EAAE,KAAK,SAAa,GAAG,IAAI;IAMpF;;;OAGG;IACH,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI;IAM5C;;;OAGG;IACH,cAAc,CAAC,GAAG,EAAE,OAAO,GAAG,IAAI;IAMlC;;;;OAIG;IACH,OAAO,CAAC,GAAG;IAaX,0HAA0H;IAC1H,MAAM,CAAC,GAAG,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,GAAG,IAAI;IAiExE,OAAO,CAAC,IAAI;IAKZ,mGAAmG;IACnG,OAAO,CAAC,KAAK;IAmBb,OAAO,IAAI,IAAI;CAOhB;AAED,0FAA0F;AAC1F,eAAO,MAAM,QAAQ,OAAO,CAAC;AAE7B,4GAA4G;AAC5G,eAAO,MAAM,aAAa,QAAgB,CAAC"}
@@ -0,0 +1,35 @@
1
+ import { Texture } from 'pixi.js';
2
+ import type { Stage } from '../core/Stage.js';
3
+ /**
4
+ * A white dithered edge for a screen of `w`×`h` world pixels, one texel a world pixel and scaled up `'nearest'`;
5
+ * the sprite that draws it tints it. Made once per size and strength. Returns `Texture.EMPTY` when the browser has
6
+ * no canvas memory to spare (iOS), so the caller asks again later.
7
+ */
8
+ export declare function ditherVignette(w: number, h: number, strength?: number, from?: number): Texture;
9
+ export interface DitherVignetteOptions {
10
+ /** The edge's colour (default black). */
11
+ color?: number;
12
+ /** How far from the centre toward a corner the edge begins, 0..1 (default 0.55). */
13
+ from?: number;
14
+ }
15
+ /**
16
+ * A dithered pixel edge round the screen, on the screen layer: a darkened border, or tinted red and beaten with
17
+ * `heartbeat` while a player is low on health. The texture is made at full strength, off the frame that first needs
18
+ * it (a full-screen dither is a few ms on a phone), and remade only when the window or the zoom changes; `show`
19
+ * changes how much of it shows.
20
+ */
21
+ export declare class DitherVignette {
22
+ private readonly stage;
23
+ private readonly edge;
24
+ private madeFor;
25
+ private making;
26
+ private readonly from;
27
+ constructor(stage: Stage, options?: DitherVignetteOptions);
28
+ setColor(color: number): void;
29
+ private make;
30
+ /** Shows the edge at `alpha` (0..1); call each frame it shows. */
31
+ show(alpha: number): void;
32
+ hide(): void;
33
+ destroy(): void;
34
+ }
35
+ //# sourceMappingURL=DitherVignette.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DitherVignette.d.ts","sourceRoot":"","sources":["../../../src/pixel/DitherVignette.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,OAAO,EAAE,MAAM,SAAS,CAAC;AAC1C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAO3C;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,QAAQ,SAAI,EAAE,IAAI,SAAO,GAAG,OAAO,CAuBvF;AAED,MAAM,WAAW,qBAAqB;IACpC,yCAAyC;IACzC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,oFAAoF;IACpF,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;;;;GAKG;AACH,qBAAa,cAAc;IAOvB,OAAO,CAAC,QAAQ,CAAC,KAAK;IANxB,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAgB;IACrC,OAAO,CAAC,OAAO,CAAM;IACrB,OAAO,CAAC,MAAM,CAA8C;IAC5D,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAS;gBAGX,KAAK,EAAE,KAAK,EAC7B,OAAO,GAAE,qBAA0B;IAYrC,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAI7B,OAAO,CAAC,IAAI;IAaZ,kEAAkE;IAClE,IAAI,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IASzB,IAAI,IAAI,IAAI;IAIZ,OAAO,IAAI,IAAI;CAIhB"}
@@ -0,0 +1,30 @@
1
+ import type { Stage } from '../core/Stage.js';
2
+ import type { WorldObject } from '../core/types.js';
3
+ import type { PackedPixels } from './spritePixels.js';
4
+ /** What a dying body hands over: its feet in the world, how it was drawn, and the pixels of its last frame. */
5
+ export interface DeathPixels {
6
+ x: number;
7
+ y: number;
8
+ /** World pixels per sprite pixel (the body's `scale`), negative when the body faced left. */
9
+ scaleX: number;
10
+ scaleY: number;
11
+ pixels: PackedPixels;
12
+ }
13
+ /**
14
+ * A dead body evaporating: it breaks into its own pixels, which let go top rows first, rise, scatter a little and
15
+ * give out, while the body itself is hidden by the caller. Every particle is one whole world pixel in a colour read
16
+ * off the body's last frame, painted at 12 fps like every other effect; it pales up its own ramp as it rises and
17
+ * steps its alpha down instead of melting, so it stays pixel art the whole way. A cloud is one `PixelLayer` (a pooled
18
+ * texture) rather than a Graphics of up to 1,400 rects.
19
+ */
20
+ export declare class Evaporation {
21
+ private readonly scene;
22
+ private readonly track;
23
+ private readonly clouds;
24
+ private live;
25
+ constructor(scene: Stage, track: (object: WorldObject) => void);
26
+ play(d: DeathPixels, big: boolean, now: number): void;
27
+ update(now: number): void;
28
+ private draw;
29
+ }
30
+ //# sourceMappingURL=Evaporation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Evaporation.d.ts","sourceRoot":"","sources":["../../../src/pixel/Evaporation.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAEjD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEnD,+GAA+G;AAC/G,MAAM,WAAW,WAAW;IAC1B,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,6FAA6F;IAC7F,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,YAAY,CAAC;CACtB;AAgCD;;;;;;GAMG;AACH,qBAAa,WAAW;IAKpB,OAAO,CAAC,QAAQ,CAAC,KAAK;IACtB,OAAO,CAAC,QAAQ,CAAC,KAAK;IALxB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAe;IACtC,OAAO,CAAC,IAAI,CAAK;gBAGE,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,IAAI;IAGvD,IAAI,CAAC,CAAC,EAAE,WAAW,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI;IAqDrD,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAazB,OAAO,CAAC,IAAI;CA8Bb"}
@@ -0,0 +1,38 @@
1
+ import type { Stage } from '../core/Stage.js';
2
+ import { type DayClock } from '../ambient/DayClock.js';
3
+ export interface NightShadeOptions {
4
+ /** The day the night follows. */
5
+ clock: DayClock;
6
+ /** This place's own night colour, pulled in as the night deepens (`tintNight`); none keeps the clock's. */
7
+ tint?: number;
8
+ /** How far the tint takes over at full night (default 0.6). */
9
+ tintShare?: number;
10
+ /** A lamp's hole in the night against the glow it is drawn with (default 1.6: the light reaches past the glow). */
11
+ lampScale?: number;
12
+ /** The radius (world px) of the light a body carries at full night; 0 for none (default 64). */
13
+ carriedLight?: number;
14
+ /** The night share below which nothing is carried (default 0.55): at dusk a hole round the feet reads as a spotlight. */
15
+ carriedFrom?: number;
16
+ }
17
+ /**
18
+ * The outdoor night: a `DayClock`'s grade laid over the world as a dithered `Darkness`, deepening at dusk and lifting
19
+ * at dawn, with every lamp, window and fire burning a hole in it — the same erase trick an underground is lit by,
20
+ * only with a sheet whose colour and depth follow the clock. A place under no sky (a cave) builds a `Darkness` of its
21
+ * own instead; at noon the sheet has no alpha and costs nothing.
22
+ */
23
+ export declare class NightShade {
24
+ private readonly options;
25
+ private readonly dark;
26
+ private readonly lampScale;
27
+ private readonly carried;
28
+ private readonly carriedFrom;
29
+ constructor(stage: Stage, options: NightShadeOptions);
30
+ /** A light the place glows with, `glowSize` the diameter of the glow drawn for it: by night it is what is seen by. */
31
+ addLight(x: number, y: number, glowSize: number, color?: number, flicker?: number): void;
32
+ /** Lamps colour the dark less (a "fewer ambient lights" setting); their holes stay as wide. */
33
+ setLampsDimmed(dim: boolean): void;
34
+ /** `now` the frame's ms, `wallMs` the shared wall time the clock reads (`serverNow()`), `px`/`py` the player. */
35
+ update(now: number, wallMs: number, px: number, py: number): void;
36
+ destroy(): void;
37
+ }
38
+ //# sourceMappingURL=NightShade.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NightShade.d.ts","sourceRoot":"","sources":["../../../src/pixel/NightShade.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAG/D,MAAM,WAAW,iBAAiB;IAChC,iCAAiC;IACjC,KAAK,EAAE,QAAQ,CAAC;IAChB,2GAA2G;IAC3G,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,+DAA+D;IAC/D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mHAAmH;IACnH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gGAAgG;IAChG,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,yHAAyH;IACzH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;;;GAKG;AACH,qBAAa,UAAU;IAQnB,OAAO,CAAC,QAAQ,CAAC,OAAO;IAP1B,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAW;IAChC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAS;IACnC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAS;IACjC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAS;gBAGnC,KAAK,EAAE,KAAK,EACK,OAAO,EAAE,iBAAiB;IAS7C,sHAAsH;IACtH,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,EAAE,OAAO,SAAI,GAAG,IAAI;IAInF,+FAA+F;IAC/F,cAAc,CAAC,GAAG,EAAE,OAAO,GAAG,IAAI;IAIlC,iHAAiH;IACjH,MAAM,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,IAAI;IAOjE,OAAO,IAAI,IAAI;CAGhB"}