1681-engine 0.0.0-stage → 0.5.9

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 (831) hide show
  1. package/CHANGELOG.md +357 -0
  2. package/LICENSE +21 -0
  3. package/README.md +164 -2
  4. package/dist/1681-engine.js +471 -0
  5. package/dist/ambient/ColorGrade.js +40 -0
  6. package/dist/ambient/DayClock.js +56 -0
  7. package/dist/ambient/WeatherLayer.js +90 -0
  8. package/dist/ambient/grade.js +12 -0
  9. package/dist/ambient/weather.js +51 -0
  10. package/dist/anim/AnimStateMachine.js +163 -0
  11. package/dist/anim/Animator.js +66 -0
  12. package/dist/anim/animStateCompile.js +112 -0
  13. package/dist/anim/animStateSystem.js +16 -0
  14. package/dist/anim/animationSystem.js +14 -0
  15. package/dist/anim/asepriteSlices.js +21 -0
  16. package/dist/anim/asepriteTags.js +34 -0
  17. package/dist/anim/parseAseprite.js +82 -0
  18. package/dist/assets/AssetLoader.js +202 -0
  19. package/dist/assets/loadAseprite.js +49 -0
  20. package/dist/assets/takeCleanerWorker-DTcI_Jqr.js +30 -0
  21. package/dist/assets/textureAtlas.js +58 -0
  22. package/dist/audio/Footsteps.js +25 -0
  23. package/dist/audio/MusicPlayer.js +77 -0
  24. package/dist/audio/SoundEngine.js +125 -0
  25. package/dist/audio/cleanTake.js +29 -0
  26. package/dist/audio/music/ElementVoice.js +34 -0
  27. package/dist/audio/music/GraphVoice.js +38 -0
  28. package/dist/audio/music/MusicChannel.js +57 -0
  29. package/dist/audio/music/musicVoice.js +12 -0
  30. package/dist/audio/sampleBank.js +81 -0
  31. package/dist/audio/soundTable.js +8 -0
  32. package/dist/audio/synth.js +35 -0
  33. package/dist/core/BitmapLabel.js +48 -0
  34. package/dist/core/Camera.js +149 -0
  35. package/dist/core/Clock.js +40 -0
  36. package/dist/core/Graphics.js +68 -0
  37. package/dist/core/Group.js +28 -0
  38. package/dist/core/Image.js +50 -0
  39. package/dist/core/ObjectFactory.js +54 -0
  40. package/dist/core/Pointer.js +80 -0
  41. package/dist/core/Rectangle.js +50 -0
  42. package/dist/core/Stage.js +85 -0
  43. package/dist/core/Text.js +21 -0
  44. package/dist/core/TextureRegistry.js +141 -0
  45. package/dist/core/Timeline.js +210 -0
  46. package/dist/core/TimelineBuilder.js +72 -0
  47. package/dist/core/TimelineChild.js +83 -0
  48. package/dist/core/Tweener.js +135 -0
  49. package/dist/core/atlas.js +37 -0
  50. package/dist/core/atlasPlan.js +21 -0
  51. package/dist/core/blendLayer.js +11 -0
  52. package/dist/core/eases.js +20 -0
  53. package/dist/core/gameObject.js +117 -0
  54. package/dist/core/pixelZoom.js +43 -0
  55. package/dist/core/pixiPatches.js +17 -0
  56. package/dist/core/runDue.js +28 -0
  57. package/dist/core/silhouette.js +49 -0
  58. package/dist/core/timelinePlace.js +23 -0
  59. package/dist/core/tweenProps.js +11 -0
  60. package/dist/debug/DebugOverlay.js +93 -0
  61. package/dist/debug/DrawCallCounter.js +44 -0
  62. package/dist/debug/ErrorLog.js +21 -0
  63. package/dist/debug/FrameStats.js +41 -0
  64. package/dist/debug/inspectWorld.js +28 -0
  65. package/dist/diagnostics/ErrorDeduper.js +26 -0
  66. package/dist/diagnostics/FrameSampler.js +41 -0
  67. package/dist/diagnostics/bootWatch.js +20 -0
  68. package/dist/diagnostics/captureErrors.js +26 -0
  69. package/dist/diagnostics/contextLoss.js +24 -0
  70. package/dist/diagnostics/frameStats.js +30 -0
  71. package/dist/diagnostics/gpuInfo.js +21 -0
  72. package/dist/diagnostics/renderGuard.js +23 -0
  73. package/dist/ecs/SparseSet.js +54 -0
  74. package/dist/ecs/World.js +306 -0
  75. package/dist/ecs/fields.js +25 -0
  76. package/dist/engine/Engine.js +106 -0
  77. package/dist/engine/FixedLoop.js +36 -0
  78. package/dist/engine/HiddenPause.js +27 -0
  79. package/dist/engine/Scene.js +78 -0
  80. package/dist/engine/SceneManager.js +72 -0
  81. package/dist/events/EventBus.js +41 -0
  82. package/dist/fx/Afterimages.js +82 -0
  83. package/dist/fx/FloatingText.js +71 -0
  84. package/dist/fx/hitStop.js +27 -0
  85. package/dist/fx/viewCull.js +9 -0
  86. package/dist/i18n/Translator.js +71 -0
  87. package/dist/i18n/extractStrings.js +57 -0
  88. package/dist/i18n/formatMessage.js +18 -0
  89. package/dist/input/Actions.js +139 -0
  90. package/dist/input/AimGesture.js +74 -0
  91. package/dist/input/Keyboard.js +53 -0
  92. package/dist/input/Keymap.js +170 -0
  93. package/dist/input/TargetLock.js +72 -0
  94. package/dist/input/aimAxis.js +7 -0
  95. package/dist/input/keyChord.js +28 -0
  96. package/dist/input/longPress.js +31 -0
  97. package/dist/input/rumble.js +42 -0
  98. package/dist/input/stickAxis.js +22 -0
  99. package/dist/input/touchDetect.js +6 -0
  100. package/dist/light/LightLayer.js +83 -0
  101. package/dist/nav/MinHeap.js +38 -0
  102. package/dist/nav/findPath.js +77 -0
  103. package/dist/nav/navGrid.js +35 -0
  104. package/dist/nav/nearestOpen.js +18 -0
  105. package/dist/nav/straightenPath.js +50 -0
  106. package/dist/net/Connection.js +107 -0
  107. package/dist/net/InterpolationBuffer.js +56 -0
  108. package/dist/net/PredictedMover.js +60 -0
  109. package/dist/net/Room.js +91 -0
  110. package/dist/net/RoomHost.js +100 -0
  111. package/dist/net/cadence.js +21 -0
  112. package/dist/net/constants.js +10 -0
  113. package/dist/net/lobby/LobbyClient.js +123 -0
  114. package/dist/net/lobby/LobbyHost.js +365 -0
  115. package/dist/net/lobby/LobbyRooms.js +65 -0
  116. package/dist/net/lobby/Matchmaker.js +105 -0
  117. package/dist/net/movement.js +84 -0
  118. package/dist/net/protocol.js +10 -0
  119. package/dist/net/reconnect.js +10 -0
  120. package/dist/net/serverClock.js +21 -0
  121. package/dist/net/snapshotCodec.js +91 -0
  122. package/dist/parallax/Parallax.js +31 -0
  123. package/dist/parallax/ParallaxLayer.js +69 -0
  124. package/dist/parallax/parallaxMath.js +26 -0
  125. package/dist/particles/Emitter.js +107 -0
  126. package/dist/particles/ParticleBudget.js +31 -0
  127. package/dist/particles/ParticleSim.js +59 -0
  128. package/dist/particles/particleCurves.js +47 -0
  129. package/dist/particles/particleSampling.js +29 -0
  130. package/dist/physics/Body.js +201 -0
  131. package/dist/physics/BroadPhase.js +55 -0
  132. package/dist/physics/Contact.js +75 -0
  133. package/dist/physics/ContactSolver.js +69 -0
  134. package/dist/physics/PhysicsWorld.js +220 -0
  135. package/dist/physics/SpatialHash.js +38 -0
  136. package/dist/physics/collide.js +75 -0
  137. package/dist/physics/collidePolygon.js +93 -0
  138. package/dist/physics/contactReport.js +13 -0
  139. package/dist/physics/drawColliders.js +30 -0
  140. package/dist/physics/physicsSystem.js +7 -0
  141. package/dist/physics/polygon.js +79 -0
  142. package/dist/physics/raycast.js +61 -0
  143. package/dist/physics/syncToBody.js +18 -0
  144. package/dist/physics/tileBodies.js +58 -0
  145. package/dist/physics/types.js +7 -0
  146. package/dist/pixel/Darkness.js +169 -0
  147. package/dist/pixel/DitherVignette.js +56 -0
  148. package/dist/pixel/Evaporation.js +84 -0
  149. package/dist/pixel/NightShade.js +33 -0
  150. package/dist/pixel/PixelLayer.js +210 -0
  151. package/dist/pixel/PixelMarks.js +99 -0
  152. package/dist/pixel/SwayProp.js +74 -0
  153. package/dist/pixel/aimPixels.js +67 -0
  154. package/dist/pixel/lights.js +43 -0
  155. package/dist/pixel/nineSlice.js +61 -0
  156. package/dist/pixel/paintLayer.js +35 -0
  157. package/dist/pixel/palette.js +56 -0
  158. package/dist/pixel/pixel.js +277 -0
  159. package/dist/pixel/pixelPaint.js +197 -0
  160. package/dist/pixel/pixelParticles.js +35 -0
  161. package/dist/pixel/pixelTone.js +163 -0
  162. package/dist/pixel/propKit.js +40 -0
  163. package/dist/pixel/ramp.js +101 -0
  164. package/dist/pixel/selout.js +34 -0
  165. package/dist/pixel/spritePixels.js +58 -0
  166. package/dist/pixel/swayRig.js +86 -0
  167. package/dist/pixel/vignetteMask.js +23 -0
  168. package/dist/pixel/weatherArt.js +60 -0
  169. package/dist/pixel.js +96 -0
  170. package/dist/platform/appResume.js +18 -0
  171. package/dist/platform/fullscreen.js +52 -0
  172. package/dist/platform/orientation.js +26 -0
  173. package/dist/platform/pointerLock.js +37 -0
  174. package/dist/platform/reducedMotion.js +23 -0
  175. package/dist/platform/timeoutSignal.js +14 -0
  176. package/dist/platform/touch.js +32 -0
  177. package/dist/postfx/BloomFilter.js +64 -0
  178. package/dist/postfx/ChromaticAberrationFilter.js +24 -0
  179. package/dist/postfx/ColorAdjustFilter.js +75 -0
  180. package/dist/postfx/CrtFilter.js +41 -0
  181. package/dist/postfx/PixelateFilter.js +26 -0
  182. package/dist/postfx/PostFx.js +122 -0
  183. package/dist/postfx/ShockwaveFilter.js +48 -0
  184. package/dist/postfx/VignetteFilter.js +36 -0
  185. package/dist/postfx/fxAnimator.js +37 -0
  186. package/dist/postfx/fxShader.js +127 -0
  187. package/dist/postfx.js +25 -0
  188. package/dist/react/ChoiceDialog.js +50 -0
  189. package/dist/react/ConfirmDialog.js +52 -0
  190. package/dist/react/Glyph.js +62 -0
  191. package/dist/react/Modal.js +37 -0
  192. package/dist/react/Panel.js +23 -0
  193. package/dist/react/PixelImage.js +23 -0
  194. package/dist/react/Select.js +98 -0
  195. package/dist/react/Slider.js +61 -0
  196. package/dist/react/SplitPane.js +23 -0
  197. package/dist/react/TabStrip.js +31 -0
  198. package/dist/react/TitleTips.js +41 -0
  199. package/dist/react/Tooltip.js +27 -0
  200. package/dist/react/UiProvider.js +49 -0
  201. package/dist/react/baseCss.js +221 -0
  202. package/dist/react/choiceStore.js +22 -0
  203. package/dist/react/classNames.js +18 -0
  204. package/dist/react/confirmStore.js +29 -0
  205. package/dist/react/labels.js +17 -0
  206. package/dist/react/placement.js +48 -0
  207. package/dist/react/useFillSheet.js +22 -0
  208. package/dist/react/useFitToViewport.js +28 -0
  209. package/dist/react/usePicked.js +12 -0
  210. package/dist/react/useStore.js +8 -0
  211. package/dist/react/useViewport.js +16 -0
  212. package/dist/react.js +77 -0
  213. package/dist/rig/PosePlayer.js +91 -0
  214. package/dist/rig/RigView.js +124 -0
  215. package/dist/rig/Skeleton.js +30 -0
  216. package/dist/rig/humanoid.js +5 -0
  217. package/dist/rig/humanoid.json.js +29 -0
  218. package/dist/rig/humanoidPoses.js +29 -0
  219. package/dist/rig/poseMath.js +53 -0
  220. package/dist/rig/poses.json.js +149 -0
  221. package/dist/save/Autosaver.js +53 -0
  222. package/dist/save/MemoryBackend.js +18 -0
  223. package/dist/save/SaveStore.js +102 -0
  224. package/dist/save/WebStorageBackend.js +26 -0
  225. package/dist/save/checksum.js +9 -0
  226. package/dist/save/migrateSave.js +26 -0
  227. package/dist/settings.js +26 -0
  228. package/dist/tilemap/TilemapView.js +68 -0
  229. package/dist/tilemap/collision.js +24 -0
  230. package/dist/tilemap/tiled.js +137 -0
  231. package/dist/transitions/CrossfadeTransition.js +23 -0
  232. package/dist/transitions/DitherWipeTransition.js +69 -0
  233. package/dist/transitions/FadeTransition.js +33 -0
  234. package/dist/transitions/Letterbox.js +41 -0
  235. package/dist/transitions/ditherMask.js +14 -0
  236. package/dist/transitions/transitionTo.js +27 -0
  237. package/dist/transitions/tweenDone.js +14 -0
  238. package/dist/types/ambient/ColorGrade.d.ts +41 -0
  239. package/dist/types/ambient/ColorGrade.d.ts.map +1 -0
  240. package/dist/types/ambient/DayClock.d.ts +80 -0
  241. package/dist/types/ambient/DayClock.d.ts.map +1 -0
  242. package/dist/types/ambient/WeatherLayer.d.ts +78 -0
  243. package/dist/types/ambient/WeatherLayer.d.ts.map +1 -0
  244. package/dist/types/ambient/grade.d.ts +22 -0
  245. package/dist/types/ambient/grade.d.ts.map +1 -0
  246. package/dist/types/ambient/weather.d.ts +49 -0
  247. package/dist/types/ambient/weather.d.ts.map +1 -0
  248. package/dist/types/anim/AnimStateMachine.d.ts +80 -0
  249. package/dist/types/anim/AnimStateMachine.d.ts.map +1 -0
  250. package/dist/types/anim/Animator.d.ts +50 -0
  251. package/dist/types/anim/Animator.d.ts.map +1 -0
  252. package/dist/types/anim/animStateCompile.d.ts +52 -0
  253. package/dist/types/anim/animStateCompile.d.ts.map +1 -0
  254. package/dist/types/anim/animStateSystem.d.ts +10 -0
  255. package/dist/types/anim/animStateSystem.d.ts.map +1 -0
  256. package/dist/types/anim/animStateTypes.d.ts +50 -0
  257. package/dist/types/anim/animStateTypes.d.ts.map +1 -0
  258. package/dist/types/anim/animationSystem.d.ts +13 -0
  259. package/dist/types/anim/animationSystem.d.ts.map +1 -0
  260. package/dist/types/anim/asepriteSlices.d.ts +19 -0
  261. package/dist/types/anim/asepriteSlices.d.ts.map +1 -0
  262. package/dist/types/anim/asepriteTags.d.ts +16 -0
  263. package/dist/types/anim/asepriteTags.d.ts.map +1 -0
  264. package/dist/types/anim/asepriteTypes.d.ts +159 -0
  265. package/dist/types/anim/asepriteTypes.d.ts.map +1 -0
  266. package/dist/types/anim/parseAseprite.d.ts +21 -0
  267. package/dist/types/anim/parseAseprite.d.ts.map +1 -0
  268. package/dist/types/assets/AssetLoader.d.ts +140 -0
  269. package/dist/types/assets/AssetLoader.d.ts.map +1 -0
  270. package/dist/types/assets/loadAseprite.d.ts +27 -0
  271. package/dist/types/assets/loadAseprite.d.ts.map +1 -0
  272. package/dist/types/assets/textureAtlas.d.ts +35 -0
  273. package/dist/types/assets/textureAtlas.d.ts.map +1 -0
  274. package/dist/types/audio/Footsteps.d.ts +33 -0
  275. package/dist/types/audio/Footsteps.d.ts.map +1 -0
  276. package/dist/types/audio/MusicPlayer.d.ts +65 -0
  277. package/dist/types/audio/MusicPlayer.d.ts.map +1 -0
  278. package/dist/types/audio/SoundEngine.d.ts +47 -0
  279. package/dist/types/audio/SoundEngine.d.ts.map +1 -0
  280. package/dist/types/audio/cleanTake.d.ts +3 -0
  281. package/dist/types/audio/cleanTake.d.ts.map +1 -0
  282. package/dist/types/audio/music/ElementVoice.d.ts +14 -0
  283. package/dist/types/audio/music/ElementVoice.d.ts.map +1 -0
  284. package/dist/types/audio/music/GraphVoice.d.ts +22 -0
  285. package/dist/types/audio/music/GraphVoice.d.ts.map +1 -0
  286. package/dist/types/audio/music/MusicChannel.d.ts +35 -0
  287. package/dist/types/audio/music/MusicChannel.d.ts.map +1 -0
  288. package/dist/types/audio/music/musicVoice.d.ts +26 -0
  289. package/dist/types/audio/music/musicVoice.d.ts.map +1 -0
  290. package/dist/types/audio/sampleBank.d.ts +27 -0
  291. package/dist/types/audio/sampleBank.d.ts.map +1 -0
  292. package/dist/types/audio/soundTable.d.ts +14 -0
  293. package/dist/types/audio/soundTable.d.ts.map +1 -0
  294. package/dist/types/audio/synth.d.ts +34 -0
  295. package/dist/types/audio/synth.d.ts.map +1 -0
  296. package/dist/types/audio/takeCleanerWorker.d.ts +2 -0
  297. package/dist/types/audio/takeCleanerWorker.d.ts.map +1 -0
  298. package/dist/types/core/BitmapLabel.d.ts +36 -0
  299. package/dist/types/core/BitmapLabel.d.ts.map +1 -0
  300. package/dist/types/core/Camera.d.ts +115 -0
  301. package/dist/types/core/Camera.d.ts.map +1 -0
  302. package/dist/types/core/Clock.d.ts +23 -0
  303. package/dist/types/core/Clock.d.ts.map +1 -0
  304. package/dist/types/core/Graphics.d.ts +37 -0
  305. package/dist/types/core/Graphics.d.ts.map +1 -0
  306. package/dist/types/core/Group.d.ts +15 -0
  307. package/dist/types/core/Group.d.ts.map +1 -0
  308. package/dist/types/core/Image.d.ts +25 -0
  309. package/dist/types/core/Image.d.ts.map +1 -0
  310. package/dist/types/core/ObjectFactory.d.ts +34 -0
  311. package/dist/types/core/ObjectFactory.d.ts.map +1 -0
  312. package/dist/types/core/Pointer.d.ts +45 -0
  313. package/dist/types/core/Pointer.d.ts.map +1 -0
  314. package/dist/types/core/Rectangle.d.ts +26 -0
  315. package/dist/types/core/Rectangle.d.ts.map +1 -0
  316. package/dist/types/core/Stage.d.ts +58 -0
  317. package/dist/types/core/Stage.d.ts.map +1 -0
  318. package/dist/types/core/Text.d.ts +22 -0
  319. package/dist/types/core/Text.d.ts.map +1 -0
  320. package/dist/types/core/TextureRegistry.d.ts +90 -0
  321. package/dist/types/core/TextureRegistry.d.ts.map +1 -0
  322. package/dist/types/core/Timeline.d.ts +115 -0
  323. package/dist/types/core/Timeline.d.ts.map +1 -0
  324. package/dist/types/core/TimelineBuilder.d.ts +53 -0
  325. package/dist/types/core/TimelineBuilder.d.ts.map +1 -0
  326. package/dist/types/core/TimelineChild.d.ts +51 -0
  327. package/dist/types/core/TimelineChild.d.ts.map +1 -0
  328. package/dist/types/core/Tweener.d.ts +70 -0
  329. package/dist/types/core/Tweener.d.ts.map +1 -0
  330. package/dist/types/core/atlas.d.ts +16 -0
  331. package/dist/types/core/atlas.d.ts.map +1 -0
  332. package/dist/types/core/atlasPlan.d.ts +34 -0
  333. package/dist/types/core/atlasPlan.d.ts.map +1 -0
  334. package/dist/types/core/blendLayer.d.ts +23 -0
  335. package/dist/types/core/blendLayer.d.ts.map +1 -0
  336. package/dist/types/core/eases.d.ts +3 -0
  337. package/dist/types/core/eases.d.ts.map +1 -0
  338. package/dist/types/core/gameObject.d.ts +42 -0
  339. package/dist/types/core/gameObject.d.ts.map +1 -0
  340. package/dist/types/core/pixelZoom.d.ts +45 -0
  341. package/dist/types/core/pixelZoom.d.ts.map +1 -0
  342. package/dist/types/core/pixiPatches.d.ts +9 -0
  343. package/dist/types/core/pixiPatches.d.ts.map +1 -0
  344. package/dist/types/core/runDue.d.ts +15 -0
  345. package/dist/types/core/runDue.d.ts.map +1 -0
  346. package/dist/types/core/silhouette.d.ts +16 -0
  347. package/dist/types/core/silhouette.d.ts.map +1 -0
  348. package/dist/types/core/timelinePlace.d.ts +23 -0
  349. package/dist/types/core/timelinePlace.d.ts.map +1 -0
  350. package/dist/types/core/tweenProps.d.ts +8 -0
  351. package/dist/types/core/tweenProps.d.ts.map +1 -0
  352. package/dist/types/core/types.d.ts +4 -0
  353. package/dist/types/core/types.d.ts.map +1 -0
  354. package/dist/types/debug/DebugOverlay.d.ts +63 -0
  355. package/dist/types/debug/DebugOverlay.d.ts.map +1 -0
  356. package/dist/types/debug/DrawCallCounter.d.ts +20 -0
  357. package/dist/types/debug/DrawCallCounter.d.ts.map +1 -0
  358. package/dist/types/debug/ErrorLog.d.ts +20 -0
  359. package/dist/types/debug/ErrorLog.d.ts.map +1 -0
  360. package/dist/types/debug/FrameStats.d.ts +21 -0
  361. package/dist/types/debug/FrameStats.d.ts.map +1 -0
  362. package/dist/types/debug/inspectWorld.d.ts +14 -0
  363. package/dist/types/debug/inspectWorld.d.ts.map +1 -0
  364. package/dist/types/diagnostics/ErrorDeduper.d.ts +17 -0
  365. package/dist/types/diagnostics/ErrorDeduper.d.ts.map +1 -0
  366. package/dist/types/diagnostics/FrameSampler.d.ts +37 -0
  367. package/dist/types/diagnostics/FrameSampler.d.ts.map +1 -0
  368. package/dist/types/diagnostics/bootWatch.d.ts +25 -0
  369. package/dist/types/diagnostics/bootWatch.d.ts.map +1 -0
  370. package/dist/types/diagnostics/captureErrors.d.ts +24 -0
  371. package/dist/types/diagnostics/captureErrors.d.ts.map +1 -0
  372. package/dist/types/diagnostics/contextLoss.d.ts +35 -0
  373. package/dist/types/diagnostics/contextLoss.d.ts.map +1 -0
  374. package/dist/types/diagnostics/frameStats.d.ts +30 -0
  375. package/dist/types/diagnostics/frameStats.d.ts.map +1 -0
  376. package/dist/types/diagnostics/gpuInfo.d.ts +9 -0
  377. package/dist/types/diagnostics/gpuInfo.d.ts.map +1 -0
  378. package/dist/types/diagnostics/renderGuard.d.ts +12 -0
  379. package/dist/types/diagnostics/renderGuard.d.ts.map +1 -0
  380. package/dist/types/ecs/SparseSet.d.ts +25 -0
  381. package/dist/types/ecs/SparseSet.d.ts.map +1 -0
  382. package/dist/types/ecs/World.d.ts +137 -0
  383. package/dist/types/ecs/World.d.ts.map +1 -0
  384. package/dist/types/ecs/fields.d.ts +34 -0
  385. package/dist/types/ecs/fields.d.ts.map +1 -0
  386. package/dist/types/engine/Engine.d.ts +96 -0
  387. package/dist/types/engine/Engine.d.ts.map +1 -0
  388. package/dist/types/engine/FixedLoop.d.ts +32 -0
  389. package/dist/types/engine/FixedLoop.d.ts.map +1 -0
  390. package/dist/types/engine/HiddenPause.d.ts +22 -0
  391. package/dist/types/engine/HiddenPause.d.ts.map +1 -0
  392. package/dist/types/engine/Scene.d.ts +67 -0
  393. package/dist/types/engine/Scene.d.ts.map +1 -0
  394. package/dist/types/engine/SceneManager.d.ts +36 -0
  395. package/dist/types/engine/SceneManager.d.ts.map +1 -0
  396. package/dist/types/events/EventBus.d.ts +20 -0
  397. package/dist/types/events/EventBus.d.ts.map +1 -0
  398. package/dist/types/fx/Afterimages.d.ts +62 -0
  399. package/dist/types/fx/Afterimages.d.ts.map +1 -0
  400. package/dist/types/fx/FloatingText.d.ts +71 -0
  401. package/dist/types/fx/FloatingText.d.ts.map +1 -0
  402. package/dist/types/fx/hitStop.d.ts +20 -0
  403. package/dist/types/fx/hitStop.d.ts.map +1 -0
  404. package/dist/types/fx/viewCull.d.ts +14 -0
  405. package/dist/types/fx/viewCull.d.ts.map +1 -0
  406. package/dist/types/i18n/Translator.d.ts +52 -0
  407. package/dist/types/i18n/Translator.d.ts.map +1 -0
  408. package/dist/types/i18n/extractStrings.d.ts +25 -0
  409. package/dist/types/i18n/extractStrings.d.ts.map +1 -0
  410. package/dist/types/i18n/formatMessage.d.ts +10 -0
  411. package/dist/types/i18n/formatMessage.d.ts.map +1 -0
  412. package/dist/types/index.d.ts +164 -0
  413. package/dist/types/index.d.ts.map +1 -0
  414. package/dist/types/input/Actions.d.ts +100 -0
  415. package/dist/types/input/Actions.d.ts.map +1 -0
  416. package/dist/types/input/AimGesture.d.ts +106 -0
  417. package/dist/types/input/AimGesture.d.ts.map +1 -0
  418. package/dist/types/input/Keyboard.d.ts +30 -0
  419. package/dist/types/input/Keyboard.d.ts.map +1 -0
  420. package/dist/types/input/Keymap.d.ts +85 -0
  421. package/dist/types/input/Keymap.d.ts.map +1 -0
  422. package/dist/types/input/TargetLock.d.ts +56 -0
  423. package/dist/types/input/TargetLock.d.ts.map +1 -0
  424. package/dist/types/input/aimAxis.d.ts +9 -0
  425. package/dist/types/input/aimAxis.d.ts.map +1 -0
  426. package/dist/types/input/keyChord.d.ts +15 -0
  427. package/dist/types/input/keyChord.d.ts.map +1 -0
  428. package/dist/types/input/longPress.d.ts +21 -0
  429. package/dist/types/input/longPress.d.ts.map +1 -0
  430. package/dist/types/input/rumble.d.ts +41 -0
  431. package/dist/types/input/rumble.d.ts.map +1 -0
  432. package/dist/types/input/stickAxis.d.ts +26 -0
  433. package/dist/types/input/stickAxis.d.ts.map +1 -0
  434. package/dist/types/input/touchDetect.d.ts +18 -0
  435. package/dist/types/input/touchDetect.d.ts.map +1 -0
  436. package/dist/types/light/LightLayer.d.ts +65 -0
  437. package/dist/types/light/LightLayer.d.ts.map +1 -0
  438. package/dist/types/nav/MinHeap.d.ts +15 -0
  439. package/dist/types/nav/MinHeap.d.ts.map +1 -0
  440. package/dist/types/nav/findPath.d.ts +38 -0
  441. package/dist/types/nav/findPath.d.ts.map +1 -0
  442. package/dist/types/nav/navGrid.d.ts +48 -0
  443. package/dist/types/nav/navGrid.d.ts.map +1 -0
  444. package/dist/types/nav/nearestOpen.d.ts +8 -0
  445. package/dist/types/nav/nearestOpen.d.ts.map +1 -0
  446. package/dist/types/nav/straightenPath.d.ts +13 -0
  447. package/dist/types/nav/straightenPath.d.ts.map +1 -0
  448. package/dist/types/net/Connection.d.ts +88 -0
  449. package/dist/types/net/Connection.d.ts.map +1 -0
  450. package/dist/types/net/InterpolationBuffer.d.ts +36 -0
  451. package/dist/types/net/InterpolationBuffer.d.ts.map +1 -0
  452. package/dist/types/net/PredictedMover.d.ts +43 -0
  453. package/dist/types/net/PredictedMover.d.ts.map +1 -0
  454. package/dist/types/net/Room.d.ts +69 -0
  455. package/dist/types/net/Room.d.ts.map +1 -0
  456. package/dist/types/net/RoomHost.d.ts +74 -0
  457. package/dist/types/net/RoomHost.d.ts.map +1 -0
  458. package/dist/types/net/cadence.d.ts +22 -0
  459. package/dist/types/net/cadence.d.ts.map +1 -0
  460. package/dist/types/net/constants.d.ts +33 -0
  461. package/dist/types/net/constants.d.ts.map +1 -0
  462. package/dist/types/net/lobby/LobbyClient.d.ts +107 -0
  463. package/dist/types/net/lobby/LobbyClient.d.ts.map +1 -0
  464. package/dist/types/net/lobby/LobbyHost.d.ts +147 -0
  465. package/dist/types/net/lobby/LobbyHost.d.ts.map +1 -0
  466. package/dist/types/net/lobby/LobbyRooms.d.ts +56 -0
  467. package/dist/types/net/lobby/LobbyRooms.d.ts.map +1 -0
  468. package/dist/types/net/lobby/Matchmaker.d.ts +57 -0
  469. package/dist/types/net/lobby/Matchmaker.d.ts.map +1 -0
  470. package/dist/types/net/lobby/index.d.ts +6 -0
  471. package/dist/types/net/lobby/index.d.ts.map +1 -0
  472. package/dist/types/net/lobby/lobbyProtocol.d.ts +143 -0
  473. package/dist/types/net/lobby/lobbyProtocol.d.ts.map +1 -0
  474. package/dist/types/net/movement.d.ts +50 -0
  475. package/dist/types/net/movement.d.ts.map +1 -0
  476. package/dist/types/net/protocol.d.ts +59 -0
  477. package/dist/types/net/protocol.d.ts.map +1 -0
  478. package/dist/types/net/reconnect.d.ts +14 -0
  479. package/dist/types/net/reconnect.d.ts.map +1 -0
  480. package/dist/types/net/serverClock.d.ts +14 -0
  481. package/dist/types/net/serverClock.d.ts.map +1 -0
  482. package/dist/types/net/snapshotCodec.d.ts +55 -0
  483. package/dist/types/net/snapshotCodec.d.ts.map +1 -0
  484. package/dist/types/parallax/Parallax.d.ts +37 -0
  485. package/dist/types/parallax/Parallax.d.ts.map +1 -0
  486. package/dist/types/parallax/ParallaxLayer.d.ts +80 -0
  487. package/dist/types/parallax/ParallaxLayer.d.ts.map +1 -0
  488. package/dist/types/parallax/parallaxMath.d.ts +50 -0
  489. package/dist/types/parallax/parallaxMath.d.ts.map +1 -0
  490. package/dist/types/particles/Emitter.d.ts +97 -0
  491. package/dist/types/particles/Emitter.d.ts.map +1 -0
  492. package/dist/types/particles/ParticleBudget.d.ts +28 -0
  493. package/dist/types/particles/ParticleBudget.d.ts.map +1 -0
  494. package/dist/types/particles/ParticleSim.d.ts +38 -0
  495. package/dist/types/particles/ParticleSim.d.ts.map +1 -0
  496. package/dist/types/particles/particleCurves.d.ts +21 -0
  497. package/dist/types/particles/particleCurves.d.ts.map +1 -0
  498. package/dist/types/particles/particleSampling.d.ts +20 -0
  499. package/dist/types/particles/particleSampling.d.ts.map +1 -0
  500. package/dist/types/physics/Body.d.ts +130 -0
  501. package/dist/types/physics/Body.d.ts.map +1 -0
  502. package/dist/types/physics/BroadPhase.d.ts +26 -0
  503. package/dist/types/physics/BroadPhase.d.ts.map +1 -0
  504. package/dist/types/physics/Contact.d.ts +62 -0
  505. package/dist/types/physics/Contact.d.ts.map +1 -0
  506. package/dist/types/physics/ContactSolver.d.ts +29 -0
  507. package/dist/types/physics/ContactSolver.d.ts.map +1 -0
  508. package/dist/types/physics/PhysicsWorld.d.ts +78 -0
  509. package/dist/types/physics/PhysicsWorld.d.ts.map +1 -0
  510. package/dist/types/physics/PhysicsWorldOptions.d.ts +24 -0
  511. package/dist/types/physics/PhysicsWorldOptions.d.ts.map +1 -0
  512. package/dist/types/physics/SpatialHash.d.ts +23 -0
  513. package/dist/types/physics/SpatialHash.d.ts.map +1 -0
  514. package/dist/types/physics/collide.d.ts +27 -0
  515. package/dist/types/physics/collide.d.ts.map +1 -0
  516. package/dist/types/physics/collidePolygon.d.ts +14 -0
  517. package/dist/types/physics/collidePolygon.d.ts.map +1 -0
  518. package/dist/types/physics/contactReport.d.ts +8 -0
  519. package/dist/types/physics/contactReport.d.ts.map +1 -0
  520. package/dist/types/physics/drawColliders.d.ts +43 -0
  521. package/dist/types/physics/drawColliders.d.ts.map +1 -0
  522. package/dist/types/physics/physicsSystem.d.ts +5 -0
  523. package/dist/types/physics/physicsSystem.d.ts.map +1 -0
  524. package/dist/types/physics/polygon.d.ts +28 -0
  525. package/dist/types/physics/polygon.d.ts.map +1 -0
  526. package/dist/types/physics/raycast.d.ts +19 -0
  527. package/dist/types/physics/raycast.d.ts.map +1 -0
  528. package/dist/types/physics/syncToBody.d.ts +16 -0
  529. package/dist/types/physics/syncToBody.d.ts.map +1 -0
  530. package/dist/types/physics/tileBodies.d.ts +36 -0
  531. package/dist/types/physics/tileBodies.d.ts.map +1 -0
  532. package/dist/types/physics/types.d.ts +116 -0
  533. package/dist/types/physics/types.d.ts.map +1 -0
  534. package/dist/types/pixel/Darkness.d.ts +90 -0
  535. package/dist/types/pixel/Darkness.d.ts.map +1 -0
  536. package/dist/types/pixel/DitherVignette.d.ts +35 -0
  537. package/dist/types/pixel/DitherVignette.d.ts.map +1 -0
  538. package/dist/types/pixel/Evaporation.d.ts +30 -0
  539. package/dist/types/pixel/Evaporation.d.ts.map +1 -0
  540. package/dist/types/pixel/NightShade.d.ts +38 -0
  541. package/dist/types/pixel/NightShade.d.ts.map +1 -0
  542. package/dist/types/pixel/PixelLayer.d.ts +85 -0
  543. package/dist/types/pixel/PixelLayer.d.ts.map +1 -0
  544. package/dist/types/pixel/PixelMarks.d.ts +68 -0
  545. package/dist/types/pixel/PixelMarks.d.ts.map +1 -0
  546. package/dist/types/pixel/SwayProp.d.ts +52 -0
  547. package/dist/types/pixel/SwayProp.d.ts.map +1 -0
  548. package/dist/types/pixel/aimPixels.d.ts +23 -0
  549. package/dist/types/pixel/aimPixels.d.ts.map +1 -0
  550. package/dist/types/pixel/index.d.ts +33 -0
  551. package/dist/types/pixel/index.d.ts.map +1 -0
  552. package/dist/types/pixel/lights.d.ts +34 -0
  553. package/dist/types/pixel/lights.d.ts.map +1 -0
  554. package/dist/types/pixel/nineSlice.d.ts +71 -0
  555. package/dist/types/pixel/nineSlice.d.ts.map +1 -0
  556. package/dist/types/pixel/paintLayer.d.ts +35 -0
  557. package/dist/types/pixel/paintLayer.d.ts.map +1 -0
  558. package/dist/types/pixel/palette.d.ts +58 -0
  559. package/dist/types/pixel/palette.d.ts.map +1 -0
  560. package/dist/types/pixel/pixel.d.ts +80 -0
  561. package/dist/types/pixel/pixel.d.ts.map +1 -0
  562. package/dist/types/pixel/pixelPaint.d.ts +44 -0
  563. package/dist/types/pixel/pixelPaint.d.ts.map +1 -0
  564. package/dist/types/pixel/pixelParticles.d.ts +21 -0
  565. package/dist/types/pixel/pixelParticles.d.ts.map +1 -0
  566. package/dist/types/pixel/pixelTone.d.ts +51 -0
  567. package/dist/types/pixel/pixelTone.d.ts.map +1 -0
  568. package/dist/types/pixel/propKit.d.ts +26 -0
  569. package/dist/types/pixel/propKit.d.ts.map +1 -0
  570. package/dist/types/pixel/ramp.d.ts +57 -0
  571. package/dist/types/pixel/ramp.d.ts.map +1 -0
  572. package/dist/types/pixel/selout.d.ts +3 -0
  573. package/dist/types/pixel/selout.d.ts.map +1 -0
  574. package/dist/types/pixel/spritePixels.d.ts +29 -0
  575. package/dist/types/pixel/spritePixels.d.ts.map +1 -0
  576. package/dist/types/pixel/swayRig.d.ts +72 -0
  577. package/dist/types/pixel/swayRig.d.ts.map +1 -0
  578. package/dist/types/pixel/vignetteMask.d.ts +16 -0
  579. package/dist/types/pixel/vignetteMask.d.ts.map +1 -0
  580. package/dist/types/pixel/weatherArt.d.ts +29 -0
  581. package/dist/types/pixel/weatherArt.d.ts.map +1 -0
  582. package/dist/types/platform/appResume.d.ts +25 -0
  583. package/dist/types/platform/appResume.d.ts.map +1 -0
  584. package/dist/types/platform/fullscreen.d.ts +37 -0
  585. package/dist/types/platform/fullscreen.d.ts.map +1 -0
  586. package/dist/types/platform/orientation.d.ts +19 -0
  587. package/dist/types/platform/orientation.d.ts.map +1 -0
  588. package/dist/types/platform/pointerLock.d.ts +26 -0
  589. package/dist/types/platform/pointerLock.d.ts.map +1 -0
  590. package/dist/types/platform/reducedMotion.d.ts +20 -0
  591. package/dist/types/platform/reducedMotion.d.ts.map +1 -0
  592. package/dist/types/platform/timeoutSignal.d.ts +6 -0
  593. package/dist/types/platform/timeoutSignal.d.ts.map +1 -0
  594. package/dist/types/platform/touch.d.ts +10 -0
  595. package/dist/types/platform/touch.d.ts.map +1 -0
  596. package/dist/types/postfx/BloomFilter.d.ts +33 -0
  597. package/dist/types/postfx/BloomFilter.d.ts.map +1 -0
  598. package/dist/types/postfx/ChromaticAberrationFilter.d.ts +11 -0
  599. package/dist/types/postfx/ChromaticAberrationFilter.d.ts.map +1 -0
  600. package/dist/types/postfx/ColorAdjustFilter.d.ts +32 -0
  601. package/dist/types/postfx/ColorAdjustFilter.d.ts.map +1 -0
  602. package/dist/types/postfx/CrtFilter.d.ts +16 -0
  603. package/dist/types/postfx/CrtFilter.d.ts.map +1 -0
  604. package/dist/types/postfx/PixelateFilter.d.ts +8 -0
  605. package/dist/types/postfx/PixelateFilter.d.ts.map +1 -0
  606. package/dist/types/postfx/PostFx.d.ts +92 -0
  607. package/dist/types/postfx/PostFx.d.ts.map +1 -0
  608. package/dist/types/postfx/ShockwaveFilter.d.ts +20 -0
  609. package/dist/types/postfx/ShockwaveFilter.d.ts.map +1 -0
  610. package/dist/types/postfx/VignetteFilter.d.ts +19 -0
  611. package/dist/types/postfx/VignetteFilter.d.ts.map +1 -0
  612. package/dist/types/postfx/fxAnimator.d.ts +32 -0
  613. package/dist/types/postfx/fxAnimator.d.ts.map +1 -0
  614. package/dist/types/postfx/fxShader.d.ts +49 -0
  615. package/dist/types/postfx/fxShader.d.ts.map +1 -0
  616. package/dist/types/postfx/index.d.ts +11 -0
  617. package/dist/types/postfx/index.d.ts.map +1 -0
  618. package/dist/types/react/ChoiceDialog.d.ts +8 -0
  619. package/dist/types/react/ChoiceDialog.d.ts.map +1 -0
  620. package/dist/types/react/ConfirmDialog.d.ts +9 -0
  621. package/dist/types/react/ConfirmDialog.d.ts.map +1 -0
  622. package/dist/types/react/Glyph.d.ts +54 -0
  623. package/dist/types/react/Glyph.d.ts.map +1 -0
  624. package/dist/types/react/Modal.d.ts +22 -0
  625. package/dist/types/react/Modal.d.ts.map +1 -0
  626. package/dist/types/react/Panel.d.ts +29 -0
  627. package/dist/types/react/Panel.d.ts.map +1 -0
  628. package/dist/types/react/PixelImage.d.ts +19 -0
  629. package/dist/types/react/PixelImage.d.ts.map +1 -0
  630. package/dist/types/react/Select.d.ts +27 -0
  631. package/dist/types/react/Select.d.ts.map +1 -0
  632. package/dist/types/react/Slider.d.ts +24 -0
  633. package/dist/types/react/Slider.d.ts.map +1 -0
  634. package/dist/types/react/SplitPane.d.ts +26 -0
  635. package/dist/types/react/SplitPane.d.ts.map +1 -0
  636. package/dist/types/react/TabStrip.d.ts +31 -0
  637. package/dist/types/react/TabStrip.d.ts.map +1 -0
  638. package/dist/types/react/TitleTips.d.ts +15 -0
  639. package/dist/types/react/TitleTips.d.ts.map +1 -0
  640. package/dist/types/react/Tooltip.d.ts +22 -0
  641. package/dist/types/react/Tooltip.d.ts.map +1 -0
  642. package/dist/types/react/UiProvider.d.ts +52 -0
  643. package/dist/types/react/UiProvider.d.ts.map +1 -0
  644. package/dist/types/react/baseCss.d.ts +27 -0
  645. package/dist/types/react/baseCss.d.ts.map +1 -0
  646. package/dist/types/react/choiceStore.d.ts +34 -0
  647. package/dist/types/react/choiceStore.d.ts.map +1 -0
  648. package/dist/types/react/classNames.d.ts +12 -0
  649. package/dist/types/react/classNames.d.ts.map +1 -0
  650. package/dist/types/react/confirmStore.d.ts +30 -0
  651. package/dist/types/react/confirmStore.d.ts.map +1 -0
  652. package/dist/types/react/index.d.ts +33 -0
  653. package/dist/types/react/index.d.ts.map +1 -0
  654. package/dist/types/react/labels.d.ts +24 -0
  655. package/dist/types/react/labels.d.ts.map +1 -0
  656. package/dist/types/react/placement.d.ts +59 -0
  657. package/dist/types/react/placement.d.ts.map +1 -0
  658. package/dist/types/react/useFillSheet.d.ts +9 -0
  659. package/dist/types/react/useFillSheet.d.ts.map +1 -0
  660. package/dist/types/react/useFitToViewport.d.ts +20 -0
  661. package/dist/types/react/useFitToViewport.d.ts.map +1 -0
  662. package/dist/types/react/usePicked.d.ts +9 -0
  663. package/dist/types/react/usePicked.d.ts.map +1 -0
  664. package/dist/types/react/useStore.d.ts +8 -0
  665. package/dist/types/react/useStore.d.ts.map +1 -0
  666. package/dist/types/react/useViewport.d.ts +4 -0
  667. package/dist/types/react/useViewport.d.ts.map +1 -0
  668. package/dist/types/rig/PosePlayer.d.ts +64 -0
  669. package/dist/types/rig/PosePlayer.d.ts.map +1 -0
  670. package/dist/types/rig/RigView.d.ts +68 -0
  671. package/dist/types/rig/RigView.d.ts.map +1 -0
  672. package/dist/types/rig/Skeleton.d.ts +14 -0
  673. package/dist/types/rig/Skeleton.d.ts.map +1 -0
  674. package/dist/types/rig/humanoid.d.ts +4 -0
  675. package/dist/types/rig/humanoid.d.ts.map +1 -0
  676. package/dist/types/rig/humanoidPoses.d.ts +117 -0
  677. package/dist/types/rig/humanoidPoses.d.ts.map +1 -0
  678. package/dist/types/rig/poseMath.d.ts +14 -0
  679. package/dist/types/rig/poseMath.d.ts.map +1 -0
  680. package/dist/types/rig/rigTypes.d.ts +82 -0
  681. package/dist/types/rig/rigTypes.d.ts.map +1 -0
  682. package/dist/types/save/Autosaver.d.ts +43 -0
  683. package/dist/types/save/Autosaver.d.ts.map +1 -0
  684. package/dist/types/save/MemoryBackend.d.ts +10 -0
  685. package/dist/types/save/MemoryBackend.d.ts.map +1 -0
  686. package/dist/types/save/SaveBackend.d.ts +14 -0
  687. package/dist/types/save/SaveBackend.d.ts.map +1 -0
  688. package/dist/types/save/SaveStore.d.ts +73 -0
  689. package/dist/types/save/SaveStore.d.ts.map +1 -0
  690. package/dist/types/save/WebStorageBackend.d.ts +14 -0
  691. package/dist/types/save/WebStorageBackend.d.ts.map +1 -0
  692. package/dist/types/save/checksum.d.ts +7 -0
  693. package/dist/types/save/checksum.d.ts.map +1 -0
  694. package/dist/types/save/migrateSave.d.ts +17 -0
  695. package/dist/types/save/migrateSave.d.ts.map +1 -0
  696. package/dist/types/settings.d.ts +25 -0
  697. package/dist/types/settings.d.ts.map +1 -0
  698. package/dist/types/tilemap/TilemapView.d.ts +42 -0
  699. package/dist/types/tilemap/TilemapView.d.ts.map +1 -0
  700. package/dist/types/tilemap/collision.d.ts +16 -0
  701. package/dist/types/tilemap/collision.d.ts.map +1 -0
  702. package/dist/types/tilemap/tiled.d.ts +104 -0
  703. package/dist/types/tilemap/tiled.d.ts.map +1 -0
  704. package/dist/types/transitions/CrossfadeTransition.d.ts +20 -0
  705. package/dist/types/transitions/CrossfadeTransition.d.ts.map +1 -0
  706. package/dist/types/transitions/DitherWipeTransition.d.ts +35 -0
  707. package/dist/types/transitions/DitherWipeTransition.d.ts.map +1 -0
  708. package/dist/types/transitions/FadeTransition.d.ts +20 -0
  709. package/dist/types/transitions/FadeTransition.d.ts.map +1 -0
  710. package/dist/types/transitions/Letterbox.d.ts +33 -0
  711. package/dist/types/transitions/Letterbox.d.ts.map +1 -0
  712. package/dist/types/transitions/Transition.d.ts +22 -0
  713. package/dist/types/transitions/Transition.d.ts.map +1 -0
  714. package/dist/types/transitions/ditherMask.d.ts +13 -0
  715. package/dist/types/transitions/ditherMask.d.ts.map +1 -0
  716. package/dist/types/transitions/transitionTo.d.ts +16 -0
  717. package/dist/types/transitions/transitionTo.d.ts.map +1 -0
  718. package/dist/types/transitions/tweenDone.d.ts +5 -0
  719. package/dist/types/transitions/tweenDone.d.ts.map +1 -0
  720. package/dist/types/ui/Bar.d.ts +41 -0
  721. package/dist/types/ui/Bar.d.ts.map +1 -0
  722. package/dist/types/ui/Button.d.ts +47 -0
  723. package/dist/types/ui/Button.d.ts.map +1 -0
  724. package/dist/types/ui/Dialog.d.ts +47 -0
  725. package/dist/types/ui/Dialog.d.ts.map +1 -0
  726. package/dist/types/ui/FocusManager.d.ts +53 -0
  727. package/dist/types/ui/FocusManager.d.ts.map +1 -0
  728. package/dist/types/ui/Label.d.ts +24 -0
  729. package/dist/types/ui/Label.d.ts.map +1 -0
  730. package/dist/types/ui/List.d.ts +23 -0
  731. package/dist/types/ui/List.d.ts.map +1 -0
  732. package/dist/types/ui/Panel.d.ts +38 -0
  733. package/dist/types/ui/Panel.d.ts.map +1 -0
  734. package/dist/types/ui/ScrollView.d.ts +56 -0
  735. package/dist/types/ui/ScrollView.d.ts.map +1 -0
  736. package/dist/types/ui/Slider.d.ts +47 -0
  737. package/dist/types/ui/Slider.d.ts.map +1 -0
  738. package/dist/types/ui/Stack.d.ts +16 -0
  739. package/dist/types/ui/Stack.d.ts.map +1 -0
  740. package/dist/types/ui/Toggle.d.ts +31 -0
  741. package/dist/types/ui/Toggle.d.ts.map +1 -0
  742. package/dist/types/ui/UiHost.d.ts +18 -0
  743. package/dist/types/ui/UiHost.d.ts.map +1 -0
  744. package/dist/types/ui/UiPointerGate.d.ts +17 -0
  745. package/dist/types/ui/UiPointerGate.d.ts.map +1 -0
  746. package/dist/types/ui/UiRoot.d.ts +73 -0
  747. package/dist/types/ui/UiRoot.d.ts.map +1 -0
  748. package/dist/types/ui/Widget.d.ts +56 -0
  749. package/dist/types/ui/Widget.d.ts.map +1 -0
  750. package/dist/types/ui/dom/DomOverlay.d.ts +52 -0
  751. package/dist/types/ui/dom/DomOverlay.d.ts.map +1 -0
  752. package/dist/types/ui/dom/DomWorldAnchors.d.ts +50 -0
  753. package/dist/types/ui/dom/DomWorldAnchors.d.ts.map +1 -0
  754. package/dist/types/ui/dom/InputShield.d.ts +20 -0
  755. package/dist/types/ui/dom/InputShield.d.ts.map +1 -0
  756. package/dist/types/ui/dom/createStore.d.ts +22 -0
  757. package/dist/types/ui/dom/createStore.d.ts.map +1 -0
  758. package/dist/types/ui/dom/shieldDecision.d.ts +34 -0
  759. package/dist/types/ui/dom/shieldDecision.d.ts.map +1 -0
  760. package/dist/types/ui/dom/worldToScreen.d.ts +24 -0
  761. package/dist/types/ui/dom/worldToScreen.d.ts.map +1 -0
  762. package/dist/types/ui/index.d.ts +42 -0
  763. package/dist/types/ui/index.d.ts.map +1 -0
  764. package/dist/types/ui/layout/anchor.d.ts +9 -0
  765. package/dist/types/ui/layout/anchor.d.ts.map +1 -0
  766. package/dist/types/ui/layout/barDrain.d.ts +25 -0
  767. package/dist/types/ui/layout/barDrain.d.ts.map +1 -0
  768. package/dist/types/ui/layout/fitToViewport.d.ts +32 -0
  769. package/dist/types/ui/layout/fitToViewport.d.ts.map +1 -0
  770. package/dist/types/ui/layout/focusNav.d.ts +13 -0
  771. package/dist/types/ui/layout/focusNav.d.ts.map +1 -0
  772. package/dist/types/ui/layout/geometry.d.ts +35 -0
  773. package/dist/types/ui/layout/geometry.d.ts.map +1 -0
  774. package/dist/types/ui/layout/listWidth.d.ts +13 -0
  775. package/dist/types/ui/layout/listWidth.d.ts.map +1 -0
  776. package/dist/types/ui/layout/placeTooltip.d.ts +23 -0
  777. package/dist/types/ui/layout/placeTooltip.d.ts.map +1 -0
  778. package/dist/types/ui/layout/scroll.d.ts +17 -0
  779. package/dist/types/ui/layout/scroll.d.ts.map +1 -0
  780. package/dist/types/ui/layout/slider.d.ts +7 -0
  781. package/dist/types/ui/layout/slider.d.ts.map +1 -0
  782. package/dist/types/ui/layout/stack.d.ts +26 -0
  783. package/dist/types/ui/layout/stack.d.ts.map +1 -0
  784. package/dist/types/ui/layout/wrapRow.d.ts +6 -0
  785. package/dist/types/ui/layout/wrapRow.d.ts.map +1 -0
  786. package/dist/types/ui/rich/RichText.d.ts +48 -0
  787. package/dist/types/ui/rich/RichText.d.ts.map +1 -0
  788. package/dist/types/ui/rich/richFonts.d.ts +70 -0
  789. package/dist/types/ui/rich/richFonts.d.ts.map +1 -0
  790. package/dist/types/ui/rich/richLayout.d.ts +76 -0
  791. package/dist/types/ui/rich/richLayout.d.ts.map +1 -0
  792. package/dist/types/ui/rich/richMarkup.d.ts +48 -0
  793. package/dist/types/ui/rich/richMarkup.d.ts.map +1 -0
  794. package/dist/ui/Bar.js +53 -0
  795. package/dist/ui/Button.js +57 -0
  796. package/dist/ui/Dialog.js +55 -0
  797. package/dist/ui/FocusManager.js +96 -0
  798. package/dist/ui/Label.js +35 -0
  799. package/dist/ui/List.js +44 -0
  800. package/dist/ui/Panel.js +37 -0
  801. package/dist/ui/ScrollView.js +95 -0
  802. package/dist/ui/Slider.js +54 -0
  803. package/dist/ui/Stack.js +27 -0
  804. package/dist/ui/Toggle.js +36 -0
  805. package/dist/ui/UiHost.js +8 -0
  806. package/dist/ui/UiPointerGate.js +24 -0
  807. package/dist/ui/UiRoot.js +92 -0
  808. package/dist/ui/Widget.js +89 -0
  809. package/dist/ui/dom/DomOverlay.js +58 -0
  810. package/dist/ui/dom/DomWorldAnchors.js +58 -0
  811. package/dist/ui/dom/InputShield.js +26 -0
  812. package/dist/ui/dom/createStore.js +41 -0
  813. package/dist/ui/dom/shieldDecision.js +35 -0
  814. package/dist/ui/dom/worldToScreen.js +10 -0
  815. package/dist/ui/layout/anchor.js +19 -0
  816. package/dist/ui/layout/barDrain.js +24 -0
  817. package/dist/ui/layout/fitToViewport.js +16 -0
  818. package/dist/ui/layout/focusNav.js +41 -0
  819. package/dist/ui/layout/geometry.js +20 -0
  820. package/dist/ui/layout/listWidth.js +9 -0
  821. package/dist/ui/layout/placeTooltip.js +27 -0
  822. package/dist/ui/layout/scroll.js +23 -0
  823. package/dist/ui/layout/slider.js +19 -0
  824. package/dist/ui/layout/stack.js +26 -0
  825. package/dist/ui/layout/wrapRow.js +12 -0
  826. package/dist/ui/rich/RichText.js +87 -0
  827. package/dist/ui/rich/richFonts.js +105 -0
  828. package/dist/ui/rich/richLayout.js +132 -0
  829. package/dist/ui/rich/richMarkup.js +67 -0
  830. package/dist/ui.js +95 -0
  831. package/package.json +112 -4
@@ -0,0 +1,35 @@
1
+ import { inView as C } from "../fx/viewCull.js";
2
+ import { addPixelLayer as w } from "./PixelLayer.js";
3
+ import { setCoverage as M, beginBatch as R, endBatch as U } from "./pixelTone.js";
4
+ const _ = 64, b = 192;
5
+ function O(o, a) {
6
+ const { at: v, duration: n, paint: x, alive: f } = a, s = a.depth ?? ((t) => t + 45), h = 1e3 / (a.fps ?? 12), l = a.every ?? 1, c = Math.min(a.fadeMs ?? 260, n * 0.3), e = w(o);
7
+ a.onCreate?.(e);
8
+ const y = { elapsed: 0 };
9
+ let i = -1, p = b;
10
+ const d = o.cameras.main, u = () => {
11
+ if (f && !f()) {
12
+ e.destroy();
13
+ return;
14
+ }
15
+ const t = v();
16
+ e.setPosition(d.snap(t.x), d.snap(t.y)).setDepth(typeof s == "number" ? s : s(t.y));
17
+ let r = Math.floor(y.elapsed / h);
18
+ if (l > 1 && (r -= r % l), r === i || i >= 0 && !C(d, t.x, t.y, _ + Math.max(p, e.reach()))) return;
19
+ i = r, e.clear();
20
+ const m = Math.min(n, r * h);
21
+ M(c > 0 && m > n - c ? Math.max(0, (n - m) / c) * 0.85 + 0.15 : 1), R(e);
22
+ try {
23
+ x(e, m);
24
+ } finally {
25
+ U(), M(1);
26
+ }
27
+ e.present(), p = Math.max(p, e.reach());
28
+ };
29
+ if (u(), !e.active) return e;
30
+ const L = o.tweens.add({ targets: y, elapsed: n, duration: n, onUpdate: u, onComplete: () => e.destroy() });
31
+ return e.once("destroyed", () => L.remove()), e;
32
+ }
33
+ export {
34
+ O as paintLayer
35
+ };
@@ -0,0 +1,56 @@
1
+ import { hex as a } from "./pixel.js";
2
+ const r = {
3
+ outline: a("#1a1220"),
4
+ outlineSoft: a("#2e2233"),
5
+ black: a("#0e0b12"),
6
+ white: a("#f4f0e8"),
7
+ offWhite: a("#e2dccf"),
8
+ skin: a("#f2c59a"),
9
+ skinShade: a("#d99d74"),
10
+ skinTan: a("#cf9468"),
11
+ skinTanShade: a("#a86c48"),
12
+ blush: a("#e88c80"),
13
+ hairBlack: a("#2a2230"),
14
+ hairBrown: a("#5b3a29"),
15
+ hairAuburn: a("#7a3b2a"),
16
+ hairWhite: a("#e8e4dc"),
17
+ hairGrey: a("#9a96a0"),
18
+ red: a("#c8373a"),
19
+ redDark: a("#8e2331"),
20
+ crimson: a("#a3243b"),
21
+ orange: a("#e07a36"),
22
+ gold: a("#f2c84b"),
23
+ goldDark: a("#b88a2a"),
24
+ yellow: a("#f5e06a"),
25
+ green: a("#5aa04a"),
26
+ greenDark: a("#2f6b3a"),
27
+ jade: a("#4fbf8f"),
28
+ jadeDark: a("#2d8466"),
29
+ teal: a("#3aa6a0"),
30
+ sky: a("#7ec4f0"),
31
+ azure: a("#4a8ad4"),
32
+ blue: a("#3560b0"),
33
+ navy: a("#27335e"),
34
+ indigo: a("#3b2f6e"),
35
+ purple: a("#7a4bb0"),
36
+ pink: a("#e89aaa"),
37
+ brown: a("#7a5234"),
38
+ brownDark: a("#4e3222"),
39
+ brownLight: a("#a6784a"),
40
+ tan: a("#c9a26e"),
41
+ cream: a("#efe2c0"),
42
+ grey: a("#8a8690"),
43
+ greyDark: a("#57535e"),
44
+ greyLight: a("#bdb9c2"),
45
+ steel: a("#c8d2dc"),
46
+ steelDark: a("#7f8a98"),
47
+ iron: a("#9aa0a8"),
48
+ wood: a("#9a6a3c"),
49
+ woodDark: a("#6a4426"),
50
+ woodLight: a("#bd8c56"),
51
+ straw: a("#d8b060"),
52
+ strawDark: a("#a8823e")
53
+ };
54
+ export {
55
+ r as P
56
+ };
@@ -0,0 +1,277 @@
1
+ const D = 0;
2
+ function b(r, t, n, h = 255) {
3
+ const s = Math.max(0, Math.min(255, Math.round(r))), o = Math.max(0, Math.min(255, Math.round(t))), i = Math.max(0, Math.min(255, Math.round(n)));
4
+ return (Math.max(0, Math.min(255, Math.round(h))) << 24 | i << 16 | o << 8 | s) >>> 0;
5
+ }
6
+ function U(r) {
7
+ let t = r.startsWith("#") ? r.slice(1) : r;
8
+ t.length === 3 && (t = [...t].map((i) => i + i).join(""));
9
+ const n = parseInt(t.slice(0, 2), 16), h = parseInt(t.slice(2, 4), 16), s = parseInt(t.slice(4, 6), 16), o = t.length >= 8 ? parseInt(t.slice(6, 8), 16) : 255;
10
+ return b(n, h, s, o);
11
+ }
12
+ function m(r) {
13
+ return [r & 255, r >>> 8 & 255, r >>> 16 & 255, r >>> 24 & 255];
14
+ }
15
+ function B(r, t) {
16
+ const [n, h, s, o] = m(r);
17
+ if (t >= 1) {
18
+ const i = Math.min(1, t - 1);
19
+ return b(n + (255 - n) * i, h + (255 - h) * i, s + (255 - s) * i, o);
20
+ }
21
+ return b(n * t, h * t, s * t, o);
22
+ }
23
+ function L(r, t, n) {
24
+ const h = m(r), s = m(t);
25
+ return b(h[0] + (s[0] - h[0]) * n, h[1] + (s[1] - h[1]) * n, h[2] + (s[2] - h[2]) * n, h[3] + (s[3] - h[3]) * n);
26
+ }
27
+ function R(r, t) {
28
+ const [n, h, s] = m(r);
29
+ return b(n, h, s, t);
30
+ }
31
+ function $(r) {
32
+ const [t, n, h, s] = m(r);
33
+ return `rgba(${t},${n},${h},${(s / 255).toFixed(3)})`;
34
+ }
35
+ function C(r, t, n = 0) {
36
+ let h = r * 374761393 + t * 668265263 + n * 2147483647 | 0;
37
+ return h = Math.imul(h ^ h >>> 13, 1274126177), ((h ^ h >>> 16) >>> 0) / 4294967296;
38
+ }
39
+ function v(r) {
40
+ let t = r >>> 0;
41
+ return () => {
42
+ t = t + 1831565813 >>> 0;
43
+ let n = t;
44
+ return n = Math.imul(n ^ n >>> 15, n | 1), n ^= n + Math.imul(n ^ n >>> 7, n | 61), ((n ^ n >>> 14) >>> 0) / 4294967296;
45
+ };
46
+ }
47
+ function S(r, t, n, h) {
48
+ const s = r / n, o = t / n, i = Math.floor(s), e = Math.floor(o), l = s - i, c = o - e, M = l * l * (3 - 2 * l), d = c * c * (3 - 2 * c), w = C(i, e, h), a = C(i + 1, e, h), u = C(i, e + 1, h), f = C(i + 1, e + 1, h);
49
+ return w + (a - w) * M + (u - w) * d + (w - a - u + f) * M * d;
50
+ }
51
+ class A {
52
+ constructor(t, n) {
53
+ this.w = t, this.h = n, this.data = new Uint32Array(t * n);
54
+ }
55
+ w;
56
+ h;
57
+ data;
58
+ inBounds(t, n) {
59
+ return t >= 0 && n >= 0 && t < this.w && n < this.h;
60
+ }
61
+ px(t, n, h) {
62
+ t = Math.floor(t), n = Math.floor(n), t >= 0 && n >= 0 && t < this.w && n < this.h && (this.data[n * this.w + t] = h);
63
+ }
64
+ get(t, n) {
65
+ return t < 0 || n < 0 || t >= this.w || n >= this.h ? 0 : this.data[n * this.w + t] ?? 0;
66
+ }
67
+ alphaAt(t, n) {
68
+ return this.get(t, n) >>> 24;
69
+ }
70
+ rect(t, n, h, s, o) {
71
+ for (let i = Math.floor(n); i < n + s; i++) for (let e = Math.floor(t); e < t + h; e++) this.px(e, i, o);
72
+ }
73
+ hline(t, n, h, s) {
74
+ for (let o = Math.min(t, n); o <= Math.max(t, n); o++) this.px(o, h, s);
75
+ }
76
+ vline(t, n, h, s) {
77
+ for (let o = Math.min(n, h); o <= Math.max(n, h); o++) this.px(t, o, s);
78
+ }
79
+ /** Filled ellipse; a pixel is inside when its center lies inside the ellipse. */
80
+ ellipse(t, n, h, s, o) {
81
+ if (!(h <= 0 || s <= 0))
82
+ for (let i = Math.floor(n - s); i <= Math.ceil(n + s); i++)
83
+ for (let e = Math.floor(t - h); e <= Math.ceil(t + h); e++) {
84
+ const l = (e + 0.5 - t) / h, c = (i + 0.5 - n) / s;
85
+ l * l + c * c <= 1 && this.px(e, i, o);
86
+ }
87
+ }
88
+ circle(t, n, h, s) {
89
+ this.ellipse(t, n, h, h, s);
90
+ }
91
+ ring(t, n, h, s, o) {
92
+ for (let i = Math.floor(n - h - 1); i <= Math.ceil(n + h + 1); i++)
93
+ for (let e = Math.floor(t - h - 1); e <= Math.ceil(t + h + 1); e++) {
94
+ const l = Math.hypot(e + 0.5 - t, i + 0.5 - n);
95
+ l <= h && l >= h - s && this.px(e, i, o);
96
+ }
97
+ }
98
+ line(t, n, h, s, o, i = 1) {
99
+ t = Math.round(t), n = Math.round(n), h = Math.round(h), s = Math.round(s);
100
+ const e = Math.abs(h - t), l = -Math.abs(s - n), c = t < h ? 1 : -1, M = n < s ? 1 : -1;
101
+ let d = e + l;
102
+ for (; i <= 1 ? this.px(t, n, o) : this.rect(t - Math.floor((i - 1) / 2), n - Math.floor((i - 1) / 2), i, i, o), !(t === h && n === s); ) {
103
+ const w = 2 * d;
104
+ w >= l && (d += l, t += c), w <= e && (d += e, n += M);
105
+ }
106
+ }
107
+ /** Filled polygon (even-odd scanline on pixel centers). */
108
+ poly(t, n) {
109
+ if (t.length < 3) return;
110
+ const h = Math.floor(Math.min(...t.map((o) => o[1]))), s = Math.ceil(Math.max(...t.map((o) => o[1])));
111
+ for (let o = h; o <= s; o++) {
112
+ const i = o + 0.5, e = [];
113
+ for (let l = 0; l < t.length; l++) {
114
+ const c = t[l], M = t[(l + 1) % t.length];
115
+ (c[1] <= i && M[1] > i || M[1] <= i && c[1] > i) && e.push(c[0] + (i - c[1]) / (M[1] - c[1]) * (M[0] - c[0]));
116
+ }
117
+ e.sort((l, c) => l - c);
118
+ for (let l = 0; l + 1 < e.length; l += 2)
119
+ for (let c = Math.ceil(e[l] - 0.5); c <= Math.floor(e[l + 1] - 0.5); c++) this.px(c, o, n);
120
+ }
121
+ }
122
+ /**
123
+ * Adds `width` pixels of outline around all opaque pixels, one ring at a time — the same result as calling it
124
+ * `width` times, but each ring only visits the neighbours of the ring before it instead of the whole grid again.
125
+ * (A pixel next to ring `k` is always filled by ring `k+1`, so nothing further back can still be waiting.)
126
+ */
127
+ outline(t, n = !1, h = 1) {
128
+ const s = this.w, o = this.h, i = new Uint8Array(this.data.length);
129
+ let e = s, l = o, c = -1, M = -1;
130
+ for (let a = 0; a < o; a++)
131
+ for (let u = 0; u < s; u++) {
132
+ const f = a * s + u;
133
+ this.data[f] >>> 24 && (i[f] = 1, u < e && (e = u), u > c && (c = u), a < l && (l = a), M = a);
134
+ }
135
+ if (c < 0) return;
136
+ const d = (a, u, f) => a >= 0 && u >= 0 && a < s && u < o && i[f] === 1;
137
+ let w = [];
138
+ for (let a = Math.max(0, l - 1); a <= Math.min(o - 1, M + 1); a++)
139
+ for (let u = Math.max(0, e - 1); u <= Math.min(s - 1, c + 1); u++) {
140
+ const f = a * s + u;
141
+ if (i[f]) continue;
142
+ let g = d(u - 1, a, f - 1) || d(u + 1, a, f + 1) || d(u, a - 1, f - s) || d(u, a + 1, f + s);
143
+ !g && n && (g = d(u - 1, a - 1, f - s - 1) || d(u + 1, a - 1, f - s + 1) || d(u - 1, a + 1, f + s - 1) || d(u + 1, a + 1, f + s + 1)), g && (this.data[f] = t, w.push(f));
144
+ }
145
+ for (const a of w) i[a] = 1;
146
+ for (let a = 1; a < h && w.length; a++) {
147
+ const u = [];
148
+ for (const f of w) {
149
+ const g = f % s, p = f / s | 0, x = (E, I, y) => {
150
+ E < 0 || I < 0 || E >= s || I >= o || i[y] || (i[y] = 1, this.data[y] = t, u.push(y));
151
+ };
152
+ x(g - 1, p, f - 1), x(g + 1, p, f + 1), x(g, p - 1, f - s), x(g, p + 1, f + s), n && (x(g - 1, p - 1, f - s - 1), x(g + 1, p - 1, f - s + 1), x(g - 1, p + 1, f + s - 1), x(g + 1, p + 1, f + s + 1));
153
+ }
154
+ w = u;
155
+ }
156
+ }
157
+ /** Replaces every pixel whose color matches `from`. */
158
+ recolor(t, n) {
159
+ for (let h = 0; h < this.data.length; h++) this.data[h] === t && (this.data[h] = n);
160
+ }
161
+ /** Multiplies brightness of opaque pixels matching `pred`. */
162
+ tint(t, n) {
163
+ for (let h = 0; h < this.h; h++)
164
+ for (let s = 0; s < this.w; s++) {
165
+ const o = h * this.w + s, i = this.data[o] ?? 0;
166
+ i >>> 24 && n(s, h) && (this.data[o] = B(i, t));
167
+ }
168
+ }
169
+ blit(t, n, h, s = !1) {
170
+ for (let o = 0; o < t.h; o++)
171
+ for (let i = 0; i < t.w; i++) {
172
+ const e = t.data[o * t.w + i] ?? 0;
173
+ e >>> 24 && this.px(n + (s ? t.w - 1 - i : i), h + o, e);
174
+ }
175
+ }
176
+ /** Alpha-blends a color onto an existing pixel. */
177
+ blend(t, n, h) {
178
+ if (!this.inBounds(t, n)) return;
179
+ const s = n * this.w + t, o = this.data[s] ?? 0, [i, e, l, c] = m(h), M = c / 255, d = m(o);
180
+ this.data[s] = b(d[0] + (i - d[0]) * M, d[1] + (e - d[1]) * M, d[2] + (l - d[2]) * M, Math.max(d[3], c));
181
+ }
182
+ /** Reads a canvas back into a grid (a PNG layer of the paper doll joining the painted ones). */
183
+ static from(t) {
184
+ const n = new A(t.width, t.height), h = t.getContext("2d").getImageData(0, 0, t.width, t.height);
185
+ return n.data.set(new Uint32Array(h.data.buffer, h.data.byteOffset, t.width * t.height)), n;
186
+ }
187
+ /** The same picture on a grid `factor` times as fine, each pixel becoming a square block. */
188
+ upscaled(t) {
189
+ if (t === 1) return this;
190
+ const n = new A(this.w * t, this.h * t);
191
+ for (let h = 0; h < this.h; h++)
192
+ for (let s = 0; s < this.w; s++) {
193
+ const o = this.data[h * this.w + s] ?? 0;
194
+ o >>> 24 && n.rect(s * t, h * t, t, t, o);
195
+ }
196
+ return n;
197
+ }
198
+ /** Same size and same pixels. */
199
+ equals(t) {
200
+ if (t.w !== this.w || t.h !== this.h) return !1;
201
+ for (let n = 0; n < this.data.length; n++) if (this.data[n] !== t.data[n]) return !1;
202
+ return !0;
203
+ }
204
+ /** Cheap hash of the pixels, for grouping identical frames before comparing them. */
205
+ key() {
206
+ let t = 2166136261;
207
+ for (let n = 0; n < this.data.length; n++)
208
+ t ^= this.data[n], t = Math.imul(t, 16777619) >>> 0;
209
+ return t >>> 0;
210
+ }
211
+ clone() {
212
+ const t = new A(this.w, this.h);
213
+ return t.data.set(this.data), t;
214
+ }
215
+ toCanvas() {
216
+ const t = document.createElement("canvas");
217
+ t.width = this.w, t.height = this.h;
218
+ const n = t.getContext("2d");
219
+ if (!n) throw new Error("2D canvas not supported");
220
+ const h = new Uint8ClampedArray(this.w * this.h * 4);
221
+ h.set(new Uint8Array(this.data.buffer, this.data.byteOffset, this.data.byteLength));
222
+ const s = new ImageData(h, this.w, this.h);
223
+ return n.putImageData(s, 0, 0), t;
224
+ }
225
+ }
226
+ class O extends A {
227
+ constructor(t, n, h, s) {
228
+ super(h, s), this.x0 = t, this.y0 = n;
229
+ }
230
+ x0;
231
+ y0;
232
+ inBounds(t, n) {
233
+ return super.inBounds(t - this.x0, n - this.y0);
234
+ }
235
+ px(t, n, h) {
236
+ super.px(Math.floor(t) - this.x0, Math.floor(n) - this.y0, h);
237
+ }
238
+ get(t, n) {
239
+ return super.get(t - this.x0, n - this.y0);
240
+ }
241
+ blend(t, n, h) {
242
+ const s = t - this.x0, o = n - this.y0;
243
+ if (!super.inBounds(s, o)) return;
244
+ const i = o * this.w + s, e = this.data[i] ?? 0, [l, c, M, d] = m(h), w = d / 255, a = m(e);
245
+ this.data[i] = b(a[0] + (l - a[0]) * w, a[1] + (c - a[1]) * w, a[2] + (M - a[2]) * w, Math.max(a[3], d));
246
+ }
247
+ }
248
+ function W(r, t = 16384) {
249
+ const n = r[0];
250
+ if (!n) throw new Error("makeSheet: no frames");
251
+ const h = Math.max(1, Math.min(r.length, Math.floor(t / n.w))), s = Math.ceil(r.length / h), o = new A(n.w * h, n.h * s);
252
+ return r.forEach((i, e) => o.blit(i, e % h * n.w, Math.floor(e / h) * n.h)), o.toCanvas();
253
+ }
254
+ function Y(r, t) {
255
+ const n = document.createElement("canvas");
256
+ n.width = r.width * t, n.height = r.height * t;
257
+ const h = n.getContext("2d");
258
+ if (!h) throw new Error("2D canvas not supported");
259
+ return h.imageSmoothingEnabled = !1, h.drawImage(r, 0, 0, n.width, n.height), n;
260
+ }
261
+ export {
262
+ D as CLEAR,
263
+ A as PixelGrid,
264
+ O as PixelWindow,
265
+ m as channels,
266
+ C as hash2,
267
+ U as hex,
268
+ W as makeSheet,
269
+ L as mix,
270
+ v as mulberry32,
271
+ b as rgba,
272
+ B as shade,
273
+ $ as toCss,
274
+ Y as upscale,
275
+ S as valueNoise,
276
+ R as withAlpha
277
+ };
@@ -0,0 +1,197 @@
1
+ import { ramp as P, dithered as I, grade as S, capturing as B, stageRun as v, endOutline as E, pixelKey as F, fillRuns as H, batchFor as T, record as K, beginOutline as L, flushBatch as j, currentCoverage as D } from "./pixelTone.js";
2
+ import { PixelLayer as G } from "./PixelLayer.js";
3
+ import { pixelOn as ft, spark as at, tail as lt } from "./pixelParticles.js";
4
+ const J = 16774358, d = (f) => Math.round(f);
5
+ function y(f, e, o, n, c = 1) {
6
+ const s = d(e), t = d(o);
7
+ if (I(s, t)) return;
8
+ const i = S(n);
9
+ if (B()) {
10
+ for (let a = 0; a < c; a++) for (let h = 0; h < c; h++) K(s + h, t + a, i);
11
+ return;
12
+ }
13
+ const l = T(f);
14
+ if (l) {
15
+ for (let a = 0; a < c; a++) v(l, s, t + a, c, i);
16
+ return;
17
+ }
18
+ f.fillStyle(i, 1).fillRect(s, t, c, c);
19
+ }
20
+ class C {
21
+ at = /* @__PURE__ */ new Map();
22
+ set(e, o, n) {
23
+ this.at.set(F(d(e), d(o)), n);
24
+ }
25
+ lay(e) {
26
+ if (B()) {
27
+ for (const [c, s] of this.at) y(e, (c >>> 16) - 32768, (c & 65535) - 32768, s);
28
+ return;
29
+ }
30
+ const o = T(e);
31
+ if (o instanceof G) {
32
+ for (const [c, s] of this.at) {
33
+ const t = (c >>> 16) - 32768, i = (c & 65535) - 32768;
34
+ I(t, i) || o.stage(t, i, 1, S(s));
35
+ }
36
+ return;
37
+ }
38
+ const n = /* @__PURE__ */ new Map();
39
+ for (const [c, s] of this.at) I((c >>> 16) - 32768, (c & 65535) - 32768) || n.set(c, S(s));
40
+ H(e, n);
41
+ }
42
+ }
43
+ function R(f, e, o, n, c) {
44
+ const s = d(e), t = d(n);
45
+ if (!(t <= 0)) {
46
+ if (!B() && !I(s, o) && !I(s + 1, o) && !I(s + 2, o + 1) && !I(s + 3, o + 1)) {
47
+ const i = T(f);
48
+ if (i) {
49
+ v(i, s, d(o), t, S(c));
50
+ return;
51
+ }
52
+ f.fillStyle(S(c), 1).fillRect(s, d(o), t, 1);
53
+ return;
54
+ }
55
+ for (let i = 0; i < t; i++) y(f, s + i, o, c);
56
+ }
57
+ }
58
+ function Y(f, e, o) {
59
+ L();
60
+ try {
61
+ o();
62
+ } finally {
63
+ E(f, e);
64
+ }
65
+ }
66
+ function q(f, e, o, n, c = 2) {
67
+ const s = Math.hypot(o.x - e.x, o.y - e.y), t = Math.max(1, Math.ceil(s)), i = s ? -(o.y - e.y) / s : 0, l = s ? (o.x - e.x) / s : 1, a = P(n), h = Math.max(1, Math.round(c));
68
+ for (let r = 0; r <= t; r++) {
69
+ const u = t >= 10 && (r <= 1 || r >= t - 1), x = t >= 16 && Math.abs(r - Math.round(t / 3)) <= 1, m = e.x + (o.x - e.x) * r / t, p = e.y + (o.y - e.y) * r / t;
70
+ for (let M = 0; M < h; M++) {
71
+ const w = M - (h - 1) / 2, g = h >= 2 ? M === 0 ? a.light : M === h - 1 ? a.deep : n : n;
72
+ y(f, m + i * w, p + l * w, u ? a.deep : x && M === 0 ? a.hi : g);
73
+ }
74
+ }
75
+ }
76
+ function Z(f, e, o, n = 0, c = 0) {
77
+ const s = P(o), t = Math.max(32, Math.ceil(e * 5)), i = new C();
78
+ for (let l = 0; l < t; l++) {
79
+ const a = ((l * 64 / t + n) % 16 + 16) % 16;
80
+ if (a < 3) continue;
81
+ const h = l * Math.PI * 2 / t, r = Math.sin(h), u = a < 4 ? s.hi : r > 0.35 ? s.light : r < -0.35 ? s.deep : o, x = Math.cos(h) * e, m = c + r * e * 0.5;
82
+ i.set(x, m, u), r > 0.5 && i.set(x, m + 1, s.deep);
83
+ }
84
+ i.lay(f);
85
+ }
86
+ function _(f, e, o, n, c) {
87
+ const s = P(c);
88
+ for (let t = -n; t <= n; t++) {
89
+ const i = Math.max(1, d(n - Math.abs(t))), l = d(e - i / 2);
90
+ if (t > n * 0.45) {
91
+ R(f, l, o + t, i, s.deep);
92
+ continue;
93
+ }
94
+ const a = Math.floor(i / 2);
95
+ n < 3 || a < 1 ? R(f, l, o + t, i, c) : (R(f, l, o + t, a, s.light), R(f, l + a, o + t, i - a, c));
96
+ }
97
+ n >= 5 && y(f, e - 1, o - n + 2, s.hi);
98
+ }
99
+ function $(f, e, o, n, c = !1) {
100
+ for (let s = 0; s < 12; s++) {
101
+ const t = s * Math.PI / 6 + (c ? e * 1.8 : 0), i = o * (c ? 1 - e : e);
102
+ y(f, Math.cos(t) * i, -8 + Math.sin(t) * i * 0.6 - (c ? 0 : Math.sin(e * Math.PI) * 8), s % 3 ? n : J, s % 3 ? 1 : 2);
103
+ }
104
+ }
105
+ function N(f, e, o, n, c, s = !1) {
106
+ const t = Math.max(1, Math.round(s ? n * 0.5 : n)), i = P(c);
107
+ for (let l = -t; l <= t; l++) {
108
+ const a = d(n * Math.sqrt(Math.max(0, 1 - (l / t) ** 2)));
109
+ if (a <= 0) continue;
110
+ const h = (l + t) / (2 * t || 1);
111
+ R(f, e - a, o + l, a * 2, h > 0.7 && n >= 3 ? i.deep : c), n >= 3 && h < 0.35 && a >= 2 && R(f, e - a + 1, o + l, d(a * 0.6), i.light);
112
+ }
113
+ n >= 4 && y(f, e - n * 0.4, o - t * 0.55, i.hi);
114
+ }
115
+ function Q(f, e, o, n, c, s = e + 8) {
116
+ const t = c / 1e3, i = e + n * t + 260 * t * t;
117
+ return i > s && n * t + 260 * t * t > 0 ? null : { x: f + o * t, y: i };
118
+ }
119
+ function z(f, e, o, n, c) {
120
+ q(f, { x: e - n, y: o - n }, { x: e + n, y: o + n }, c), q(f, { x: e - n, y: o + n }, { x: e + n, y: o - n }, c);
121
+ }
122
+ function tt(f, e, o, n, c, s) {
123
+ const t = { x: e.x + (o.x - e.x) * n, y: e.y + (o.y - e.y) * n };
124
+ q(f, t, o, c, 4), q(f, t, o, s, 2);
125
+ }
126
+ function nt(f, e, o, n, c, s, t = 0, i = 0.7) {
127
+ if (n = Math.round(n), n < 2) return;
128
+ const l = P(c), a = Math.max(2, Math.round(n * 0.85)), h = i * D();
129
+ j();
130
+ const r = d(e);
131
+ for (let u = -a; u <= a; u++) {
132
+ const x = n * Math.sqrt(Math.max(0, 1 - (u / (a + 0.5)) ** 2));
133
+ let m = 0, p = 0, M = -1, w = 0;
134
+ const g = Math.ceil(x);
135
+ for (let k = -g; k <= g; k++) {
136
+ let O = -1, A = 0;
137
+ if (k < g) {
138
+ const W = x - Math.abs(k + 0.5), b = (k * 73856093 ^ u * 19349663 ^ t * 83492791) >>> 0;
139
+ W < 1 && b % 2 === 0 || (O = u < -a * 0.3 && k < x * 0.2 ? s : u > a * 0.4 ? l.deep : b % 9 === 0 ? l.light : c, A = W < 1 ? h * 0.6 : h);
140
+ }
141
+ if (O === M && A === w && O !== -1) {
142
+ p++;
143
+ continue;
144
+ }
145
+ M !== -1 && f.fillStyle(S(M), w).fillRect(r + m, d(o + u), p, 1), m = k, p = 1, M = O, w = A;
146
+ }
147
+ }
148
+ }
149
+ function ot(f, e, o, n, c, s, t, i = !0, l = 1) {
150
+ const a = Math.max(2, Math.ceil(Math.abs(s - c) * n)), h = P(t);
151
+ l *= 2;
152
+ const r = new C();
153
+ for (let u = 0; u < l; u++) {
154
+ const x = n - u, m = u === 0 ? h.light : u === l - 1 ? h.deep : t;
155
+ for (let p = 0; p <= a; p++) {
156
+ const M = c + (s - c) * p / a, w = p >= a - 1 ? h.hi : l <= 2 && a >= 12 && p < a * 0.2 ? h.deep : m;
157
+ r.set(e + Math.cos(M) * x, o + Math.sin(M) * x * (i ? 0.5 : 1), w);
158
+ }
159
+ }
160
+ r.lay(f);
161
+ }
162
+ function et(f, e, o, n, c = 10, s = 13154458) {
163
+ for (let t = 0; t < 4; t++) {
164
+ const i = t * 1.7 + 0.3, l = Math.round(4 * (1 - n));
165
+ l >= 1 && N(f, e + Math.cos(i) * c * n, o - 2 + Math.sin(i) * c * 0.4 * n - n * 4, l, t % 2 ? s : 14734524);
166
+ }
167
+ }
168
+ function st(f, e, o, n, c, s, t) {
169
+ for (let i = 0; i < n; i++) {
170
+ const l = i / n * Math.PI * 2 + 0.3, a = c * (0.6 + i * 7 % 5 * 0.1), h = Q(e, o, Math.cos(l) * a, -70 - i * 17 % 40, s, o + 6);
171
+ if (!h) continue;
172
+ const r = t[i % t.length], u = h.y + Math.sin(l) * a * 0.3 * s / 1e3;
173
+ i % 3 ? y(f, h.x, u, r) : (y(f, h.x, u, r, 2), y(f, h.x, u + 2, P(r).deep, 2), y(f, h.x, u, P(r).hi));
174
+ }
175
+ }
176
+ export {
177
+ J as WHITE,
178
+ ot as arc,
179
+ N as blob,
180
+ tt as dashStreak,
181
+ st as debris,
182
+ _ as diamond,
183
+ y as dot,
184
+ Q as drop,
185
+ et as dust,
186
+ R as hline,
187
+ Y as outlined,
188
+ ft as pixelOn,
189
+ nt as puffBlob,
190
+ Z as ring,
191
+ $ as shards,
192
+ d as snap,
193
+ at as spark,
194
+ q as stroke,
195
+ lt as tail,
196
+ z as xMark
197
+ };
@@ -0,0 +1,35 @@
1
+ import { dot as i } from "./pixelPaint.js";
2
+ import { ramp as w } from "./pixelTone.js";
3
+ function C(n, s, h, e, a, f = 0) {
4
+ const o = w(e);
5
+ if (a === 1) return i(n, s, h, f % 3 === 0 ? o.light : e);
6
+ i(n, s, h, o.hi);
7
+ const c = a === 3 ? 2 + f % 2 : 1;
8
+ for (let t = 1; t <= c; t++) {
9
+ const r = t === c && c > 1 ? o.deep : t === 1 ? o.light : e;
10
+ i(n, s + t, h, r), i(n, s - t, h, r), i(n, s, h + t, r), i(n, s, h - t, r);
11
+ }
12
+ }
13
+ function D(n, s, h, e, a, f, o, c = 1) {
14
+ const t = Math.hypot(e, a);
15
+ if (t === 0) return i(n, s, h, o);
16
+ const r = w(o), p = [r.hi, r.light, o, o, r.deep, r.shade], j = Math.max(1, Math.floor(f));
17
+ let u = -a / t, m = e / t;
18
+ (m < -0.1 || Math.abs(m) <= 0.1 && u < 0) && (u = -u, m = -m);
19
+ const l = Math.round(u), q = Math.round(m) || (l === 0 ? 1 : 0);
20
+ for (let M = j; M >= 0; M--) {
21
+ const d = M / j;
22
+ if (d > 0.5 && M % 2) continue;
23
+ const b = s - e / t * M, k = h - a / t * M, O = Math.min(p.length - 1, Math.floor(d * p.length));
24
+ c >= 2 && d < 0.8 && i(n, b + l, k + q, p[Math.min(p.length - 1, O + 1)]), c >= 3 && d < 0.45 && i(n, b - l, k - q, p[Math.max(0, O - 1)]), i(n, b, k, p[O]);
25
+ }
26
+ }
27
+ function E(n, s, h, e) {
28
+ const a = Math.cos(e), f = Math.sin(e);
29
+ return (o, c, t) => i(n, s + a * o - f * c, h + f * o + a * c, t);
30
+ }
31
+ export {
32
+ E as pixelOn,
33
+ C as spark,
34
+ D as tail
35
+ };