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
@@ -1,7 +1,7 @@
1
1
  import type { ExcaliburGraphicsContext, ImageSource } from '../..';
2
- import { AffineMatrix, Color, Vector } from '../..';
3
- import type { Matrix } from '../../math/matrix';
4
- export type UniformDictionary = Record<string, number | boolean | Vector | Color | AffineMatrix | Float32Array | [uniformData: Float32Array, bindingPoint: number]>;
2
+ import { AffineMatrix, Color, Vector, Vector3, Vector4 } from '../..';
3
+ import { Matrix } from '../../math/matrix';
4
+ export type UniformDictionary = Record<string, number | boolean | Vector | Vector3 | Vector4 | Color | AffineMatrix | Matrix | Float32Array | [uniformData: Float32Array, bindingPoint: number]>;
5
5
  export type UniformTypeNames = 'uniform1f' | 'uniform1i' | 'uniform1ui' | 'uniform2f' | 'uniform2i' | 'uniform2ui' | 'uniform3f' | 'uniform3i' | 'uniform3ui' | 'uniform4f' | 'uniform4i' | 'uniform4ui' | 'uniform1fv' | 'uniform1iv' | 'uniform1uiv' | 'uniform2fv' | 'uniform2iv' | 'uniform2uiv' | 'uniform3fv' | 'uniform3iv' | 'uniform3uiv' | 'uniform4fv' | 'uniform4iv' | 'uniform4uiv' | 'uniformMatrix2fv' | 'uniformMatrix2x3fv' | 'uniformMatrix2x4fv' | 'uniformMatrix3fv' | 'uniformMatrix3x2fv' | 'uniformMatrix3x4fv' | 'uniformMatrix4fv' | 'uniformMatrix4x2fv' | 'uniformMatrix4x3fv';
6
6
  /**
7
7
  *
@@ -65,7 +65,7 @@ export interface ShaderOptions {
65
65
  /**
66
66
  * Set initial uniforms
67
67
  */
68
- uniforms?: UniformDictionary;
68
+ uniforms?: UniformDictionary | null;
69
69
  /**
70
70
  * Set initial images as uniform sampler2D
71
71
  */
@@ -98,6 +98,12 @@ export declare class Shader {
98
98
  };
99
99
  private _uniforms;
100
100
  private _uniformBuffers;
101
+ private _uniformBufferBindingPoints;
102
+ private _uniformBlockIndexCache;
103
+ private _uniformBlockBindingSet;
104
+ private _boundBufferBase;
105
+ private _nextUniformBufferBindingPoint;
106
+ private _affineMatrixCache;
101
107
  private _compiled;
102
108
  private _onPreLink?;
103
109
  private _onPostCompile?;
@@ -155,6 +161,7 @@ export declare class Shader {
155
161
  * @param texture
156
162
  */
157
163
  setTexture(slotNumber: number, texture: WebGLTexture): void;
164
+ private _getUniformBlockIndex;
158
165
  /**
159
166
  * Set a uniform buffer block with a Float32Array
160
167
  * @param name The of the binding block
@@ -234,7 +241,7 @@ export declare class Shader {
234
241
  * @param name
235
242
  * @param value
236
243
  */
237
- setUniformFloatArray(name: string, value: number[]): void;
244
+ setUniformFloatArray(name: string, value: Float32Array | number[]): void;
238
245
  /**
239
246
  * Set a float array uniform for the current shader, WILL NOT THROW on error.
240
247
  *
@@ -242,7 +249,7 @@ export declare class Shader {
242
249
  * @param name
243
250
  * @param value
244
251
  */
245
- trySetUniformFloatArray(name: string, value: number[]): boolean;
252
+ trySetUniformFloatArray(name: string, value: Float32Array | number[]): boolean;
246
253
  /**
247
254
  * Set a {@apilink Vector} uniform for the current shader
248
255
  *
@@ -259,6 +266,36 @@ export declare class Shader {
259
266
  * @param value
260
267
  */
261
268
  trySetUniformFloatVector(name: string, value: Vector): boolean;
269
+ /**
270
+ * Set a {@apilink Vector3} uniform for the current shader
271
+ * **Important** Must call ex.Shader.use() before setting a uniform!
272
+ * @param name
273
+ * @param value
274
+ */
275
+ setUniformFloatVector3(name: string, value: Vector3): void;
276
+ /**
277
+ * Set a {@apilink Vector3} uniform for the current shader, WILL NOT THROW on error.
278
+ * **Important** Must call ex.Shader.use() before setting a uniform!
279
+ * @param name
280
+ * @param value
281
+ * @returns
282
+ */
283
+ trySetUniformFloatVector3(name: string, value: Vector3): boolean;
284
+ /**
285
+ * Set a {@apilink Vector4} uniform for the current shader
286
+ * **Important** Must call ex.Shader.use() before setting a uniform!
287
+ * @param name
288
+ * @param value
289
+ */
290
+ setUniformFloatVector4(name: string, value: Vector4): void;
291
+ /**
292
+ * Set a {@apilink Vector4} uniform for the current shader, WILL NOT THROW on error.
293
+ * **Important** Must call ex.Shader.use() before setting a uniform!
294
+ * @param name
295
+ * @param value
296
+ * @returns
297
+ */
298
+ trySetUniformFloatVector4(name: string, value: Vector4): boolean;
262
299
  /**
263
300
  * Set a {@apilink Color} uniform for the current shader
264
301
  *
@@ -11,7 +11,7 @@ export declare class TextureLoader {
11
11
  constructor(gl: WebGL2RenderingContext, _garbageCollector?: {
12
12
  garbageCollector: GarbageCollector;
13
13
  collectionInterval: number;
14
- });
14
+ } | undefined);
15
15
  dispose(): void;
16
16
  /**
17
17
  * Sets the default filtering for the Excalibur texture loader, default {@apilink ImageFiltering.Blended}
@@ -22,14 +22,14 @@ export declare function getGLTypeFromSource(gl: WebGLRenderingContext, source: s
22
22
  * @param gl
23
23
  * @param type
24
24
  */
25
- export declare function getAttributeComponentSize(gl: WebGLRenderingContext, type: number): number;
25
+ export declare function getAttributeComponentSize(gl: WebGL2RenderingContext, type: number): number;
26
26
  /**
27
27
  * Based on the attribute return the corresponding supported attrib pointer type
28
28
  * https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/vertexAttribPointer
29
29
  * @param gl
30
30
  * @param type
31
31
  */
32
- export declare function getAttributePointerType(gl: WebGLRenderingContext, type: number): 5126 | 5122 | 5123 | 5120 | 5121;
32
+ export declare function getAttributePointerType(gl: WebGL2RenderingContext, type: number): 5124 | 5125 | 5126 | 5122 | 5123 | 5120 | 5121;
33
33
  /**
34
34
  *
35
35
  */
@@ -10,5 +10,6 @@ import { Component } from '../entity-component-system/component';
10
10
  export declare class DebugGraphicsComponent extends Component {
11
11
  draw: (ctx: ExcaliburGraphicsContext, debugFlags: DebugConfig) => void;
12
12
  useTransform: boolean;
13
+ private static _NAME;
13
14
  constructor(draw: (ctx: ExcaliburGraphicsContext, debugFlags: DebugConfig) => void, useTransform?: boolean);
14
15
  }
@@ -16,4 +16,4 @@ export declare enum ImageFiltering {
16
16
  /**
17
17
  * Parse the image filtering attribute value, if it doesn't match returns null
18
18
  */
19
- export declare function parseImageFiltering(val: string): ImageFiltering | undefined;
19
+ export declare function parseImageFiltering(val: string): ImageFiltering | null;
@@ -101,7 +101,7 @@ export declare enum FontStyle {
101
101
  /**
102
102
  * Enum representing the text direction, useful for other languages, or writing text in reverse
103
103
  */
104
- export declare enum Direction {
104
+ export declare enum TextDirection {
105
105
  LeftToRight = "ltr",
106
106
  RightToLeft = "rtl"
107
107
  }
@@ -140,7 +140,7 @@ export interface FontOptions {
140
140
  /**
141
141
  * Optionally specify the text direction, by default LeftToRight
142
142
  */
143
- direction?: Direction;
143
+ direction?: TextDirection;
144
144
  /**
145
145
  * Optionally override the text line height in pixels, useful for multiline text. If unset will use default.
146
146
  */
@@ -6,11 +6,11 @@ export declare class FontTextInstance {
6
6
  readonly font: Font;
7
7
  readonly text: string;
8
8
  readonly color: Color;
9
- readonly maxWidth?: number;
10
- canvas: HTMLCanvasElement;
11
- ctx: CanvasRenderingContext2D;
9
+ readonly maxWidth?: number | undefined;
10
+ canvas: HTMLCanvasElement | null;
11
+ ctx: CanvasRenderingContext2D | null;
12
12
  private _textFragments;
13
- dimensions: BoundingBox;
13
+ dimensions: BoundingBox | null;
14
14
  disposed: boolean;
15
15
  private _lastHashCode;
16
16
  /**
@@ -21,7 +21,7 @@ export declare class FontTextInstance {
21
21
  * Total height including all lines, in text space
22
22
  */
23
23
  private _totalHeight;
24
- constructor(font: Font, text: string, color: Color, maxWidth?: number);
24
+ constructor(font: Font, text: string, color: Color, maxWidth?: number | undefined);
25
25
  measureText(text: string, maxWidth?: number): BoundingBox;
26
26
  private _setDimension;
27
27
  static getHashCode(font: Font, text: string, color?: Color): number;
@@ -3,7 +3,7 @@ import { BoundingBox } from '../collision/index';
3
3
  import { Color } from '../color';
4
4
  import type { ExcaliburGraphicsContext } from './context/excalibur-graphics-context';
5
5
  import type { FontOptions, FontRenderer } from './font-common';
6
- import { BaseAlign, Direction, FontStyle, FontUnit, TextAlign } from './font-common';
6
+ import { BaseAlign, TextDirection, FontStyle, FontUnit, TextAlign } from './font-common';
7
7
  import type { GraphicOptions } from './graphic';
8
8
  import { Graphic } from './graphic';
9
9
  import type { RasterOptions } from './raster';
@@ -46,11 +46,11 @@ export declare class Font extends Graphic implements FontRenderer {
46
46
  unit: FontUnit;
47
47
  textAlign: TextAlign;
48
48
  baseAlign: BaseAlign;
49
- direction: Direction;
49
+ direction: TextDirection;
50
50
  /**
51
51
  * Font line height in pixels, default line height if unset
52
52
  */
53
- lineHeight: number | undefined;
53
+ lineHeight: number | null;
54
54
  size: number;
55
55
  shadow?: {
56
56
  blur?: number;
@@ -29,7 +29,7 @@ export interface GraphicsComponentData {
29
29
  x: number;
30
30
  y: number;
31
31
  };
32
- } | undefined;
32
+ } | null;
33
33
  };
34
34
  isVisible: boolean;
35
35
  opacity: number;
@@ -51,6 +51,7 @@ export interface GraphicsComponentData {
51
51
  flipVertical: boolean;
52
52
  copyGraphics: boolean;
53
53
  forceOnScreen: boolean;
54
+ shouldAlwaysTick: boolean;
54
55
  tint?: {
55
56
  r: number;
56
57
  g: number;
@@ -105,11 +106,17 @@ export interface GraphicsComponentOptions {
105
106
  * Optional anchor
106
107
  */
107
108
  anchor?: Vector;
109
+ /**
110
+ * Optionally tick graphics even when offscreen, default false. When true, the current graphic will tick every frame
111
+ * regardless of whether the owning entity is offscreen.
112
+ */
113
+ shouldAlwaysTick?: boolean;
108
114
  }
109
115
  /**
110
116
  * Component to manage drawings, using with the position component
111
117
  */
112
118
  export declare class GraphicsComponent extends Component {
119
+ private static _NAME;
113
120
  private _logger;
114
121
  private _current;
115
122
  private _graphics;
@@ -122,7 +129,7 @@ export declare class GraphicsComponent extends Component {
122
129
  /**
123
130
  * Draws after the entity transform has been applied, and after graphics component graphics has been drawn
124
131
  */
125
- onPostDraw?: (ctx: ExcaliburGraphicsContext, elapsed: number) => void;
132
+ onPostDraw: ((ctx: ExcaliburGraphicsContext, elapsed: number) => void) | null;
126
133
  /**
127
134
  * Draws before the entity transform has been applied before any any graphics component drawing
128
135
  */
@@ -132,16 +139,6 @@ export declare class GraphicsComponent extends Component {
132
139
  */
133
140
  onPostTransformDraw?: (ctx: ExcaliburGraphicsContext, elapsed: number) => void;
134
141
  private _color?;
135
- /**
136
- * Sets or gets wether any drawing should be visible in this component
137
- * @deprecated use isVisible
138
- */
139
- get visible(): boolean;
140
- /**
141
- * Sets or gets wether any drawing should be visible in this component
142
- * @deprecated use isVisible
143
- */
144
- set visible(val: boolean);
145
142
  /**
146
143
  * Sets or gets wether any drawing should be visible in this component
147
144
  */
@@ -150,6 +147,14 @@ export declare class GraphicsComponent extends Component {
150
147
  * Optionally force the graphic onscreen, default false. Not recommend to use for perf reasons, only if you known what you're doing.
151
148
  */
152
149
  forceOnScreen: boolean;
150
+ /**
151
+ * Optionally tick graphics even when offscreen, default false. When true, the current graphic will tick every frame
152
+ * regardless of whether the owning entity is offscreen. This is useful for keeping animations synchronized
153
+ * across your game scene.
154
+ *
155
+ * Can also be set per-graphic via {@apilink Animation.shouldAlwaysTick} or {@apilink GraphicsGroup.shouldAlwaysTick}.
156
+ */
157
+ shouldAlwaysTick: boolean;
153
158
  /**
154
159
  * Sets or gets wither all drawings should have an opacity applied
155
160
  */
@@ -186,7 +191,7 @@ export declare class GraphicsComponent extends Component {
186
191
  copyGraphics: boolean;
187
192
  constructor(options?: GraphicsComponentOptions);
188
193
  getGraphic(name: string): Graphic | undefined;
189
- getOptions(name: string): GraphicsShowOptions | undefined;
194
+ getOptions(name: string): GraphicsShowOptions | null;
190
195
  /**
191
196
  * Get registered graphics names
192
197
  */
@@ -198,7 +203,7 @@ export declare class GraphicsComponent extends Component {
198
203
  /**
199
204
  * Returns the currently displayed graphic offsets
200
205
  */
201
- get currentOptions(): GraphicsShowOptions | undefined;
206
+ get currentOptions(): GraphicsShowOptions | null;
202
207
  /**
203
208
  * Returns all graphics associated with this component
204
209
  */
@@ -209,7 +214,7 @@ export declare class GraphicsComponent extends Component {
209
214
  * Returns all graphics options associated with this component
210
215
  */
211
216
  get options(): {
212
- [graphicName: string]: GraphicsShowOptions | undefined;
217
+ [graphicName: string]: GraphicsShowOptions | null;
213
218
  };
214
219
  /**
215
220
  * Adds a named graphic to this component, if the name is "default" or not specified, it will be shown by default without needing to call
@@ -241,6 +246,7 @@ export declare class GraphicsComponent extends Component {
241
246
  * Get local bounds of graphics component
242
247
  */
243
248
  get localBounds(): BoundingBox;
249
+ private _scratchWorldBounds;
244
250
  /**
245
251
  * Get world bounds of graphics component
246
252
  */
@@ -251,6 +257,13 @@ export declare class GraphicsComponent extends Component {
251
257
  * @internal
252
258
  */
253
259
  update(elapsed: number, idempotencyToken?: number): void;
260
+ /**
261
+ * Update underlying graphics when offscreen, only ticks if opted in via shouldAlwaysTick on the component or current graphic.
262
+ * Called internally by GraphicsSystem.
263
+ * @param elapsed
264
+ * @internal
265
+ */
266
+ updateOffscreen(elapsed: number, idempotencyToken?: number): void;
254
267
  clone(): GraphicsComponent;
255
268
  /**
256
269
  * Custom serialization - stores graphic references instead of graphic data
@@ -13,6 +13,11 @@ export interface GraphicsGroupingOptions {
13
13
  * positioning graphics in the group is done with the `offset` property.
14
14
  */
15
15
  useAnchor?: boolean;
16
+ /**
17
+ * Optionally tick this graphics group even when offscreen, default false. Useful for keeping animations synchronized
18
+ * across your game scene.
19
+ */
20
+ shouldAlwaysTick?: boolean;
16
21
  }
17
22
  export interface GraphicsGrouping {
18
23
  offset: Vector;
@@ -31,6 +36,7 @@ export interface GraphicsGrouping {
31
36
  export declare class GraphicsGroup extends Graphic implements HasTick {
32
37
  private _logger;
33
38
  useAnchor: boolean;
39
+ shouldAlwaysTick: boolean;
34
40
  members: (GraphicsGrouping | Graphic)[];
35
41
  constructor(options: GraphicsGroupingOptions & GraphicOptions);
36
42
  clone(): GraphicsGroup;
@@ -15,11 +15,11 @@ export declare class GraphicsSystem extends System {
15
15
  query: Query<typeof TransformComponent | typeof GraphicsComponent>;
16
16
  get sortedTransforms(): TransformComponent[];
17
17
  constructor(world: World);
18
- initialize(world: World, scene: Scene): void;
18
+ onInitialize(world: World, scene: Scene): void;
19
19
  private _zHasChanged;
20
20
  private _zIndexUpdate;
21
- preupdate(): void;
22
- update(elapsed: number): void;
21
+ onPreUpdate(): void;
22
+ onUpdate(elapsed: number): void;
23
23
  private _drawGraphicsComponent;
24
24
  private _targetInterpolationTransform;
25
25
  /**
@@ -5,7 +5,7 @@ import { ImageFiltering } from './filtering';
5
5
  import { ImageWrapping } from './wrapping';
6
6
  import type { GraphicOptions } from './graphic';
7
7
  export interface ImageSourceOptions {
8
- filtering?: ImageFiltering;
8
+ filtering?: ImageFiltering | null;
9
9
  wrapping?: ImageWrapConfiguration | ImageWrapping;
10
10
  bustCache?: boolean;
11
11
  }
@@ -30,12 +30,20 @@ export * from './context/particle-renderer/particle-renderer';
30
30
  export * from './context/debug-text';
31
31
  export type * from './post-processor/post-processor';
32
32
  export * from './post-processor/screen-shader';
33
+ export * from './post-processor/shader-pipeline-post-processor';
33
34
  export * from './post-processor/color-blindness-mode';
34
35
  export * from './post-processor/color-blindness-post-processor';
35
36
  export * from './context/texture-loader';
36
37
  export * from './filtering';
37
38
  export * from './wrapping';
39
+ export * from './context/glsl';
38
40
  export * from './context/shader';
41
+ export * from './context/framebuffer';
42
+ export * from './context/shader-pipeline/shader-pass';
43
+ export * from './context/shader-pipeline/shader-pipeline';
44
+ export * from './context/shader-pipeline/effects/blur-passes';
45
+ export * from './context/shader-pipeline/effects/bloom-effect';
46
+ export * from './context/shader-pipeline/effects/glow-passes';
39
47
  export * from './context/vertex-buffer';
40
48
  export * from './context/uniform-buffer';
41
49
  export * from './context/vertex-layout';
@@ -12,7 +12,7 @@ export declare class OffscreenSystem extends System {
12
12
  private _worldBounds;
13
13
  query: Query<typeof TransformComponent | typeof GraphicsComponent>;
14
14
  constructor(world: World);
15
- initialize(world: World, scene: Scene): void;
16
- update(): void;
15
+ onInitialize(world: World, scene: Scene): void;
16
+ onUpdate(): void;
17
17
  private _isOffscreen;
18
18
  }
@@ -1,6 +1,7 @@
1
1
  import { Component } from '../entity-component-system/component';
2
2
  import type { Vector } from '../math/vector';
3
3
  export declare class ParallaxComponent extends Component {
4
+ private static _NAME;
4
5
  parallaxFactor: Vector;
5
6
  constructor(parallaxFactor?: Vector);
6
7
  }
@@ -1,16 +1,14 @@
1
1
  import type { PostProcessor } from './post-processor';
2
2
  import { ColorBlindnessMode } from './color-blindness-mode';
3
- import type { Shader } from '../context/shader';
4
- import type { VertexLayout } from '../context/vertex-layout';
5
3
  import type { ExcaliburGraphicsContextWebGL } from '../context/excalibur-graphics-context-webgl';
4
+ import type { Framebuffer } from '../context/framebuffer';
6
5
  export declare class ColorBlindnessPostProcessor implements PostProcessor {
7
6
  private _colorBlindnessMode;
8
- private _shader;
7
+ private _pass;
9
8
  private _simulate;
10
9
  constructor(_colorBlindnessMode: ColorBlindnessMode, simulate?: boolean);
11
10
  initialize(graphicsContext: ExcaliburGraphicsContextWebGL): void;
12
- getShader(): Shader;
13
- getLayout(): VertexLayout;
11
+ process(source: Framebuffer, destination: Framebuffer): void;
14
12
  set colorBlindnessMode(colorBlindMode: ColorBlindnessMode);
15
13
  get colorBlindnessMode(): ColorBlindnessMode;
16
14
  set simulate(value: boolean);
@@ -0,0 +1,66 @@
1
+ import type { VertexLayout } from '../context/vertex-layout';
2
+ import type { Shader } from '../context/shader';
3
+ import type { ExcaliburGraphicsContextWebGL } from '../context/excalibur-graphics-context-webgl';
4
+ import type { Framebuffer } from '../context/framebuffer';
5
+ /**
6
+ * PostProcessors apply a shader effect to the entire screen at the end of the frame.
7
+ *
8
+ * Implement {@apilink PostProcessor.process}: the current (MSAA-resolved) screen arrives as
9
+ * `source` and the result must be rendered into `destination` — typically with a
10
+ * {@apilink ShaderPass} or {@apilink ShaderPipeline}. Because the shape matches
11
+ * {@apilink ShaderPipelineLike}, effect objects like {@apilink BloomEffect} or
12
+ * {@apilink BlurEffect} can be added as post processors directly:
13
+ *
14
+ * ```typescript
15
+ * game.graphicsContext.addPostProcessor(new ex.BloomEffect({ graphicsContext }));
16
+ * ```
17
+ *
18
+ * Use {@apilink ShaderPipelinePostProcessor} to build one from a list of fragment sources.
19
+ *
20
+ * Fragment shaders in a {@apilink ShaderPass}/{@apilink ShaderPipeline} get these built-ins:
21
+ *
22
+ * * `uniform sampler2D u_image` - the current screen (or previous pass output)
23
+ * * `uniform vec2 u_resolution` - the destination resolution (in pixels)
24
+ * * `uniform vec2 u_texelSize` - `1.0 / source resolution`
25
+ * * `uniform float u_time_ms` - total time in milliseconds
26
+ * * `uniform float u_elapsed_ms` - elapsed milliseconds since the last frame
27
+ * * `in vec2 v_uv` - 0-1 UV over the screen
28
+ *
29
+ * The deprecated single-pass path receives `u_image` at slot 0 plus `u_time_ms`,
30
+ * `u_elapsed_ms`, and `u_resolution` when declared; custom uniforms can be updated in
31
+ * {@apilink PostProcessor.onUpdate}.
32
+ */
33
+ export interface PostProcessor {
34
+ /**
35
+ * Called once when the post processor is added to the graphics context
36
+ */
37
+ initialize?(graphicsContext: ExcaliburGraphicsContextWebGL): void;
38
+ /**
39
+ * `source` is the current (MSAA-resolved) screen framebuffer, render the result into
40
+ * `destination`, for example with a {@apilink ShaderPass} or {@apilink ShaderPipeline}.
41
+ */
42
+ process?(source: Framebuffer, destination: Framebuffer): void;
43
+ /**
44
+ * @deprecated implement {@apilink PostProcessor.process} instead, the single-pass
45
+ * shader/layout path will be removed in v1.x. The screen texture is bound to slot 0 as
46
+ * `uniform sampler2D u_image` and default uniforms (`u_time_ms`, `u_elapsed_ms`,
47
+ * `u_resolution`) are set when declared.
48
+ */
49
+ getShader?(): Shader;
50
+ /**
51
+ * @deprecated implement {@apilink PostProcessor.process} instead, the single-pass
52
+ * shader/layout path will be removed in v1.x.
53
+ */
54
+ getLayout?(): VertexLayout;
55
+ /**
56
+ * Use the onUpdate hook to update any uniforms in the postprocessors shader
57
+ *
58
+ * The shader has already been bound so there is no need to call shader.use();
59
+ * @param elapsed
60
+ */
61
+ onUpdate?(elapsed: number): void;
62
+ /**
63
+ * Use the onDraw hook to upload any textures or command that need to run right before draw
64
+ */
65
+ onDraw?(): void;
66
+ }
@@ -0,0 +1,45 @@
1
+ import type { ExcaliburGraphicsContextWebGL } from '../context/excalibur-graphics-context-webgl';
2
+ import type { Framebuffer } from '../context/framebuffer';
3
+ import type { ShaderPassLike, ShaderPipelineLike } from '../context/shader-pipeline/shader-pipeline';
4
+ import type { PostProcessor } from './post-processor';
5
+ export interface ShaderPipelinePostProcessorOptions {
6
+ /**
7
+ * Name the post processor for debugging
8
+ */
9
+ name?: string;
10
+ /**
11
+ * Multipass pipeline run over the screen, mirroring {@apilink Material}'s `passes`.
12
+ *
13
+ * Provide an ordered list of passes (bare fragment strings or {@apilink ShaderPass}), or any
14
+ * {@apilink ShaderPipelineLike} implementation ({@apilink BloomEffect}, {@apilink GlowEffect},
15
+ * {@apilink BlurEffect}, or your own pass graph).
16
+ */
17
+ passes: ShaderPassLike[] | ShaderPipelineLike;
18
+ }
19
+ /**
20
+ * A fullscreen multipass {@apilink PostProcessor} built on {@apilink ShaderPipeline}.
21
+ *
22
+ * ```typescript
23
+ * game.graphicsContext.addPostProcessor(new ex.ShaderPipelinePostProcessor({
24
+ * passes: [thresholdGlsl, blurHorizontalPass, blurVerticalPass]
25
+ * }));
26
+ * ```
27
+ *
28
+ * Each frame the screen is run through the passes and the final pass renders back into the
29
+ * engine's post processing chain, composing with any other post processors in order.
30
+ */
31
+ export declare class ShaderPipelinePostProcessor implements PostProcessor {
32
+ readonly name: string;
33
+ private _passes;
34
+ private _pipeline;
35
+ private _elapsed;
36
+ constructor(options: ShaderPipelinePostProcessorOptions);
37
+ /**
38
+ * The pipeline run over the screen, available after the post processor is added to the context
39
+ */
40
+ get pipeline(): ShaderPipelineLike;
41
+ initialize(graphicsContext: ExcaliburGraphicsContextWebGL): void;
42
+ onUpdate(elapsed: number): void;
43
+ process(source: Framebuffer, destination: Framebuffer): void;
44
+ dispose(): void;
45
+ }
@@ -39,12 +39,12 @@ export declare class SpriteFont extends Graphic implements FontRenderer {
39
39
  private _text;
40
40
  alphabet: string;
41
41
  spriteSheet: SpriteSheet;
42
- shadow?: {
42
+ shadow: {
43
43
  offset: Vector;
44
- };
44
+ } | null;
45
45
  caseInsensitive: boolean;
46
46
  spacing: number;
47
- lineHeight: number | undefined;
47
+ lineHeight: number | null;
48
48
  private _logger;
49
49
  constructor(options: SpriteFontOptions & GraphicOptions);
50
50
  protected _getCharacterSprites(text: string): Sprite[];
@@ -16,10 +16,12 @@ export * from './event-emitter';
16
16
  export * from './events/media-events';
17
17
  export * from './events';
18
18
  export * from './label';
19
- export { FontStyle, FontUnit, TextAlign, BaseAlign } from './graphics/font-common';
19
+ export { FontStyle, FontUnit, TextAlign, BaseAlign, TextDirection } from './graphics/font-common';
20
20
  export * from './particles/index';
21
21
  export * from './scene';
22
+ export * from './plugin';
22
23
  export * from './tile-map/index';
24
+ export * from './lighting/index';
23
25
  export * from './timer';
24
26
  export * from './trigger';
25
27
  export * from './screen-element';
@@ -47,7 +49,7 @@ export { PointerSystem } from './input/pointer-system';
47
49
  export { PointerType } from './input/pointer-type';
48
50
  export { PointerScope } from './input/pointer-scope';
49
51
  export type { NavigatorGamepads, NavigatorGamepad, NavigatorGamepadButton, NavigatorGamepadEvent, GamepadConfiguration } from './input/gamepad';
50
- export { Gamepads, Gamepad, Buttons, Axes } from './input/gamepad';
52
+ export { Gamepads, Gamepad, Buttons, Axes, GamepadEvents } from './input/gamepad';
51
53
  export type { KeyboardInitOptions } from './input/keyboard';
52
54
  export { Keys, KeyEvent, Keyboard } from './input/keyboard';
53
55
  export * from './input/input-host';
@@ -55,12 +57,10 @@ export * from './input/input-mapper';
55
57
  import * as util from './util/index';
56
58
  export { util as Util };
57
59
  export * from './util/browser';
58
- export * from './util/decorators';
59
60
  export * from './util/detector';
60
- export * from './util/easing-functions';
61
61
  export * from './util/observable';
62
62
  export * from './util/log';
63
- export * from './util/pool';
63
+ export * from './util/arena-pool';
64
64
  export * from './util/fps';
65
65
  export * from './util/clock';
66
66
  export * from './util/web-audio';
@@ -5,12 +5,16 @@ export interface GamepadEvents {
5
5
  connect: GamepadConnectEvent;
6
6
  disconnect: GamepadDisconnectEvent;
7
7
  button: GamepadButtonEvent;
8
+ buttondown: GamepadButtonEvent;
9
+ buttonup: GamepadButtonEvent;
8
10
  axis: GamepadAxisEvent;
9
11
  }
10
12
  export declare const GamepadEvents: {
11
13
  GamepadConnect: string;
12
14
  GamepadDisconnect: string;
13
15
  GamepadButton: string;
16
+ GamepadButtonDown: string;
17
+ GamepadButtonUp: string;
14
18
  GamepadAxis: string;
15
19
  };
16
20
  /**
@@ -100,13 +104,6 @@ export declare class Gamepad {
100
104
  private _buttonsDown;
101
105
  constructor();
102
106
  update(): void;
103
- /**
104
- * Whether or not the given button is pressed
105
- * @deprecated will be removed in v0.28.0. Use isButtonHeld instead
106
- * @param button The button to query
107
- * @param threshold The threshold over which the button is considered to be pressed
108
- */
109
- isButtonPressed(button: Buttons | number, threshold?: number): boolean;
110
107
  /**
111
108
  * Tests if a certain button is held down. This is persisted between frames.
112
109
  * @param button The button to query
@@ -192,14 +192,14 @@ export declare enum Keys {
192
192
  */
193
193
  export declare class KeyEvent extends Events.GameEvent<any> {
194
194
  key: Keys;
195
- value?: string;
196
- originalEvent?: KeyboardEvent;
195
+ value?: string | undefined;
196
+ originalEvent?: KeyboardEvent | undefined;
197
197
  /**
198
198
  * @param key The key responsible for throwing the event
199
199
  * @param value The key's typed value the browser detected
200
200
  * @param originalEvent The original keyboard event that Excalibur handled
201
201
  */
202
- constructor(key: Keys, value?: string, originalEvent?: KeyboardEvent);
202
+ constructor(key: Keys, value?: string | undefined, originalEvent?: KeyboardEvent | undefined);
203
203
  }
204
204
  export interface KeyboardInitOptions {
205
205
  global: GlobalEventHandlers | (() => GlobalEventHandlers);