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
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import type { Entity } from '../../entity-component-system/entity';
|
|
2
2
|
import type { Easing } from '../../math';
|
|
3
3
|
import { Vector } from '../../math/vector';
|
|
4
|
-
import type { EasingFunction } from '../../util/easing-functions';
|
|
5
4
|
import type { Action } from '../action';
|
|
6
5
|
export interface MoveByOptions {
|
|
7
6
|
offset: Vector;
|
|
8
7
|
duration: number;
|
|
9
|
-
easing?: Easing
|
|
8
|
+
easing?: Easing;
|
|
10
9
|
}
|
|
11
10
|
/**
|
|
12
11
|
*
|
|
@@ -24,9 +23,7 @@ export declare class MoveByWithOptions implements Action {
|
|
|
24
23
|
private _stopped;
|
|
25
24
|
private _motion;
|
|
26
25
|
private _offset;
|
|
27
|
-
private _legacyEasing;
|
|
28
26
|
private _easing;
|
|
29
|
-
private _useLegacyEasing;
|
|
30
27
|
constructor(entity: Entity, options: MoveByOptions);
|
|
31
28
|
update(elapsed: number): void;
|
|
32
29
|
isComplete(entity: Entity): boolean;
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import type { Entity } from '../../entity-component-system/entity';
|
|
2
2
|
import type { Easing } from '../../math';
|
|
3
3
|
import { Vector } from '../../math/vector';
|
|
4
|
-
import type { EasingFunction } from '../../util/easing-functions';
|
|
5
4
|
import type { Action } from '../action';
|
|
6
5
|
export interface MoveToOptions {
|
|
7
6
|
pos: Vector;
|
|
8
7
|
duration: number;
|
|
9
|
-
easing?: Easing
|
|
8
|
+
easing?: Easing;
|
|
10
9
|
}
|
|
11
10
|
/**
|
|
12
11
|
*
|
|
@@ -24,8 +23,6 @@ export declare class MoveToWithOptions implements Action {
|
|
|
24
23
|
private _stopped;
|
|
25
24
|
private _motion;
|
|
26
25
|
private _easing;
|
|
27
|
-
private _legacyEasing;
|
|
28
|
-
private _useLegacyEasing;
|
|
29
26
|
constructor(entity: Entity, options: MoveToOptions);
|
|
30
27
|
update(elapsed: number): void;
|
|
31
28
|
isComplete(entity: Entity): boolean;
|
|
@@ -11,11 +11,19 @@ export declare class RepeatForever implements Action {
|
|
|
11
11
|
id: number;
|
|
12
12
|
private _actionQueue;
|
|
13
13
|
private _stopped;
|
|
14
|
+
private _isUpdating;
|
|
15
|
+
private _resetRequested;
|
|
14
16
|
private _repeatContext;
|
|
15
17
|
private _repeatBuilder;
|
|
16
18
|
constructor(entity: Entity, repeatBuilder: (repeatContext: ActionContext) => any);
|
|
17
19
|
update(elapsed: number): void;
|
|
18
20
|
isComplete(): boolean;
|
|
19
21
|
stop(): void;
|
|
22
|
+
/**
|
|
23
|
+
* Restarts the repeat by stopping the current action and rebuilding the sequence.
|
|
24
|
+
* The builder is called again, including when runAction resets this action.
|
|
25
|
+
* Actions start from the entity's current state; its position is not restored.
|
|
26
|
+
* During a child action's update, rebuilding is deferred until that update completes.
|
|
27
|
+
*/
|
|
20
28
|
reset(): void;
|
|
21
29
|
}
|
|
@@ -11,7 +11,12 @@ export interface RotateByOptions {
|
|
|
11
11
|
*/
|
|
12
12
|
duration: number;
|
|
13
13
|
/**
|
|
14
|
-
* Optionally provide type of rotation
|
|
14
|
+
* Optionally provide type of rotation. When omitted the entity rotates by exactly the
|
|
15
|
+
* signed offset provided, preserving full turns (an offset of 2 PI performs a full revolution).
|
|
16
|
+
* When provided, the offset determines the target orientation and the rotation type picks
|
|
17
|
+
* the travel path to it. Non-zero full-turn multiples of 2 PI travel one full revolution in
|
|
18
|
+
* the requested direction for Clockwise, CounterClockwise, and LongestPath, while
|
|
19
|
+
* ShortestPath will not move.
|
|
15
20
|
*/
|
|
16
21
|
rotationType?: RotationType;
|
|
17
22
|
}
|
|
@@ -30,8 +35,9 @@ export declare class RotateByWithOptions implements Action {
|
|
|
30
35
|
private _motion;
|
|
31
36
|
private _offset;
|
|
32
37
|
private _startAngle;
|
|
33
|
-
private _rotationType
|
|
34
|
-
private
|
|
38
|
+
private _rotationType?;
|
|
39
|
+
private _travel;
|
|
40
|
+
private _currentAngle;
|
|
35
41
|
constructor(entity: Entity, options: RotateByOptions);
|
|
36
42
|
update(elapsed: number): void;
|
|
37
43
|
isComplete(): boolean;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { EasingFunction } from '../util/easing-functions';
|
|
2
1
|
import { ActionQueue } from './action-queue';
|
|
3
2
|
import type { MoveByOptions } from './action/move-by';
|
|
4
3
|
import type { MoveToOptions } from './action/move-to';
|
|
@@ -42,48 +41,9 @@ export declare class ActionContext {
|
|
|
42
41
|
* @param options
|
|
43
42
|
*/
|
|
44
43
|
curveTo(options: CurveToOptions): ActionContext;
|
|
45
|
-
/**
|
|
46
|
-
* This method will move an actor to the specified `x` and `y` position over the
|
|
47
|
-
* specified duration using a given {@apilink EasingFunctions} and return back the actor. This
|
|
48
|
-
* method is part of the actor 'Action' fluent API allowing action chaining.
|
|
49
|
-
* @param pos The x,y vector location to move the actor to
|
|
50
|
-
* @param duration The time it should take the actor to move to the new location in milliseconds
|
|
51
|
-
* @param easingFcn Use {@apilink EasingFunction} or a custom function to use to calculate position, Default is {@apilink EasingFunctions.Linear}
|
|
52
|
-
* @deprecated use new moveTo({pos: Vector, duration: number, easing: EasingFunction})
|
|
53
|
-
*/
|
|
54
|
-
easeTo(pos: Vector, duration: number, easingFcn?: EasingFunction): ActionContext;
|
|
55
|
-
/**
|
|
56
|
-
* This method will move an actor to the specified `x` and `y` position over the
|
|
57
|
-
* specified duration using a given {@apilink EasingFunctions} and return back the actor. This
|
|
58
|
-
* method is part of the actor 'Action' fluent API allowing action chaining.
|
|
59
|
-
* @param x The x location to move the actor to
|
|
60
|
-
* @param y The y location to move the actor to
|
|
61
|
-
* @param duration The time it should take the actor to move to the new location in milliseconds
|
|
62
|
-
* @param easingFcn Use {@apilink EasingFunction} or a custom function to use to calculate position, Default is {@apilink EasingFunctions.Linear}
|
|
63
|
-
* @deprecated use new moveTo({pos: Vector, duration: number, easing: EasingFunction})
|
|
64
|
-
*/
|
|
65
|
-
easeTo(x: number, y: number, duration: number, easingFcn?: EasingFunction): ActionContext;
|
|
66
|
-
/**
|
|
67
|
-
* This method will move an actor by a specified vector offset relative to the current position given
|
|
68
|
-
* a duration and a {@apilink EasingFunction}. This method is part of the actor 'Action' fluent API allowing action chaining.
|
|
69
|
-
* @param offset Vector offset relative to the current position
|
|
70
|
-
* @param duration The duration in milliseconds
|
|
71
|
-
* @param easingFcn Use {@apilink EasingFunction} or a custom function to use to calculate position, Default is {@apilink EasingFunctions.Linear}
|
|
72
|
-
* @deprecated use new moveBy({offset: Vector, duration: number, easing: EasingFunction})
|
|
73
|
-
*/
|
|
74
|
-
easeBy(offset: Vector, duration: number, easingFcn?: EasingFunction): ActionContext;
|
|
75
|
-
/**
|
|
76
|
-
* This method will move an actor by a specified x and y offset relative to the current position given
|
|
77
|
-
* a duration and a {@apilink EasingFunction}. This method is part of the actor 'Action' fluent API allowing action chaining.
|
|
78
|
-
* @param offset Vector offset relative to the current position
|
|
79
|
-
* @param duration The duration in milliseconds
|
|
80
|
-
* @param easingFcn Use {@apilink EasingFunction} or a custom function to use to calculate position, Default is {@apilink EasingFunctions.Linear}
|
|
81
|
-
* @deprecated use new moveBy({offset: Vector, duration: number, easing: EasingFunction})
|
|
82
|
-
*/
|
|
83
|
-
easeBy(offsetX: number, offsetY: number, duration: number, easingFcn?: EasingFunction): ActionContext;
|
|
84
44
|
/**
|
|
85
45
|
* Moves an actor to a specified {@link Vector} in a given duration in milliseconds.
|
|
86
|
-
* You may optionally specify an {@link
|
|
46
|
+
* You may optionally specify an {@link Easing}
|
|
87
47
|
* @param options
|
|
88
48
|
*/
|
|
89
49
|
moveTo(options: MoveToOptions): ActionContext;
|
|
@@ -106,10 +66,17 @@ export declare class ActionContext {
|
|
|
106
66
|
moveTo(x: number, y: number, speed: number): ActionContext;
|
|
107
67
|
/**
|
|
108
68
|
* Moves an actor by a specified offset {@link Vector} in a given duration in milliseconds.
|
|
109
|
-
* You may optionally specify an {@link
|
|
69
|
+
* You may optionally specify an {@link Easing}
|
|
110
70
|
* @param options
|
|
111
71
|
*/
|
|
112
72
|
moveBy(options: MoveByOptions): ActionContext;
|
|
73
|
+
/**
|
|
74
|
+
* This method will move an actor by the specified x offset and y offset from its current position, at a certain speed.
|
|
75
|
+
* This method is part of the actor 'Action' fluent API allowing action chaining.
|
|
76
|
+
* @param offset The Vector offset to apply to this actor
|
|
77
|
+
* @param speed The speed in pixels per second the actor should move
|
|
78
|
+
*/
|
|
79
|
+
moveBy(offset: Vector, speed: number): ActionContext;
|
|
113
80
|
/**
|
|
114
81
|
* This method will move an actor by the specified x offset and y offset from its current position, at a certain speed.
|
|
115
82
|
* This method is part of the actor 'Action' fluent API allowing action chaining.
|
|
@@ -117,7 +84,6 @@ export declare class ActionContext {
|
|
|
117
84
|
* @param yOffset The y location to move the actor to
|
|
118
85
|
* @param speed The speed in pixels per second the actor should move
|
|
119
86
|
*/
|
|
120
|
-
moveBy(offset: Vector, speed: number): ActionContext;
|
|
121
87
|
moveBy(xOffset: number, yOffset: number, speed: number): ActionContext;
|
|
122
88
|
/**
|
|
123
89
|
* Rotates an actor to a specified angle over a duration in milliseconds,
|
|
@@ -5,7 +5,6 @@ import type { Actor } from '../actor';
|
|
|
5
5
|
import { MotionComponent } from '../entity-component-system/components/motion-component';
|
|
6
6
|
import { TransformComponent } from '../entity-component-system/components/transform-component';
|
|
7
7
|
import type { Vector, RotationType } from '../math';
|
|
8
|
-
import type { EasingFunction } from '../util/easing-functions';
|
|
9
8
|
import type { ActionQueue } from './action-queue';
|
|
10
9
|
import type { Action } from './action';
|
|
11
10
|
import type { Color } from '../color';
|
|
@@ -16,6 +15,7 @@ import type { MoveByOptions, RotateByOptions, RotateToOptions, ScaleByOptions, S
|
|
|
16
15
|
export interface ActionContextMethods extends Pick<ActionContext, keyof ActionContext> {
|
|
17
16
|
}
|
|
18
17
|
export declare class ActionsComponent extends Component implements ActionContextMethods {
|
|
18
|
+
private static _NAME;
|
|
19
19
|
dependencies: (typeof TransformComponent | typeof MotionComponent)[];
|
|
20
20
|
private _ctx;
|
|
21
21
|
onAdd(entity: Entity): void;
|
|
@@ -52,47 +52,9 @@ export declare class ActionsComponent extends Component implements ActionContext
|
|
|
52
52
|
* @param options
|
|
53
53
|
*/
|
|
54
54
|
curveTo(options: CurveToOptions): ActionContext;
|
|
55
|
-
/**
|
|
56
|
-
* This method will move an actor to the specified `x` and `y` position over the
|
|
57
|
-
* specified duration using a given {@apilink EasingFunctions} and return back the actor. This
|
|
58
|
-
* method is part of the actor 'Action' fluent API allowing action chaining.
|
|
59
|
-
* @param pos The x,y vector location to move the actor to
|
|
60
|
-
* @param duration The time it should take the actor to move to the new location in milliseconds
|
|
61
|
-
* @param easingFcn Use {@apilink EasingFunctions} or a custom function to use to calculate position, Default is {@apilink EasingFunctions.Linear}
|
|
62
|
-
* @deprecated use new moveTo({pos: Vector, duration: number, easing: EasingFunction})
|
|
63
|
-
*/
|
|
64
|
-
easeTo(pos: Vector, duration: number, easingFcn?: EasingFunction): ActionContext;
|
|
65
|
-
/**
|
|
66
|
-
* This method will move an actor to the specified `x` and `y` position over the
|
|
67
|
-
* specified duration using a given {@apilink EasingFunctions} and return back the actor. This
|
|
68
|
-
* method is part of the actor 'Action' fluent API allowing action chaining.
|
|
69
|
-
* @param x The x location to move the actor to
|
|
70
|
-
* @param y The y location to move the actor to
|
|
71
|
-
* @param duration The time it should take the actor to move to the new location in milliseconds
|
|
72
|
-
* @param easingFcn Use {@apilink EasingFunctions} or a custom function to use to calculate position, Default is {@apilink EasingFunctions.Linear}
|
|
73
|
-
* @deprecated use new moveTo({pos: Vector, duration: number, easing: EasingFunction})
|
|
74
|
-
*/
|
|
75
|
-
easeTo(x: number, y: number, duration: number, easingFcn?: EasingFunction): ActionContext;
|
|
76
|
-
/**
|
|
77
|
-
*
|
|
78
|
-
* @param offset
|
|
79
|
-
* @param duration
|
|
80
|
-
* @param easingFcn
|
|
81
|
-
* @deprecated use new moveBy({pos: Vector, duration: number, easing: EasingFunction})
|
|
82
|
-
*/
|
|
83
|
-
easeBy(offset: Vector, duration: number, easingFcn?: EasingFunction): ActionContext;
|
|
84
|
-
/**
|
|
85
|
-
*
|
|
86
|
-
* @param offsetX
|
|
87
|
-
* @param offsetY
|
|
88
|
-
* @param duration
|
|
89
|
-
* @param easingFcn
|
|
90
|
-
* @deprecated use new moveBy({pos: Vector, duration: number, easing: EasingFunction})
|
|
91
|
-
*/
|
|
92
|
-
easeBy(offsetX: number, offsetY: number, duration: number, easingFcn?: EasingFunction): ActionContext;
|
|
93
55
|
/**
|
|
94
56
|
* Moves an actor to a specified {@link Vector} in a given duration in milliseconds.
|
|
95
|
-
* You may optionally specify an {@link
|
|
57
|
+
* You may optionally specify an {@link Easing}
|
|
96
58
|
* @param options
|
|
97
59
|
*/
|
|
98
60
|
moveTo(options: MoveToOptions): ActionContext;
|
|
@@ -115,7 +77,7 @@ export declare class ActionsComponent extends Component implements ActionContext
|
|
|
115
77
|
moveTo(x: number, y: number, speed: number): ActionContext;
|
|
116
78
|
/**
|
|
117
79
|
* Moves an actor by a specified offset {@link Vector} in a given duration in milliseconds.
|
|
118
|
-
* You may optionally specify an {@link
|
|
80
|
+
* You may optionally specify an {@link Easing}
|
|
119
81
|
* @param options
|
|
120
82
|
*/
|
|
121
83
|
moveBy(options: MoveByOptions): ActionContext;
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import type { Query, World } from '../entity-component-system';
|
|
2
2
|
import { System, SystemType } from '../entity-component-system//system';
|
|
3
|
-
import { PauseComponent } from '../entity-component-system/components/pause-component';
|
|
4
3
|
import { ActionsComponent } from './actions-component';
|
|
5
4
|
export declare class ActionsSystem extends System {
|
|
6
5
|
world: World;
|
|
7
6
|
static priority: -5;
|
|
8
7
|
systemType: SystemType;
|
|
9
8
|
private _actions;
|
|
10
|
-
query: Query<typeof ActionsComponent
|
|
9
|
+
query: Query<typeof ActionsComponent>;
|
|
11
10
|
constructor(world: World);
|
|
12
|
-
|
|
11
|
+
onUpdate(elapsed: number): void;
|
|
13
12
|
}
|
|
@@ -8,8 +8,6 @@ export * from './action/repeat';
|
|
|
8
8
|
export * from './action/repeat-forever';
|
|
9
9
|
export * from './action/blink';
|
|
10
10
|
export * from './action/die';
|
|
11
|
-
export * from './action/ease-to';
|
|
12
|
-
export * from './action/ease-by';
|
|
13
11
|
export * from './action/fade';
|
|
14
12
|
export * from './action/follow';
|
|
15
13
|
export * from './action/meet';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { PostCollisionEvent, PreCollisionEvent, CollisionStartEvent, CollisionEndEvent,
|
|
1
|
+
import type { PostCollisionEvent, PreCollisionEvent, CollisionStartEvent, CollisionEndEvent, EnterViewportEvent, ExitViewportEvent, PreDrawEvent, PostDrawEvent, PreDebugDrawEvent, PostDebugDrawEvent, ActionStartEvent, ActionCompleteEvent, PostTransformDrawEvent, PreTransformDrawEvent } from './events';
|
|
2
2
|
import { type KillEvent, PostKillEvent, PreKillEvent } from './events';
|
|
3
3
|
import type { Engine } from './engine';
|
|
4
4
|
import type { Color } from './color';
|
|
@@ -34,7 +34,7 @@ export declare function isActor(x: any): x is Actor;
|
|
|
34
34
|
/**
|
|
35
35
|
* Actor constructor options
|
|
36
36
|
*/
|
|
37
|
-
export type
|
|
37
|
+
export type ActorOptions = ColliderArgs & {
|
|
38
38
|
/**
|
|
39
39
|
* Optionally set the name of the actor, default is 'anonymous'
|
|
40
40
|
*/
|
|
@@ -93,8 +93,7 @@ export type ActorArgs = ColliderArgs & {
|
|
|
93
93
|
*/
|
|
94
94
|
material?: Material;
|
|
95
95
|
/**
|
|
96
|
-
* Optionally set the
|
|
97
|
-
* If a width/height or a radius was set a default graphic will be added
|
|
96
|
+
* Optionally set the opacity of an actor, only used if no graphics are present
|
|
98
97
|
*/
|
|
99
98
|
opacity?: number;
|
|
100
99
|
/**
|
|
@@ -106,7 +105,7 @@ export type ActorArgs = ColliderArgs & {
|
|
|
106
105
|
*/
|
|
107
106
|
anchor?: Vector;
|
|
108
107
|
/**
|
|
109
|
-
* Optionally set the
|
|
108
|
+
* Optionally set the pixel offset for graphics in the actor
|
|
110
109
|
*/
|
|
111
110
|
offset?: Vector;
|
|
112
111
|
/**
|
|
@@ -119,6 +118,8 @@ export type ActorArgs = ColliderArgs & {
|
|
|
119
118
|
collisionGroup?: CollisionGroup;
|
|
120
119
|
/**
|
|
121
120
|
* Optionally set if the actor can be paused
|
|
121
|
+
*
|
|
122
|
+
* (default is true)
|
|
122
123
|
*/
|
|
123
124
|
canPause?: boolean;
|
|
124
125
|
};
|
|
@@ -162,6 +163,11 @@ type ColliderArgs = // custom collider
|
|
|
162
163
|
width?: undefined;
|
|
163
164
|
height?: undefined;
|
|
164
165
|
};
|
|
166
|
+
/**
|
|
167
|
+
* Actor constructor options
|
|
168
|
+
* @deprecated use ActorOptions
|
|
169
|
+
*/
|
|
170
|
+
export type ActorArgs = ActorOptions;
|
|
165
171
|
export interface ActorEvents extends EntityEvents {
|
|
166
172
|
collisionstart: CollisionStartEvent;
|
|
167
173
|
collisionend: CollisionEndEvent;
|
|
@@ -172,8 +178,8 @@ export interface ActorEvents extends EntityEvents {
|
|
|
172
178
|
postkill: PostKillEvent;
|
|
173
179
|
predraw: PreDrawEvent;
|
|
174
180
|
postdraw: PostDrawEvent;
|
|
175
|
-
pretransformdraw:
|
|
176
|
-
posttransformdraw:
|
|
181
|
+
pretransformdraw: PreTransformDrawEvent;
|
|
182
|
+
posttransformdraw: PostTransformDrawEvent;
|
|
177
183
|
predebugdraw: PreDebugDrawEvent;
|
|
178
184
|
postdebugdraw: PostDebugDrawEvent;
|
|
179
185
|
pointerup: PointerEvent;
|
|
@@ -188,8 +194,8 @@ export interface ActorEvents extends EntityEvents {
|
|
|
188
194
|
pointerdragenter: PointerEvent;
|
|
189
195
|
pointerdragleave: PointerEvent;
|
|
190
196
|
pointerdragmove: PointerEvent;
|
|
191
|
-
enterviewport:
|
|
192
|
-
exitviewport:
|
|
197
|
+
enterviewport: EnterViewportEvent;
|
|
198
|
+
exitviewport: ExitViewportEvent;
|
|
193
199
|
actionstart: ActionStartEvent;
|
|
194
200
|
actioncomplete: ActionCompleteEvent;
|
|
195
201
|
}
|
|
@@ -219,8 +225,8 @@ export declare const ActorEvents: {
|
|
|
219
225
|
readonly PointerDragEnter: "pointerdragenter";
|
|
220
226
|
readonly PointerDragLeave: "pointerdragleave";
|
|
221
227
|
readonly PointerDragMove: "pointerdragmove";
|
|
222
|
-
readonly
|
|
223
|
-
readonly
|
|
228
|
+
readonly EnterViewport: "enterviewport";
|
|
229
|
+
readonly ExitViewport: "exitviewport";
|
|
224
230
|
readonly ActionStart: "actionstart";
|
|
225
231
|
readonly ActionComplete: "actioncomplete";
|
|
226
232
|
};
|
|
@@ -401,7 +407,7 @@ export declare class Actor extends Entity implements Eventable, PointerEvents, C
|
|
|
401
407
|
*
|
|
402
408
|
* @param config
|
|
403
409
|
*/
|
|
404
|
-
constructor(config?:
|
|
410
|
+
constructor(config?: ActorOptions);
|
|
405
411
|
clone(): Actor;
|
|
406
412
|
/**
|
|
407
413
|
* `onInitialize` is called before the first update of the actor. This method is meant to be
|
|
@@ -462,7 +468,7 @@ export declare class Actor extends Entity implements Eventable, PointerEvents, C
|
|
|
462
468
|
*/
|
|
463
469
|
unkill(): void;
|
|
464
470
|
/**
|
|
465
|
-
* Indicates
|
|
471
|
+
* Indicates whether the actor has been killed.
|
|
466
472
|
*/
|
|
467
473
|
isKilled(): boolean;
|
|
468
474
|
/**
|
|
@@ -487,31 +493,14 @@ export declare class Actor extends Entity implements Eventable, PointerEvents, C
|
|
|
487
493
|
get localCenter(): Vector;
|
|
488
494
|
get width(): number;
|
|
489
495
|
get height(): number;
|
|
490
|
-
/**
|
|
491
|
-
* Gets this actor's rotation taking into account any parent relationships
|
|
492
|
-
* @returns Rotation angle in radians
|
|
493
|
-
* @deprecated Use {@apilink globalRotation} instead
|
|
494
|
-
*/
|
|
495
|
-
getGlobalRotation(): number;
|
|
496
496
|
/**
|
|
497
497
|
* The actor's rotation (in radians) taking into account any parent relationships
|
|
498
498
|
*/
|
|
499
499
|
get globalRotation(): number;
|
|
500
|
-
/**
|
|
501
|
-
* Gets an actor's world position taking into account parent relationships, scaling, rotation, and translation
|
|
502
|
-
* @returns Position in world coordinates
|
|
503
|
-
* @deprecated Use {@apilink globalPos} instead
|
|
504
|
-
*/
|
|
505
|
-
getGlobalPos(): Vector;
|
|
506
500
|
/**
|
|
507
501
|
* The actor's world position taking into account parent relationships, scaling, rotation, and translation
|
|
508
502
|
*/
|
|
509
503
|
get globalPos(): Vector;
|
|
510
|
-
/**
|
|
511
|
-
* Gets the global scale of the Actor
|
|
512
|
-
* @deprecated Use {@apilink globalScale} instead
|
|
513
|
-
*/
|
|
514
|
-
getGlobalScale(): Vector;
|
|
515
504
|
/**
|
|
516
505
|
* The global scale of the Actor
|
|
517
506
|
*/
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { Engine } from './engine';
|
|
2
|
-
import type { EasingFunction } from './util/easing-functions';
|
|
3
2
|
import { Vector } from './math/vector';
|
|
4
3
|
import type { Actor } from './actor';
|
|
5
4
|
import type { CanUpdate, CanInitialize } from './interfaces/lifecycle-events';
|
|
@@ -221,7 +220,7 @@ export declare class Camera implements CanUpdate, CanInitialize {
|
|
|
221
220
|
private _lerpStart;
|
|
222
221
|
private _lerpEnd;
|
|
223
222
|
private _lerpResolve;
|
|
224
|
-
private _lerpPromise
|
|
223
|
+
private _lerpPromise?;
|
|
225
224
|
protected _isShaking: boolean;
|
|
226
225
|
private _shakeMagnitudeX;
|
|
227
226
|
private _shakeMagnitudeY;
|
|
@@ -236,11 +235,7 @@ export declare class Camera implements CanUpdate, CanInitialize {
|
|
|
236
235
|
private _zoomDuration;
|
|
237
236
|
private _zoomResolve;
|
|
238
237
|
private _zoomPromise;
|
|
239
|
-
private _legacyZoomEasing;
|
|
240
|
-
private _useLegacyZoom;
|
|
241
238
|
private _zoomEasing;
|
|
242
|
-
private _legacyEasing;
|
|
243
|
-
private _useLegacyEasing;
|
|
244
239
|
private _easing;
|
|
245
240
|
private _halfWidth;
|
|
246
241
|
private _halfHeight;
|
|
@@ -292,7 +287,7 @@ export declare class Camera implements CanUpdate, CanInitialize {
|
|
|
292
287
|
* @returns A {@apilink Promise} that resolves when movement is finished, including if it's interrupted.
|
|
293
288
|
* The {@apilink Promise} value is the {@apilink Vector} of the target position. It will be rejected if a move cannot be made.
|
|
294
289
|
*/
|
|
295
|
-
move(pos: Vector, duration: number, easingFn?: Easing
|
|
290
|
+
move(pos: Vector, duration: number, easingFn?: Easing): Promise<Vector>;
|
|
296
291
|
/**
|
|
297
292
|
* Sets the camera to shake at the specified magnitudes for the specified duration
|
|
298
293
|
* @param magnitudeX The x magnitude of the shake
|
|
@@ -306,15 +301,15 @@ export declare class Camera implements CanUpdate, CanInitialize {
|
|
|
306
301
|
* @param scale The scale of the zoom
|
|
307
302
|
* @param duration The duration of the zoom in milliseconds
|
|
308
303
|
*/
|
|
309
|
-
zoomOverTime(scale: number, duration?: number, easingFn?: Easing
|
|
310
|
-
private _viewport
|
|
304
|
+
zoomOverTime(scale: number, duration?: number, easingFn?: Easing): Promise<boolean>;
|
|
305
|
+
private _viewport?;
|
|
311
306
|
/**
|
|
312
307
|
* Gets the bounding box of the viewport of this camera in world coordinates
|
|
313
308
|
*/
|
|
314
309
|
get viewport(): BoundingBox;
|
|
315
310
|
/**
|
|
316
311
|
* Adds one or more new camera strategies to this camera
|
|
317
|
-
* @param
|
|
312
|
+
* @param cameraStrategies Instance of an {@apilink CameraStrategy}
|
|
318
313
|
*/
|
|
319
314
|
addStrategy<T extends CameraStrategy<any>[]>(...cameraStrategies: T): void;
|
|
320
315
|
/**
|
|
@@ -393,6 +388,14 @@ export declare class Camera implements CanUpdate, CanInitialize {
|
|
|
393
388
|
* Applies the relevant transformations to the game canvas to "move" or apply effects to the Camera
|
|
394
389
|
* @param ctx Canvas context to apply transformations
|
|
395
390
|
*/
|
|
391
|
+
/**
|
|
392
|
+
* Finalizes this frame's draw transform (fixed-update interpolation and pixel-snap), without
|
|
393
|
+
* mutating `ctx`. Split out from {@apilink draw} so systems that need the finalized transform
|
|
394
|
+
* before their own draw pass (e.g. LightingSystem, which runs before GraphicsSystem) can call
|
|
395
|
+
* this directly instead of the full `draw()`, which also applies the transform to the context.
|
|
396
|
+
* @internal
|
|
397
|
+
*/
|
|
398
|
+
_finalizeDrawTransform(ctx: ExcaliburGraphicsContext): void;
|
|
396
399
|
draw(ctx: ExcaliburGraphicsContext): void;
|
|
397
400
|
updateTransform(pos: Vector): void;
|
|
398
401
|
private _isDoneShaking;
|
|
@@ -40,6 +40,7 @@ export declare enum DegreeOfFreedom {
|
|
|
40
40
|
* of physics simulation.
|
|
41
41
|
*/
|
|
42
42
|
export declare class BodyComponent extends Component implements Clonable<BodyComponent> {
|
|
43
|
+
private static _NAME;
|
|
43
44
|
dependencies: (typeof TransformComponent | typeof MotionComponent)[];
|
|
44
45
|
static _ID: number;
|
|
45
46
|
readonly id: Id<'body'>;
|
|
@@ -100,21 +101,10 @@ export declare class BodyComponent extends Component implements Clonable<BodyCom
|
|
|
100
101
|
*/
|
|
101
102
|
canSleep: boolean;
|
|
102
103
|
private _sleeping;
|
|
103
|
-
/**
|
|
104
|
-
* Whether this body is sleeping or not
|
|
105
|
-
* @deprecated use isSleeping
|
|
106
|
-
*/
|
|
107
|
-
get sleeping(): boolean;
|
|
108
104
|
/**
|
|
109
105
|
* Whether this body is sleeping or not
|
|
110
106
|
*/
|
|
111
107
|
get isSleeping(): boolean;
|
|
112
|
-
/**
|
|
113
|
-
* Set the sleep state of the body
|
|
114
|
-
* @param sleeping
|
|
115
|
-
* @deprecated use isSleeping
|
|
116
|
-
*/
|
|
117
|
-
setSleeping(sleeping: boolean): void;
|
|
118
108
|
wake(): void;
|
|
119
109
|
sleep(): void;
|
|
120
110
|
set isSleeping(sleeping: boolean);
|
|
@@ -154,19 +144,10 @@ export declare class BodyComponent extends Component implements Clonable<BodyCom
|
|
|
154
144
|
* Note: this only limits responses in the realistic solver, if velocity/angularVelocity is set the actor will still respond
|
|
155
145
|
*/
|
|
156
146
|
limitDegreeOfFreedom: DegreeOfFreedom[];
|
|
157
|
-
/**
|
|
158
|
-
* Returns if the owner is active
|
|
159
|
-
* @deprecated use isActive
|
|
160
|
-
*/
|
|
161
|
-
get active(): boolean;
|
|
162
147
|
/**
|
|
163
148
|
* Returns if the owner is active
|
|
164
149
|
*/
|
|
165
150
|
get isActive(): boolean;
|
|
166
|
-
/**
|
|
167
|
-
* @deprecated Use globalPos
|
|
168
|
-
*/
|
|
169
|
-
get center(): Vector;
|
|
170
151
|
transform: TransformComponent;
|
|
171
152
|
motion: MotionComponent;
|
|
172
153
|
onAdd(owner: Entity<any>): void;
|
|
@@ -251,6 +232,16 @@ export declare class BodyComponent extends Component implements Clonable<BodyCom
|
|
|
251
232
|
* @param impulse
|
|
252
233
|
*/
|
|
253
234
|
applyImpulse(point: Vector, impulse: Vector): void;
|
|
235
|
+
/**
|
|
236
|
+
* Apply an impulse (impulseX, impulseY) at a lever arm (offsetX, offsetY) from the body's center.
|
|
237
|
+
*
|
|
238
|
+
* Scalar variant of {@apilink BodyComponent.applyImpulse} used by the collision solver hot loops, it allocates nothing
|
|
239
|
+
* @param offsetX
|
|
240
|
+
* @param offsetY
|
|
241
|
+
* @param impulseX
|
|
242
|
+
* @param impulseY
|
|
243
|
+
*/
|
|
244
|
+
applyImpulseAtOffset(offsetX: number, offsetY: number, impulseX: number, impulseY: number): void;
|
|
254
245
|
/**
|
|
255
246
|
* Apply only linear impulse to the body
|
|
256
247
|
* @param impulse
|
|
@@ -85,7 +85,7 @@ export declare class BoundingBox {
|
|
|
85
85
|
* Transform the axis aligned bounding box by a {@apilink Matrix}, producing a new axis aligned bounding box
|
|
86
86
|
* @param matrix
|
|
87
87
|
*/
|
|
88
|
-
transform(matrix: AffineMatrix): BoundingBox;
|
|
88
|
+
transform(matrix: AffineMatrix, dest?: BoundingBox): BoundingBox;
|
|
89
89
|
/**
|
|
90
90
|
* Returns the perimeter of the bounding box
|
|
91
91
|
*/
|
|
@@ -138,7 +138,7 @@ export declare class BoundingBox {
|
|
|
138
138
|
* @param other Other {@apilink BoundingBox} to test intersection with
|
|
139
139
|
* @returns A Vector in the direction of the current BoundingBox, this <- other
|
|
140
140
|
*/
|
|
141
|
-
intersect(other: BoundingBox): Vector;
|
|
141
|
+
intersect(other: BoundingBox): Vector | null;
|
|
142
142
|
/**
|
|
143
143
|
* Test whether the bounding box has intersected with another bounding box, returns the side of the current bb that intersected.
|
|
144
144
|
* @param bb The other actor to test
|
|
@@ -147,14 +147,7 @@ export declare class BoundingBox {
|
|
|
147
147
|
/**
|
|
148
148
|
* Draw a debug bounding box
|
|
149
149
|
* @param ex
|
|
150
|
-
* @param color
|
|
151
|
-
* @deprecated
|
|
152
|
-
*/
|
|
153
|
-
draw(ex: ExcaliburGraphicsContext, options?: RectGraphicsOptions): void;
|
|
154
|
-
/**
|
|
155
|
-
* Draw a debug bounding box
|
|
156
|
-
* @param ex
|
|
157
|
-
* @param color
|
|
150
|
+
* @param [options={ color: Color.Yellow }]
|
|
158
151
|
*/
|
|
159
152
|
debug(ex: ExcaliburGraphicsContext, options?: RectGraphicsOptions): void;
|
|
160
153
|
}
|
|
@@ -8,7 +8,7 @@ import { CircleCollider } from './colliders/circle-collider';
|
|
|
8
8
|
import type { Collider } from './colliders/collider';
|
|
9
9
|
import { CompositeCollider } from './colliders/composite-collider';
|
|
10
10
|
import { PolygonCollider } from './colliders/polygon-collider';
|
|
11
|
-
import
|
|
11
|
+
import { EdgeCollider } from './colliders/edge-collider';
|
|
12
12
|
import { EventEmitter } from '../event-emitter';
|
|
13
13
|
export interface ColliderComponentData {
|
|
14
14
|
type: string;
|
|
@@ -69,6 +69,8 @@ export interface CompositeColliderData {
|
|
|
69
69
|
}
|
|
70
70
|
export type ColliderCreationData = BoxColliderData | CircleColliderData | PolygonColliderData | EdgeColliderData | CompositeColliderData | CapsuleColliderData;
|
|
71
71
|
export declare class ColliderComponent extends Component {
|
|
72
|
+
private _logger;
|
|
73
|
+
private static _NAME;
|
|
72
74
|
events: EventEmitter<any>;
|
|
73
75
|
/**
|
|
74
76
|
* Observable that notifies when a collider is added to the body
|
|
@@ -83,11 +85,18 @@ export declare class ColliderComponent extends Component {
|
|
|
83
85
|
/**
|
|
84
86
|
* Get the current collider geometry
|
|
85
87
|
*/
|
|
86
|
-
get(): Collider |
|
|
88
|
+
get(): Collider | null;
|
|
89
|
+
/**
|
|
90
|
+
* Use specific collider geometry
|
|
91
|
+
* @param collider
|
|
92
|
+
* @returns the collider you set
|
|
93
|
+
*/
|
|
94
|
+
use<T extends Collider>(collider?: T): T;
|
|
87
95
|
/**
|
|
88
96
|
* Set the collider geometry
|
|
89
97
|
* @param collider
|
|
90
98
|
* @returns the collider you set
|
|
99
|
+
* @deprecated Use .use(collider) instead
|
|
91
100
|
*/
|
|
92
101
|
set<T extends Collider>(collider: T): T;
|
|
93
102
|
private _collidersToRemove;
|
|
@@ -95,6 +104,12 @@ export declare class ColliderComponent extends Component {
|
|
|
95
104
|
* Remove collider geometry from collider component
|
|
96
105
|
*/
|
|
97
106
|
clear(): void;
|
|
107
|
+
private _collidersToFinalize;
|
|
108
|
+
/**
|
|
109
|
+
* Removal happens in two phases: colliders removed this frame are untracked from collision detection right away, but
|
|
110
|
+
* stay wired to this component for one more frame so the `collisionend` of any contact they were in still reaches the
|
|
111
|
+
* owner. The next call finalizes them.
|
|
112
|
+
*/
|
|
98
113
|
processColliderRemoval(): void;
|
|
99
114
|
clone(): ColliderComponent;
|
|
100
115
|
/**
|
|
@@ -28,6 +28,14 @@ export declare class CircleCollider extends Collider {
|
|
|
28
28
|
*/
|
|
29
29
|
offset: Vector;
|
|
30
30
|
private _globalMatrix;
|
|
31
|
+
private _syncedVersion;
|
|
32
|
+
private _syncedOffsetX;
|
|
33
|
+
private _syncedOffsetY;
|
|
34
|
+
/**
|
|
35
|
+
* Rebuilds the world matrix from the owner transform if it (or the offset) changed since the last sync
|
|
36
|
+
*/
|
|
37
|
+
private _ensureWorld;
|
|
38
|
+
get worldVersion(): number;
|
|
31
39
|
get worldPos(): Vector;
|
|
32
40
|
private _naturalRadius;
|
|
33
41
|
private _radius;
|
|
@@ -3,7 +3,7 @@ import type { PolygonCollider } from './polygon-collider';
|
|
|
3
3
|
import type { EdgeCollider } from './edge-collider';
|
|
4
4
|
import type { CircleCollider } from './circle-collider';
|
|
5
5
|
export declare const ClosestLineJumpTable: {
|
|
6
|
-
PolygonPolygonClosestLine(polygonA: PolygonCollider, polygonB: PolygonCollider): LineSegment;
|
|
6
|
+
PolygonPolygonClosestLine(polygonA: PolygonCollider, polygonB: PolygonCollider): LineSegment | null;
|
|
7
7
|
PolygonEdgeClosestLine(polygon: PolygonCollider, edge: EdgeCollider): LineSegment;
|
|
8
8
|
PolygonCircleClosestLine(polygon: PolygonCollider, circle: CircleCollider): LineSegment;
|
|
9
9
|
CircleCircleClosestLine(circleA: CircleCollider, circleB: CircleCollider): LineSegment;
|