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.
- package/.nvmrc +1 -1
- package/CHANGELOG.md +206 -5
- package/build/esm/excalibur.development.js +37363 -35202
- package/build/esm/excalibur.js +37363 -35202
- package/build/esm/excalibur.min.development.js +18360 -23963
- package/build/esm/excalibur.min.js +18360 -23963
- package/build/{dist → esm/src/engine}/actions/action/move-by.d.ts +1 -4
- package/build/{dist → esm/src/engine}/actions/action/move-to.d.ts +1 -4
- package/build/{dist → esm/src/engine}/actions/action/repeat-forever.d.ts +8 -0
- package/build/{dist → esm/src/engine}/actions/action/rotate-by.d.ts +9 -3
- package/build/{dist → esm/src/engine}/actions/action-context.d.ts +9 -43
- package/build/{dist → esm/src/engine}/actions/actions-component.d.ts +3 -41
- package/build/{dist → esm/src/engine}/actions/actions-system.d.ts +2 -3
- package/build/{dist → esm/src/engine}/actions/index.d.ts +0 -2
- package/build/{dist → esm/src/engine}/actor.d.ts +19 -30
- package/build/{dist → esm/src/engine}/camera.d.ts +13 -10
- package/build/{dist → esm/src/engine}/collision/body-component.d.ts +11 -20
- package/build/{dist → esm/src/engine}/collision/bounding-box.d.ts +3 -10
- package/build/{dist → esm/src/engine}/collision/collider-component.d.ts +17 -2
- package/build/{dist → esm/src/engine}/collision/colliders/circle-collider.d.ts +8 -0
- package/build/{dist → esm/src/engine}/collision/colliders/closest-line-jump-table.d.ts +1 -1
- package/build/{dist → esm/src/engine}/collision/colliders/collider.d.ts +7 -1
- package/build/{dist/collision/colliders/shape.d.ts → esm/src/engine/collision/colliders/colliders.d.ts} +50 -0
- package/build/{dist → esm/src/engine}/collision/colliders/collision-jump-table.d.ts +2 -1
- package/build/{dist → esm/src/engine}/collision/colliders/edge-collider.d.ts +25 -1
- package/build/{dist → esm/src/engine}/collision/colliders/polygon-collider.d.ts +23 -0
- package/build/esm/src/engine/collision/colliders/sat-shape.d.ts +27 -0
- package/build/{dist → esm/src/engine}/collision/colliders/separating-axis.d.ts +11 -6
- package/build/{dist → esm/src/engine}/collision/collision-system.d.ts +9 -5
- package/build/{dist → esm/src/engine}/collision/detection/collision-contact.d.ts +6 -0
- package/build/{dist → esm/src/engine}/collision/detection/dynamic-tree.d.ts +9 -11
- package/build/{dist → esm/src/engine}/collision/detection/pair.d.ts +9 -0
- package/build/{dist → esm/src/engine}/collision/detection/quad-tree.d.ts +2 -2
- package/build/{dist → esm/src/engine}/collision/detection/sparse-hash-grid-collision-processor.d.ts +7 -2
- package/build/{dist → esm/src/engine}/collision/detection/sparse-hash-grid.d.ts +11 -3
- package/build/{dist → esm/src/engine}/collision/group/collision-group-manager.d.ts +1 -1
- package/build/{dist → esm/src/engine}/collision/index.d.ts +2 -1
- package/build/{dist → esm/src/engine}/collision/motion-system.d.ts +2 -3
- package/build/{dist → esm/src/engine}/collision/physics-config.d.ts +7 -0
- package/build/{dist → esm/src/engine}/collision/physics-world.d.ts +34 -33
- package/build/esm/src/engine/collision/solver/realistic-solver.d.ts +50 -0
- package/build/{dist → esm/src/engine}/collision/solver/solver.d.ts +4 -2
- package/build/{dist → esm/src/engine}/debug/debug-config.d.ts +16 -0
- package/build/{dist → esm/src/engine}/debug/debug-system.d.ts +3 -3
- package/build/esm/src/engine/deprecated.d.ts +1 -0
- package/build/{dist → esm/src/engine}/director/director.d.ts +13 -8
- package/build/{dist → esm/src/engine}/director/slide.d.ts +2 -2
- package/build/{dist → esm/src/engine}/director/transition.d.ts +1 -4
- package/build/{dist → esm/src/engine}/engine.d.ts +58 -8
- package/build/{dist → esm/src/engine}/entity-component-system/component.d.ts +1 -1
- package/build/{dist → esm/src/engine}/entity-component-system/components/motion-component.d.ts +1 -0
- package/build/{dist → esm/src/engine}/entity-component-system/components/pause-component.d.ts +2 -0
- package/build/{dist → esm/src/engine}/entity-component-system/components/tags-component.d.ts +1 -0
- package/build/{dist → esm/src/engine}/entity-component-system/components/transform-component.d.ts +1 -0
- package/build/{dist → esm/src/engine}/entity-component-system/entity.d.ts +0 -10
- package/build/{dist → esm/src/engine}/entity-component-system/index.d.ts +0 -1
- package/build/{dist → esm/src/engine}/entity-component-system/query.d.ts +1 -1
- package/build/{dist → esm/src/engine}/entity-component-system/system.d.ts +11 -4
- package/build/{dist → esm/src/engine}/entity-component-system/world.d.ts +1 -5
- package/build/{dist → esm/src/engine}/events/media-events.d.ts +3 -3
- package/build/{dist → esm/src/engine}/events.d.ts +4 -4
- package/build/{dist → esm/src/engine}/graphics/animation.d.ts +15 -5
- package/build/{dist → esm/src/engine}/graphics/context/circle-renderer/circle-renderer.d.ts +5 -0
- package/build/{dist → esm/src/engine}/graphics/context/debug-text.d.ts +13 -1
- package/build/{dist → esm/src/engine}/graphics/context/excalibur-graphics-context-2d-canvas.d.ts +13 -3
- package/build/{dist → esm/src/engine}/graphics/context/excalibur-graphics-context-webgl.d.ts +43 -6
- package/build/{dist → esm/src/engine}/graphics/context/excalibur-graphics-context.d.ts +108 -4
- package/build/esm/src/engine/graphics/context/framebuffer.d.ts +154 -0
- package/build/esm/src/engine/graphics/context/glsl.d.ts +47 -0
- package/build/{dist → esm/src/engine}/graphics/context/material-renderer/material-renderer.d.ts +1 -0
- package/build/esm/src/engine/graphics/context/material.d.ts +208 -0
- package/build/esm/src/engine/graphics/context/shader-pipeline/effects/bloom-effect.d.ts +80 -0
- package/build/esm/src/engine/graphics/context/shader-pipeline/effects/blur-passes.d.ts +75 -0
- package/build/esm/src/engine/graphics/context/shader-pipeline/effects/glow-passes.d.ts +93 -0
- package/build/esm/src/engine/graphics/context/shader-pipeline/shader-pass.d.ts +138 -0
- package/build/esm/src/engine/graphics/context/shader-pipeline/shader-pipeline.d.ts +91 -0
- package/build/{dist → esm/src/engine}/graphics/context/shader.d.ts +43 -6
- package/build/{dist → esm/src/engine}/graphics/context/texture-loader.d.ts +1 -1
- package/build/{dist → esm/src/engine}/graphics/context/webgl-util.d.ts +2 -2
- package/build/{dist → esm/src/engine}/graphics/debug-graphics-component.d.ts +1 -0
- package/build/{dist → esm/src/engine}/graphics/filtering.d.ts +1 -1
- package/build/{dist → esm/src/engine}/graphics/font-common.d.ts +2 -2
- package/build/{dist → esm/src/engine}/graphics/font-text-instance.d.ts +5 -5
- package/build/{dist → esm/src/engine}/graphics/font.d.ts +3 -3
- package/build/{dist → esm/src/engine}/graphics/graphics-component.d.ts +28 -15
- package/build/{dist → esm/src/engine}/graphics/graphics-group.d.ts +6 -0
- package/build/{dist → esm/src/engine}/graphics/graphics-system.d.ts +3 -3
- package/build/{dist → esm/src/engine}/graphics/image-source.d.ts +1 -1
- package/build/{dist → esm/src/engine}/graphics/index.d.ts +8 -0
- package/build/{dist → esm/src/engine}/graphics/offscreen-system.d.ts +2 -2
- package/build/{dist → esm/src/engine}/graphics/parallax-component.d.ts +1 -0
- package/build/{dist → esm/src/engine}/graphics/post-processor/color-blindness-post-processor.d.ts +3 -5
- package/build/esm/src/engine/graphics/post-processor/post-processor.d.ts +66 -0
- package/build/esm/src/engine/graphics/post-processor/shader-pipeline-post-processor.d.ts +45 -0
- package/build/{dist → esm/src/engine}/graphics/sprite-font.d.ts +3 -3
- package/build/{dist → esm/src/engine}/index.d.ts +5 -5
- package/build/{dist → esm/src/engine}/input/gamepad.d.ts +4 -7
- package/build/{dist → esm/src/engine}/input/keyboard.d.ts +3 -3
- package/build/{dist → esm/src/engine}/input/pointer-component.d.ts +1 -0
- package/build/{dist → esm/src/engine}/input/pointer-event-receiver.d.ts +13 -0
- package/build/{dist → esm/src/engine}/input/pointer-system.d.ts +3 -3
- package/build/{dist → esm/src/engine}/interfaces/index.d.ts +0 -2
- package/build/{dist → esm/src/engine}/label.d.ts +2 -2
- package/build/esm/src/engine/lighting/cone-light-component.d.ts +47 -0
- package/build/esm/src/engine/lighting/darkness-component.d.ts +34 -0
- package/build/esm/src/engine/lighting/flicker-options.d.ts +17 -0
- package/build/esm/src/engine/lighting/flicker-system.d.ts +19 -0
- package/build/esm/src/engine/lighting/index.d.ts +8 -0
- package/build/esm/src/engine/lighting/light-occluder-component.d.ts +66 -0
- package/build/esm/src/engine/lighting/lighting-config.d.ts +47 -0
- package/build/esm/src/engine/lighting/lighting-system.d.ts +153 -0
- package/build/esm/src/engine/lighting/point-light-component.d.ts +46 -0
- package/build/{dist → esm/src/engine}/math/affine-matrix.d.ts +8 -1
- package/build/esm/src/engine/math/coord-plane.d.ts +52 -0
- package/build/{dist → esm/src/engine}/math/graph.d.ts +2 -3
- package/build/{dist → esm/src/engine}/math/index.d.ts +2 -0
- package/build/{dist → esm/src/engine}/math/line-segment.d.ts +1 -1
- package/build/{dist → esm/src/engine}/math/matrix.d.ts +25 -0
- package/build/{dist → esm/src/engine}/math/ray.d.ts +1 -1
- package/build/{dist → esm/src/engine}/math/transform.d.ts +9 -0
- package/build/{dist → esm/src/engine}/math/vector.d.ts +16 -13
- package/build/esm/src/engine/math/vector3.d.ts +163 -0
- package/build/esm/src/engine/math/vector4.d.ts +157 -0
- package/build/{dist → esm/src/engine}/particles/gpu-particle-emitter.d.ts +2 -2
- package/build/{dist → esm/src/engine}/particles/particle-emitter.d.ts +2 -2
- package/build/{dist → esm/src/engine}/particles/particles.d.ts +6 -1
- package/build/esm/src/engine/plugin.d.ts +253 -0
- package/build/{dist → esm/src/engine}/resources/resource.d.ts +8 -0
- package/build/{dist → esm/src/engine}/resources/sound/index.d.ts +1 -1
- package/build/esm/src/engine/resources/sound/sound-manager.d.ts +378 -0
- package/build/esm/src/engine/resources/sound/sound-track.d.ts +176 -0
- package/build/esm/src/engine/resources/sound/sound.d.ts +351 -0
- package/build/{dist → esm/src/engine}/scene.d.ts +13 -7
- package/build/{dist → esm/src/engine}/screen-element.d.ts +2 -2
- package/build/{dist → esm/src/engine}/screen.d.ts +97 -29
- package/build/{dist → esm/src/engine}/tile-map/isometric-entity-component.d.ts +1 -0
- package/build/{dist → esm/src/engine}/tile-map/isometric-entity-system.d.ts +2 -3
- package/build/{dist → esm/src/engine}/tile-map/isometric-map.d.ts +0 -10
- package/build/{dist → esm/src/engine}/tile-map/tile-map.d.ts +2 -0
- package/build/{dist → esm/src/engine}/timer.d.ts +5 -8
- package/build/{dist/util/pool.d.ts → esm/src/engine/util/arena-pool.d.ts} +15 -4
- package/build/{dist → esm/src/engine}/util/browser.d.ts +8 -0
- package/build/{dist → esm/src/engine}/util/detector.d.ts +1 -1
- package/build/{dist → esm/src/engine}/util/draw-util.d.ts +2 -2
- package/build/{dist → esm/src/engine}/util/index.d.ts +0 -1
- package/build/{dist → esm/src/engine}/util/pause-system.d.ts +7 -1
- package/build/{dist → esm/src/engine}/util/rental-pool.d.ts +1 -0
- package/build/{dist → esm/src/engine}/util/serializer.d.ts +1 -1
- package/build/{dist → esm/src/engine}/util/state-machine.d.ts +1 -1
- package/package.json +38 -44
- package/tsconfig.json +38 -1
- package/.devcontainer/devcontainer.json +0 -26
- package/.git-blame-ignore-revs +0 -3
- package/.gitattributes +0 -70
- package/.gitmodules +0 -0
- package/.husky/pre-commit +0 -1
- package/.prettierrc +0 -8
- package/build/dist/collision/solver/realistic-solver.d.ts +0 -28
- package/build/dist/deprecated.d.ts +0 -0
- package/build/dist/entity-component-system/tag-query.d.ts +0 -28
- package/build/dist/excalibur.development.js +0 -35408
- package/build/dist/excalibur.js +0 -35408
- package/build/dist/excalibur.min.development.js +0 -931
- package/build/dist/excalibur.min.js +0 -931
- package/build/dist/graphics/context/material.d.ts +0 -102
- package/build/dist/graphics/context/render-source.d.ts +0 -7
- package/build/dist/graphics/context/render-target.d.ts +0 -60
- package/build/dist/graphics/post-processor/post-processor.d.ts +0 -36
- package/build/dist/interfaces/audio-implementation.d.ts +0 -25
- package/build/dist/interfaces/audio.d.ts +0 -55
- package/build/dist/math/coord-plane.d.ts +0 -15
- package/build/dist/resources/sound/sound-manager.d.ts +0 -102
- package/build/dist/resources/sound/sound.d.ts +0 -215
- package/build/dist/resources/sound/web-audio-instance.d.ts +0 -49
- package/build/dist/util/decorators.d.ts +0 -15
- package/build/dist/util/easing-functions.d.ts +0 -89
- package/build/dist/util/sound.d.ts +0 -5
- package/deno.json +0 -10
- package/eslint.config.mjs +0 -210
- package/playground/README.md +0 -71
- package/playground/index.html +0 -75
- package/playground/package-lock.json +0 -1976
- package/playground/package.json +0 -27
- package/playground/public/favicon.ico +0 -0
- package/playground/public/icon.png +0 -0
- package/playground/public/logo-white@2x.png +0 -0
- package/playground/public/logo@2x.png +0 -0
- package/playground/public/player-run.png +0 -0
- package/playground/public/rpg-audio/License.txt +0 -21
- package/playground/public/rpg-audio/audio/handleCoins.ogg +0 -0
- package/playground/public/social.jpg +0 -0
- package/playground/public/social.png +0 -0
- package/playground/public/tiny-town/License.txt +0 -22
- package/playground/public/tiny-town/tilemap/tilemap.png +0 -0
- package/playground/tsconfig.json +0 -26
- package/playground/tsdown.config.ts +0 -13
- package/playground/vite.config.ts +0 -5
- package/vite.config.common.js +0 -27
- package/vite.config.ts +0 -78
- package/vitest.config.ts +0 -41
- /package/build/{dist → esm/src/engine}/actions/action/action-sequence.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/actions/action/blink.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/actions/action/call-method.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/actions/action/curve-by.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/actions/action/curve-to.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/actions/action/delay.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/actions/action/die.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/actions/action/ease-by.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/actions/action/ease-to.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/actions/action/fade.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/actions/action/flash.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/actions/action/follow.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/actions/action/meet.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/actions/action/parallel-actions.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/actions/action/repeat.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/actions/action/rotate-to.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/actions/action/scale-by.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/actions/action/scale-to.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/actions/action-queue.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/actions/action.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/actions/actionable.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/collision/colliders/composite-collider.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/collision/collision-type.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/collision/detection/collision-processor.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/collision/detection/dynamic-tree-collision-processor.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/collision/detection/ray-cast-hit.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/collision/detection/ray-cast-options.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/collision/detection/spatial-partition-strategy.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/collision/group/collision-group.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/collision/integrator.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/collision/island.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/collision/side.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/collision/solver/arcade-solver.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/collision/solver/contact-bias.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/collision/solver/contact-constraint-point.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/collision/solver-strategy.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/color.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/context.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/debug/debug-flags.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/debug/index.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/director/cross-fade.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/director/default-loader.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/director/fade-in-out.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/director/index.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/director/loader.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/entity-component-system/entity-manager.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/entity-component-system/priority.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/entity-component-system/query-manager.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/entity-component-system/system-manager.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/entity-component-system/types.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/event-emitter.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/events/ex-event.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/events/pointer-events.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/excalibur.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/flags.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/garbage-collector.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/graphics/canvas.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/graphics/circle.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/graphics/context/debug-circle-renderer/debug-circle-renderer.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/graphics/context/debug-line-renderer/debug-line-renderer.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/graphics/context/debug-point-renderer/debug-point-renderer.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/graphics/context/draw-call.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/graphics/context/image-renderer/image-renderer.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/graphics/context/image-renderer-v2/image-renderer-v2.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/graphics/context/particle-renderer/particle-renderer.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/graphics/context/quad-index-buffer.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/graphics/context/rectangle-renderer/rectangle-renderer.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/graphics/context/renderer.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/graphics/context/screen-pass-painter/screen-pass-painter.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/graphics/context/state-stack.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/graphics/context/transform-stack.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/graphics/context/uniform-buffer.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/graphics/context/vertex-buffer.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/graphics/context/vertex-layout.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/graphics/debug.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/graphics/font-cache.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/graphics/graphic.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/graphics/graphics-diagnostics.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/graphics/line.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/graphics/nine-slice.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/graphics/polygon.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/graphics/post-processor/color-blindness-mode.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/graphics/post-processor/screen-shader.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/graphics/raster.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/graphics/rectangle.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/graphics/sprite-sheet.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/graphics/sprite.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/graphics/text.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/graphics/tiled-animation.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/graphics/tiled-sprite.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/graphics/transform-interpolation.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/graphics/wrapping.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/id.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/input/capture-pointer-config.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/input/input-host.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/input/input-mapper.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/input/native-pointer-button.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/input/pointer-abstraction.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/input/pointer-button.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/input/pointer-event.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/input/pointer-events-to-object-dispatcher.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/input/pointer-scope.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/input/pointer-type.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/input/wheel-delta-mode.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/input/wheel-event.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/interfaces/clonable.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/interfaces/evented.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/interfaces/lifecycle-events.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/interfaces/loadable.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/interfaces/pointer-event-handlers.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/math/bezier-curve.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/math/easings.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/math/global-coordinates.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/math/lerp.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/math/projection.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/math/random.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/math/rotation-type.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/math/util.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/math/vector-view.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/math/watch-vector.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/particles/emitter-type.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/particles/gpu-particle-renderer.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/particles/index.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/polyfill.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/resources/font.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/resources/gif.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/resources/index.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/resources/sound/audio-context.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/tile-map/index.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/trigger.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/util/assert.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/util/clock.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/util/coroutine.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/util/fps.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/util/future.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/util/iframe.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/util/log.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/util/observable.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/util/required.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/util/semaphore.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/util/string.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/util/toaster.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/util/util.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/util/watch.d.ts +0 -0
- /package/build/{dist → esm/src/engine}/util/web-audio.d.ts +0 -0
|
@@ -16,12 +16,50 @@ export declare enum DisplayMode {
|
|
|
16
16
|
* Fit the aspect ratio given by the game resolution within the container at all times will fill any gaps with canvas.
|
|
17
17
|
* The displayed area outside the aspect ratio is not guaranteed to be on the screen, only the {@apilink Screen.contentArea}
|
|
18
18
|
* is guaranteed to be on screen.
|
|
19
|
+
*
|
|
20
|
+
* Behaves like {@apilink DisplayMode.FitScreenAndFill} but driven by the parent element size
|
|
21
|
+
* instead of the window. Same C-frame rooting rules apply:
|
|
22
|
+
* `contentArea.topLeft === (0, 0)` and `unsafeArea` spans the full resolution in the C-frame.
|
|
19
23
|
*/
|
|
20
24
|
FitContainerAndFill = "FitContainerAndFill",
|
|
21
25
|
/**
|
|
22
26
|
* Fit the aspect ratio given by the game resolution the screen at all times will fill the screen.
|
|
23
27
|
* This displayed area outside the aspect ratio is not guaranteed to be on the screen, only the {@apilink Screen.contentArea}
|
|
24
28
|
* is guaranteed to be on screen.
|
|
29
|
+
*
|
|
30
|
+
* Screen space (the {@apilink CoordPlane.Screen} frame, "C") is rooted at the top-left of the
|
|
31
|
+
* safe {@apilink Screen.contentArea}: `contentArea.topLeft === (0, 0)` and
|
|
32
|
+
* `contentArea.bottomRight === (contentAreaWidth, contentAreaHeight)`. The unsafe area spans the
|
|
33
|
+
* full resolution but is expressed in the same C-frame, so it extends symmetrically past the
|
|
34
|
+
* content area by half the clip on each clipped axis. {@apilink Screen.contentAreaOffset} is
|
|
35
|
+
* the resolution-space ("R") location of the content area top-left, used to convert C<->R.
|
|
36
|
+
*
|
|
37
|
+
* Horizontal-clip example (window wider than the content aspect ratio):
|
|
38
|
+
*
|
|
39
|
+
* ```
|
|
40
|
+
* Canvas / resolution frame (R) Screen / CoordPlane.Screen (C)
|
|
41
|
+
*
|
|
42
|
+
* (0,0) (0,0)
|
|
43
|
+
* +-------+------------------+-------+ +--------------------------+
|
|
44
|
+
* |unsafe | contentArea |unsafe | | |
|
|
45
|
+
* |(clip, | (safe area) |(clip, | | contentArea |
|
|
46
|
+
* | off- | | off- | ====> | (0,0)..(contentW,H) |
|
|
47
|
+
* |screen)| R-frame (0,0) is |screen)| | |
|
|
48
|
+
* | | here ----------> | | | |
|
|
49
|
+
* +-------+------------------+-------+ +--------------------------+
|
|
50
|
+
* ^-clip -^ ^-clip -^
|
|
51
|
+
*
|
|
52
|
+
* contentAreaOffset.x = clip
|
|
53
|
+
*
|
|
54
|
+
* unsafeArea (C-frame): left = -clip,
|
|
55
|
+
* right = contentRes.width + clip,
|
|
56
|
+
* width = resolution.width
|
|
57
|
+
* contentArea.width = contentRes.width
|
|
58
|
+
* resolution.width = contentRes.width + 2*clip
|
|
59
|
+
* ```
|
|
60
|
+
*
|
|
61
|
+
* Vertical-clip behaves analogously on the Y axis. {@apilink DisplayMode.FitContainerAndFill}
|
|
62
|
+
* follows the same rules but driven by the parent element size instead of the window.
|
|
25
63
|
*/
|
|
26
64
|
FitScreenAndFill = "FitScreenAndFill",
|
|
27
65
|
/**
|
|
@@ -30,6 +68,11 @@ export declare enum DisplayMode {
|
|
|
30
68
|
*
|
|
31
69
|
* **warning** This will clip some drawable area from the user because of the zoom,
|
|
32
70
|
* use {@apilink Screen.contentArea} to know the safe to draw area.
|
|
71
|
+
*
|
|
72
|
+
* The safe content area is centered on the (zoomed) unsafe area; the C-frame origin
|
|
73
|
+
* ({@apilink CoordPlane.Screen}) is at `contentArea.topLeft`. {@apilink Screen.contentAreaOffset}
|
|
74
|
+
* holds the per-axis half-clip in resolution space, and {@apilink Screen.unsafeArea} spans the
|
|
75
|
+
* full resolution in the same C-frame (was uninitialized before the fix).
|
|
33
76
|
*/
|
|
34
77
|
FitContainerAndZoom = "FitContainerAndZoom",
|
|
35
78
|
/**
|
|
@@ -38,6 +81,11 @@ export declare enum DisplayMode {
|
|
|
38
81
|
*
|
|
39
82
|
* **warning** This will clip some drawable area from the user because of the zoom,
|
|
40
83
|
* use {@apilink Screen.contentArea} to know the safe to draw area.
|
|
84
|
+
*
|
|
85
|
+
* The safe content area is centered on the (zoomed) unsafe area; the C-frame origin
|
|
86
|
+
* ({@apilink CoordPlane.Screen}) is at `contentArea.topLeft`. {@apilink Screen.contentAreaOffset}
|
|
87
|
+
* holds the per-axis half-clip in resolution space, and {@apilink Screen.unsafeArea} spans the
|
|
88
|
+
* full resolution in the same C-frame (was uninitialized before the fix).
|
|
41
89
|
*/
|
|
42
90
|
FitScreenAndZoom = "FitScreenAndZoom",
|
|
43
91
|
/**
|
|
@@ -170,7 +218,7 @@ export interface PixelRatioChangeEvent {
|
|
|
170
218
|
/**
|
|
171
219
|
* Fires when the browser fullscreen api is successfully engaged or disengaged
|
|
172
220
|
*/
|
|
173
|
-
export interface
|
|
221
|
+
export interface FullscreenChangeEvent {
|
|
174
222
|
/**
|
|
175
223
|
* Current fullscreen state
|
|
176
224
|
*/
|
|
@@ -191,12 +239,12 @@ export interface ScreenEvents {
|
|
|
191
239
|
/**
|
|
192
240
|
* Fires when the browser fullscreen api is successfully engaged or disengaged
|
|
193
241
|
*/
|
|
194
|
-
fullscreen:
|
|
242
|
+
fullscreen: FullscreenChangeEvent;
|
|
195
243
|
}
|
|
196
244
|
export declare const ScreenEvents: {
|
|
197
245
|
readonly ScreenResize: "resize";
|
|
198
246
|
readonly PixelRatioChange: "pixelratio";
|
|
199
|
-
readonly
|
|
247
|
+
readonly FullscreenChange: "fullscreen";
|
|
200
248
|
};
|
|
201
249
|
/**
|
|
202
250
|
* The Screen handles all aspects of interacting with the screen for Excalibur.
|
|
@@ -279,24 +327,10 @@ export declare class Screen {
|
|
|
279
327
|
* Get or set screen antialiasing
|
|
280
328
|
*/
|
|
281
329
|
set antialiasing(isSmooth: boolean);
|
|
282
|
-
/**
|
|
283
|
-
* Returns true if excalibur is fullscreen using the browser fullscreen api
|
|
284
|
-
* @deprecated use isFullscreen()
|
|
285
|
-
*/
|
|
286
|
-
get isFullScreen(): boolean;
|
|
287
330
|
/**
|
|
288
331
|
* Returns true if excalibur is fullscreen using the browser fullscreen api
|
|
289
332
|
*/
|
|
290
333
|
get isFullscreen(): boolean;
|
|
291
|
-
/**
|
|
292
|
-
* Requests to go fullscreen using the browser fullscreen api, requires user interaction to be successful.
|
|
293
|
-
* For example, wire this to a user click handler.
|
|
294
|
-
*
|
|
295
|
-
* Optionally specify a target element id to go fullscreen, by default the game canvas is used
|
|
296
|
-
* @param elementId
|
|
297
|
-
* @deprecated use enterFullscreen(...)
|
|
298
|
-
*/
|
|
299
|
-
goFullScreen(elementId?: string): Promise<void>;
|
|
300
334
|
/**
|
|
301
335
|
* Requests to enter fullscreen using the browser fullscreen api, requires user interaction to be successful.
|
|
302
336
|
* For example, wire this to a user click handler.
|
|
@@ -305,20 +339,20 @@ export declare class Screen {
|
|
|
305
339
|
* @param elementId
|
|
306
340
|
*/
|
|
307
341
|
enterFullscreen(elementId?: string): Promise<void>;
|
|
308
|
-
/**
|
|
309
|
-
* Requests to exit fullscreen using the browser fullscreen api
|
|
310
|
-
* @deprecated use exitFullscreen()
|
|
311
|
-
*/
|
|
312
|
-
exitFullScreen(): Promise<void>;
|
|
313
342
|
exitFullscreen(): Promise<void>;
|
|
314
343
|
private _viewportToPixels;
|
|
315
344
|
/**
|
|
316
345
|
* Takes a coordinate in normal html page space, for example from a pointer move event, and translates it to
|
|
317
346
|
* Excalibur screen space.
|
|
318
347
|
*
|
|
319
|
-
* Excalibur screen space
|
|
320
|
-
*
|
|
321
|
-
*
|
|
348
|
+
* Excalibur screen space is rooted at the top-left (0, 0) of the {@apilink Screen.contentArea} (the safe
|
|
349
|
+
* content area), and extends to (contentArea.width, contentArea.height). Anywhere the safe area differs from
|
|
350
|
+
* the full resolution (e.g. {@apilink DisplayMode.FitScreenAndFill}, {@apilink DisplayMode.FitContainerAndFill},
|
|
351
|
+
* {@apilink DisplayMode.FitScreenAndZoom}, {@apilink DisplayMode.FitContainerAndZoom}) the screen-space origin
|
|
352
|
+
* is shifted into the safe area, not the raw canvas top-left.
|
|
353
|
+
*
|
|
354
|
+
* This matches how {@apilink ScreenElement | `screen elements`} and {@apilink CoordPlane.Screen} entities are
|
|
355
|
+
* drawn: their local (0, 0) sits at {@apilink Screen.contentArea}.topLeft.
|
|
322
356
|
* @param point
|
|
323
357
|
*/
|
|
324
358
|
pageToScreenCoordinates(point: Vector): Vector;
|
|
@@ -326,14 +360,17 @@ export declare class Screen {
|
|
|
326
360
|
* Takes a coordinate in Excalibur screen space, and translates it to normal html page space. For example,
|
|
327
361
|
* this is where html elements might live if you want to position them relative to Excalibur.
|
|
328
362
|
*
|
|
329
|
-
* Excalibur screen space
|
|
330
|
-
*
|
|
363
|
+
* Excalibur screen space is rooted at the top-left (0, 0) of the {@apilink Screen.contentArea} (the safe
|
|
364
|
+
* content area), the inverse of {@apilink Screen.pageToScreenCoordinates}.
|
|
331
365
|
* @param point
|
|
332
366
|
*/
|
|
333
367
|
screenToPageCoordinates(point: Vector): Vector;
|
|
334
368
|
/**
|
|
335
369
|
* Takes a coordinate in Excalibur screen space, and translates it to Excalibur world space.
|
|
336
370
|
*
|
|
371
|
+
* The screen coordinate is rooted at the top-left of the {@apilink Screen.contentArea} (the safe content area),
|
|
372
|
+
* matching how {@apilink ScreenElement | `screen elements`} and {@apilink CoordPlane.Screen} entities are drawn.
|
|
373
|
+
*
|
|
337
374
|
* World space is where {@apilink Entity | `entities`} in Excalibur live by default {@apilink CoordPlane.World}
|
|
338
375
|
* and extends infinitely out relative from the {@apilink Camera}.
|
|
339
376
|
* @param point Screen coordinate to convert
|
|
@@ -342,7 +379,9 @@ export declare class Screen {
|
|
|
342
379
|
/**
|
|
343
380
|
* Takes a coordinate in Excalibur world space, and translates it to Excalibur screen space.
|
|
344
381
|
*
|
|
345
|
-
* Screen space is where {@apilink ScreenElement | `screen elements`} and {@apilink Entity | `entities`} with
|
|
382
|
+
* Screen space is where {@apilink ScreenElement | `screen elements`} and {@apilink Entity | `entities`} with
|
|
383
|
+
* {@apilink CoordPlane.Screen} live. The returned coordinate is rooted at the top-left of the
|
|
384
|
+
* {@apilink Screen.contentArea} (the safe content area), matching how `CoordPlane.Screen` entities are drawn.
|
|
346
385
|
* @param point World coordinate to convert
|
|
347
386
|
*/
|
|
348
387
|
worldToScreenCoordinates(point: Vector): Vector;
|
|
@@ -405,15 +444,44 @@ export declare class Screen {
|
|
|
405
444
|
*/
|
|
406
445
|
get center(): Vector;
|
|
407
446
|
/**
|
|
408
|
-
* Returns the content area in screen space where it is safe to place content
|
|
447
|
+
* Returns the content area in screen space where it is safe to place content.
|
|
448
|
+
*
|
|
449
|
+
* Screen space is rooted at the top-left of the content area, so
|
|
450
|
+
* `contentArea.topLeft` is always `(0, 0)` and `contentArea.bottomRight` is
|
|
451
|
+
* `(contentArea.width, contentArea.height)`. To convert a screen-space point
|
|
452
|
+
* back to the raw canvas/resolution frame, add
|
|
453
|
+
* {@apilink Screen.contentAreaOffset}.
|
|
454
|
+
*
|
|
455
|
+
* // TODO(phase-3): a `CoordPlane.Canvas` could expose the raw resolution
|
|
456
|
+
* frame to users that need true canvas-corner coordinates.
|
|
409
457
|
*/
|
|
410
458
|
get contentArea(): BoundingBox;
|
|
411
459
|
/**
|
|
412
460
|
* Returns the unsafe area in screen space, this is the full screen and some space may not be onscreen.
|
|
461
|
+
*
|
|
462
|
+
* The unsafe area spans the full resolution, expressed in the same
|
|
463
|
+
* content-area-rooted screen space as {@apilink Screen.contentArea}: when the
|
|
464
|
+
* content area is inset from the canvas (e.g. {@apilink DisplayMode.FitScreenAndFill}),
|
|
465
|
+
* `unsafeArea.topLeft` is negative by the clip amount and `unsafeArea.width`
|
|
466
|
+
* equals {@apilink Screen.resolution}.width.
|
|
413
467
|
*/
|
|
414
468
|
get unsafeArea(): BoundingBox;
|
|
469
|
+
/**
|
|
470
|
+
* Resolution-space offset of the safe content area's top-left corner. `(0, 0)`
|
|
471
|
+
* when the content area fills the canvas (no clipping); positive when the
|
|
472
|
+
* safe area is inset (e.g. under {@apilink DisplayMode.FitScreenAndFill}).
|
|
473
|
+
*
|
|
474
|
+
* Use this to convert between the {@apilink CoordPlane.Screen} frame (rooted
|
|
475
|
+
* at {@apilink Screen.contentArea}.topLeft) and the raw canvas/resolution
|
|
476
|
+
* frame (rooted at the canvas top-left). This is the value the engine
|
|
477
|
+
* translates by before drawing {@apilink CoordPlane.Screen} entities, and the
|
|
478
|
+
* inverse offset applied by {@apilink Screen.pageToScreenCoordinates} and
|
|
479
|
+
* {@apilink Screen.screenToWorldCoordinates}.
|
|
480
|
+
*/
|
|
481
|
+
get contentAreaOffset(): Vector;
|
|
415
482
|
private _contentArea;
|
|
416
483
|
private _unsafeArea;
|
|
484
|
+
private _contentAreaOffset;
|
|
417
485
|
private _computeFit;
|
|
418
486
|
private _computeFitScreenAndFill;
|
|
419
487
|
private _computeFitContainerAndFill;
|
|
@@ -2,12 +2,11 @@ import { System, SystemType } from '../entity-component-system/system';
|
|
|
2
2
|
import { TransformComponent } from '../entity-component-system/components/transform-component';
|
|
3
3
|
import { IsometricEntityComponent } from './isometric-entity-component';
|
|
4
4
|
import type { Query, World } from '../entity-component-system';
|
|
5
|
-
import { PauseComponent } from '../entity-component-system/components/pause-component';
|
|
6
5
|
export declare class IsometricEntitySystem extends System {
|
|
7
6
|
world: World;
|
|
8
7
|
static priority: number;
|
|
9
8
|
readonly systemType = SystemType.Update;
|
|
10
|
-
query: Query<typeof TransformComponent | typeof IsometricEntityComponent
|
|
9
|
+
query: Query<typeof TransformComponent | typeof IsometricEntityComponent>;
|
|
11
10
|
constructor(world: World);
|
|
12
|
-
|
|
11
|
+
onUpdate(): void;
|
|
13
12
|
}
|
|
@@ -161,16 +161,6 @@ export declare class IsometricMap extends Entity implements HasNestedPointerEven
|
|
|
161
161
|
* List containing all of the tiles in IsometricMap
|
|
162
162
|
*/
|
|
163
163
|
readonly tiles: IsometricTile[];
|
|
164
|
-
/**
|
|
165
|
-
* Whether tiles should be visible
|
|
166
|
-
* @deprecated use isVisible
|
|
167
|
-
*/
|
|
168
|
-
get visible(): boolean;
|
|
169
|
-
/**
|
|
170
|
-
* Whether tiles should be visible
|
|
171
|
-
* @deprecated use isVisible
|
|
172
|
-
*/
|
|
173
|
-
set visible(val: boolean);
|
|
174
164
|
/**
|
|
175
165
|
* Whether tiles should be visible
|
|
176
166
|
*/
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { Scene } from './scene';
|
|
2
|
-
import
|
|
2
|
+
import { Random } from './math/random';
|
|
3
|
+
import { EventEmitter } from './event-emitter';
|
|
3
4
|
/**
|
|
4
5
|
* Built in events supported by all entities
|
|
5
6
|
*/
|
|
@@ -30,10 +31,6 @@ export interface TimerOptions {
|
|
|
30
31
|
* If a number is specified then it will only repeat a number of times
|
|
31
32
|
*/
|
|
32
33
|
numberOfRepeats?: number;
|
|
33
|
-
/**
|
|
34
|
-
* @deprecated use action: () => void, will be removed in v1.0
|
|
35
|
-
*/
|
|
36
|
-
fcn?: () => void;
|
|
37
34
|
/**
|
|
38
35
|
* Action to perform every time the timer fires
|
|
39
36
|
*/
|
|
@@ -49,7 +46,7 @@ export interface TimerOptions {
|
|
|
49
46
|
/**
|
|
50
47
|
* Optionally provide a random instance to use for random behavior, otherwise a new random will be created seeded from the current time.
|
|
51
48
|
*/
|
|
52
|
-
random?:
|
|
49
|
+
random?: Random;
|
|
53
50
|
/**
|
|
54
51
|
* Optionally provide a callback to fire once when the timer completes its last action callback.
|
|
55
52
|
*/
|
|
@@ -63,7 +60,7 @@ export declare class Timer {
|
|
|
63
60
|
private _logger;
|
|
64
61
|
private static _MAX_ID;
|
|
65
62
|
id: number;
|
|
66
|
-
events:
|
|
63
|
+
events: EventEmitter<TimerEvents>;
|
|
67
64
|
private _elapsedTime;
|
|
68
65
|
private _totalTimeAlive;
|
|
69
66
|
private _running;
|
|
@@ -73,7 +70,7 @@ export declare class Timer {
|
|
|
73
70
|
repeats: boolean;
|
|
74
71
|
maxNumberOfRepeats: number;
|
|
75
72
|
randomRange: [number, number];
|
|
76
|
-
random:
|
|
73
|
+
random: Random;
|
|
77
74
|
private _baseInterval;
|
|
78
75
|
private _generateRandomInterval;
|
|
79
76
|
private _onComplete;
|
|
@@ -1,13 +1,19 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* This pool works like an arena allocator, it preallocates a large list of objects and passes them out sequentially
|
|
3
|
+
* It is meant to be freed all at once, so things that can be reclaimed after a frame are the ideal type.
|
|
4
|
+
*
|
|
5
|
+
* If you need to take singular objects and put singular objects back {@link RentalPool} is ideal.
|
|
6
|
+
*/
|
|
7
|
+
export declare class ArenaPool<Type> {
|
|
2
8
|
builder: () => Type;
|
|
3
|
-
recycler?: (instance: Type) => Type;
|
|
9
|
+
recycler?: ((instance: Type) => Type) | undefined;
|
|
4
10
|
maxObjects: number;
|
|
5
11
|
totalAllocations: number;
|
|
6
12
|
index: number;
|
|
7
13
|
objects: Type[];
|
|
8
14
|
disableWarnings: boolean;
|
|
9
15
|
private _logger;
|
|
10
|
-
constructor(builder: () => Type, recycler?: (instance: Type) => Type, maxObjects?: number);
|
|
16
|
+
constructor(builder: () => Type, recycler?: ((instance: Type) => Type) | undefined, maxObjects?: number);
|
|
11
17
|
dispose(): void;
|
|
12
18
|
preallocate(): void;
|
|
13
19
|
/**
|
|
@@ -16,7 +22,7 @@ export declare class Pool<Type> {
|
|
|
16
22
|
* By returning values out of the context they will be un-hooked from the pool and are free to be passed to consumers
|
|
17
23
|
* @param context
|
|
18
24
|
*/
|
|
19
|
-
using(context: (pool:
|
|
25
|
+
using(context: (pool: ArenaPool<Type>) => Type[] | void): Type[];
|
|
20
26
|
/**
|
|
21
27
|
* Use a single instance out of th pool and immediately return it to the pool
|
|
22
28
|
* @param context
|
|
@@ -36,3 +42,8 @@ export declare class Pool<Type> {
|
|
|
36
42
|
done(...objects: Type[]): Type[];
|
|
37
43
|
done(): void;
|
|
38
44
|
}
|
|
45
|
+
/**
|
|
46
|
+
* @deprecated Use ArenaPool
|
|
47
|
+
*/
|
|
48
|
+
export declare class Pool<T> extends ArenaPool<T> {
|
|
49
|
+
}
|
|
@@ -5,6 +5,14 @@ export interface NativeEventable {
|
|
|
5
5
|
export declare class BrowserComponent<T extends NativeEventable> {
|
|
6
6
|
nativeComponent: T;
|
|
7
7
|
private _paused;
|
|
8
|
+
/**
|
|
9
|
+
* Event name -> (original handler -> decorated wrapper)
|
|
10
|
+
*
|
|
11
|
+
* Supports multiple handlers per event name. Each registered handler is
|
|
12
|
+
* decorated with pause-awareness; the original handler reference is the key
|
|
13
|
+
* so callers can `off(eventName, originalHandler)` by the same reference they
|
|
14
|
+
* passed to `on`.
|
|
15
|
+
*/
|
|
8
16
|
private _nativeHandlers;
|
|
9
17
|
on(eventName: string, handler: (evt: any) => void): void;
|
|
10
18
|
off(eventName: string, handler?: (event: any) => void): void;
|
|
@@ -16,11 +16,11 @@ export type LineCapStyle = 'butt' | 'round' | 'square';
|
|
|
16
16
|
* @param thickness The line thickness
|
|
17
17
|
* @param cap The {@apilink LineCapStyle} (butt, round, or square)
|
|
18
18
|
*/
|
|
19
|
-
export declare function line(ctx: CanvasRenderingContext2D, color: Color, x1: number, y1: number, x2: number, y2: number, thickness?: number, cap?: LineCapStyle): void;
|
|
19
|
+
export declare function line(ctx: CanvasRenderingContext2D, color: Color | undefined, x1: number, y1: number, x2: number, y2: number, thickness?: number, cap?: LineCapStyle): void;
|
|
20
20
|
/**
|
|
21
21
|
* Draw the vector as a point onto the canvas.
|
|
22
22
|
*/
|
|
23
|
-
export declare function point(ctx: CanvasRenderingContext2D, color: Color, point: Vector): void;
|
|
23
|
+
export declare function point(ctx: CanvasRenderingContext2D, color: Color | undefined, point: Vector): void;
|
|
24
24
|
/**
|
|
25
25
|
* Draw the vector as a line onto the canvas starting a origin point.
|
|
26
26
|
*/
|
|
@@ -3,10 +3,16 @@ import type { Query } from '../entity-component-system';
|
|
|
3
3
|
import { System, SystemType } from '../entity-component-system';
|
|
4
4
|
import { PauseComponent } from '../entity-component-system/components/pause-component';
|
|
5
5
|
export declare class PauseSystem extends System {
|
|
6
|
+
static priority: number;
|
|
6
7
|
systemType: SystemType;
|
|
7
8
|
query: Query<typeof PauseComponent>;
|
|
8
9
|
sceneEventEmitter: EventEmitter<SceneEvents>;
|
|
9
10
|
isPaused: boolean;
|
|
11
|
+
wasPaused: boolean;
|
|
10
12
|
constructor(scene: Scene);
|
|
11
|
-
|
|
13
|
+
/**
|
|
14
|
+
* Number of entities currently carrying the paused tag, lets the common "nothing is paused" frame skip the scan
|
|
15
|
+
*/
|
|
16
|
+
private _pausedCount;
|
|
17
|
+
onUpdate(): void;
|
|
12
18
|
}
|
|
@@ -30,7 +30,7 @@ export declare class StateMachine<TPossibleStates extends string, TData> {
|
|
|
30
30
|
get currentState(): State<TData>;
|
|
31
31
|
set currentState(state: State<TData>);
|
|
32
32
|
states: Map<string, State<TData>>;
|
|
33
|
-
data
|
|
33
|
+
data?: TData;
|
|
34
34
|
static create<TMachine extends StateMachineDescription<TData>, TData>(machineDescription: TMachine, data?: TData): StateMachine<PossibleStates<TMachine>, TData>;
|
|
35
35
|
in(state: TPossibleStates): boolean;
|
|
36
36
|
go(stateName: TPossibleStates, eventData?: any): boolean;
|
package/package.json
CHANGED
|
@@ -1,30 +1,28 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "excalibur",
|
|
3
|
+
"type": "module",
|
|
3
4
|
"sideEffects": false,
|
|
4
|
-
"version": "
|
|
5
|
-
"exNextVersion": "
|
|
5
|
+
"version": "1.1.0-alpha.310",
|
|
6
|
+
"exNextVersion": "1.1.0",
|
|
6
7
|
"publishConfig": {
|
|
7
8
|
"provenance": true
|
|
8
9
|
},
|
|
9
10
|
"description": "Excalibur.js is a simple JavaScript game engine with TypeScript bindings for making 2D games in HTML5 Canvas. Our mission is to make web game development as simple as possible.",
|
|
10
11
|
"author": "https://github.com/excaliburjs/Excalibur/graphs/contributors",
|
|
11
12
|
"homepage": "https://github.com/excaliburjs/Excalibur",
|
|
12
|
-
"main": "build/
|
|
13
|
-
"typings": "build/
|
|
13
|
+
"main": "build/esm/excalibur.min.js",
|
|
14
|
+
"typings": "build/esm/src/engine/excalibur.d.ts",
|
|
14
15
|
"exports": {
|
|
15
16
|
"./package.json": "./package.json",
|
|
16
17
|
".": {
|
|
17
|
-
"types": "./build/
|
|
18
|
+
"types": "./build/esm/src/engine/excalibur.d.ts",
|
|
18
19
|
"development": {
|
|
19
|
-
"import": "./build/esm/excalibur.development.js"
|
|
20
|
-
"require": "./build/dist/excalibur.development.js"
|
|
20
|
+
"import": "./build/esm/excalibur.development.js"
|
|
21
21
|
},
|
|
22
22
|
"production": {
|
|
23
|
-
"import": "./build/esm/excalibur.js"
|
|
24
|
-
"require": "./build/dist/excalibur.js"
|
|
23
|
+
"import": "./build/esm/excalibur.js"
|
|
25
24
|
},
|
|
26
|
-
"import": "./build/esm/excalibur.js"
|
|
27
|
-
"require": "./build/dist/excalibur.js"
|
|
25
|
+
"import": "./build/esm/excalibur.js"
|
|
28
26
|
}
|
|
29
27
|
},
|
|
30
28
|
"repository": {
|
|
@@ -45,15 +43,15 @@
|
|
|
45
43
|
],
|
|
46
44
|
"scripts": {
|
|
47
45
|
"all": "npm run format && npm run lint && npm run build && npm run test",
|
|
48
|
-
"all:ci": "npm run format && npm run lint && npm run test:ci && npm run build",
|
|
46
|
+
"all:ci": "npm run format && npm run lint && npm run apidocs && npm run test:ci && npm run build",
|
|
49
47
|
"clean": "rimraf ./build",
|
|
50
|
-
"linux:ci": "npm run clean && npm run all:ci && npm run coveralls
|
|
48
|
+
"linux:ci": "npm run clean && npm run all:ci && npm run coveralls",
|
|
51
49
|
"appveyor": "npm run all:ci && npm run nuget 0.0.1",
|
|
52
50
|
"browserstack": "npm run build:production && karma start karma.conf.browsers.js",
|
|
53
51
|
"nuget": ".\\src\\tools\\NuGet.exe pack Excalibur.nuspec -OutputDirectory .\\build\\nuget -version",
|
|
54
52
|
"dev": "concurrently --names \"build,types\" \"vite build --watch\" \"npm run types -- --watch\"",
|
|
55
53
|
"start": "npm run build:watch",
|
|
56
|
-
"types": "tsc --project src/engine/tsconfig.json --declaration --incremental true --tsBuildInfoFile build/
|
|
54
|
+
"types": "tsc --project src/engine/tsconfig.json --declaration --incremental true --tsBuildInfoFile build/esm/.tsbuildinfo --emitDeclarationOnly",
|
|
57
55
|
"build": "npm run build:production && npm run build:development && npm run types",
|
|
58
56
|
"build:production": "vite build && vite build --minify false",
|
|
59
57
|
"build:development": "vite build --mode development && vite build --mode development --minify false",
|
|
@@ -62,6 +60,7 @@
|
|
|
62
60
|
"lint": "npm run eslint",
|
|
63
61
|
"lint:fix": "npm run eslint -- --fix",
|
|
64
62
|
"type-check": "cd src/engine && tsc --noEmit",
|
|
63
|
+
"type-check:tests": "cd src/spec && tsc --noEmit",
|
|
65
64
|
"eslint": "eslint .",
|
|
66
65
|
"visual": "storybook dev -p 6006",
|
|
67
66
|
"build-storybook": "storybook build -o build-storybook",
|
|
@@ -74,29 +73,30 @@
|
|
|
74
73
|
"test:debug:unit:headless": "npm run test:unit -- --browser.headless --inspect --no-file-parallelism",
|
|
75
74
|
"test:visual": "vitest --project visual",
|
|
76
75
|
"test:visual:headless": "npm run test:visual -- --browser.headless",
|
|
77
|
-
"apidocs": "node scripts/
|
|
76
|
+
"apidocs": "node site/scripts/gen-typedoc-api.mjs",
|
|
78
77
|
"release": "cross-env release=true npm run all",
|
|
79
78
|
"prepare": "husky"
|
|
80
79
|
},
|
|
81
80
|
"devDependencies": {
|
|
82
|
-
"@babel/core": "7.29.
|
|
83
|
-
"@babel/preset-env": "7.29.
|
|
84
|
-
"@babel/preset-typescript": "7.
|
|
85
|
-
"@eslint/eslintrc": "3.3.
|
|
81
|
+
"@babel/core": "7.29.7",
|
|
82
|
+
"@babel/preset-env": "7.29.7",
|
|
83
|
+
"@babel/preset-typescript": "7.29.7",
|
|
84
|
+
"@eslint/eslintrc": "3.3.7",
|
|
86
85
|
"@eslint/js": "9.30.1",
|
|
87
86
|
"@fortawesome/fontawesome-free": "6.7.2",
|
|
88
87
|
"@octokit/rest": "21.1.1",
|
|
89
|
-
"@storybook/html-vite": "
|
|
88
|
+
"@storybook/html-vite": "10.6.5",
|
|
90
89
|
"@types/jasmine": "5.1.15",
|
|
91
|
-
"@types/node": "22.
|
|
90
|
+
"@types/node": "22.20.5",
|
|
92
91
|
"@types/react-color": "3.0.13",
|
|
93
92
|
"@types/webpack-env": "1.18.8",
|
|
94
|
-
"@vitest/browser": "
|
|
95
|
-
"@vitest/
|
|
96
|
-
"@vitest/
|
|
97
|
-
"
|
|
93
|
+
"@vitest/browser": "4.1.12",
|
|
94
|
+
"@vitest/browser-playwright": "4.1.12",
|
|
95
|
+
"@vitest/coverage-istanbul": "4.1.12",
|
|
96
|
+
"@vitest/ui": "4.1.12",
|
|
97
|
+
"concurrently": "9.2.5",
|
|
98
98
|
"copyfiles": "2.4.1",
|
|
99
|
-
"coveralls-next": "
|
|
99
|
+
"coveralls-next": "6.0.2",
|
|
100
100
|
"cross-env": "7.0.3",
|
|
101
101
|
"css-loader": "6.11.0",
|
|
102
102
|
"eslint": "9.30.1",
|
|
@@ -111,14 +111,14 @@
|
|
|
111
111
|
"karma-chrome-launcher": "3.2.0",
|
|
112
112
|
"karma-jasmine": "5.1.0",
|
|
113
113
|
"karma-jasmine-order-reporter": "1.2.0",
|
|
114
|
-
"karma-spec-reporter": "0.0.
|
|
114
|
+
"karma-spec-reporter": "0.0.37",
|
|
115
115
|
"karma-summary-reporter": "4.0.1",
|
|
116
116
|
"karma-webpack": "5.0.1",
|
|
117
117
|
"lint-staged": "15.5.2",
|
|
118
118
|
"pixelmatch": "5.3.0",
|
|
119
|
-
"playwright": "1.
|
|
120
|
-
"prettier": "3.8.
|
|
121
|
-
"puppeteer": "
|
|
119
|
+
"playwright": "1.64.1",
|
|
120
|
+
"prettier": "3.8.3",
|
|
121
|
+
"puppeteer": "25.16.0",
|
|
122
122
|
"raw-loader": "4.0.2",
|
|
123
123
|
"react": "18.3.1",
|
|
124
124
|
"react-dom": "18.3.1",
|
|
@@ -126,17 +126,16 @@
|
|
|
126
126
|
"rimraf": "5.0.10",
|
|
127
127
|
"serve": "14.2.6",
|
|
128
128
|
"source-map-support": "0.5.21",
|
|
129
|
-
"storybook": "
|
|
129
|
+
"storybook": "10.6.5",
|
|
130
130
|
"sync-request": "6.1.0",
|
|
131
|
-
"ts-loader": "9.
|
|
132
|
-
"
|
|
133
|
-
"typescript": "
|
|
134
|
-
"typescript-eslint": "8.38.0",
|
|
131
|
+
"ts-loader": "9.6.2",
|
|
132
|
+
"typescript": "6.0.3",
|
|
133
|
+
"typescript-eslint": "8.63.0",
|
|
135
134
|
"url-loader": "4.1.1",
|
|
136
|
-
"vite": "
|
|
135
|
+
"vite": "8.1.6",
|
|
137
136
|
"vite-plugin-banner": "0.8.1",
|
|
138
|
-
"vite-plugin-static-copy": "
|
|
139
|
-
"vitest": "
|
|
137
|
+
"vite-plugin-static-copy": "4.1.1",
|
|
138
|
+
"vitest": "4.1.12",
|
|
140
139
|
"webpack": "5.104.1",
|
|
141
140
|
"webpack-cli": "5.1.4"
|
|
142
141
|
},
|
|
@@ -144,16 +143,11 @@
|
|
|
144
143
|
"*.{js,jsx,ts,tsx,html,json,md,yml,yaml}": "prettier --write",
|
|
145
144
|
"*.{js,jsx,ts,tsx,html}": "eslint --fix"
|
|
146
145
|
},
|
|
147
|
-
"overrides": {
|
|
148
|
-
"typedoc": {
|
|
149
|
-
"typescript": ">=4.7.4"
|
|
150
|
-
}
|
|
151
|
-
},
|
|
152
146
|
"devEngines": {
|
|
153
147
|
"runtime": {
|
|
154
148
|
"name": "node",
|
|
155
149
|
"onFail": "error",
|
|
156
|
-
"version": ">=
|
|
150
|
+
"version": ">=24"
|
|
157
151
|
},
|
|
158
152
|
"packageManager": {
|
|
159
153
|
"name": "npm",
|