1681-engine 0.5.8 → 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 (600) hide show
  1. package/CHANGELOG.md +53 -0
  2. package/dist/1681-engine.js +463 -409
  3. package/dist/ambient/ColorGrade.js +0 -1
  4. package/dist/ambient/DayClock.js +0 -1
  5. package/dist/ambient/WeatherLayer.js +0 -1
  6. package/dist/ambient/grade.js +0 -1
  7. package/dist/ambient/weather.js +0 -1
  8. package/dist/anim/AnimStateMachine.js +0 -1
  9. package/dist/anim/Animator.js +0 -1
  10. package/dist/anim/animStateCompile.js +0 -1
  11. package/dist/anim/animStateSystem.js +0 -1
  12. package/dist/anim/animationSystem.js +0 -1
  13. package/dist/anim/asepriteSlices.js +0 -1
  14. package/dist/anim/asepriteTags.js +0 -1
  15. package/dist/anim/parseAseprite.js +0 -1
  16. package/dist/assets/AssetLoader.js +112 -14
  17. package/dist/assets/loadAseprite.js +0 -1
  18. package/dist/assets/takeCleanerWorker-DTcI_Jqr.js +0 -1
  19. package/dist/assets/textureAtlas.js +58 -0
  20. package/dist/audio/Footsteps.js +0 -1
  21. package/dist/audio/MusicPlayer.js +0 -1
  22. package/dist/audio/SoundEngine.js +13 -7
  23. package/dist/audio/cleanTake.js +0 -1
  24. package/dist/audio/music/ElementVoice.js +0 -1
  25. package/dist/audio/music/GraphVoice.js +0 -1
  26. package/dist/audio/music/MusicChannel.js +0 -1
  27. package/dist/audio/music/musicVoice.js +0 -1
  28. package/dist/audio/sampleBank.js +0 -1
  29. package/dist/audio/soundTable.js +0 -1
  30. package/dist/audio/synth.js +0 -1
  31. package/dist/core/BitmapLabel.js +0 -1
  32. package/dist/core/Camera.js +1 -2
  33. package/dist/core/Clock.js +31 -21
  34. package/dist/core/Graphics.js +0 -1
  35. package/dist/core/Group.js +0 -1
  36. package/dist/core/Image.js +0 -1
  37. package/dist/core/ObjectFactory.js +0 -1
  38. package/dist/core/Pointer.js +46 -24
  39. package/dist/core/Rectangle.js +0 -1
  40. package/dist/core/Stage.js +5 -6
  41. package/dist/core/Text.js +0 -1
  42. package/dist/core/TextureRegistry.js +54 -24
  43. package/dist/core/Timeline.js +0 -1
  44. package/dist/core/TimelineBuilder.js +0 -1
  45. package/dist/core/TimelineChild.js +0 -1
  46. package/dist/core/Tweener.js +0 -1
  47. package/dist/core/atlas.js +0 -1
  48. package/dist/core/atlasPlan.js +0 -1
  49. package/dist/core/blendLayer.js +11 -0
  50. package/dist/core/eases.js +0 -1
  51. package/dist/core/gameObject.js +22 -20
  52. package/dist/core/pixelZoom.js +43 -0
  53. package/dist/core/pixiPatches.js +0 -1
  54. package/dist/core/runDue.js +28 -0
  55. package/dist/core/silhouette.js +49 -0
  56. package/dist/core/timelinePlace.js +0 -1
  57. package/dist/core/tweenProps.js +0 -1
  58. package/dist/debug/DebugOverlay.js +0 -1
  59. package/dist/debug/DrawCallCounter.js +15 -12
  60. package/dist/debug/ErrorLog.js +0 -1
  61. package/dist/debug/FrameStats.js +0 -1
  62. package/dist/debug/inspectWorld.js +0 -1
  63. package/dist/diagnostics/ErrorDeduper.js +0 -1
  64. package/dist/diagnostics/FrameSampler.js +0 -1
  65. package/dist/diagnostics/bootWatch.js +0 -1
  66. package/dist/diagnostics/captureErrors.js +0 -1
  67. package/dist/diagnostics/contextLoss.js +0 -1
  68. package/dist/diagnostics/frameStats.js +0 -1
  69. package/dist/diagnostics/gpuInfo.js +0 -1
  70. package/dist/diagnostics/renderGuard.js +0 -1
  71. package/dist/ecs/SparseSet.js +0 -1
  72. package/dist/ecs/World.js +0 -1
  73. package/dist/ecs/fields.js +0 -1
  74. package/dist/engine/Engine.js +42 -18
  75. package/dist/engine/FixedLoop.js +0 -1
  76. package/dist/engine/HiddenPause.js +27 -0
  77. package/dist/engine/Scene.js +0 -1
  78. package/dist/engine/SceneManager.js +0 -1
  79. package/dist/events/EventBus.js +0 -1
  80. package/dist/fx/Afterimages.js +82 -0
  81. package/dist/fx/FloatingText.js +0 -1
  82. package/dist/fx/hitStop.js +0 -1
  83. package/dist/fx/viewCull.js +0 -1
  84. package/dist/i18n/Translator.js +0 -1
  85. package/dist/i18n/extractStrings.js +0 -1
  86. package/dist/i18n/formatMessage.js +0 -1
  87. package/dist/input/Actions.js +29 -21
  88. package/dist/input/AimGesture.js +0 -1
  89. package/dist/input/Keyboard.js +0 -1
  90. package/dist/input/Keymap.js +0 -1
  91. package/dist/input/TargetLock.js +0 -1
  92. package/dist/input/aimAxis.js +0 -1
  93. package/dist/input/keyChord.js +0 -1
  94. package/dist/input/longPress.js +0 -1
  95. package/dist/input/rumble.js +42 -0
  96. package/dist/input/stickAxis.js +0 -1
  97. package/dist/input/touchDetect.js +0 -1
  98. package/dist/light/LightLayer.js +0 -1
  99. package/dist/nav/MinHeap.js +0 -1
  100. package/dist/nav/findPath.js +0 -1
  101. package/dist/nav/navGrid.js +0 -1
  102. package/dist/nav/nearestOpen.js +0 -1
  103. package/dist/nav/straightenPath.js +0 -1
  104. package/dist/net/Connection.js +39 -16
  105. package/dist/net/InterpolationBuffer.js +0 -1
  106. package/dist/net/PredictedMover.js +0 -1
  107. package/dist/net/Room.js +0 -1
  108. package/dist/net/RoomHost.js +0 -1
  109. package/dist/net/cadence.js +0 -1
  110. package/dist/net/constants.js +0 -1
  111. package/dist/net/lobby/LobbyClient.js +0 -1
  112. package/dist/net/lobby/LobbyHost.js +0 -1
  113. package/dist/net/lobby/LobbyRooms.js +0 -1
  114. package/dist/net/lobby/Matchmaker.js +0 -1
  115. package/dist/net/movement.js +40 -39
  116. package/dist/net/protocol.js +0 -1
  117. package/dist/net/reconnect.js +10 -0
  118. package/dist/net/serverClock.js +0 -1
  119. package/dist/net/snapshotCodec.js +0 -1
  120. package/dist/parallax/Parallax.js +0 -1
  121. package/dist/parallax/ParallaxLayer.js +0 -1
  122. package/dist/parallax/parallaxMath.js +0 -1
  123. package/dist/particles/Emitter.js +0 -1
  124. package/dist/particles/ParticleBudget.js +0 -1
  125. package/dist/particles/ParticleSim.js +0 -1
  126. package/dist/particles/particleCurves.js +0 -1
  127. package/dist/particles/particleSampling.js +0 -1
  128. package/dist/physics/Body.js +0 -1
  129. package/dist/physics/BroadPhase.js +0 -1
  130. package/dist/physics/Contact.js +0 -1
  131. package/dist/physics/ContactSolver.js +0 -1
  132. package/dist/physics/PhysicsWorld.js +0 -1
  133. package/dist/physics/SpatialHash.js +0 -1
  134. package/dist/physics/collide.js +0 -1
  135. package/dist/physics/collidePolygon.js +0 -1
  136. package/dist/physics/contactReport.js +0 -1
  137. package/dist/physics/drawColliders.js +0 -1
  138. package/dist/physics/physicsSystem.js +0 -1
  139. package/dist/physics/polygon.js +0 -1
  140. package/dist/physics/raycast.js +0 -1
  141. package/dist/physics/syncToBody.js +0 -1
  142. package/dist/physics/tileBodies.js +0 -1
  143. package/dist/physics/types.js +0 -1
  144. package/dist/pixel/Darkness.js +50 -47
  145. package/dist/pixel/DitherVignette.js +0 -1
  146. package/dist/pixel/Evaporation.js +0 -1
  147. package/dist/pixel/NightShade.js +0 -1
  148. package/dist/pixel/PixelLayer.js +0 -1
  149. package/dist/pixel/PixelMarks.js +99 -0
  150. package/dist/pixel/SwayProp.js +0 -1
  151. package/dist/pixel/aimPixels.js +67 -0
  152. package/dist/pixel/lights.js +0 -1
  153. package/dist/pixel/nineSlice.js +0 -1
  154. package/dist/pixel/paintLayer.js +0 -1
  155. package/dist/pixel/palette.js +0 -1
  156. package/dist/pixel/pixel.js +0 -1
  157. package/dist/pixel/pixelPaint.js +27 -24
  158. package/dist/pixel/pixelParticles.js +35 -0
  159. package/dist/pixel/pixelTone.js +0 -1
  160. package/dist/pixel/propKit.js +0 -1
  161. package/dist/pixel/ramp.js +0 -1
  162. package/dist/pixel/selout.js +0 -1
  163. package/dist/pixel/spritePixels.js +0 -1
  164. package/dist/pixel/swayRig.js +0 -1
  165. package/dist/pixel/vignetteMask.js +0 -1
  166. package/dist/pixel/weatherArt.js +0 -1
  167. package/dist/pixel.js +71 -65
  168. package/dist/platform/appResume.js +18 -0
  169. package/dist/platform/fullscreen.js +52 -0
  170. package/dist/platform/orientation.js +26 -0
  171. package/dist/platform/pointerLock.js +37 -0
  172. package/dist/platform/reducedMotion.js +23 -0
  173. package/dist/platform/timeoutSignal.js +14 -0
  174. package/dist/platform/touch.js +0 -1
  175. package/dist/postfx/BloomFilter.js +0 -1
  176. package/dist/postfx/ChromaticAberrationFilter.js +0 -1
  177. package/dist/postfx/ColorAdjustFilter.js +0 -1
  178. package/dist/postfx/CrtFilter.js +0 -1
  179. package/dist/postfx/PixelateFilter.js +0 -1
  180. package/dist/postfx/PostFx.js +0 -1
  181. package/dist/postfx/ShockwaveFilter.js +0 -1
  182. package/dist/postfx/VignetteFilter.js +0 -1
  183. package/dist/postfx/fxAnimator.js +0 -1
  184. package/dist/postfx/fxShader.js +0 -1
  185. package/dist/postfx.js +0 -1
  186. package/dist/react/ChoiceDialog.js +0 -1
  187. package/dist/react/ConfirmDialog.js +0 -1
  188. package/dist/react/Glyph.js +0 -1
  189. package/dist/react/Modal.js +0 -1
  190. package/dist/react/Panel.js +0 -1
  191. package/dist/react/PixelImage.js +0 -1
  192. package/dist/react/Select.js +0 -1
  193. package/dist/react/Slider.js +0 -1
  194. package/dist/react/SplitPane.js +0 -1
  195. package/dist/react/TabStrip.js +0 -1
  196. package/dist/react/TitleTips.js +0 -1
  197. package/dist/react/Tooltip.js +0 -1
  198. package/dist/react/UiProvider.js +0 -1
  199. package/dist/react/baseCss.js +0 -1
  200. package/dist/react/choiceStore.js +0 -1
  201. package/dist/react/classNames.js +0 -1
  202. package/dist/react/confirmStore.js +0 -1
  203. package/dist/react/labels.js +0 -1
  204. package/dist/react/placement.js +0 -1
  205. package/dist/react/useFillSheet.js +0 -1
  206. package/dist/react/useFitToViewport.js +0 -1
  207. package/dist/react/usePicked.js +0 -1
  208. package/dist/react/useStore.js +0 -1
  209. package/dist/react/useViewport.js +0 -1
  210. package/dist/react.js +0 -1
  211. package/dist/rig/PosePlayer.js +0 -1
  212. package/dist/rig/RigView.js +0 -1
  213. package/dist/rig/Skeleton.js +0 -1
  214. package/dist/rig/humanoid.js +0 -1
  215. package/dist/rig/humanoid.json.js +0 -1
  216. package/dist/rig/humanoidPoses.js +0 -1
  217. package/dist/rig/poseMath.js +0 -1
  218. package/dist/rig/poses.json.js +0 -1
  219. package/dist/save/Autosaver.js +0 -1
  220. package/dist/save/MemoryBackend.js +0 -1
  221. package/dist/save/SaveStore.js +0 -1
  222. package/dist/save/WebStorageBackend.js +0 -1
  223. package/dist/save/checksum.js +0 -1
  224. package/dist/save/migrateSave.js +0 -1
  225. package/dist/settings.js +0 -1
  226. package/dist/tilemap/TilemapView.js +0 -1
  227. package/dist/tilemap/collision.js +0 -1
  228. package/dist/tilemap/tiled.js +0 -1
  229. package/dist/transitions/CrossfadeTransition.js +0 -1
  230. package/dist/transitions/DitherWipeTransition.js +0 -1
  231. package/dist/transitions/FadeTransition.js +0 -1
  232. package/dist/transitions/Letterbox.js +0 -1
  233. package/dist/transitions/ditherMask.js +0 -1
  234. package/dist/transitions/transitionTo.js +0 -1
  235. package/dist/transitions/tweenDone.js +0 -1
  236. package/dist/types/assets/AssetLoader.d.ts +63 -8
  237. package/dist/types/assets/AssetLoader.d.ts.map +1 -1
  238. package/dist/types/assets/textureAtlas.d.ts +35 -0
  239. package/dist/types/assets/textureAtlas.d.ts.map +1 -0
  240. package/dist/types/audio/SoundEngine.d.ts +5 -0
  241. package/dist/types/audio/SoundEngine.d.ts.map +1 -1
  242. package/dist/types/core/Camera.d.ts +1 -1
  243. package/dist/types/core/Camera.d.ts.map +1 -1
  244. package/dist/types/core/Clock.d.ts +14 -2
  245. package/dist/types/core/Clock.d.ts.map +1 -1
  246. package/dist/types/core/Pointer.d.ts +18 -0
  247. package/dist/types/core/Pointer.d.ts.map +1 -1
  248. package/dist/types/core/Stage.d.ts.map +1 -1
  249. package/dist/types/core/TextureRegistry.d.ts +39 -0
  250. package/dist/types/core/TextureRegistry.d.ts.map +1 -1
  251. package/dist/types/core/blendLayer.d.ts +23 -0
  252. package/dist/types/core/blendLayer.d.ts.map +1 -0
  253. package/dist/types/core/gameObject.d.ts.map +1 -1
  254. package/dist/types/core/pixelZoom.d.ts +45 -0
  255. package/dist/types/core/pixelZoom.d.ts.map +1 -0
  256. package/dist/types/core/runDue.d.ts +15 -0
  257. package/dist/types/core/runDue.d.ts.map +1 -0
  258. package/dist/types/core/silhouette.d.ts +16 -0
  259. package/dist/types/core/silhouette.d.ts.map +1 -0
  260. package/dist/types/debug/DrawCallCounter.d.ts.map +1 -1
  261. package/dist/types/engine/Engine.d.ts +16 -0
  262. package/dist/types/engine/Engine.d.ts.map +1 -1
  263. package/dist/types/engine/HiddenPause.d.ts +22 -0
  264. package/dist/types/engine/HiddenPause.d.ts.map +1 -0
  265. package/dist/types/fx/Afterimages.d.ts +62 -0
  266. package/dist/types/fx/Afterimages.d.ts.map +1 -0
  267. package/dist/types/index.d.ts +18 -3
  268. package/dist/types/index.d.ts.map +1 -1
  269. package/dist/types/input/Actions.d.ts +7 -1
  270. package/dist/types/input/Actions.d.ts.map +1 -1
  271. package/dist/types/input/rumble.d.ts +41 -0
  272. package/dist/types/input/rumble.d.ts.map +1 -0
  273. package/dist/types/net/Connection.d.ts +22 -0
  274. package/dist/types/net/Connection.d.ts.map +1 -1
  275. package/dist/types/net/constants.d.ts +13 -4
  276. package/dist/types/net/constants.d.ts.map +1 -1
  277. package/dist/types/net/movement.d.ts.map +1 -1
  278. package/dist/types/net/reconnect.d.ts +14 -0
  279. package/dist/types/net/reconnect.d.ts.map +1 -0
  280. package/dist/types/pixel/Darkness.d.ts +17 -5
  281. package/dist/types/pixel/Darkness.d.ts.map +1 -1
  282. package/dist/types/pixel/PixelMarks.d.ts +68 -0
  283. package/dist/types/pixel/PixelMarks.d.ts.map +1 -0
  284. package/dist/types/pixel/aimPixels.d.ts +23 -0
  285. package/dist/types/pixel/aimPixels.d.ts.map +1 -0
  286. package/dist/types/pixel/index.d.ts +3 -1
  287. package/dist/types/pixel/index.d.ts.map +1 -1
  288. package/dist/types/pixel/pixelPaint.d.ts +1 -0
  289. package/dist/types/pixel/pixelPaint.d.ts.map +1 -1
  290. package/dist/types/pixel/pixelParticles.d.ts +21 -0
  291. package/dist/types/pixel/pixelParticles.d.ts.map +1 -0
  292. package/dist/types/platform/appResume.d.ts +25 -0
  293. package/dist/types/platform/appResume.d.ts.map +1 -0
  294. package/dist/types/platform/fullscreen.d.ts +37 -0
  295. package/dist/types/platform/fullscreen.d.ts.map +1 -0
  296. package/dist/types/platform/orientation.d.ts +19 -0
  297. package/dist/types/platform/orientation.d.ts.map +1 -0
  298. package/dist/types/platform/pointerLock.d.ts +26 -0
  299. package/dist/types/platform/pointerLock.d.ts.map +1 -0
  300. package/dist/types/platform/reducedMotion.d.ts +20 -0
  301. package/dist/types/platform/reducedMotion.d.ts.map +1 -0
  302. package/dist/types/platform/timeoutSignal.d.ts +6 -0
  303. package/dist/types/platform/timeoutSignal.d.ts.map +1 -0
  304. package/dist/types/ui/index.d.ts +4 -0
  305. package/dist/types/ui/index.d.ts.map +1 -1
  306. package/dist/types/ui/rich/RichText.d.ts +48 -0
  307. package/dist/types/ui/rich/RichText.d.ts.map +1 -0
  308. package/dist/types/ui/rich/richFonts.d.ts +70 -0
  309. package/dist/types/ui/rich/richFonts.d.ts.map +1 -0
  310. package/dist/types/ui/rich/richLayout.d.ts +76 -0
  311. package/dist/types/ui/rich/richLayout.d.ts.map +1 -0
  312. package/dist/types/ui/rich/richMarkup.d.ts +48 -0
  313. package/dist/types/ui/rich/richMarkup.d.ts.map +1 -0
  314. package/dist/ui/Bar.js +0 -1
  315. package/dist/ui/Button.js +0 -1
  316. package/dist/ui/Dialog.js +0 -1
  317. package/dist/ui/FocusManager.js +0 -1
  318. package/dist/ui/Label.js +0 -1
  319. package/dist/ui/List.js +0 -1
  320. package/dist/ui/Panel.js +0 -1
  321. package/dist/ui/ScrollView.js +0 -1
  322. package/dist/ui/Slider.js +0 -1
  323. package/dist/ui/Stack.js +0 -1
  324. package/dist/ui/Toggle.js +0 -1
  325. package/dist/ui/UiHost.js +0 -1
  326. package/dist/ui/UiPointerGate.js +0 -1
  327. package/dist/ui/UiRoot.js +0 -1
  328. package/dist/ui/Widget.js +0 -1
  329. package/dist/ui/dom/DomOverlay.js +0 -1
  330. package/dist/ui/dom/DomWorldAnchors.js +0 -1
  331. package/dist/ui/dom/InputShield.js +0 -1
  332. package/dist/ui/dom/createStore.js +0 -1
  333. package/dist/ui/dom/shieldDecision.js +0 -1
  334. package/dist/ui/dom/worldToScreen.js +0 -1
  335. package/dist/ui/layout/anchor.js +0 -1
  336. package/dist/ui/layout/barDrain.js +0 -1
  337. package/dist/ui/layout/fitToViewport.js +0 -1
  338. package/dist/ui/layout/focusNav.js +0 -1
  339. package/dist/ui/layout/geometry.js +0 -1
  340. package/dist/ui/layout/listWidth.js +0 -1
  341. package/dist/ui/layout/placeTooltip.js +0 -1
  342. package/dist/ui/layout/scroll.js +0 -1
  343. package/dist/ui/layout/slider.js +0 -1
  344. package/dist/ui/layout/stack.js +0 -1
  345. package/dist/ui/layout/wrapRow.js +0 -1
  346. package/dist/ui/rich/RichText.js +87 -0
  347. package/dist/ui/rich/richFonts.js +105 -0
  348. package/dist/ui/rich/richLayout.js +132 -0
  349. package/dist/ui/rich/richMarkup.js +67 -0
  350. package/dist/ui.js +75 -65
  351. package/package.json +1 -4
  352. package/dist/1681-engine.js.map +0 -1
  353. package/dist/ambient/ColorGrade.js.map +0 -1
  354. package/dist/ambient/DayClock.js.map +0 -1
  355. package/dist/ambient/WeatherLayer.js.map +0 -1
  356. package/dist/ambient/grade.js.map +0 -1
  357. package/dist/ambient/weather.js.map +0 -1
  358. package/dist/anim/AnimStateMachine.js.map +0 -1
  359. package/dist/anim/Animator.js.map +0 -1
  360. package/dist/anim/animStateCompile.js.map +0 -1
  361. package/dist/anim/animStateSystem.js.map +0 -1
  362. package/dist/anim/animationSystem.js.map +0 -1
  363. package/dist/anim/asepriteSlices.js.map +0 -1
  364. package/dist/anim/asepriteTags.js.map +0 -1
  365. package/dist/anim/parseAseprite.js.map +0 -1
  366. package/dist/assets/AssetLoader.js.map +0 -1
  367. package/dist/assets/loadAseprite.js.map +0 -1
  368. package/dist/assets/takeCleanerWorker-DTcI_Jqr.js.map +0 -1
  369. package/dist/audio/Footsteps.js.map +0 -1
  370. package/dist/audio/MusicPlayer.js.map +0 -1
  371. package/dist/audio/SoundEngine.js.map +0 -1
  372. package/dist/audio/cleanTake.js.map +0 -1
  373. package/dist/audio/music/ElementVoice.js.map +0 -1
  374. package/dist/audio/music/GraphVoice.js.map +0 -1
  375. package/dist/audio/music/MusicChannel.js.map +0 -1
  376. package/dist/audio/music/musicVoice.js.map +0 -1
  377. package/dist/audio/sampleBank.js.map +0 -1
  378. package/dist/audio/soundTable.js.map +0 -1
  379. package/dist/audio/synth.js.map +0 -1
  380. package/dist/core/BitmapLabel.js.map +0 -1
  381. package/dist/core/Camera.js.map +0 -1
  382. package/dist/core/Clock.js.map +0 -1
  383. package/dist/core/Graphics.js.map +0 -1
  384. package/dist/core/Group.js.map +0 -1
  385. package/dist/core/Image.js.map +0 -1
  386. package/dist/core/ObjectFactory.js.map +0 -1
  387. package/dist/core/Pointer.js.map +0 -1
  388. package/dist/core/Rectangle.js.map +0 -1
  389. package/dist/core/Stage.js.map +0 -1
  390. package/dist/core/Text.js.map +0 -1
  391. package/dist/core/TextureRegistry.js.map +0 -1
  392. package/dist/core/Timeline.js.map +0 -1
  393. package/dist/core/TimelineBuilder.js.map +0 -1
  394. package/dist/core/TimelineChild.js.map +0 -1
  395. package/dist/core/Tweener.js.map +0 -1
  396. package/dist/core/atlas.js.map +0 -1
  397. package/dist/core/atlasPlan.js.map +0 -1
  398. package/dist/core/eases.js.map +0 -1
  399. package/dist/core/gameObject.js.map +0 -1
  400. package/dist/core/pixiPatches.js.map +0 -1
  401. package/dist/core/timelinePlace.js.map +0 -1
  402. package/dist/core/tweenProps.js.map +0 -1
  403. package/dist/debug/DebugOverlay.js.map +0 -1
  404. package/dist/debug/DrawCallCounter.js.map +0 -1
  405. package/dist/debug/ErrorLog.js.map +0 -1
  406. package/dist/debug/FrameStats.js.map +0 -1
  407. package/dist/debug/inspectWorld.js.map +0 -1
  408. package/dist/diagnostics/ErrorDeduper.js.map +0 -1
  409. package/dist/diagnostics/FrameSampler.js.map +0 -1
  410. package/dist/diagnostics/bootWatch.js.map +0 -1
  411. package/dist/diagnostics/captureErrors.js.map +0 -1
  412. package/dist/diagnostics/contextLoss.js.map +0 -1
  413. package/dist/diagnostics/frameStats.js.map +0 -1
  414. package/dist/diagnostics/gpuInfo.js.map +0 -1
  415. package/dist/diagnostics/renderGuard.js.map +0 -1
  416. package/dist/ecs/SparseSet.js.map +0 -1
  417. package/dist/ecs/World.js.map +0 -1
  418. package/dist/ecs/fields.js.map +0 -1
  419. package/dist/engine/Engine.js.map +0 -1
  420. package/dist/engine/FixedLoop.js.map +0 -1
  421. package/dist/engine/Scene.js.map +0 -1
  422. package/dist/engine/SceneManager.js.map +0 -1
  423. package/dist/events/EventBus.js.map +0 -1
  424. package/dist/fx/FloatingText.js.map +0 -1
  425. package/dist/fx/hitStop.js.map +0 -1
  426. package/dist/fx/viewCull.js.map +0 -1
  427. package/dist/i18n/Translator.js.map +0 -1
  428. package/dist/i18n/extractStrings.js.map +0 -1
  429. package/dist/i18n/formatMessage.js.map +0 -1
  430. package/dist/input/Actions.js.map +0 -1
  431. package/dist/input/AimGesture.js.map +0 -1
  432. package/dist/input/Keyboard.js.map +0 -1
  433. package/dist/input/Keymap.js.map +0 -1
  434. package/dist/input/TargetLock.js.map +0 -1
  435. package/dist/input/aimAxis.js.map +0 -1
  436. package/dist/input/keyChord.js.map +0 -1
  437. package/dist/input/longPress.js.map +0 -1
  438. package/dist/input/stickAxis.js.map +0 -1
  439. package/dist/input/touchDetect.js.map +0 -1
  440. package/dist/light/LightLayer.js.map +0 -1
  441. package/dist/nav/MinHeap.js.map +0 -1
  442. package/dist/nav/findPath.js.map +0 -1
  443. package/dist/nav/navGrid.js.map +0 -1
  444. package/dist/nav/nearestOpen.js.map +0 -1
  445. package/dist/nav/straightenPath.js.map +0 -1
  446. package/dist/net/Connection.js.map +0 -1
  447. package/dist/net/InterpolationBuffer.js.map +0 -1
  448. package/dist/net/PredictedMover.js.map +0 -1
  449. package/dist/net/Room.js.map +0 -1
  450. package/dist/net/RoomHost.js.map +0 -1
  451. package/dist/net/cadence.js.map +0 -1
  452. package/dist/net/constants.js.map +0 -1
  453. package/dist/net/lobby/LobbyClient.js.map +0 -1
  454. package/dist/net/lobby/LobbyHost.js.map +0 -1
  455. package/dist/net/lobby/LobbyRooms.js.map +0 -1
  456. package/dist/net/lobby/Matchmaker.js.map +0 -1
  457. package/dist/net/movement.js.map +0 -1
  458. package/dist/net/protocol.js.map +0 -1
  459. package/dist/net/serverClock.js.map +0 -1
  460. package/dist/net/snapshotCodec.js.map +0 -1
  461. package/dist/parallax/Parallax.js.map +0 -1
  462. package/dist/parallax/ParallaxLayer.js.map +0 -1
  463. package/dist/parallax/parallaxMath.js.map +0 -1
  464. package/dist/particles/Emitter.js.map +0 -1
  465. package/dist/particles/ParticleBudget.js.map +0 -1
  466. package/dist/particles/ParticleSim.js.map +0 -1
  467. package/dist/particles/particleCurves.js.map +0 -1
  468. package/dist/particles/particleSampling.js.map +0 -1
  469. package/dist/physics/Body.js.map +0 -1
  470. package/dist/physics/BroadPhase.js.map +0 -1
  471. package/dist/physics/Contact.js.map +0 -1
  472. package/dist/physics/ContactSolver.js.map +0 -1
  473. package/dist/physics/PhysicsWorld.js.map +0 -1
  474. package/dist/physics/SpatialHash.js.map +0 -1
  475. package/dist/physics/collide.js.map +0 -1
  476. package/dist/physics/collidePolygon.js.map +0 -1
  477. package/dist/physics/contactReport.js.map +0 -1
  478. package/dist/physics/drawColliders.js.map +0 -1
  479. package/dist/physics/physicsSystem.js.map +0 -1
  480. package/dist/physics/polygon.js.map +0 -1
  481. package/dist/physics/raycast.js.map +0 -1
  482. package/dist/physics/syncToBody.js.map +0 -1
  483. package/dist/physics/tileBodies.js.map +0 -1
  484. package/dist/physics/types.js.map +0 -1
  485. package/dist/pixel/Darkness.js.map +0 -1
  486. package/dist/pixel/DitherVignette.js.map +0 -1
  487. package/dist/pixel/Evaporation.js.map +0 -1
  488. package/dist/pixel/NightShade.js.map +0 -1
  489. package/dist/pixel/PixelLayer.js.map +0 -1
  490. package/dist/pixel/SwayProp.js.map +0 -1
  491. package/dist/pixel/lights.js.map +0 -1
  492. package/dist/pixel/nineSlice.js.map +0 -1
  493. package/dist/pixel/paintLayer.js.map +0 -1
  494. package/dist/pixel/palette.js.map +0 -1
  495. package/dist/pixel/pixel.js.map +0 -1
  496. package/dist/pixel/pixelPaint.js.map +0 -1
  497. package/dist/pixel/pixelTone.js.map +0 -1
  498. package/dist/pixel/propKit.js.map +0 -1
  499. package/dist/pixel/ramp.js.map +0 -1
  500. package/dist/pixel/selout.js.map +0 -1
  501. package/dist/pixel/spritePixels.js.map +0 -1
  502. package/dist/pixel/swayRig.js.map +0 -1
  503. package/dist/pixel/vignetteMask.js.map +0 -1
  504. package/dist/pixel/weatherArt.js.map +0 -1
  505. package/dist/pixel.js.map +0 -1
  506. package/dist/platform/touch.js.map +0 -1
  507. package/dist/postfx/BloomFilter.js.map +0 -1
  508. package/dist/postfx/ChromaticAberrationFilter.js.map +0 -1
  509. package/dist/postfx/ColorAdjustFilter.js.map +0 -1
  510. package/dist/postfx/CrtFilter.js.map +0 -1
  511. package/dist/postfx/PixelateFilter.js.map +0 -1
  512. package/dist/postfx/PostFx.js.map +0 -1
  513. package/dist/postfx/ShockwaveFilter.js.map +0 -1
  514. package/dist/postfx/VignetteFilter.js.map +0 -1
  515. package/dist/postfx/fxAnimator.js.map +0 -1
  516. package/dist/postfx/fxShader.js.map +0 -1
  517. package/dist/postfx.js.map +0 -1
  518. package/dist/react/ChoiceDialog.js.map +0 -1
  519. package/dist/react/ConfirmDialog.js.map +0 -1
  520. package/dist/react/Glyph.js.map +0 -1
  521. package/dist/react/Modal.js.map +0 -1
  522. package/dist/react/Panel.js.map +0 -1
  523. package/dist/react/PixelImage.js.map +0 -1
  524. package/dist/react/Select.js.map +0 -1
  525. package/dist/react/Slider.js.map +0 -1
  526. package/dist/react/SplitPane.js.map +0 -1
  527. package/dist/react/TabStrip.js.map +0 -1
  528. package/dist/react/TitleTips.js.map +0 -1
  529. package/dist/react/Tooltip.js.map +0 -1
  530. package/dist/react/UiProvider.js.map +0 -1
  531. package/dist/react/baseCss.js.map +0 -1
  532. package/dist/react/choiceStore.js.map +0 -1
  533. package/dist/react/classNames.js.map +0 -1
  534. package/dist/react/confirmStore.js.map +0 -1
  535. package/dist/react/labels.js.map +0 -1
  536. package/dist/react/placement.js.map +0 -1
  537. package/dist/react/useFillSheet.js.map +0 -1
  538. package/dist/react/useFitToViewport.js.map +0 -1
  539. package/dist/react/usePicked.js.map +0 -1
  540. package/dist/react/useStore.js.map +0 -1
  541. package/dist/react/useViewport.js.map +0 -1
  542. package/dist/react.js.map +0 -1
  543. package/dist/rig/PosePlayer.js.map +0 -1
  544. package/dist/rig/RigView.js.map +0 -1
  545. package/dist/rig/Skeleton.js.map +0 -1
  546. package/dist/rig/humanoid.js.map +0 -1
  547. package/dist/rig/humanoid.json.js.map +0 -1
  548. package/dist/rig/humanoidPoses.js.map +0 -1
  549. package/dist/rig/poseMath.js.map +0 -1
  550. package/dist/rig/poses.json.js.map +0 -1
  551. package/dist/save/Autosaver.js.map +0 -1
  552. package/dist/save/MemoryBackend.js.map +0 -1
  553. package/dist/save/SaveStore.js.map +0 -1
  554. package/dist/save/WebStorageBackend.js.map +0 -1
  555. package/dist/save/checksum.js.map +0 -1
  556. package/dist/save/migrateSave.js.map +0 -1
  557. package/dist/settings.js.map +0 -1
  558. package/dist/tilemap/TilemapView.js.map +0 -1
  559. package/dist/tilemap/collision.js.map +0 -1
  560. package/dist/tilemap/tiled.js.map +0 -1
  561. package/dist/transitions/CrossfadeTransition.js.map +0 -1
  562. package/dist/transitions/DitherWipeTransition.js.map +0 -1
  563. package/dist/transitions/FadeTransition.js.map +0 -1
  564. package/dist/transitions/Letterbox.js.map +0 -1
  565. package/dist/transitions/ditherMask.js.map +0 -1
  566. package/dist/transitions/transitionTo.js.map +0 -1
  567. package/dist/transitions/tweenDone.js.map +0 -1
  568. package/dist/ui/Bar.js.map +0 -1
  569. package/dist/ui/Button.js.map +0 -1
  570. package/dist/ui/Dialog.js.map +0 -1
  571. package/dist/ui/FocusManager.js.map +0 -1
  572. package/dist/ui/Label.js.map +0 -1
  573. package/dist/ui/List.js.map +0 -1
  574. package/dist/ui/Panel.js.map +0 -1
  575. package/dist/ui/ScrollView.js.map +0 -1
  576. package/dist/ui/Slider.js.map +0 -1
  577. package/dist/ui/Stack.js.map +0 -1
  578. package/dist/ui/Toggle.js.map +0 -1
  579. package/dist/ui/UiHost.js.map +0 -1
  580. package/dist/ui/UiPointerGate.js.map +0 -1
  581. package/dist/ui/UiRoot.js.map +0 -1
  582. package/dist/ui/Widget.js.map +0 -1
  583. package/dist/ui/dom/DomOverlay.js.map +0 -1
  584. package/dist/ui/dom/DomWorldAnchors.js.map +0 -1
  585. package/dist/ui/dom/InputShield.js.map +0 -1
  586. package/dist/ui/dom/createStore.js.map +0 -1
  587. package/dist/ui/dom/shieldDecision.js.map +0 -1
  588. package/dist/ui/dom/worldToScreen.js.map +0 -1
  589. package/dist/ui/layout/anchor.js.map +0 -1
  590. package/dist/ui/layout/barDrain.js.map +0 -1
  591. package/dist/ui/layout/fitToViewport.js.map +0 -1
  592. package/dist/ui/layout/focusNav.js.map +0 -1
  593. package/dist/ui/layout/geometry.js.map +0 -1
  594. package/dist/ui/layout/listWidth.js.map +0 -1
  595. package/dist/ui/layout/placeTooltip.js.map +0 -1
  596. package/dist/ui/layout/scroll.js.map +0 -1
  597. package/dist/ui/layout/slider.js.map +0 -1
  598. package/dist/ui/layout/stack.js.map +0 -1
  599. package/dist/ui/layout/wrapRow.js.map +0 -1
  600. package/dist/ui.js.map +0 -1
@@ -19,4 +19,3 @@ export {
19
19
  o as cadenceEarly,
20
20
  e as cadenceNext
21
21
  };
22
- //# sourceMappingURL=cadence.js.map
@@ -8,4 +8,3 @@ export {
8
8
  T as INPUT_STEP_RATE,
9
9
  _ as TILE_SIZE
10
10
  };
11
- //# sourceMappingURL=constants.js.map
@@ -121,4 +121,3 @@ class o {
121
121
  export {
122
122
  o as LobbyClient
123
123
  };
124
- //# sourceMappingURL=LobbyClient.js.map
@@ -363,4 +363,3 @@ class p {
363
363
  export {
364
364
  p as LobbyHost
365
365
  };
366
- //# sourceMappingURL=LobbyHost.js.map
@@ -63,4 +63,3 @@ class i {
63
63
  export {
64
64
  i as LobbyRooms
65
65
  };
66
- //# sourceMappingURL=LobbyRooms.js.map
@@ -103,4 +103,3 @@ export {
103
103
  l as Matchmaker,
104
104
  d as balanceTeams
105
105
  };
106
- //# sourceMappingURL=Matchmaker.js.map
@@ -1,83 +1,84 @@
1
- import { BODY_HALF_WIDTH as D, BODY_HALF_HEIGHT as M, COLLISION_EPSILON as y, INPUT_FLAG_DASH as x, INPUT_STEP_DT as H } from "./constants.js";
2
- const u = 0.7071067811865476;
3
- function W(t, e, o, h, f = {}) {
1
+ import { BODY_HALF_WIDTH as b, BODY_HALF_HEIGHT as D, COLLISION_EPSILON as i, INPUT_FLAG_DASH as M, INPUT_STEP_DT as x } from "./constants.js";
2
+ const H = 0.7071067811865476;
3
+ function W(t, e, o, h, a = {}) {
4
4
  if (h.length !== t * e)
5
5
  throw new Error(`collision string length ${h.length} != ${t}x${e}`);
6
6
  const n = new Uint8Array(t * e);
7
7
  for (let c = 0; c < n.length; c++) n[c] = h.charCodeAt(c) === 49 ? 1 : 0;
8
- const { ground: r } = f, s = new Set(f.shotOverTiles ?? []);
9
- let l;
10
- if (r && r.length === n.length && s.size) {
11
- l = new Uint8Array(n.length);
12
- for (let c = 0; c < n.length; c++) l[c] = n[c] && s.has(r[c]) ? 1 : 0;
8
+ const { ground: s } = a, r = new Set(a.shotOverTiles ?? []);
9
+ let f;
10
+ if (s && s.length === n.length && r.size) {
11
+ f = new Uint8Array(n.length);
12
+ for (let c = 0; c < n.length; c++) f[c] = n[c] && r.has(s[c]) ? 1 : 0;
13
13
  }
14
- const a = f.bodyHalfWidth ?? D, d = f.bodyHalfHeight ?? M;
15
- return l ? { width: t, height: e, tileSize: o, solid: n, shotOver: l, bodyHalfWidth: a, bodyHalfHeight: d } : { width: t, height: e, tileSize: o, solid: n, bodyHalfWidth: a, bodyHalfHeight: d };
14
+ const l = a.bodyHalfWidth ?? b, y = a.bodyHalfHeight ?? D;
15
+ return f ? { width: t, height: e, tileSize: o, solid: n, shotOver: f, bodyHalfWidth: l, bodyHalfHeight: y } : { width: t, height: e, tileSize: o, solid: n, bodyHalfWidth: l, bodyHalfHeight: y };
16
16
  }
17
17
  function A(t, e, o) {
18
- return i(t, e, o) ? t.shotOver?.[o * t.width + e] !== 1 : !1;
18
+ return d(t, e, o) ? t.shotOver?.[o * t.width + e] !== 1 : !1;
19
19
  }
20
20
  function C(t, e) {
21
21
  return { x: t, y: e, lastDx: 1, lastDy: 0, dashLeft: 0, dashCd: 0, dashDx: 1, dashDy: 0 };
22
22
  }
23
- function i(t, e, o) {
23
+ function d(t, e, o) {
24
24
  return e < 0 || o < 0 || e >= t.width || o >= t.height ? !0 : t.solid[o * t.width + e] === 1;
25
25
  }
26
26
  function O(t, e, o) {
27
- const h = t.tileSize, f = Math.floor((e - t.bodyHalfWidth) / h), n = Math.floor((e + t.bodyHalfWidth) / h), r = Math.floor((o - t.bodyHalfHeight) / h), s = Math.floor((o + t.bodyHalfHeight) / h);
28
- for (let l = r; l <= s; l++)
29
- for (let a = f; a <= n; a++)
30
- if (i(t, a, l)) return !0;
27
+ const h = t.tileSize, a = Math.floor((e - t.bodyHalfWidth) / h), n = Math.floor((e + t.bodyHalfWidth) / h), s = Math.floor((o - t.bodyHalfHeight) / h), r = Math.floor((o + t.bodyHalfHeight) / h);
28
+ for (let f = s; f <= r; f++)
29
+ for (let l = a; l <= n; l++)
30
+ if (d(t, l, f)) return !0;
31
31
  return !1;
32
32
  }
33
33
  function L(t, e, o, h) {
34
34
  if (h === 0) return e;
35
- const f = t.tileSize, n = e + h, r = Math.floor((o - t.bodyHalfHeight) / f), s = Math.floor((o + t.bodyHalfHeight) / f);
35
+ const a = t.tileSize, n = e + h, s = Math.floor((o - t.bodyHalfHeight) / a), r = Math.floor((o + t.bodyHalfHeight) / a);
36
36
  if (h > 0) {
37
- const l = Math.floor((n + t.bodyHalfWidth) / f);
38
- for (let a = r; a <= s; a++)
39
- if (i(t, l, a)) return l * f - t.bodyHalfWidth - y;
37
+ const f = Math.floor((n + t.bodyHalfWidth) / a);
38
+ for (let l = s; l <= r; l++)
39
+ if (d(t, f, l)) return f * a - t.bodyHalfWidth - i;
40
40
  } else {
41
- const l = Math.floor((n - t.bodyHalfWidth) / f);
42
- for (let a = r; a <= s; a++)
43
- if (i(t, l, a)) return (l + 1) * f + t.bodyHalfWidth + y;
41
+ const f = Math.floor((n - t.bodyHalfWidth) / a);
42
+ for (let l = s; l <= r; l++)
43
+ if (d(t, f, l)) return (f + 1) * a + t.bodyHalfWidth + i;
44
44
  }
45
45
  return n;
46
46
  }
47
47
  function S(t, e, o, h) {
48
48
  if (h === 0) return o;
49
- const f = t.tileSize, n = o + h, r = Math.floor((e - t.bodyHalfWidth) / f), s = Math.floor((e + t.bodyHalfWidth) / f);
49
+ const a = t.tileSize, n = o + h, s = Math.floor((e - t.bodyHalfWidth) / a), r = Math.floor((e + t.bodyHalfWidth) / a);
50
50
  if (h > 0) {
51
- const l = Math.floor((n + t.bodyHalfHeight) / f);
52
- for (let a = r; a <= s; a++)
53
- if (i(t, a, l)) return l * f - t.bodyHalfHeight - y;
51
+ const f = Math.floor((n + t.bodyHalfHeight) / a);
52
+ for (let l = s; l <= r; l++)
53
+ if (d(t, l, f)) return f * a - t.bodyHalfHeight - i;
54
54
  } else {
55
- const l = Math.floor((n - t.bodyHalfHeight) / f);
56
- for (let a = r; a <= s; a++)
57
- if (i(t, a, l)) return (l + 1) * f + t.bodyHalfHeight + y;
55
+ const f = Math.floor((n - t.bodyHalfHeight) / a);
56
+ for (let l = s; l <= r; l++)
57
+ if (d(t, l, f)) return (f + 1) * a + t.bodyHalfHeight + i;
58
58
  }
59
59
  return n;
60
60
  }
61
- function b(t) {
61
+ function u(t) {
62
62
  return t > 0 ? 1 : t < 0 ? -1 : 0;
63
63
  }
64
64
  function _(t, e, o, h) {
65
65
  t.dashCd > 0 && t.dashCd--;
66
- const f = t.dashLeft > 0;
67
- let n = o.canMove && !f ? b(e[0]) : 0, r = o.canMove && !f ? b(e[1]) : 0;
68
- n !== 0 && r !== 0 && (n = n * u, r = r * u), (n !== 0 || r !== 0) && (t.lastDx = n, t.lastDy = r), (e[2] & x) !== 0 && o.canDash && o.canMove && t.dashLeft === 0 && t.dashCd === 0 && (t.dashLeft = o.dashSteps, t.dashCd = o.dashCooldownSteps, t.dashDx = t.lastDx, t.dashDy = t.lastDy);
69
- let s, l;
70
- t.dashLeft > 0 ? (s = t.dashDx * o.dashSpeed, l = t.dashDy * o.dashSpeed, t.dashLeft--) : (s = n * o.speed, l = r * o.speed), t.x = L(h, t.x, t.y, s * H), t.y = S(h, t.x, t.y, l * H);
66
+ const a = t.dashLeft > 0;
67
+ let n = o.canMove && !a ? u(e[0]) : 0, s = o.canMove && !a ? u(e[1]) : 0;
68
+ n !== 0 && s !== 0 && (n = n * H, s = s * H), (n !== 0 || s !== 0) && (t.lastDx = n, t.lastDy = s), (e[2] & (o.dashFlag ?? M)) !== 0 && o.canDash && o.canMove && t.dashLeft === 0 && t.dashCd === 0 && (t.dashLeft = o.dashSteps, t.dashCd = o.dashCooldownSteps, t.dashDx = t.lastDx, t.dashDy = t.lastDy);
69
+ let r, f;
70
+ t.dashLeft > 0 ? (r = t.dashDx * o.dashSpeed, f = t.dashDy * o.dashSpeed, t.dashLeft--) : (r = n * o.speed, f = s * o.speed);
71
+ const l = o.stepDt ?? x;
72
+ t.x = L(h, t.x, t.y, r * l), t.y = S(h, t.x, t.y, f * l);
71
73
  }
72
74
  export {
73
- u as DIAGONAL,
75
+ H as DIAGONAL,
74
76
  A as blocksShot,
75
77
  O as bodyCollides,
76
78
  W as createCollisionGrid,
77
79
  C as createMover,
78
- i as isSolidTile,
80
+ d as isSolidTile,
79
81
  L as moveX,
80
82
  S as moveY,
81
83
  _ as stepMover
82
84
  };
83
- //# sourceMappingURL=movement.js.map
@@ -8,4 +8,3 @@ export {
8
8
  r as moverFromWire,
9
9
  d as moverToWire
10
10
  };
11
- //# sourceMappingURL=protocol.js.map
@@ -0,0 +1,10 @@
1
+ function c(n, e = 1e4, t = 250) {
2
+ return Math.min(e, t * 2 ** Math.max(0, n));
3
+ }
4
+ function r(n, e) {
5
+ return e.closedByUs || e.reconnect === !1 ? !1 : !e.fatalCloseCodes?.includes(n);
6
+ }
7
+ export {
8
+ c as reconnectDelay,
9
+ r as shouldReconnect
10
+ };
@@ -19,4 +19,3 @@ export {
19
19
  S as serverNow,
20
20
  _ as serverOffset
21
21
  };
22
- //# sourceMappingURL=serverClock.js.map
@@ -89,4 +89,3 @@ export {
89
89
  D as readUpdate,
90
90
  i as writeUpdate
91
91
  };
92
- //# sourceMappingURL=snapshotCodec.js.map
@@ -29,4 +29,3 @@ class d {
29
29
  export {
30
30
  d as Parallax
31
31
  };
32
- //# sourceMappingURL=Parallax.js.map
@@ -67,4 +67,3 @@ class g {
67
67
  export {
68
68
  g as ParallaxLayer
69
69
  };
70
- //# sourceMappingURL=ParallaxLayer.js.map
@@ -24,4 +24,3 @@ export {
24
24
  c as spanVisible,
25
25
  s as wrap
26
26
  };
27
- //# sourceMappingURL=parallaxMath.js.map
@@ -105,4 +105,3 @@ const Y = { start: 1, end: 0 };
105
105
  export {
106
106
  R as Emitter
107
107
  };
108
- //# sourceMappingURL=Emitter.js.map
@@ -29,4 +29,3 @@ export {
29
29
  s as ParticleBudget,
30
30
  a as particleBudget
31
31
  };
32
- //# sourceMappingURL=ParticleBudget.js.map
@@ -57,4 +57,3 @@ class y {
57
57
  export {
58
58
  y as ParticleSim
59
59
  };
60
- //# sourceMappingURL=ParticleSim.js.map
@@ -45,4 +45,3 @@ export {
45
45
  d as sampleColor,
46
46
  u as sampleCurve
47
47
  };
48
- //# sourceMappingURL=particleCurves.js.map
@@ -27,4 +27,3 @@ export {
27
27
  s as seededRandom,
28
28
  i as spreadAngle
29
29
  };
30
- //# sourceMappingURL=particleSampling.js.map
@@ -199,4 +199,3 @@ function w(a) {
199
199
  export {
200
200
  p as Body
201
201
  };
202
- //# sourceMappingURL=Body.js.map
@@ -53,4 +53,3 @@ class y {
53
53
  export {
54
54
  y as BroadPhase
55
55
  };
56
- //# sourceMappingURL=BroadPhase.js.map
@@ -73,4 +73,3 @@ export {
73
73
  o as Contact,
74
74
  n as ContactPoint
75
75
  };
76
- //# sourceMappingURL=Contact.js.map
@@ -67,4 +67,3 @@ function C(l, e, s, i, c, a, n, r, y) {
67
67
  export {
68
68
  z as ContactSolver
69
69
  };
70
- //# sourceMappingURL=ContactSolver.js.map
@@ -218,4 +218,3 @@ class O {
218
218
  export {
219
219
  O as PhysicsWorld
220
220
  };
221
- //# sourceMappingURL=PhysicsWorld.js.map
@@ -36,4 +36,3 @@ class i {
36
36
  export {
37
37
  i as SpatialHash
38
38
  };
39
- //# sourceMappingURL=SpatialHash.js.map
@@ -73,4 +73,3 @@ export {
73
73
  R as collide,
74
74
  L as emptyManifold
75
75
  };
76
- //# sourceMappingURL=collide.js.map
@@ -91,4 +91,3 @@ export {
91
91
  J as circlePolygon,
92
92
  z as polygonPolygon
93
93
  };
94
- //# sourceMappingURL=collidePolygon.js.map
@@ -11,4 +11,3 @@ export {
11
11
  o as info,
12
12
  u as setGround
13
13
  };
14
- //# sourceMappingURL=contactReport.js.map
@@ -28,4 +28,3 @@ export {
28
28
  f as colliderColor,
29
29
  m as drawColliders
30
30
  };
31
- //# sourceMappingURL=drawColliders.js.map
@@ -5,4 +5,3 @@ function r(s, t = "physics") {
5
5
  export {
6
6
  r as physicsSystem
7
7
  };
8
- //# sourceMappingURL=physicsSystem.js.map
@@ -77,4 +77,3 @@ export {
77
77
  m as polygonShape,
78
78
  S as regularPolygon
79
79
  };
80
- //# sourceMappingURL=polygon.js.map
@@ -59,4 +59,3 @@ export {
59
59
  v as castRay,
60
60
  L as rayShape
61
61
  };
62
- //# sourceMappingURL=raycast.js.map
@@ -16,4 +16,3 @@ function s(l, n, c, a = 0, e = 0, g = !1) {
16
16
  export {
17
17
  s as syncToBody
18
18
  };
19
- //# sourceMappingURL=syncToBody.js.map
@@ -56,4 +56,3 @@ export {
56
56
  E as tileBodies,
57
57
  B as tileBodiesFromGrid
58
58
  };
59
- //# sourceMappingURL=tileBodies.js.map
@@ -5,4 +5,3 @@ export {
5
5
  t as FACE_RIGHT,
6
6
  E as FACE_TOP
7
7
  };
8
- //# sourceMappingURL=types.js.map
@@ -1,40 +1,39 @@
1
- import { Sprite as g, Texture as v, RenderTexture as S, Container as x } from "pixi.js";
2
- import { TILE_SIZE as H } from "../net/constants.js";
3
- import { liveLights as k, lightRadius as R } from "./lights.js";
4
- import { isTouchUi as D } from "../platform/touch.js";
5
- const K = 66, W = 33, M = 8, z = (h) => Math.min(1, Math.pow(Math.max(0, 1 - h * h), 1.5) * 1.15), P = (h) => Math.pow(Math.max(0, 1 - h), 2), G = 4, U = 3, Y = 0.3, E = 0.85, $ = 16761466, B = [0, 8, 2, 10, 12, 4, 14, 6, 3, 11, 1, 9, 15, 7, 13, 5].map((h) => (h + 0.5) / 16), _ = (h) => h <= 24 ? Math.max(2, Math.round(h / 2) * 2) : Math.round(h / 8) * 8, F = [...new Set(Array.from({ length: 160 }, (h, t) => _(t + 1)))], N = 33, I = /* @__PURE__ */ new Map();
6
- let T = !1;
7
- function O() {
8
- if (T) return;
9
- T = !0;
10
- const h = F.flatMap((s) => [["hole", s], ["wash", s]]), t = () => {
1
+ import { Sprite as y, Texture as v, RenderTexture as E, Container as x } from "pixi.js";
2
+ import { liveLights as _, lightRadius as k } from "./lights.js";
3
+ import { isTouchUi as R } from "../platform/touch.js";
4
+ const D = 66, K = 33, p = 8, W = (h) => Math.min(1, Math.pow(Math.max(0, 1 - h * h), 1.5) * 1.15), z = (h) => Math.pow(Math.max(0, 1 - h), 2), P = 4, G = 3, U = 0.3, S = 0.85, $ = 16761466, Y = [0, 8, 2, 10, 12, 4, 14, 6, 3, 11, 1, 9, 15, 7, 13, 5].map((h) => (h + 0.5) / 16), I = (h) => h <= 24 ? Math.max(2, Math.round(h / 2) * 2) : Math.round(h / 8) * 8, B = [...new Set(Array.from({ length: 160 }, (h, t) => I(t + 1)))], F = 33, C = /* @__PURE__ */ new Map();
5
+ let H = !1;
6
+ function N() {
7
+ if (H) return;
8
+ H = !0;
9
+ const h = B.flatMap((s) => [["hole", s], ["wash", s]]), t = () => {
11
10
  const s = h.shift();
12
- s && (y(s[0], s[1]), setTimeout(t, 0));
11
+ s && (g(s[0], s[1]), setTimeout(t, 0));
13
12
  };
14
13
  setTimeout(t, 0);
15
14
  }
16
- function y(h, t) {
17
- const s = `${h}${t}`, i = I.get(s);
15
+ function g(h, t) {
16
+ const s = `${h}${t}`, i = C.get(s);
18
17
  if (i) return i;
19
- const e = t * 2, a = Math.max(2, Math.round(t * 2 * E)), r = h === "hole" ? G : U, p = h === "hole" ? z : P, o = document.createElement("canvas");
18
+ const e = t * 2, a = Math.max(2, Math.round(t * 2 * S)), r = h === "hole" ? P : G, w = h === "hole" ? W : z, o = document.createElement("canvas");
20
19
  o.width = e, o.height = a;
21
20
  const c = o.getContext("2d");
22
21
  if (!c) return v.EMPTY;
23
22
  const u = c.createImageData(e, a);
24
23
  for (let f = 0; f < a; f++)
25
24
  for (let l = 0; l < e; l++) {
26
- const A = Math.hypot((l + 0.5 - e / 2) / t, (f + 0.5 - a / 2) / (t * E));
27
- if (A >= 1) continue;
28
- const L = Math.min(r, Math.floor(p(A) * r + B[f % 4 * 4 + l % 4])) / r, d = (f * e + l) * 4;
29
- u.data[d] = u.data[d + 1] = u.data[d + 2] = 255, u.data[d + 3] = Math.round(L * 255);
25
+ const L = Math.hypot((l + 0.5 - e / 2) / t, (f + 0.5 - a / 2) / (t * S));
26
+ if (L >= 1) continue;
27
+ const A = Math.min(r, Math.floor(w(L) * r + Y[f % 4 * 4 + l % 4])) / r, d = (f * e + l) * 4;
28
+ u.data[d] = u.data[d + 1] = u.data[d + 2] = 255, u.data[d + 3] = Math.round(A * 255);
30
29
  }
31
30
  c.putImageData(u, 0, 0);
32
- const w = v.from(o);
33
- return w.source.scaleMode = "nearest", I.set(s, w), w;
31
+ const M = v.from(o);
32
+ return M.source.scaleMode = "nearest", C.set(s, M), M;
34
33
  }
35
34
  class q {
36
- constructor(t, s, i) {
37
- this.stage = t, this.color = s, this.alpha = i, this.sheet = new g({ texture: v.WHITE }), this.scratch.addChild(this.sheet, this.holes, this.washes), this.carried = this.light(16773340), this.rt = S.create({ width: 1, height: 1 }), this.view = new g({ texture: this.rt }), this.layer.addChild(this.view), t.screen.addChild(this.layer), t.cameras.main.follow(this.layer), this.unsubscribeResize = t.onResize(() => this.dirty = !0), O();
35
+ constructor(t, s, i, e = {}) {
36
+ this.stage = t, this.color = s, this.alpha = i, this.carriedLight = e.carriedLight ?? V, this.sheet = new y({ texture: v.WHITE }), this.scratch.addChild(this.sheet, this.holes, this.washes), this.carried = this.light(16773340), this.rt = E.create({ width: 1, height: 1 }), this.view = new y({ texture: this.rt }), this.layer.addChild(this.view), t.screen.addChild(this.layer), t.cameras.main.follow(this.layer), this.unsubscribeResize = t.onResize(() => this.dirty = !0), N();
38
37
  }
39
38
  stage;
40
39
  color;
@@ -76,12 +75,14 @@ class q {
76
75
  /** The lamps' colour turned down (`setLampsDimmed`). */
77
76
  dimLamps = !1;
78
77
  /** A phone redraws the night at most `PHONE_MS` apart, whatever moves (`isTouchUi`). */
79
- phone = D();
78
+ phone = R();
79
+ /** The radius `update` uses when it is given none (`DarknessOptions.carriedLight`). */
80
+ carriedLight;
80
81
  /** A hole and its colour, added to the night's layers. */
81
82
  light(t) {
82
- const s = new g({ texture: y("hole", 8) });
83
+ const s = new y({ texture: g("hole", 8) });
83
84
  s.blendMode = "erase", this.holes.addChild(s);
84
- const i = new g({ texture: y("wash", 8) });
85
+ const i = new y({ texture: g("wash", 8) });
85
86
  return i.tint = t, this.washes.addChild(i), { hole: s, wash: i };
86
87
  }
87
88
  /** 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. */
@@ -108,32 +109,35 @@ class q {
108
109
  * at zoom 2 or 3 it is a quarter or a ninth of the screen's pixels. True when it was remade.
109
110
  */
110
111
  fit(t, s, i) {
111
- const e = Math.ceil(t / i) + M * 2, a = Math.ceil(s / i) + M * 2, r = `${e},${a},${i}`;
112
- return r === this.rtKey ? !1 : (this.rtKey = r, this.rt.destroy(!0), this.rt = S.create({ width: e, height: a }), this.rt.source.scaleMode = "nearest", this.view.texture = this.rt, !0);
112
+ const e = Math.ceil(t / i) + p * 2, a = Math.ceil(s / i) + p * 2, r = `${e},${a},${i}`;
113
+ return r === this.rtKey ? !1 : (this.rtKey = r, this.rt.destroy(!0), this.rt = E.create({ width: e, height: a }), this.rt.source.scaleMode = "nearest", this.view.texture = this.rt, !0);
113
114
  }
114
- /** Redraws the night with this frame's holes in it, when anything in it changed. `px`/`py` is where the player stands. */
115
- update(t, s, i, e) {
115
+ /**
116
+ * Redraws the night with this frame's holes in it, when anything in it changed. `px`/`py` is where the player stands;
117
+ * `carriedRadius` is the light they carry (default the `carriedLight` option, 0 for none).
118
+ */
119
+ update(t, s, i, e = this.carriedLight) {
116
120
  if (!this.layer.visible) return;
117
- const a = this.stage.cameras.main, r = a.zoom || 1, p = this.fit(this.stage.width, this.stage.height, r), o = Math.floor(a.scrollX) - M, c = Math.floor(a.scrollY) - M, u = `${o},${c},${this.rtKey},${this.color},${this.alpha}`, w = k(t), f = e > 0 ? `${Math.round(s)},${Math.round(i)},${Math.round(e)}` : "", l = t - this.drawnAt;
118
- if (!(this.dirty || u !== this.drawn || f !== this.carriedAt || w.length > 0 && l >= N || (e > 0 || this.flickering > 0) && l >= K)) return;
119
- const L = Math.abs(o - this.ox) >= M - 1 || Math.abs(c - this.oy) >= M - 1;
120
- if (this.phone && l < W && !p && !L) return;
121
+ const a = this.stage.cameras.main, r = a.zoom || 1, w = this.fit(this.stage.width, this.stage.height, r), o = Math.floor(a.scrollX) - p, c = Math.floor(a.scrollY) - p, u = `${o},${c},${this.rtKey},${this.color},${this.alpha}`, M = _(t), f = e > 0 ? `${Math.round(s)},${Math.round(i)},${Math.round(e)}` : "", l = t - this.drawnAt;
122
+ if (!(this.dirty || u !== this.drawn || f !== this.carriedAt || M.length > 0 && l >= F || (e > 0 || this.flickering > 0) && l >= D)) return;
123
+ const A = Math.abs(o - this.ox) >= p - 1 || Math.abs(c - this.oy) >= p - 1;
124
+ if (this.phone && l < K && !w && !A) return;
121
125
  this.dirty = !1, this.drawn = u, this.carriedAt = f, this.drawnAt = t, this.ox = o, this.oy = c, this.view.position.set(o, c), this.sheet.width = this.rt.width, this.sheet.height = this.rt.height, this.sheet.position.set(0, 0), this.sheet.tint = this.color, this.sheet.alpha = this.alpha;
122
- const d = Y * Math.min(1, this.alpha * 1.4);
126
+ const d = U * Math.min(1, this.alpha * 1.4);
123
127
  e <= 0 ? this.hide(this.carried) : this.place(this.carried, s, i - 6, e * (1 + Math.sin(t / 260) * 0.03 + Math.sin(t / 90) * 0.015), d * 0.5);
124
- const C = this.dimLamps ? d * V : d;
128
+ const T = this.dimLamps ? d * O : d;
125
129
  for (const n of this.lamps) {
126
130
  const m = n.flicker ? 1 + Math.sin(t / 190 + n.flicker) * 0.05 + Math.sin(t / 71 + n.flicker) * 0.03 : 1;
127
- this.place(n.sprites, n.x, n.y, n.r * m, C * (n.flicker ? 0.9 + (m - 1) * 2 : 1));
131
+ this.place(n.sprites, n.x, n.y, n.r * m, T * (n.flicker ? 0.9 + (m - 1) * 2 : 1));
128
132
  }
129
- for (; this.flashes.length < w.length; ) this.flashes.push(this.light($));
133
+ for (; this.flashes.length < M.length; ) this.flashes.push(this.light($));
130
134
  for (let n = 0; n < this.flashes.length; n++) {
131
- const m = w[n], b = this.flashes[n];
135
+ const m = M[n], b = this.flashes[n];
132
136
  if (!m) {
133
137
  this.hide(b);
134
138
  continue;
135
139
  }
136
- b.wash.tint = m.color, this.place(b, m.x, m.y, R(m, t), Math.min(0.6, d * 1.6));
140
+ b.wash.tint = m.color, this.place(b, m.x, m.y, k(m, t), Math.min(0.6, d * 1.6));
137
141
  }
138
142
  this.stage.app.renderer.render({ container: this.scratch, target: this.rt, clear: !0 });
139
143
  }
@@ -142,25 +146,24 @@ class q {
142
146
  }
143
147
  /** Lays light `l` at world (wx, wy), `r` px across its radius, in the night's world-pixel grid. */
144
148
  place(t, s, i, e, a) {
145
- const r = _(e), p = Math.round(s) - this.ox, o = Math.round(i) - this.oy;
146
- if (e < 1 || p < -r || o < -r || p > this.rt.width + r || o > this.rt.height + r) {
149
+ const r = I(e), w = Math.round(s) - this.ox, o = Math.round(i) - this.oy;
150
+ if (e < 1 || w < -r || o < -r || w > this.rt.width + r || o > this.rt.height + r) {
147
151
  this.hide(t);
148
152
  return;
149
153
  }
150
- t.hole.texture = y("hole", r), t.wash.texture = y("wash", r);
154
+ t.hole.texture = g("hole", r), t.wash.texture = g("wash", r);
151
155
  for (const c of [t.hole, t.wash])
152
- c.visible = !0, c.position.set(p - r, o - Math.round(r * E));
156
+ c.visible = !0, c.position.set(w - r, o - Math.round(r * S));
153
157
  t.wash.alpha = a, t.wash.visible = a > 0.01;
154
158
  }
155
159
  destroy() {
156
160
  this.unsubscribeResize(), this.stage.cameras.main.unfollow(this.layer), this.layer.destroy({ children: !0 }), this.rt.destroy(!0), this.scratch.destroy({ children: !0, context: !0 });
157
161
  }
158
162
  }
159
- const V = 0.35, J = H * 5;
163
+ const O = 0.35, V = 80;
160
164
  export {
161
- J as CARRIED_LIGHT,
165
+ V as CARRIED_LIGHT,
162
166
  q as Darkness,
163
- V as LAMP_DIM,
167
+ O as LAMP_DIM,
164
168
  $ as WARM_LIGHT
165
169
  };
166
- //# sourceMappingURL=Darkness.js.map
@@ -54,4 +54,3 @@ export {
54
54
  y as DitherVignette,
55
55
  w as ditherVignette
56
56
  };
57
- //# sourceMappingURL=DitherVignette.js.map
@@ -82,4 +82,3 @@ class G {
82
82
  export {
83
83
  G as Evaporation
84
84
  };
85
- //# sourceMappingURL=Evaporation.js.map
@@ -31,4 +31,3 @@ class p {
31
31
  export {
32
32
  p as NightShade
33
33
  };
34
- //# sourceMappingURL=NightShade.js.map
@@ -208,4 +208,3 @@ export {
208
208
  J as PixelLayer,
209
209
  $ as addPixelLayer
210
210
  };
211
- //# sourceMappingURL=PixelLayer.js.map
@@ -0,0 +1,99 @@
1
+ import { ringPixels as d, discRuns as k, ellipsePixels as u, chevronPixels as $ } from "./aimPixels.js";
2
+ function n(g, h, t) {
3
+ g.fillStyle(t, 1);
4
+ for (const [s, i] of h) g.fillRect(s, i, 1, 1);
5
+ }
6
+ class P {
7
+ constructor(h, t) {
8
+ this.stage = h, this.tones = t.tones, this.depth = t.depth ?? 0, this.headings = Math.max(4, Math.round(t.headings ?? 32)), this.spacing = Math.max(1, t.spacing ?? 10), this.creep = t.creep ?? 0.02, this.fillAlpha = t.fillAlpha ?? 0.28;
9
+ }
10
+ stage;
11
+ tones;
12
+ depth;
13
+ headings;
14
+ spacing;
15
+ creep;
16
+ fillAlpha;
17
+ cache = /* @__PURE__ */ new Map();
18
+ pool = [];
19
+ used = 0;
20
+ shown = /* @__PURE__ */ new Set();
21
+ next = /* @__PURE__ */ new Set();
22
+ begin() {
23
+ this.used = 0, this.next.clear();
24
+ }
25
+ /** A ring of radius `r` round (x, y): the bright line with dark pixels just inside and outside it. */
26
+ ring(h, t, s, i) {
27
+ const e = this.tones[i];
28
+ s = Math.max(2, Math.round(s)), this.place(`ring:${s}:${i}`, h, t, (l) => {
29
+ n(l, d(s + 1), e.dark), n(l, d(Math.max(1, s - 1)), e.dark), n(l, d(s), e.light);
30
+ });
31
+ }
32
+ /** A filled disc of radius `r` with a bright rim and a cross at its middle: where a skill aimed at a spot lands. */
33
+ disc(h, t, s, i) {
34
+ const e = this.tones[i];
35
+ s = Math.max(2, Math.round(s)), this.place(`disc:${s}:${i}`, h, t, (l) => {
36
+ l.fillStyle(e.fill, this.fillAlpha);
37
+ for (const [a, o, c] of k(s)) l.fillRect(o, a, c - o + 1, 1);
38
+ n(l, d(s + 1), e.dark), n(l, d(s), e.rim), l.fillStyle(e.light, 1).fillRect(-1, 0, 3, 1).fillRect(0, -1, 1, 3);
39
+ });
40
+ }
41
+ /** A ring on the ground in three-quarter view, `rx` wide and `ry` deep, centred on (x, y) — a body's feet. */
42
+ groundRing(h, t, s, i, e) {
43
+ const l = this.tones[e];
44
+ s = Math.max(3, Math.round(s)), i = Math.max(2, Math.round(i)), this.place(`ell:${s}:${i}:${e}`, h, t, (a) => {
45
+ n(a, u(s + 1, i + 1), l.dark), n(a, u(s - 1, i - 1), l.dark), n(a, u(s, i), l.rim), a.fillStyle(l.light, 1).fillRect(-s, 0, 1, 1).fillRect(s, 0, 1, 1).fillRect(-1, i, 3, 1);
46
+ });
47
+ }
48
+ /**
49
+ * An aim line from (x, y) along `angle`, from `start` to `end` px out: chevrons `size` px across every `spacing`,
50
+ * creeping forward with `now`, and a larger one at the end.
51
+ */
52
+ chevrons(h, t, s, i, e, l, a, o) {
53
+ const c = this.heading(i), f = c / this.headings * Math.PI * 2, r = Math.cos(i), x = Math.sin(i), m = h * this.creep % this.spacing, M = l - a;
54
+ for (let p = e + m; p < M - this.spacing * 0.5; p += this.spacing) this.chevron(t + r * p, s + x * p, c, f, a, o);
55
+ this.chevron(t + r * M, s + x * M, c, f, a + 2, o);
56
+ }
57
+ /**
58
+ * One still chevron `dist` px out from (x, y) along `angle`: the way the next blow goes. Unlike `chevrons` it does
59
+ * not creep, so an arrow always under the feet does not keep catching the eye.
60
+ */
61
+ pointer(h, t, s, i, e, l) {
62
+ const a = this.heading(s);
63
+ this.chevron(h + Math.cos(s) * i, t + Math.sin(s) * i, a, a / this.headings * Math.PI * 2, e, l);
64
+ }
65
+ end() {
66
+ for (let t = this.used; t < this.pool.length; t++) this.pool[t].g.setVisible(!1);
67
+ for (const t of this.shown) this.next.has(t) || t.setVisible(!1);
68
+ for (const t of this.next) t.setVisible(!0);
69
+ const h = this.shown;
70
+ this.shown = this.next, this.next = h;
71
+ }
72
+ destroy() {
73
+ for (const h of this.cache.values()) h.destroy();
74
+ for (const h of this.pool) h.g.destroy();
75
+ this.cache.clear(), this.pool.length = 0, this.shown.clear(), this.next.clear();
76
+ }
77
+ heading(h) {
78
+ const t = this.headings;
79
+ return (Math.round(h / (Math.PI * 2) * t) % t + t) % t;
80
+ }
81
+ chevron(h, t, s, i, e, l) {
82
+ let a = this.pool[this.used];
83
+ a || (a = { g: this.stage.add.graphics().setDepth(this.depth), key: "" }, this.pool.push(a)), this.used++;
84
+ const o = `${s}:${e}:${l}`;
85
+ if (a.key !== o) {
86
+ a.key = o;
87
+ const c = this.tones[l], { lit: f, rim: r } = $(i, e);
88
+ a.g.clear(), n(a.g, r, c.dark), n(a.g, f, c.light);
89
+ }
90
+ a.g.setPosition(Math.round(h), Math.round(t)).setVisible(!0);
91
+ }
92
+ place(h, t, s, i) {
93
+ let e = this.cache.get(h);
94
+ e || (e = this.stage.add.graphics().setDepth(this.depth), i(e), e.setVisible(!1), this.cache.set(h, e)), e.setPosition(Math.round(t), Math.round(s)), this.next.add(e);
95
+ }
96
+ }
97
+ export {
98
+ P as PixelMarks
99
+ };