excalibur 0.33.0-alpha.99 → 1.1.0-alpha.310

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 (345) hide show
  1. package/.nvmrc +1 -1
  2. package/CHANGELOG.md +206 -5
  3. package/build/esm/excalibur.development.js +37363 -35202
  4. package/build/esm/excalibur.js +37363 -35202
  5. package/build/esm/excalibur.min.development.js +18360 -23963
  6. package/build/esm/excalibur.min.js +18360 -23963
  7. package/build/{dist → esm/src/engine}/actions/action/move-by.d.ts +1 -4
  8. package/build/{dist → esm/src/engine}/actions/action/move-to.d.ts +1 -4
  9. package/build/{dist → esm/src/engine}/actions/action/repeat-forever.d.ts +8 -0
  10. package/build/{dist → esm/src/engine}/actions/action/rotate-by.d.ts +9 -3
  11. package/build/{dist → esm/src/engine}/actions/action-context.d.ts +9 -43
  12. package/build/{dist → esm/src/engine}/actions/actions-component.d.ts +3 -41
  13. package/build/{dist → esm/src/engine}/actions/actions-system.d.ts +2 -3
  14. package/build/{dist → esm/src/engine}/actions/index.d.ts +0 -2
  15. package/build/{dist → esm/src/engine}/actor.d.ts +19 -30
  16. package/build/{dist → esm/src/engine}/camera.d.ts +13 -10
  17. package/build/{dist → esm/src/engine}/collision/body-component.d.ts +11 -20
  18. package/build/{dist → esm/src/engine}/collision/bounding-box.d.ts +3 -10
  19. package/build/{dist → esm/src/engine}/collision/collider-component.d.ts +17 -2
  20. package/build/{dist → esm/src/engine}/collision/colliders/circle-collider.d.ts +8 -0
  21. package/build/{dist → esm/src/engine}/collision/colliders/closest-line-jump-table.d.ts +1 -1
  22. package/build/{dist → esm/src/engine}/collision/colliders/collider.d.ts +7 -1
  23. package/build/{dist/collision/colliders/shape.d.ts → esm/src/engine/collision/colliders/colliders.d.ts} +50 -0
  24. package/build/{dist → esm/src/engine}/collision/colliders/collision-jump-table.d.ts +2 -1
  25. package/build/{dist → esm/src/engine}/collision/colliders/edge-collider.d.ts +25 -1
  26. package/build/{dist → esm/src/engine}/collision/colliders/polygon-collider.d.ts +23 -0
  27. package/build/esm/src/engine/collision/colliders/sat-shape.d.ts +27 -0
  28. package/build/{dist → esm/src/engine}/collision/colliders/separating-axis.d.ts +11 -6
  29. package/build/{dist → esm/src/engine}/collision/collision-system.d.ts +9 -5
  30. package/build/{dist → esm/src/engine}/collision/detection/collision-contact.d.ts +6 -0
  31. package/build/{dist → esm/src/engine}/collision/detection/dynamic-tree.d.ts +9 -11
  32. package/build/{dist → esm/src/engine}/collision/detection/pair.d.ts +9 -0
  33. package/build/{dist → esm/src/engine}/collision/detection/quad-tree.d.ts +2 -2
  34. package/build/{dist → esm/src/engine}/collision/detection/sparse-hash-grid-collision-processor.d.ts +7 -2
  35. package/build/{dist → esm/src/engine}/collision/detection/sparse-hash-grid.d.ts +11 -3
  36. package/build/{dist → esm/src/engine}/collision/group/collision-group-manager.d.ts +1 -1
  37. package/build/{dist → esm/src/engine}/collision/index.d.ts +2 -1
  38. package/build/{dist → esm/src/engine}/collision/motion-system.d.ts +2 -3
  39. package/build/{dist → esm/src/engine}/collision/physics-config.d.ts +7 -0
  40. package/build/{dist → esm/src/engine}/collision/physics-world.d.ts +34 -33
  41. package/build/esm/src/engine/collision/solver/realistic-solver.d.ts +50 -0
  42. package/build/{dist → esm/src/engine}/collision/solver/solver.d.ts +4 -2
  43. package/build/{dist → esm/src/engine}/debug/debug-config.d.ts +16 -0
  44. package/build/{dist → esm/src/engine}/debug/debug-system.d.ts +3 -3
  45. package/build/esm/src/engine/deprecated.d.ts +1 -0
  46. package/build/{dist → esm/src/engine}/director/director.d.ts +13 -8
  47. package/build/{dist → esm/src/engine}/director/slide.d.ts +2 -2
  48. package/build/{dist → esm/src/engine}/director/transition.d.ts +1 -4
  49. package/build/{dist → esm/src/engine}/engine.d.ts +58 -8
  50. package/build/{dist → esm/src/engine}/entity-component-system/component.d.ts +1 -1
  51. package/build/{dist → esm/src/engine}/entity-component-system/components/motion-component.d.ts +1 -0
  52. package/build/{dist → esm/src/engine}/entity-component-system/components/pause-component.d.ts +2 -0
  53. package/build/{dist → esm/src/engine}/entity-component-system/components/tags-component.d.ts +1 -0
  54. package/build/{dist → esm/src/engine}/entity-component-system/components/transform-component.d.ts +1 -0
  55. package/build/{dist → esm/src/engine}/entity-component-system/entity.d.ts +0 -10
  56. package/build/{dist → esm/src/engine}/entity-component-system/index.d.ts +0 -1
  57. package/build/{dist → esm/src/engine}/entity-component-system/query.d.ts +1 -1
  58. package/build/{dist → esm/src/engine}/entity-component-system/system.d.ts +11 -4
  59. package/build/{dist → esm/src/engine}/entity-component-system/world.d.ts +1 -5
  60. package/build/{dist → esm/src/engine}/events/media-events.d.ts +3 -3
  61. package/build/{dist → esm/src/engine}/events.d.ts +4 -4
  62. package/build/{dist → esm/src/engine}/graphics/animation.d.ts +15 -5
  63. package/build/{dist → esm/src/engine}/graphics/context/circle-renderer/circle-renderer.d.ts +5 -0
  64. package/build/{dist → esm/src/engine}/graphics/context/debug-text.d.ts +13 -1
  65. package/build/{dist → esm/src/engine}/graphics/context/excalibur-graphics-context-2d-canvas.d.ts +13 -3
  66. package/build/{dist → esm/src/engine}/graphics/context/excalibur-graphics-context-webgl.d.ts +43 -6
  67. package/build/{dist → esm/src/engine}/graphics/context/excalibur-graphics-context.d.ts +108 -4
  68. package/build/esm/src/engine/graphics/context/framebuffer.d.ts +154 -0
  69. package/build/esm/src/engine/graphics/context/glsl.d.ts +47 -0
  70. package/build/{dist → esm/src/engine}/graphics/context/material-renderer/material-renderer.d.ts +1 -0
  71. package/build/esm/src/engine/graphics/context/material.d.ts +208 -0
  72. package/build/esm/src/engine/graphics/context/shader-pipeline/effects/bloom-effect.d.ts +80 -0
  73. package/build/esm/src/engine/graphics/context/shader-pipeline/effects/blur-passes.d.ts +75 -0
  74. package/build/esm/src/engine/graphics/context/shader-pipeline/effects/glow-passes.d.ts +93 -0
  75. package/build/esm/src/engine/graphics/context/shader-pipeline/shader-pass.d.ts +138 -0
  76. package/build/esm/src/engine/graphics/context/shader-pipeline/shader-pipeline.d.ts +91 -0
  77. package/build/{dist → esm/src/engine}/graphics/context/shader.d.ts +43 -6
  78. package/build/{dist → esm/src/engine}/graphics/context/texture-loader.d.ts +1 -1
  79. package/build/{dist → esm/src/engine}/graphics/context/webgl-util.d.ts +2 -2
  80. package/build/{dist → esm/src/engine}/graphics/debug-graphics-component.d.ts +1 -0
  81. package/build/{dist → esm/src/engine}/graphics/filtering.d.ts +1 -1
  82. package/build/{dist → esm/src/engine}/graphics/font-common.d.ts +2 -2
  83. package/build/{dist → esm/src/engine}/graphics/font-text-instance.d.ts +5 -5
  84. package/build/{dist → esm/src/engine}/graphics/font.d.ts +3 -3
  85. package/build/{dist → esm/src/engine}/graphics/graphics-component.d.ts +28 -15
  86. package/build/{dist → esm/src/engine}/graphics/graphics-group.d.ts +6 -0
  87. package/build/{dist → esm/src/engine}/graphics/graphics-system.d.ts +3 -3
  88. package/build/{dist → esm/src/engine}/graphics/image-source.d.ts +1 -1
  89. package/build/{dist → esm/src/engine}/graphics/index.d.ts +8 -0
  90. package/build/{dist → esm/src/engine}/graphics/offscreen-system.d.ts +2 -2
  91. package/build/{dist → esm/src/engine}/graphics/parallax-component.d.ts +1 -0
  92. package/build/{dist → esm/src/engine}/graphics/post-processor/color-blindness-post-processor.d.ts +3 -5
  93. package/build/esm/src/engine/graphics/post-processor/post-processor.d.ts +66 -0
  94. package/build/esm/src/engine/graphics/post-processor/shader-pipeline-post-processor.d.ts +45 -0
  95. package/build/{dist → esm/src/engine}/graphics/sprite-font.d.ts +3 -3
  96. package/build/{dist → esm/src/engine}/index.d.ts +5 -5
  97. package/build/{dist → esm/src/engine}/input/gamepad.d.ts +4 -7
  98. package/build/{dist → esm/src/engine}/input/keyboard.d.ts +3 -3
  99. package/build/{dist → esm/src/engine}/input/pointer-component.d.ts +1 -0
  100. package/build/{dist → esm/src/engine}/input/pointer-event-receiver.d.ts +13 -0
  101. package/build/{dist → esm/src/engine}/input/pointer-system.d.ts +3 -3
  102. package/build/{dist → esm/src/engine}/interfaces/index.d.ts +0 -2
  103. package/build/{dist → esm/src/engine}/label.d.ts +2 -2
  104. package/build/esm/src/engine/lighting/cone-light-component.d.ts +47 -0
  105. package/build/esm/src/engine/lighting/darkness-component.d.ts +34 -0
  106. package/build/esm/src/engine/lighting/flicker-options.d.ts +17 -0
  107. package/build/esm/src/engine/lighting/flicker-system.d.ts +19 -0
  108. package/build/esm/src/engine/lighting/index.d.ts +8 -0
  109. package/build/esm/src/engine/lighting/light-occluder-component.d.ts +66 -0
  110. package/build/esm/src/engine/lighting/lighting-config.d.ts +47 -0
  111. package/build/esm/src/engine/lighting/lighting-system.d.ts +153 -0
  112. package/build/esm/src/engine/lighting/point-light-component.d.ts +46 -0
  113. package/build/{dist → esm/src/engine}/math/affine-matrix.d.ts +8 -1
  114. package/build/esm/src/engine/math/coord-plane.d.ts +52 -0
  115. package/build/{dist → esm/src/engine}/math/graph.d.ts +2 -3
  116. package/build/{dist → esm/src/engine}/math/index.d.ts +2 -0
  117. package/build/{dist → esm/src/engine}/math/line-segment.d.ts +1 -1
  118. package/build/{dist → esm/src/engine}/math/matrix.d.ts +25 -0
  119. package/build/{dist → esm/src/engine}/math/ray.d.ts +1 -1
  120. package/build/{dist → esm/src/engine}/math/transform.d.ts +9 -0
  121. package/build/{dist → esm/src/engine}/math/vector.d.ts +16 -13
  122. package/build/esm/src/engine/math/vector3.d.ts +163 -0
  123. package/build/esm/src/engine/math/vector4.d.ts +157 -0
  124. package/build/{dist → esm/src/engine}/particles/gpu-particle-emitter.d.ts +2 -2
  125. package/build/{dist → esm/src/engine}/particles/particle-emitter.d.ts +2 -2
  126. package/build/{dist → esm/src/engine}/particles/particles.d.ts +6 -1
  127. package/build/esm/src/engine/plugin.d.ts +253 -0
  128. package/build/{dist → esm/src/engine}/resources/resource.d.ts +8 -0
  129. package/build/{dist → esm/src/engine}/resources/sound/index.d.ts +1 -1
  130. package/build/esm/src/engine/resources/sound/sound-manager.d.ts +378 -0
  131. package/build/esm/src/engine/resources/sound/sound-track.d.ts +176 -0
  132. package/build/esm/src/engine/resources/sound/sound.d.ts +351 -0
  133. package/build/{dist → esm/src/engine}/scene.d.ts +13 -7
  134. package/build/{dist → esm/src/engine}/screen-element.d.ts +2 -2
  135. package/build/{dist → esm/src/engine}/screen.d.ts +97 -29
  136. package/build/{dist → esm/src/engine}/tile-map/isometric-entity-component.d.ts +1 -0
  137. package/build/{dist → esm/src/engine}/tile-map/isometric-entity-system.d.ts +2 -3
  138. package/build/{dist → esm/src/engine}/tile-map/isometric-map.d.ts +0 -10
  139. package/build/{dist → esm/src/engine}/tile-map/tile-map.d.ts +2 -0
  140. package/build/{dist → esm/src/engine}/timer.d.ts +5 -8
  141. package/build/{dist/util/pool.d.ts → esm/src/engine/util/arena-pool.d.ts} +15 -4
  142. package/build/{dist → esm/src/engine}/util/browser.d.ts +8 -0
  143. package/build/{dist → esm/src/engine}/util/detector.d.ts +1 -1
  144. package/build/{dist → esm/src/engine}/util/draw-util.d.ts +2 -2
  145. package/build/{dist → esm/src/engine}/util/index.d.ts +0 -1
  146. package/build/{dist → esm/src/engine}/util/pause-system.d.ts +7 -1
  147. package/build/{dist → esm/src/engine}/util/rental-pool.d.ts +1 -0
  148. package/build/{dist → esm/src/engine}/util/serializer.d.ts +1 -1
  149. package/build/{dist → esm/src/engine}/util/state-machine.d.ts +1 -1
  150. package/package.json +38 -44
  151. package/tsconfig.json +38 -1
  152. package/.devcontainer/devcontainer.json +0 -26
  153. package/.git-blame-ignore-revs +0 -3
  154. package/.gitattributes +0 -70
  155. package/.gitmodules +0 -0
  156. package/.husky/pre-commit +0 -1
  157. package/.prettierrc +0 -8
  158. package/build/dist/collision/solver/realistic-solver.d.ts +0 -28
  159. package/build/dist/deprecated.d.ts +0 -0
  160. package/build/dist/entity-component-system/tag-query.d.ts +0 -28
  161. package/build/dist/excalibur.development.js +0 -35408
  162. package/build/dist/excalibur.js +0 -35408
  163. package/build/dist/excalibur.min.development.js +0 -931
  164. package/build/dist/excalibur.min.js +0 -931
  165. package/build/dist/graphics/context/material.d.ts +0 -102
  166. package/build/dist/graphics/context/render-source.d.ts +0 -7
  167. package/build/dist/graphics/context/render-target.d.ts +0 -60
  168. package/build/dist/graphics/post-processor/post-processor.d.ts +0 -36
  169. package/build/dist/interfaces/audio-implementation.d.ts +0 -25
  170. package/build/dist/interfaces/audio.d.ts +0 -55
  171. package/build/dist/math/coord-plane.d.ts +0 -15
  172. package/build/dist/resources/sound/sound-manager.d.ts +0 -102
  173. package/build/dist/resources/sound/sound.d.ts +0 -215
  174. package/build/dist/resources/sound/web-audio-instance.d.ts +0 -49
  175. package/build/dist/util/decorators.d.ts +0 -15
  176. package/build/dist/util/easing-functions.d.ts +0 -89
  177. package/build/dist/util/sound.d.ts +0 -5
  178. package/deno.json +0 -10
  179. package/eslint.config.mjs +0 -210
  180. package/playground/README.md +0 -71
  181. package/playground/index.html +0 -75
  182. package/playground/package-lock.json +0 -1976
  183. package/playground/package.json +0 -27
  184. package/playground/public/favicon.ico +0 -0
  185. package/playground/public/icon.png +0 -0
  186. package/playground/public/logo-white@2x.png +0 -0
  187. package/playground/public/logo@2x.png +0 -0
  188. package/playground/public/player-run.png +0 -0
  189. package/playground/public/rpg-audio/License.txt +0 -21
  190. package/playground/public/rpg-audio/audio/handleCoins.ogg +0 -0
  191. package/playground/public/social.jpg +0 -0
  192. package/playground/public/social.png +0 -0
  193. package/playground/public/tiny-town/License.txt +0 -22
  194. package/playground/public/tiny-town/tilemap/tilemap.png +0 -0
  195. package/playground/tsconfig.json +0 -26
  196. package/playground/tsdown.config.ts +0 -13
  197. package/playground/vite.config.ts +0 -5
  198. package/vite.config.common.js +0 -27
  199. package/vite.config.ts +0 -78
  200. package/vitest.config.ts +0 -41
  201. /package/build/{dist → esm/src/engine}/actions/action/action-sequence.d.ts +0 -0
  202. /package/build/{dist → esm/src/engine}/actions/action/blink.d.ts +0 -0
  203. /package/build/{dist → esm/src/engine}/actions/action/call-method.d.ts +0 -0
  204. /package/build/{dist → esm/src/engine}/actions/action/curve-by.d.ts +0 -0
  205. /package/build/{dist → esm/src/engine}/actions/action/curve-to.d.ts +0 -0
  206. /package/build/{dist → esm/src/engine}/actions/action/delay.d.ts +0 -0
  207. /package/build/{dist → esm/src/engine}/actions/action/die.d.ts +0 -0
  208. /package/build/{dist → esm/src/engine}/actions/action/ease-by.d.ts +0 -0
  209. /package/build/{dist → esm/src/engine}/actions/action/ease-to.d.ts +0 -0
  210. /package/build/{dist → esm/src/engine}/actions/action/fade.d.ts +0 -0
  211. /package/build/{dist → esm/src/engine}/actions/action/flash.d.ts +0 -0
  212. /package/build/{dist → esm/src/engine}/actions/action/follow.d.ts +0 -0
  213. /package/build/{dist → esm/src/engine}/actions/action/meet.d.ts +0 -0
  214. /package/build/{dist → esm/src/engine}/actions/action/parallel-actions.d.ts +0 -0
  215. /package/build/{dist → esm/src/engine}/actions/action/repeat.d.ts +0 -0
  216. /package/build/{dist → esm/src/engine}/actions/action/rotate-to.d.ts +0 -0
  217. /package/build/{dist → esm/src/engine}/actions/action/scale-by.d.ts +0 -0
  218. /package/build/{dist → esm/src/engine}/actions/action/scale-to.d.ts +0 -0
  219. /package/build/{dist → esm/src/engine}/actions/action-queue.d.ts +0 -0
  220. /package/build/{dist → esm/src/engine}/actions/action.d.ts +0 -0
  221. /package/build/{dist → esm/src/engine}/actions/actionable.d.ts +0 -0
  222. /package/build/{dist → esm/src/engine}/collision/colliders/composite-collider.d.ts +0 -0
  223. /package/build/{dist → esm/src/engine}/collision/collision-type.d.ts +0 -0
  224. /package/build/{dist → esm/src/engine}/collision/detection/collision-processor.d.ts +0 -0
  225. /package/build/{dist → esm/src/engine}/collision/detection/dynamic-tree-collision-processor.d.ts +0 -0
  226. /package/build/{dist → esm/src/engine}/collision/detection/ray-cast-hit.d.ts +0 -0
  227. /package/build/{dist → esm/src/engine}/collision/detection/ray-cast-options.d.ts +0 -0
  228. /package/build/{dist → esm/src/engine}/collision/detection/spatial-partition-strategy.d.ts +0 -0
  229. /package/build/{dist → esm/src/engine}/collision/group/collision-group.d.ts +0 -0
  230. /package/build/{dist → esm/src/engine}/collision/integrator.d.ts +0 -0
  231. /package/build/{dist → esm/src/engine}/collision/island.d.ts +0 -0
  232. /package/build/{dist → esm/src/engine}/collision/side.d.ts +0 -0
  233. /package/build/{dist → esm/src/engine}/collision/solver/arcade-solver.d.ts +0 -0
  234. /package/build/{dist → esm/src/engine}/collision/solver/contact-bias.d.ts +0 -0
  235. /package/build/{dist → esm/src/engine}/collision/solver/contact-constraint-point.d.ts +0 -0
  236. /package/build/{dist → esm/src/engine}/collision/solver-strategy.d.ts +0 -0
  237. /package/build/{dist → esm/src/engine}/color.d.ts +0 -0
  238. /package/build/{dist → esm/src/engine}/context.d.ts +0 -0
  239. /package/build/{dist → esm/src/engine}/debug/debug-flags.d.ts +0 -0
  240. /package/build/{dist → esm/src/engine}/debug/index.d.ts +0 -0
  241. /package/build/{dist → esm/src/engine}/director/cross-fade.d.ts +0 -0
  242. /package/build/{dist → esm/src/engine}/director/default-loader.d.ts +0 -0
  243. /package/build/{dist → esm/src/engine}/director/fade-in-out.d.ts +0 -0
  244. /package/build/{dist → esm/src/engine}/director/index.d.ts +0 -0
  245. /package/build/{dist → esm/src/engine}/director/loader.d.ts +0 -0
  246. /package/build/{dist → esm/src/engine}/entity-component-system/entity-manager.d.ts +0 -0
  247. /package/build/{dist → esm/src/engine}/entity-component-system/priority.d.ts +0 -0
  248. /package/build/{dist → esm/src/engine}/entity-component-system/query-manager.d.ts +0 -0
  249. /package/build/{dist → esm/src/engine}/entity-component-system/system-manager.d.ts +0 -0
  250. /package/build/{dist → esm/src/engine}/entity-component-system/types.d.ts +0 -0
  251. /package/build/{dist → esm/src/engine}/event-emitter.d.ts +0 -0
  252. /package/build/{dist → esm/src/engine}/events/ex-event.d.ts +0 -0
  253. /package/build/{dist → esm/src/engine}/events/pointer-events.d.ts +0 -0
  254. /package/build/{dist → esm/src/engine}/excalibur.d.ts +0 -0
  255. /package/build/{dist → esm/src/engine}/flags.d.ts +0 -0
  256. /package/build/{dist → esm/src/engine}/garbage-collector.d.ts +0 -0
  257. /package/build/{dist → esm/src/engine}/graphics/canvas.d.ts +0 -0
  258. /package/build/{dist → esm/src/engine}/graphics/circle.d.ts +0 -0
  259. /package/build/{dist → esm/src/engine}/graphics/context/debug-circle-renderer/debug-circle-renderer.d.ts +0 -0
  260. /package/build/{dist → esm/src/engine}/graphics/context/debug-line-renderer/debug-line-renderer.d.ts +0 -0
  261. /package/build/{dist → esm/src/engine}/graphics/context/debug-point-renderer/debug-point-renderer.d.ts +0 -0
  262. /package/build/{dist → esm/src/engine}/graphics/context/draw-call.d.ts +0 -0
  263. /package/build/{dist → esm/src/engine}/graphics/context/image-renderer/image-renderer.d.ts +0 -0
  264. /package/build/{dist → esm/src/engine}/graphics/context/image-renderer-v2/image-renderer-v2.d.ts +0 -0
  265. /package/build/{dist → esm/src/engine}/graphics/context/particle-renderer/particle-renderer.d.ts +0 -0
  266. /package/build/{dist → esm/src/engine}/graphics/context/quad-index-buffer.d.ts +0 -0
  267. /package/build/{dist → esm/src/engine}/graphics/context/rectangle-renderer/rectangle-renderer.d.ts +0 -0
  268. /package/build/{dist → esm/src/engine}/graphics/context/renderer.d.ts +0 -0
  269. /package/build/{dist → esm/src/engine}/graphics/context/screen-pass-painter/screen-pass-painter.d.ts +0 -0
  270. /package/build/{dist → esm/src/engine}/graphics/context/state-stack.d.ts +0 -0
  271. /package/build/{dist → esm/src/engine}/graphics/context/transform-stack.d.ts +0 -0
  272. /package/build/{dist → esm/src/engine}/graphics/context/uniform-buffer.d.ts +0 -0
  273. /package/build/{dist → esm/src/engine}/graphics/context/vertex-buffer.d.ts +0 -0
  274. /package/build/{dist → esm/src/engine}/graphics/context/vertex-layout.d.ts +0 -0
  275. /package/build/{dist → esm/src/engine}/graphics/debug.d.ts +0 -0
  276. /package/build/{dist → esm/src/engine}/graphics/font-cache.d.ts +0 -0
  277. /package/build/{dist → esm/src/engine}/graphics/graphic.d.ts +0 -0
  278. /package/build/{dist → esm/src/engine}/graphics/graphics-diagnostics.d.ts +0 -0
  279. /package/build/{dist → esm/src/engine}/graphics/line.d.ts +0 -0
  280. /package/build/{dist → esm/src/engine}/graphics/nine-slice.d.ts +0 -0
  281. /package/build/{dist → esm/src/engine}/graphics/polygon.d.ts +0 -0
  282. /package/build/{dist → esm/src/engine}/graphics/post-processor/color-blindness-mode.d.ts +0 -0
  283. /package/build/{dist → esm/src/engine}/graphics/post-processor/screen-shader.d.ts +0 -0
  284. /package/build/{dist → esm/src/engine}/graphics/raster.d.ts +0 -0
  285. /package/build/{dist → esm/src/engine}/graphics/rectangle.d.ts +0 -0
  286. /package/build/{dist → esm/src/engine}/graphics/sprite-sheet.d.ts +0 -0
  287. /package/build/{dist → esm/src/engine}/graphics/sprite.d.ts +0 -0
  288. /package/build/{dist → esm/src/engine}/graphics/text.d.ts +0 -0
  289. /package/build/{dist → esm/src/engine}/graphics/tiled-animation.d.ts +0 -0
  290. /package/build/{dist → esm/src/engine}/graphics/tiled-sprite.d.ts +0 -0
  291. /package/build/{dist → esm/src/engine}/graphics/transform-interpolation.d.ts +0 -0
  292. /package/build/{dist → esm/src/engine}/graphics/wrapping.d.ts +0 -0
  293. /package/build/{dist → esm/src/engine}/id.d.ts +0 -0
  294. /package/build/{dist → esm/src/engine}/input/capture-pointer-config.d.ts +0 -0
  295. /package/build/{dist → esm/src/engine}/input/input-host.d.ts +0 -0
  296. /package/build/{dist → esm/src/engine}/input/input-mapper.d.ts +0 -0
  297. /package/build/{dist → esm/src/engine}/input/native-pointer-button.d.ts +0 -0
  298. /package/build/{dist → esm/src/engine}/input/pointer-abstraction.d.ts +0 -0
  299. /package/build/{dist → esm/src/engine}/input/pointer-button.d.ts +0 -0
  300. /package/build/{dist → esm/src/engine}/input/pointer-event.d.ts +0 -0
  301. /package/build/{dist → esm/src/engine}/input/pointer-events-to-object-dispatcher.d.ts +0 -0
  302. /package/build/{dist → esm/src/engine}/input/pointer-scope.d.ts +0 -0
  303. /package/build/{dist → esm/src/engine}/input/pointer-type.d.ts +0 -0
  304. /package/build/{dist → esm/src/engine}/input/wheel-delta-mode.d.ts +0 -0
  305. /package/build/{dist → esm/src/engine}/input/wheel-event.d.ts +0 -0
  306. /package/build/{dist → esm/src/engine}/interfaces/clonable.d.ts +0 -0
  307. /package/build/{dist → esm/src/engine}/interfaces/evented.d.ts +0 -0
  308. /package/build/{dist → esm/src/engine}/interfaces/lifecycle-events.d.ts +0 -0
  309. /package/build/{dist → esm/src/engine}/interfaces/loadable.d.ts +0 -0
  310. /package/build/{dist → esm/src/engine}/interfaces/pointer-event-handlers.d.ts +0 -0
  311. /package/build/{dist → esm/src/engine}/math/bezier-curve.d.ts +0 -0
  312. /package/build/{dist → esm/src/engine}/math/easings.d.ts +0 -0
  313. /package/build/{dist → esm/src/engine}/math/global-coordinates.d.ts +0 -0
  314. /package/build/{dist → esm/src/engine}/math/lerp.d.ts +0 -0
  315. /package/build/{dist → esm/src/engine}/math/projection.d.ts +0 -0
  316. /package/build/{dist → esm/src/engine}/math/random.d.ts +0 -0
  317. /package/build/{dist → esm/src/engine}/math/rotation-type.d.ts +0 -0
  318. /package/build/{dist → esm/src/engine}/math/util.d.ts +0 -0
  319. /package/build/{dist → esm/src/engine}/math/vector-view.d.ts +0 -0
  320. /package/build/{dist → esm/src/engine}/math/watch-vector.d.ts +0 -0
  321. /package/build/{dist → esm/src/engine}/particles/emitter-type.d.ts +0 -0
  322. /package/build/{dist → esm/src/engine}/particles/gpu-particle-renderer.d.ts +0 -0
  323. /package/build/{dist → esm/src/engine}/particles/index.d.ts +0 -0
  324. /package/build/{dist → esm/src/engine}/polyfill.d.ts +0 -0
  325. /package/build/{dist → esm/src/engine}/resources/font.d.ts +0 -0
  326. /package/build/{dist → esm/src/engine}/resources/gif.d.ts +0 -0
  327. /package/build/{dist → esm/src/engine}/resources/index.d.ts +0 -0
  328. /package/build/{dist → esm/src/engine}/resources/sound/audio-context.d.ts +0 -0
  329. /package/build/{dist → esm/src/engine}/tile-map/index.d.ts +0 -0
  330. /package/build/{dist → esm/src/engine}/trigger.d.ts +0 -0
  331. /package/build/{dist → esm/src/engine}/util/assert.d.ts +0 -0
  332. /package/build/{dist → esm/src/engine}/util/clock.d.ts +0 -0
  333. /package/build/{dist → esm/src/engine}/util/coroutine.d.ts +0 -0
  334. /package/build/{dist → esm/src/engine}/util/fps.d.ts +0 -0
  335. /package/build/{dist → esm/src/engine}/util/future.d.ts +0 -0
  336. /package/build/{dist → esm/src/engine}/util/iframe.d.ts +0 -0
  337. /package/build/{dist → esm/src/engine}/util/log.d.ts +0 -0
  338. /package/build/{dist → esm/src/engine}/util/observable.d.ts +0 -0
  339. /package/build/{dist → esm/src/engine}/util/required.d.ts +0 -0
  340. /package/build/{dist → esm/src/engine}/util/semaphore.d.ts +0 -0
  341. /package/build/{dist → esm/src/engine}/util/string.d.ts +0 -0
  342. /package/build/{dist → esm/src/engine}/util/toaster.d.ts +0 -0
  343. /package/build/{dist → esm/src/engine}/util/util.d.ts +0 -0
  344. /package/build/{dist → esm/src/engine}/util/watch.d.ts +0 -0
  345. /package/build/{dist → esm/src/engine}/util/web-audio.d.ts +0 -0
@@ -0,0 +1,50 @@
1
+ import type { CollisionContact } from '../detection/collision-contact';
2
+ import { ContactConstraintPoint } from './contact-constraint-point';
3
+ import type { CollisionSolver } from './solver';
4
+ import type { DeepRequired } from '../../util/required';
5
+ import type { PhysicsConfig } from '../physics-config';
6
+ export declare class RealisticSolver implements CollisionSolver {
7
+ config: DeepRequired<Pick<PhysicsConfig, 'realistic'>['realistic']>;
8
+ directionMap: Map<string, "horizontal" | "vertical">;
9
+ distanceMap: Map<string, number>;
10
+ private _currentContactIds;
11
+ constructor(config: DeepRequired<Pick<PhysicsConfig, 'realistic'>['realistic']>);
12
+ lastFrameContacts: Map<string, CollisionContact>;
13
+ idToContactConstraint: Map<string, ContactConstraintPoint[]>;
14
+ getContactConstraints(id: string): ContactConstraintPoint[];
15
+ /**
16
+ * Solve the contacts for one physics (sub)step
17
+ * @param contacts
18
+ * @param _duration length of the step in ms, unused but kept so `substep`/`substepCount` line up positionally with
19
+ * the {@apilink CollisionSolver} interface
20
+ * @param substep index of the substep within the frame, collision events are emitted on the first and last substep only
21
+ * @param substepCount total substeps in the frame
22
+ */
23
+ solve(contacts: CollisionContact[], _duration?: number, substep?: number, substepCount?: number): CollisionContact[];
24
+ /**
25
+ * Prepares the contact constraints (effective masses, lever arms, restitution targets) and warm starts them
26
+ * @param contacts
27
+ * @param substep index of the substep within the frame, `precollision`/`beforecollisionresolve` are only emitted on the first
28
+ */
29
+ preSolve(contacts: CollisionContact[], substep?: number): void;
30
+ /**
31
+ * @param contacts
32
+ * @param emitEvents whether `postcollision`/`aftercollisionresolve` fire, only the last substep of a frame does
33
+ */
34
+ postSolve(contacts: CollisionContact[], emitEvents?: boolean): void;
35
+ /**
36
+ * Warm up body's based on previous frame contact points
37
+ * @param contacts
38
+ */
39
+ warmStart(contacts: CollisionContact[]): void;
40
+ /**
41
+ * Iteratively solve the position overlap constraint
42
+ * @param contacts
43
+ */
44
+ solvePosition(contacts: CollisionContact[]): void;
45
+ /**
46
+ * Moves and rotates a body by a pseudo impulse applied at a lever arm from its center, honoring the limited degrees of freedom
47
+ */
48
+ private _applyPositionCorrection;
49
+ solveVelocity(contacts: CollisionContact[]): void;
50
+ }
@@ -8,7 +8,6 @@ import type { CollisionContact } from '../detection/collision-contact';
8
8
  * 2. solveVelocity
9
9
  * 3. solvePosition
10
10
  * 4. postSolve
11
- * @inheritdoc
12
11
  */
13
12
  export interface CollisionSolver {
14
13
  /**
@@ -20,6 +19,9 @@ export interface CollisionSolver {
20
19
  * 3. solvePosition
21
20
  * 4. postSolve
22
21
  * @param contacts
22
+ * @param duration length of the (sub)step in ms
23
+ * @param substep index of the substep within the current frame, starting at 0
24
+ * @param substepCount total number of substeps in the current frame
23
25
  */
24
- solve(contacts: CollisionContact[], duration?: number): CollisionContact[];
26
+ solve(contacts: CollisionContact[], duration?: number, substep?: number, substepCount?: number): CollisionContact[];
25
27
  }
@@ -287,6 +287,22 @@ export declare class DebugConfig {
287
287
  gridWidth: number;
288
288
  showColliderGeometry: boolean;
289
289
  };
290
+ /**
291
+ * Screen debug settings
292
+ *
293
+ * Visualizes the screen-space coordinate plan, including the safe {@apilink Screen.contentArea}
294
+ * and the full {@apilink Screen.unsafeArea} (which may be partially offscreen under the
295
+ * *AndFill display modes).
296
+ */
297
+ screen: {
298
+ showAll: boolean;
299
+ showContentArea: boolean;
300
+ contentAreaColor: Color;
301
+ showUnsafeArea: boolean;
302
+ unsafeAreaColor: Color;
303
+ showLegend: boolean;
304
+ legendColor: Color;
305
+ };
290
306
  }
291
307
  /**
292
308
  * Implementation of a frame's stats. Meant to have values copied via {@apilink FrameStats.reset}, avoid
@@ -12,9 +12,9 @@ export declare class DebugSystem extends System {
12
12
  private _engine;
13
13
  query: Query<typeof TransformComponent>;
14
14
  constructor(world: World);
15
- initialize(world: World, scene: Scene): void;
16
- update(): void;
17
- postupdate(engine: Scene<unknown>, elapsed: number): void;
15
+ onInitialize(world: World, scene: Scene): void;
16
+ onUpdate(): void;
17
+ onPostUpdate(engine: Scene<unknown>, elapsed: number): void;
18
18
  /**
19
19
  * This applies the current entity transform to the graphics context
20
20
  * @param entity
@@ -0,0 +1 @@
1
+ export {};
@@ -69,11 +69,11 @@ export interface GoToOptions<TActivationData = any> {
69
69
  /**
70
70
  * Optionally supply destination scene "in" transition, this will override any previously defined transition
71
71
  */
72
- destinationIn?: Transition;
72
+ destinationIn?: Transition | null;
73
73
  /**
74
74
  * Optionally supply source scene "out" transition, this will override any previously defined transition
75
75
  */
76
- sourceOut?: Transition;
76
+ sourceOut?: Transition | null;
77
77
  /**
78
78
  * Optionally supply a different loader for the destination scene, this will override any previously defined loader
79
79
  */
@@ -91,8 +91,8 @@ export declare class Director<TKnownScenes extends string = any> {
91
91
  private _engine;
92
92
  events: EventEmitter<DirectorEvents>;
93
93
  private _logger;
94
- private _deferredGoto?;
95
- private _deferredTransition?;
94
+ private _deferredGoto;
95
+ private _deferredTransition;
96
96
  private _initialized;
97
97
  /**
98
98
  * Current scene's name
@@ -105,7 +105,7 @@ export declare class Director<TKnownScenes extends string = any> {
105
105
  /**
106
106
  * Current transition if any
107
107
  */
108
- currentTransition?: Transition;
108
+ currentTransition: Transition | null;
109
109
  /**
110
110
  * All registered scenes in Excalibur
111
111
  */
@@ -150,12 +150,12 @@ export declare class Director<TKnownScenes extends string = any> {
150
150
  private _getLoader;
151
151
  private _getInTransition;
152
152
  private _getOutTransition;
153
- getDeferredScene(): Scene<unknown> | SceneConstructor;
153
+ getDeferredScene(): Scene<unknown> | SceneConstructor | null;
154
154
  /**
155
155
  * Returns a scene by name if it exists, might be the constructor and not the instance of a scene
156
156
  * @param name
157
157
  */
158
- getSceneDefinition(name?: string): Scene | SceneConstructor | undefined;
158
+ getSceneDefinition(name?: string): Scene | SceneConstructor | null;
159
159
  /**
160
160
  * Returns the name of the registered scene, null if none can be found
161
161
  * @param scene
@@ -192,7 +192,7 @@ export declare class Director<TKnownScenes extends string = any> {
192
192
  * This will call any constructors that were given as a definition
193
193
  * @param scene
194
194
  */
195
- getSceneInstance(scene: string): Scene | undefined;
195
+ getSceneInstance(scene: string): Scene | null;
196
196
  /**
197
197
  * Triggers scene loading if has not already been loaded
198
198
  * @param scene
@@ -213,4 +213,9 @@ export declare class Director<TKnownScenes extends string = any> {
213
213
  */
214
214
  swapScene<TData = undefined>(destinationScene: string, data?: TData): Promise<void>;
215
215
  private _emitEvent;
216
+ /**
217
+ * Tears down any initialized scene's {@apilink InputHost}, removing native pointer listeners
218
+ * the scene attached to the canvas/window and disabling input. Called by {@apilink Engine.dispose}.
219
+ */
220
+ dispose(): void;
216
221
  }
@@ -2,7 +2,7 @@ import type { Engine } from '../engine';
2
2
  import type { Scene } from '../scene';
3
3
  import type { TransitionOptions } from './transition';
4
4
  import { Transition } from './transition';
5
- import { type EasingFunction } from '../util/easing-functions';
5
+ import type { Easing } from '../math/easings';
6
6
  export interface SlideOptions {
7
7
  /**
8
8
  * Duration of the transition in milliseconds
@@ -15,7 +15,7 @@ export interface SlideOptions {
15
15
  /**
16
16
  * Optionally select an easing function, by default linear (aka lerp)
17
17
  */
18
- easingFunction?: EasingFunction;
18
+ easingFunction?: Easing;
19
19
  }
20
20
  /**
21
21
  * Slide`s between the previous scene and the destination scene
@@ -2,7 +2,6 @@ import type { Engine } from '../engine';
2
2
  import type { Scene } from '../scene';
3
3
  import { Entity, TransformComponent } from '../entity-component-system';
4
4
  import { GraphicsComponent } from '../graphics';
5
- import type { EasingFunction } from '../util/easing-functions';
6
5
  import type { CoroutineInstance } from '../util/coroutine';
7
6
  import type { Easing } from '../math/easings';
8
7
  export interface TransitionOptions {
@@ -27,7 +26,7 @@ export interface TransitionOptions {
27
26
  /**
28
27
  * Optionally specify a easing function, by default linear
29
28
  */
30
- easing?: Easing | EasingFunction;
29
+ easing?: Easing;
31
30
  /**
32
31
  * Optionally specify a transition direction, by default 'out'
33
32
  *
@@ -47,7 +46,6 @@ export declare class Transition extends Entity {
47
46
  readonly blockInput: boolean;
48
47
  readonly duration: number;
49
48
  readonly easing: Easing;
50
- readonly legacyEasing: EasingFunction;
51
49
  readonly direction: 'out' | 'in';
52
50
  private _completeFuture;
53
51
  protected _engine?: Engine;
@@ -56,7 +54,6 @@ export declare class Transition extends Entity {
56
54
  private _currentDistance;
57
55
  private _currentProgress;
58
56
  done: Promise<void>;
59
- private _useLegacyEasing;
60
57
  /**
61
58
  * Returns a number between [0, 1] indicating what state the transition is in.
62
59
  *
@@ -26,9 +26,11 @@ import type { GoToOptions, SceneMap, StartOptions, SceneWithOptions, WithRoot }
26
26
  import { Director, DirectorEvents } from './director/director';
27
27
  import { InputHost } from './input/input-host';
28
28
  import type { PhysicsConfig } from './collision/physics-config';
29
+ import type { LightingConfig } from './lighting/lighting-config';
29
30
  import type { DeepRequired } from './util/required';
30
31
  import type { Context } from './context';
31
32
  import type { GarbageCollectionOptions } from './garbage-collector';
33
+ import type { Plugin } from './plugin';
32
34
  export interface EngineEvents extends DirectorEvents {
33
35
  fallbackgraphicscontext: ExcaliburGraphicsContext2DCanvas;
34
36
  initialize: InitializeEvent<Engine>;
@@ -81,6 +83,10 @@ export declare enum ScrollPreventionMode {
81
83
  * Defines the available options to configure the Excalibur engine at constructor time.
82
84
  */
83
85
  export interface EngineOptions<TKnownScenes extends string = any> {
86
+ /**
87
+ * Optionally configure Excalibur plugins
88
+ */
89
+ plugins?: Plugin[];
84
90
  /**
85
91
  * Optionally configure the width of the viewport in css pixels
86
92
  */
@@ -325,6 +331,18 @@ export interface EngineOptions<TKnownScenes extends string = any> {
325
331
  * Default is configured to use {@apilink SolverStrategy.Arcade} physics simulation
326
332
  */
327
333
  physics?: boolean | PhysicsConfig;
334
+ /**
335
+ * Optionally enable the 2D lighting simulation in excalibur, adding the {@apilink LightingSystem} and
336
+ * {@apilink FlickerSystem} to every scene.
337
+ *
338
+ * **Potential performance impact** — the lighting overlay is rasterized with the 2D Canvas API and
339
+ * re-uploaded to the GPU every frame, which carries a performance penalty.
340
+ *
341
+ * Pass a {@apilink LightingConfig} to tune the lighting simulation's defaults instead of just enabling it.
342
+ *
343
+ * Default is false
344
+ */
345
+ lighting?: boolean | LightingConfig;
328
346
  /**
329
347
  * Optionally specify scenes with their transitions and loaders to excalibur's scene {@apilink Director}
330
348
  *
@@ -349,6 +367,37 @@ export declare class Engine<TKnownScenes extends string = any> implements CanIni
349
367
  */
350
368
  scope: <TReturn>(cb: () => TReturn) => TReturn;
351
369
  global: GlobalEventHandlers;
370
+ private _plugins;
371
+ get plugins(): readonly Plugin[];
372
+ /**
373
+ * Check whether a plugin with the given name is currently installed.
374
+ *
375
+ * @param name The unique plugin name to check
376
+ * @returns `true` if a plugin with that name is installed
377
+ */
378
+ hasPlugin(name: string): boolean;
379
+ /**
380
+ * Add a plugin to the engine after construction.
381
+ *
382
+ * If the engine has already passed certain lifecycle stages, the plugin's hooks
383
+ * for those stages will be called immediately so the plugin can "catch up".
384
+ *
385
+ * If a plugin with the same {@apilink Plugin.name} is already installed, a warning
386
+ * is logged and the plugin is not added.
387
+ *
388
+ * @param plugin The plugin to add
389
+ * @returns `true` if the plugin was added, `false` if it was skipped (duplicate name)
390
+ */
391
+ addPlugin(plugin: Plugin): boolean;
392
+ /**
393
+ * Remove a plugin from the engine by name.
394
+ *
395
+ * The plugin's {@apilink Plugin.dispose} method will be called if present.
396
+ *
397
+ * @param name The unique plugin name to remove
398
+ * @returns `true` if the plugin was found and removed
399
+ */
400
+ removePlugin(name: string): boolean;
352
401
  private _garbageCollector;
353
402
  readonly garbageCollectorConfig: GarbageCollectionOptions | null;
354
403
  /**
@@ -384,11 +433,15 @@ export declare class Engine<TKnownScenes extends string = any> implements CanIni
384
433
  /**
385
434
  * Direct access to the canvas element ID, if an ID exists
386
435
  */
387
- canvasElementId: string;
436
+ canvasElementId?: string;
388
437
  /**
389
438
  * Direct access to the physics configuration for excalibur
390
439
  */
391
440
  physics: DeepRequired<PhysicsConfig>;
441
+ /**
442
+ * Direct access to the lighting configuration for excalibur
443
+ */
444
+ lighting: DeepRequired<LightingConfig>;
392
445
  /**
393
446
  * Optionally set the maximum fps if not set Excalibur will go as fast as the device allows.
394
447
  *
@@ -599,6 +652,7 @@ export declare class Engine<TKnownScenes extends string = any> implements CanIni
599
652
  */
600
653
  constructor(options?: EngineOptions<TKnownScenes>);
601
654
  private _handleWebGLContextLost;
655
+ private _handleWebGLContextRestored;
602
656
  private _performanceThresholdTriggered;
603
657
  private _fpsSamples;
604
658
  private _monitorPerformanceThresholdAndTriggerFallback;
@@ -619,7 +673,7 @@ export declare class Engine<TKnownScenes extends string = any> implements CanIni
619
673
  * Returns a BoundingBox of the top left corner of the screen
620
674
  * and the bottom right corner of the screen.
621
675
  */
622
- getWorldBounds(): import("./").BoundingBox;
676
+ getWorldBounds(): import("./collision").BoundingBox;
623
677
  /**
624
678
  * Gets the current engine timescale factor (default is 1.0 which is 1:1 time)
625
679
  */
@@ -852,16 +906,12 @@ export declare class Engine<TKnownScenes extends string = any> implements CanIni
852
906
  start(loader?: DefaultLoader): Promise<void>;
853
907
  /**
854
908
  * Starts the internal game loop for Excalibur after configuring any routes, loaders, or transitions
855
- * @param startOptions Optional {@apilink StartOptions} to configure the routes for scenes in Excalibur
909
+ * @param sceneName
910
+ * @param options {Optional} {@apilink StartOptions} to configure the routes for scenes in Excalibur
856
911
  *
857
912
  * Note: start() only resolves AFTER the user has clicked the play button
858
913
  */
859
914
  start(sceneName: WithRoot<TKnownScenes>, options?: StartOptions): Promise<void>;
860
- /**
861
- * Starts the internal game loop after any loader is finished
862
- * @param loader
863
- */
864
- start(loader?: DefaultLoader): Promise<void>;
865
915
  /**
866
916
  * Returns the current frames elapsed milliseconds
867
917
  */
@@ -30,7 +30,7 @@ export declare abstract class Component {
30
30
  /**
31
31
  * Current owning {@apilink Entity}, if any, of this component. Null if not added to any {@apilink Entity}
32
32
  */
33
- owner?: Entity;
33
+ owner: Entity | null;
34
34
  /**
35
35
  * Clones any properties on this component, if that property value has a `clone()` method it will be called
36
36
  */
@@ -31,6 +31,7 @@ export interface Motion {
31
31
  inertia: number;
32
32
  }
33
33
  export declare class MotionComponent extends Component {
34
+ private static _NAME;
34
35
  /**
35
36
  * The velocity of an entity in pixels per second
36
37
  */
@@ -2,7 +2,9 @@ import { Component } from '../component';
2
2
  export interface PauseComponentInterface {
3
3
  canPause: boolean;
4
4
  }
5
+ export declare const PauseComponentTag: "ex.paused";
5
6
  export declare class PauseComponent extends Component {
7
+ private static _NAME;
6
8
  paused: boolean;
7
9
  canPause: boolean;
8
10
  constructor(config?: Partial<PauseComponentInterface>);
@@ -1,4 +1,5 @@
1
1
  import { Component } from '../component';
2
2
  export declare class TagsComponent extends Component {
3
+ private static _NAME;
3
4
  tags: Set<string>;
4
5
  }
@@ -19,6 +19,7 @@ export interface TransformComponentData {
19
19
  coordPlane?: CoordPlane;
20
20
  }
21
21
  export declare class TransformComponent extends Component {
22
+ private static _NAME;
22
23
  private _logger;
23
24
  private _parentComponent;
24
25
  private _transform;
@@ -107,16 +107,6 @@ export declare class Entity<TKnownComponents extends Component = any> implements
107
107
  * The current scene that the entity is in, if any
108
108
  */
109
109
  scene: Scene | null;
110
- /**
111
- * Whether this entity is active, if set to false it will be reclaimed
112
- * @deprecated use isActive
113
- */
114
- get active(): boolean;
115
- /**
116
- * Whether this entity is active, if set to false it will be reclaimed
117
- * @deprecated use isActive
118
- */
119
- set active(val: boolean);
120
110
  /**
121
111
  * Whether this entity is active, if set to false it will be reclaimed
122
112
  */
@@ -2,7 +2,6 @@ export * from './component';
2
2
  export * from './entity';
3
3
  export * from './entity-manager';
4
4
  export * from './query';
5
- export * from './tag-query';
6
5
  export * from './query-manager';
7
6
  export * from './system';
8
7
  export * from './system-manager';
@@ -62,7 +62,7 @@ export declare class Query<TAllComponentCtors extends ComponentCtor<Component> =
62
62
  /**
63
63
  * Potentially adds or removes an entity from a query index, returns true if added, false if not added or was removed.
64
64
  * @param entity
65
- * @param [optional] removedComponent that should be treated as removed from the entity
65
+ * @param {optional} removedComponent that should be treated as removed from the entity
66
66
  */
67
67
  checkAndModify(entity: Entity, removedComponent?: ComponentCtor<Component>): boolean;
68
68
  removeEntity(entity: Entity): void;
@@ -48,22 +48,29 @@ export declare abstract class System {
48
48
  * Optionally specify an initialize handler
49
49
  * @param scene
50
50
  */
51
- initialize?(world: World, scene: Scene): void;
51
+ onInitialize?(world: World, scene: Scene): void;
52
+ /**
53
+ * Optionally specify a dispose handler, called when the system is removed from the
54
+ * {@apilink SystemManager} after having been initialized. Use it to release any resources the
55
+ * system provisioned in `initialize` (entities it added, observable subscriptions, etc.)
56
+ * @param scene
57
+ */
58
+ dispose?(world: World, scene: Scene): void;
52
59
  /**
53
60
  * Update all entities that match this system's types
54
61
  * @param elapsed Time in milliseconds
55
62
  */
56
- abstract update(elapsed: number): void;
63
+ abstract onUpdate(elapsed: number): void;
57
64
  /**
58
65
  * Optionally run a preupdate before the system processes matching entities
59
66
  * @param scene
60
67
  * @param elapsed Time in milliseconds since the last frame
61
68
  */
62
- preupdate?(scene: Scene, elapsed: number): void;
69
+ onPreUpdate?(scene: Scene, elapsed: number): void;
63
70
  /**
64
71
  * Optionally run a postupdate after the system processes matching entities
65
72
  * @param scene
66
73
  * @param elapsed Time in milliseconds since the last frame
67
74
  */
68
- postupdate?(scene: Scene, elapsed: number): void;
75
+ onPostUpdate?(scene: Scene, elapsed: number): void;
69
76
  }
@@ -25,10 +25,6 @@ export declare class World {
25
25
  * Query the ECS world for entities that match your components
26
26
  */
27
27
  query<TKnownComponentCtors extends ComponentCtor<Component> = never, TAnyComponentCtors extends ComponentCtor<Component> = never>(params: TKnownComponentCtors[] | QueryParams<TKnownComponentCtors, TAnyComponentCtors>): Query<TKnownComponentCtors, TAnyComponentCtors>;
28
- /**
29
- * @deprecated
30
- */
31
- queryTags<TKnownTags extends string>(requiredTags: TKnownTags[]): Query<any, any>;
32
28
  /**
33
29
  * Update systems by type and time elapsed in milliseconds
34
30
  */
@@ -47,7 +43,7 @@ export declare class World {
47
43
  /**
48
44
  * Get a system out of the ECS world
49
45
  */
50
- get(system: SystemCtor<System>): System;
46
+ get(system: SystemCtor<System>): System | null;
51
47
  /**
52
48
  * Remove an entity from the ECS world
53
49
  * @param entity
@@ -1,6 +1,6 @@
1
1
  import type { Sound } from '../resources/sound/sound';
2
+ import type { SoundTrack } from '../resources/sound/sound-track';
2
3
  import type { Actor } from '../actor';
3
- import type { WebAudioInstance } from '../resources/sound/web-audio-instance';
4
4
  import { GameEvent } from '../';
5
5
  export declare class MediaEvent extends GameEvent<Sound> {
6
6
  target: Sound;
@@ -37,8 +37,8 @@ export declare class MediaEvent extends GameEvent<Sound> {
37
37
  layPath(_actor: Actor): void;
38
38
  }
39
39
  export declare class NativeSoundEvent extends MediaEvent {
40
- track?: WebAudioInstance;
41
- constructor(target: Sound, track?: WebAudioInstance);
40
+ track?: SoundTrack | undefined;
41
+ constructor(target: Sound, track?: SoundTrack | undefined);
42
42
  }
43
43
  export declare class NativeSoundProcessedEvent extends MediaEvent {
44
44
  private _processedData;
@@ -522,14 +522,14 @@ export declare class DeactivateEvent extends GameEvent<Scene> {
522
522
  /**
523
523
  * Event thrown on an {@apilink Actor} when the graphics bounds completely leaves the screen.
524
524
  */
525
- export declare class ExitViewPortEvent extends GameEvent<Entity> {
525
+ export declare class ExitViewportEvent extends GameEvent<Entity> {
526
526
  self: Entity;
527
527
  constructor(self: Entity);
528
528
  }
529
529
  /**
530
530
  * Event thrown on an {@apilink Actor} when any part of the graphics bounds are on screen.
531
531
  */
532
- export declare class EnterViewPortEvent extends GameEvent<Entity> {
532
+ export declare class EnterViewportEvent extends GameEvent<Entity> {
533
533
  self: Entity;
534
534
  constructor(self: Entity);
535
535
  }
@@ -581,7 +581,7 @@ export declare class RemoveEvent<T extends OnRemove> extends GameEvent<T> {
581
581
  export declare class PauseEvent extends GameEvent<Scene> {
582
582
  self: Scene;
583
583
  /**
584
- * @param context The context for the scene deactivation
584
+ * @param self The context for the scene deactivation
585
585
  */
586
586
  constructor(self: Scene);
587
587
  }
@@ -591,7 +591,7 @@ export declare class PauseEvent extends GameEvent<Scene> {
591
591
  export declare class ResumeEvent extends GameEvent<Scene> {
592
592
  self: Scene;
593
593
  /**
594
- * @param context The context for the scene deactivation
594
+ * @param self The context for the scene deactivation
595
595
  */
596
596
  constructor(self: Scene);
597
597
  }
@@ -10,6 +10,11 @@ export interface HasTick {
10
10
  * @param idempotencyToken Optional idempotencyToken prevents a ticking animation from updating twice per frame
11
11
  */
12
12
  tick(elapsed: number, idempotencyToken?: number): void;
13
+ /**
14
+ * Optional property to tick any graphics EVEN when offscreen, this is useful when you want to keep animations synchronized
15
+ * across your game scene.
16
+ */
17
+ shouldAlwaysTick?: boolean;
13
18
  }
14
19
  export declare enum AnimationDirection {
15
20
  /**
@@ -89,6 +94,11 @@ export interface AnimationOptions {
89
94
  * Optionally set arbitrary meta data for the animation
90
95
  */
91
96
  data?: Record<string, any>;
97
+ /**
98
+ * Optionally tick this animation even when offscreen, default false. Useful for keeping animations synchronized
99
+ * across your game scene.
100
+ */
101
+ shouldAlwaysTick?: boolean;
92
102
  }
93
103
  export interface AnimationEvents {
94
104
  frame: FrameEvent;
@@ -118,11 +128,6 @@ export interface FromSpriteSheetOptions {
118
128
  duration?: number;
119
129
  options?: GetSpriteOptions;
120
130
  }[];
121
- /**
122
- * Optionally specify a default duration for frames in milliseconds
123
- * @deprecated use `durationPerFrame`
124
- */
125
- durationPerFrameMs?: number;
126
131
  /**
127
132
  * Optionally specify a default duration for frames in milliseconds
128
133
  */
@@ -145,6 +150,10 @@ export interface FromSpriteSheetOptions {
145
150
  * Optionally set arbitrary meta data for the animation
146
151
  */
147
152
  data?: Record<string, any>;
153
+ /**
154
+ * Optionally tick this animation even when offscreen, default false.
155
+ */
156
+ shouldAlwaysTick?: boolean;
148
157
  }
149
158
  /**
150
159
  * Create an Animation given a list of {@apilink Frame | `frames`} in {@apilink AnimationOptions}
@@ -158,6 +167,7 @@ export declare class Animation extends Graphic implements HasTick {
158
167
  strategy: AnimationStrategy;
159
168
  frameDuration: number;
160
169
  data: Map<string, any>;
170
+ shouldAlwaysTick: boolean;
161
171
  private _idempotencyToken;
162
172
  private _firstTick;
163
173
  private _currentFrame;
@@ -17,6 +17,11 @@ export declare class CircleRenderer implements RendererPlugin {
17
17
  initialize(gl: WebGL2RenderingContext, context: ExcaliburGraphicsContextWebGL): void;
18
18
  dispose(): void;
19
19
  private _isFull;
20
+ _scratchTopLeft: Vector;
21
+ _scratchTopRight: Vector;
22
+ _scratchBottomRight: Vector;
23
+ _scratchBottomLeft: Vector;
24
+ _scratchRadius: Vector;
20
25
  draw(pos: Vector, radius: number, color: Color, stroke?: Color, strokeThickness?: number): void;
21
26
  hasPendingDraws(): boolean;
22
27
  flush(): void;
@@ -1,5 +1,6 @@
1
1
  import type { ExcaliburGraphicsContext } from '../context/excalibur-graphics-context';
2
2
  import type { Vector } from '../../math/vector';
3
+ import { BoundingBox } from '../../collision/bounding-box';
3
4
  import { Color } from '../../color';
4
5
  /**
5
6
  * Internal debug text helper
@@ -18,11 +19,22 @@ export declare class DebugText {
18
19
  private _spriteSheet;
19
20
  private _spriteFont;
20
21
  load(): Promise<void>;
22
+ /**
23
+ * Measures the pixel dimensions of `text` as it would be drawn by {@apilink DebugText.write},
24
+ * accounting for the optional scale factor.
25
+ * @param text Text to measure
26
+ * @param scale Glyph scale factor, defaults to 1
27
+ * @returns BoundingBox whose width/height are the rendered size in pixels (origin Zero)
28
+ */
29
+ measureText(text: string, scale?: number): BoundingBox;
21
30
  /**
22
31
  * Writes debug text using the built in sprint font
23
32
  * @param ctx
24
33
  * @param text
25
34
  * @param pos
35
+ * @param foreground Optional foreground color override
36
+ * @param background Optional background color override
37
+ * @param scale Optional glyph scale factor, defaults to 1
26
38
  */
27
- write(ctx: ExcaliburGraphicsContext, text: string, pos: Vector, foreground?: Color, background?: Color): void;
39
+ write(ctx: ExcaliburGraphicsContext, text: string, pos: Vector, foreground?: Color, background?: Color, scale?: number): void;
28
40
  }