excalibur 0.25.1 → 0.25.2
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 +119 -27
- package/README.md +0 -1
- package/build/dist/Actions/ActionsComponent.d.ts +1 -1
- package/build/dist/Actor.d.ts +46 -45
- package/build/dist/Camera.d.ts +10 -2
- package/build/dist/Class.d.ts +4 -5
- package/build/dist/Collision/BodyComponent.d.ts +6 -2
- package/build/dist/Collision/BoundingBox.d.ts +6 -0
- package/build/dist/Collision/ColliderComponent.d.ts +1 -4
- package/build/dist/Collision/Colliders/CircleCollider.d.ts +18 -2
- package/build/dist/Collision/Colliders/EdgeCollider.d.ts +1 -1
- package/build/dist/Collision/Colliders/SeparatingAxis.d.ts +2 -2
- package/build/dist/Collision/Detection/DynamicTreeCollisionProcessor.d.ts +4 -4
- package/build/dist/Collision/Detection/Pair.d.ts +5 -1
- package/build/dist/Collision/Group/CollisionGroup.d.ts +0 -1
- package/build/dist/Collision/MotionSystem.d.ts +4 -0
- package/build/dist/Collision/Solver/ContactConstraintPoint.d.ts +1 -1
- package/build/dist/Collision/Solver/Solver.d.ts +1 -1
- package/build/dist/Debug/Debug.d.ts +18 -1
- package/build/dist/Debug/DebugFlags.d.ts +16 -3
- package/build/dist/Engine.d.ts +66 -8
- package/build/dist/EntityComponentSystem/Component.d.ts +3 -3
- package/build/dist/EntityComponentSystem/Components/MotionComponent.d.ts +2 -2
- package/build/dist/EntityComponentSystem/Entity.d.ts +4 -4
- package/build/dist/EntityComponentSystem/System.d.ts +1 -1
- package/build/dist/EntityComponentSystem/SystemManager.d.ts +6 -1
- package/build/dist/EventDispatcher.d.ts +0 -5
- package/build/dist/Events/ExEvent.d.ts +6 -0
- package/build/dist/Events/PointerEvents.d.ts +37 -0
- package/build/dist/Graphics/Animation.d.ts +3 -2
- package/build/dist/Graphics/Circle.d.ts +2 -0
- package/build/dist/Graphics/Context/ExcaliburGraphicsContext.d.ts +37 -5
- package/build/dist/Graphics/Context/ExcaliburGraphicsContext2DCanvas.d.ts +12 -2
- package/build/dist/Graphics/Context/ExcaliburGraphicsContextWebGL.d.ts +29 -13
- package/build/dist/Graphics/Context/circle-renderer/circle-renderer.d.ts +22 -0
- package/build/dist/Graphics/Context/circle-renderer/circle-renderer.frag.glsl +53 -0
- package/build/dist/Graphics/Context/circle-renderer/circle-renderer.vert.glsl +37 -0
- package/build/dist/Graphics/Context/image-renderer/image-renderer.d.ts +27 -0
- package/build/dist/Graphics/Context/image-renderer/image-renderer.frag.glsl +28 -0
- package/build/dist/Graphics/Context/{shaders/image-vertex.glsl → image-renderer/image-renderer.vert.glsl} +2 -7
- package/build/dist/Graphics/Context/{shaders → line-renderer}/line-fragment.glsl +0 -0
- package/build/dist/Graphics/Context/line-renderer/line-renderer.d.ts +21 -0
- package/build/dist/Graphics/Context/{shaders → line-renderer}/line-vertex.glsl +2 -2
- package/build/dist/Graphics/Context/{shaders → point-renderer}/point-fragment.glsl +6 -2
- package/build/dist/Graphics/Context/point-renderer/point-renderer.d.ts +21 -0
- package/build/dist/Graphics/Context/{shaders → point-renderer}/point-vertex.glsl +2 -2
- package/build/dist/Graphics/Context/quad-index-buffer.d.ts +36 -0
- package/build/dist/Graphics/Context/rectangle-renderer/rectangle-renderer.d.ts +23 -0
- package/build/dist/Graphics/Context/rectangle-renderer/rectangle-renderer.frag.glsl +85 -0
- package/build/dist/Graphics/Context/rectangle-renderer/rectangle-renderer.vert.glsl +42 -0
- package/build/dist/Graphics/Context/render-source.d.ts +7 -0
- package/build/dist/Graphics/Context/render-target.d.ts +26 -0
- package/build/dist/Graphics/Context/renderer.d.ts +20 -51
- package/build/dist/Graphics/Context/screen-pass-painter/screen-fragment.glsl +11 -0
- package/build/dist/Graphics/Context/screen-pass-painter/screen-pass-painter.d.ts +13 -0
- package/build/dist/Graphics/Context/screen-pass-painter/screen-vertex.glsl +11 -0
- package/build/dist/Graphics/Context/shader.d.ts +116 -42
- package/build/dist/Graphics/Context/shaders/crt-effect.glsl +64 -0
- package/build/dist/Graphics/Context/shaders/grayscale-fragment.glsl +13 -0
- package/build/dist/Graphics/Context/shaders/invert-fragment.glsl +12 -0
- package/build/dist/Graphics/Context/texture-loader.d.ts +8 -2
- package/build/dist/Graphics/Context/vertex-buffer.d.ts +49 -0
- package/build/dist/Graphics/Context/vertex-layout.d.ts +52 -0
- package/build/dist/Graphics/Context/webgl-adapter.d.ts +9 -0
- package/build/dist/Graphics/Context/webgl-util.d.ts +22 -0
- package/build/dist/Graphics/DebugGraphicsComponent.d.ts +13 -0
- package/build/dist/Graphics/Filtering.d.ts +15 -0
- package/build/dist/Graphics/Font.d.ts +61 -23
- package/build/dist/Graphics/FontCommon.d.ts +43 -2
- package/build/dist/Graphics/Graphic.d.ts +23 -9
- package/build/dist/Graphics/GraphicsSystem.d.ts +0 -1
- package/build/dist/Graphics/ImageSource.d.ts +8 -3
- package/build/dist/Graphics/Polygon.d.ts +2 -0
- package/build/dist/Graphics/PostProcessor/ColorBlindnessMode.d.ts +5 -0
- package/build/dist/Graphics/PostProcessor/ColorBlindnessPostProcessor.d.ts +17 -0
- package/build/dist/Graphics/PostProcessor/PostProcessor.d.ts +7 -0
- package/build/dist/Graphics/PostProcessor/ScreenShader.d.ts +16 -0
- package/build/dist/Graphics/PostProcessor/color-blind-fragment.glsl +62 -0
- package/build/dist/Graphics/Raster.d.ts +32 -5
- package/build/dist/Graphics/Sprite.d.ts +5 -0
- package/build/dist/Graphics/SpriteFont.d.ts +6 -7
- package/build/dist/Graphics/SpriteSheet.d.ts +1 -2
- package/build/dist/Graphics/Text.d.ts +18 -2
- package/build/dist/Graphics/index.d.ts +14 -0
- package/build/dist/Id.d.ts +1 -1
- package/build/dist/Input/EngineInput.d.ts +2 -2
- package/build/dist/Input/Index.d.ts +10 -3
- package/build/dist/Input/NativePointerButton.d.ts +10 -0
- package/build/dist/Input/PointerAbstraction.d.ts +33 -0
- package/build/dist/Input/PointerButton.d.ts +10 -0
- package/build/dist/Input/PointerComponent.d.ts +24 -0
- package/build/dist/Input/PointerEvent.d.ts +18 -0
- package/build/dist/Input/PointerEventReceiver.d.ts +114 -0
- package/build/dist/Input/PointerScope.d.ts +14 -0
- package/build/dist/Input/PointerSystem.d.ts +43 -0
- package/build/dist/Input/PointerType.d.ts +9 -0
- package/build/dist/Input/WheelDeltaMode.d.ts +5 -0
- package/build/dist/Input/WheelEvent.d.ts +18 -0
- package/build/dist/Interfaces/PointerEventHandlers.d.ts +17 -16
- package/build/dist/Label.d.ts +9 -2
- package/build/dist/Loader.d.ts +5 -2
- package/build/dist/Math/Index.d.ts +1 -0
- package/build/dist/Math/matrix.d.ts +19 -1
- package/build/dist/Math/util.d.ts +45 -0
- package/build/dist/Particles.d.ts +12 -0
- package/build/dist/Resources/Gif.d.ts +1 -1
- package/build/dist/Scene.d.ts +10 -1
- package/build/dist/Screen.d.ts +4 -3
- package/build/dist/TileMap.d.ts +3 -2
- package/build/dist/Traits/Index.d.ts +0 -1
- package/build/dist/Trigger.d.ts +4 -0
- package/build/dist/Util/Clock.d.ts +118 -0
- package/build/dist/Util/Fps.d.ts +40 -0
- package/build/dist/Util/Observable.d.ts +1 -1
- package/build/dist/Util/Pool.d.ts +2 -10
- package/build/dist/Util/Util.d.ts +23 -66
- package/build/dist/excalibur.js +9124 -7580
- package/build/dist/excalibur.js.map +1 -1
- package/build/dist/excalibur.min.js +1 -1
- package/build/dist/excalibur.min.js.LICENSE.txt +2 -2
- package/build/dist/excalibur.min.js.map +1 -1
- package/build/dist/index.d.ts +5 -2
- package/build/esm/Actions/ActionsComponent.d.ts +1 -1
- package/build/esm/Actor.d.ts +46 -45
- package/build/esm/Camera.d.ts +10 -2
- package/build/esm/Class.d.ts +4 -5
- package/build/esm/Collision/BodyComponent.d.ts +6 -2
- package/build/esm/Collision/BoundingBox.d.ts +6 -0
- package/build/esm/Collision/ColliderComponent.d.ts +1 -4
- package/build/esm/Collision/Colliders/CircleCollider.d.ts +18 -2
- package/build/esm/Collision/Colliders/EdgeCollider.d.ts +1 -1
- package/build/esm/Collision/Colliders/SeparatingAxis.d.ts +2 -2
- package/build/esm/Collision/Detection/DynamicTreeCollisionProcessor.d.ts +4 -4
- package/build/esm/Collision/Detection/Pair.d.ts +5 -1
- package/build/esm/Collision/Group/CollisionGroup.d.ts +0 -1
- package/build/esm/Collision/MotionSystem.d.ts +4 -0
- package/build/esm/Collision/Solver/ContactConstraintPoint.d.ts +1 -1
- package/build/esm/Collision/Solver/Solver.d.ts +1 -1
- package/build/esm/Debug/Debug.d.ts +18 -1
- package/build/esm/Debug/DebugFlags.d.ts +16 -3
- package/build/esm/Engine.d.ts +66 -8
- package/build/esm/EntityComponentSystem/Component.d.ts +3 -3
- package/build/esm/EntityComponentSystem/Components/MotionComponent.d.ts +2 -2
- package/build/esm/EntityComponentSystem/Entity.d.ts +4 -4
- package/build/esm/EntityComponentSystem/System.d.ts +1 -1
- package/build/esm/EntityComponentSystem/SystemManager.d.ts +6 -1
- package/build/esm/EventDispatcher.d.ts +0 -5
- package/build/esm/Events/ExEvent.d.ts +6 -0
- package/build/esm/Events/PointerEvents.d.ts +37 -0
- package/build/esm/Graphics/Animation.d.ts +3 -2
- package/build/esm/Graphics/Circle.d.ts +2 -0
- package/build/esm/Graphics/Context/ExcaliburGraphicsContext.d.ts +37 -5
- package/build/esm/Graphics/Context/ExcaliburGraphicsContext2DCanvas.d.ts +12 -2
- package/build/esm/Graphics/Context/ExcaliburGraphicsContextWebGL.d.ts +29 -13
- package/build/esm/Graphics/Context/circle-renderer/circle-renderer.d.ts +22 -0
- package/build/esm/Graphics/Context/image-renderer/image-renderer.d.ts +27 -0
- package/build/esm/Graphics/Context/line-renderer/line-renderer.d.ts +21 -0
- package/build/esm/Graphics/Context/point-renderer/point-renderer.d.ts +21 -0
- package/build/esm/Graphics/Context/quad-index-buffer.d.ts +36 -0
- package/build/esm/Graphics/Context/rectangle-renderer/rectangle-renderer.d.ts +23 -0
- package/build/esm/Graphics/Context/render-source.d.ts +7 -0
- package/build/esm/Graphics/Context/render-target.d.ts +26 -0
- package/build/esm/Graphics/Context/renderer.d.ts +20 -51
- package/build/esm/Graphics/Context/screen-pass-painter/screen-pass-painter.d.ts +13 -0
- package/build/esm/Graphics/Context/shader.d.ts +116 -42
- package/build/esm/Graphics/Context/texture-loader.d.ts +8 -2
- package/build/esm/Graphics/Context/vertex-buffer.d.ts +49 -0
- package/build/esm/Graphics/Context/vertex-layout.d.ts +52 -0
- package/build/esm/Graphics/Context/webgl-adapter.d.ts +9 -0
- package/build/esm/Graphics/Context/webgl-util.d.ts +22 -0
- package/build/esm/Graphics/DebugGraphicsComponent.d.ts +13 -0
- package/build/esm/Graphics/Filtering.d.ts +15 -0
- package/build/esm/Graphics/Font.d.ts +61 -23
- package/build/esm/Graphics/FontCommon.d.ts +43 -2
- package/build/esm/Graphics/Graphic.d.ts +23 -9
- package/build/esm/Graphics/GraphicsSystem.d.ts +0 -1
- package/build/esm/Graphics/ImageSource.d.ts +8 -3
- package/build/esm/Graphics/Polygon.d.ts +2 -0
- package/build/esm/Graphics/PostProcessor/ColorBlindnessMode.d.ts +5 -0
- package/build/esm/Graphics/PostProcessor/ColorBlindnessPostProcessor.d.ts +17 -0
- package/build/esm/Graphics/PostProcessor/PostProcessor.d.ts +7 -0
- package/build/esm/Graphics/PostProcessor/ScreenShader.d.ts +16 -0
- package/build/esm/Graphics/Raster.d.ts +32 -5
- package/build/esm/Graphics/Sprite.d.ts +5 -0
- package/build/esm/Graphics/SpriteFont.d.ts +6 -7
- package/build/esm/Graphics/SpriteSheet.d.ts +1 -2
- package/build/esm/Graphics/Text.d.ts +18 -2
- package/build/esm/Graphics/index.d.ts +14 -0
- package/build/esm/Id.d.ts +1 -1
- package/build/esm/Input/EngineInput.d.ts +2 -2
- package/build/esm/Input/Index.d.ts +10 -3
- package/build/esm/Input/NativePointerButton.d.ts +10 -0
- package/build/esm/Input/PointerAbstraction.d.ts +33 -0
- package/build/esm/Input/PointerButton.d.ts +10 -0
- package/build/esm/Input/PointerComponent.d.ts +24 -0
- package/build/esm/Input/PointerEvent.d.ts +18 -0
- package/build/esm/Input/PointerEventReceiver.d.ts +114 -0
- package/build/esm/Input/PointerScope.d.ts +14 -0
- package/build/esm/Input/PointerSystem.d.ts +43 -0
- package/build/esm/Input/PointerType.d.ts +9 -0
- package/build/esm/Input/WheelDeltaMode.d.ts +5 -0
- package/build/esm/Input/WheelEvent.d.ts +18 -0
- package/build/esm/Interfaces/PointerEventHandlers.d.ts +17 -16
- package/build/esm/Label.d.ts +9 -2
- package/build/esm/Loader.d.ts +5 -2
- package/build/esm/Math/Index.d.ts +1 -0
- package/build/esm/Math/matrix.d.ts +19 -1
- package/build/esm/Math/util.d.ts +45 -0
- package/build/esm/Particles.d.ts +12 -0
- package/build/esm/Resources/Gif.d.ts +1 -1
- package/build/esm/Scene.d.ts +10 -1
- package/build/esm/Screen.d.ts +4 -3
- package/build/esm/TileMap.d.ts +3 -2
- package/build/esm/Traits/Index.d.ts +0 -1
- package/build/esm/Trigger.d.ts +4 -0
- package/build/esm/Util/Clock.d.ts +118 -0
- package/build/esm/Util/Fps.d.ts +40 -0
- package/build/esm/Util/Observable.d.ts +1 -1
- package/build/esm/Util/Pool.d.ts +2 -10
- package/build/esm/Util/Util.d.ts +23 -66
- package/build/esm/excalibur.js +9001 -7438
- package/build/esm/excalibur.js.map +1 -1
- package/build/esm/excalibur.min.js +1 -1
- package/build/esm/excalibur.min.js.LICENSE.txt +2 -2
- package/build/esm/excalibur.min.js.map +1 -1
- package/build/esm/index.d.ts +5 -2
- package/package.json +31 -27
- package/build/dist/Graphics/Context/batch.d.ts +0 -11
- package/build/dist/Graphics/Context/draw-image-command.d.ts +0 -47
- package/build/dist/Graphics/Context/image-renderer.d.ts +0 -39
- package/build/dist/Graphics/Context/line-renderer.d.ts +0 -22
- package/build/dist/Graphics/Context/point-renderer.d.ts +0 -22
- package/build/dist/Graphics/Context/shaders/image-fragment.glsl +0 -48
- package/build/dist/Input/Pointer.d.ts +0 -134
- package/build/dist/Input/PointerEvents.d.ts +0 -170
- package/build/dist/Input/Pointers.d.ts +0 -78
- package/build/dist/PostProcessing/ColorBlindCorrector.d.ts +0 -28
- package/build/dist/PostProcessing/Index.d.ts +0 -2
- package/build/dist/PostProcessing/PostProcessor.d.ts +0 -6
- package/build/dist/Traits/CapturePointer.d.ts +0 -10
- package/build/esm/Graphics/Context/batch.d.ts +0 -11
- package/build/esm/Graphics/Context/draw-image-command.d.ts +0 -47
- package/build/esm/Graphics/Context/image-renderer.d.ts +0 -39
- package/build/esm/Graphics/Context/line-renderer.d.ts +0 -22
- package/build/esm/Graphics/Context/point-renderer.d.ts +0 -22
- package/build/esm/Input/Pointer.d.ts +0 -134
- package/build/esm/Input/PointerEvents.d.ts +0 -170
- package/build/esm/Input/Pointers.d.ts +0 -78
- package/build/esm/PostProcessing/ColorBlindCorrector.d.ts +0 -28
- package/build/esm/PostProcessing/Index.d.ts +0 -2
- package/build/esm/PostProcessing/PostProcessor.d.ts +0 -6
- package/build/esm/Traits/CapturePointer.d.ts +0 -10
- package/wallaby.js +0 -77
package/build/dist/index.d.ts
CHANGED
|
@@ -31,7 +31,6 @@ export * from './Collision/Index';
|
|
|
31
31
|
import * as legacyDrawing from './Drawing/Index';
|
|
32
32
|
export { legacyDrawing as LegacyDrawing };
|
|
33
33
|
export * from './Interfaces/Index';
|
|
34
|
-
export * from './PostProcessing/Index';
|
|
35
34
|
export * from './Resources/Index';
|
|
36
35
|
export * from './EntityComponentSystem/index';
|
|
37
36
|
export * from './Color';
|
|
@@ -40,11 +39,12 @@ import * as events from './Events';
|
|
|
40
39
|
export { events as Events };
|
|
41
40
|
import * as input from './Input/Index';
|
|
42
41
|
export { input as Input };
|
|
42
|
+
export { PointerComponent } from './Input/Index';
|
|
43
|
+
export { PointerSystem } from './Input/PointerSystem';
|
|
43
44
|
import * as traits from './Traits/Index';
|
|
44
45
|
export { traits as Traits };
|
|
45
46
|
import * as util from './Util/Index';
|
|
46
47
|
export { util as Util };
|
|
47
|
-
export { clamp, range, toDegrees, toRadians, randomInRange, randomIntInRange, canonicalizeAngle } from './Util/Index';
|
|
48
48
|
export * from './Util/Browser';
|
|
49
49
|
export * from './Util/Decorators';
|
|
50
50
|
export * from './Util/Detector';
|
|
@@ -54,4 +54,7 @@ export * from './Util/Observable';
|
|
|
54
54
|
export * from './Util/Log';
|
|
55
55
|
export * from './Util/SortedList';
|
|
56
56
|
export * from './Util/Pool';
|
|
57
|
+
export * from './Util/Fps';
|
|
58
|
+
export * from './Util/Clock';
|
|
59
|
+
export * from './Util/WebAudio';
|
|
57
60
|
export * from './Promises';
|
package/build/esm/Actor.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Texture } from './Drawing/Texture';
|
|
2
2
|
import { InitializeEvent, KillEvent, PreUpdateEvent, PostUpdateEvent, PreDrawEvent, PostDrawEvent, PreDebugDrawEvent, PostDebugDrawEvent, PostCollisionEvent, PreCollisionEvent, CollisionStartEvent, CollisionEndEvent, PostKillEvent, PreKillEvent, GameEvent, ExitTriggerEvent, EnterTriggerEvent, EnterViewPortEvent, ExitViewPortEvent } from './Events';
|
|
3
|
-
import { PointerEvent, WheelEvent, PointerDragEvent } from './Input/PointerEvents';
|
|
4
3
|
import { Engine } from './Engine';
|
|
5
4
|
import { Color } from './Color';
|
|
6
5
|
import { Sprite } from './Drawing/Sprite';
|
|
@@ -16,12 +15,14 @@ import * as Events from './Events';
|
|
|
16
15
|
import { PointerEvents } from './Interfaces/PointerEventHandlers';
|
|
17
16
|
import { CollisionType } from './Collision/CollisionType';
|
|
18
17
|
import { Entity } from './EntityComponentSystem/Entity';
|
|
19
|
-
import { TransformComponent } from './EntityComponentSystem/Components/TransformComponent';
|
|
18
|
+
import { CoordPlane, TransformComponent } from './EntityComponentSystem/Components/TransformComponent';
|
|
20
19
|
import { MotionComponent } from './EntityComponentSystem/Components/MotionComponent';
|
|
21
20
|
import { GraphicsComponent } from './Graphics/GraphicsComponent';
|
|
22
21
|
import { ColliderComponent } from './Collision/ColliderComponent';
|
|
23
22
|
import { Collider, CollisionGroup } from './Collision/Index';
|
|
24
|
-
import {
|
|
23
|
+
import { PointerEvent } from './Input/PointerEvent';
|
|
24
|
+
import { WheelEvent } from './Input/WheelEvent';
|
|
25
|
+
import { PointerComponent } from './Input/PointerComponent';
|
|
25
26
|
import { ActionsComponent } from './Actions/ActionsComponent';
|
|
26
27
|
/**
|
|
27
28
|
* Type guard for checking if something is an Actor
|
|
@@ -45,9 +46,13 @@ export interface ActorArgs {
|
|
|
45
46
|
*/
|
|
46
47
|
y?: number;
|
|
47
48
|
/**
|
|
48
|
-
*
|
|
49
|
+
* Optionally set the (x, y) position of the actor as a vector, default is (0, 0)
|
|
49
50
|
*/
|
|
50
51
|
pos?: Vector;
|
|
52
|
+
/**
|
|
53
|
+
* Optionally set the coordinate plane of the actor, default is [[CoordPlane.World]] meaning actor is subject to camera positioning
|
|
54
|
+
*/
|
|
55
|
+
coordPlane?: CoordPlane;
|
|
51
56
|
/**
|
|
52
57
|
* Optionally set the width of a box collider for the actor
|
|
53
58
|
*/
|
|
@@ -145,7 +150,11 @@ export declare class Actor extends Entity implements Eventable, PointerEvents, C
|
|
|
145
150
|
*/
|
|
146
151
|
get collider(): ColliderComponent;
|
|
147
152
|
/**
|
|
148
|
-
*
|
|
153
|
+
* Access to the Actor's built in [[PointerComponent]] config
|
|
154
|
+
*/
|
|
155
|
+
get pointer(): PointerComponent;
|
|
156
|
+
/**
|
|
157
|
+
* Useful for quickly scripting actor behavior, like moving to a place, patrolling back and forth, blinking, etc.
|
|
149
158
|
*
|
|
150
159
|
* Access to the Actor's built in [[ActionsComponent]] which forwards to the
|
|
151
160
|
* [[ActionContext|Action context]] of the actor.
|
|
@@ -258,6 +267,9 @@ export declare class Actor extends Entity implements Eventable, PointerEvents, C
|
|
|
258
267
|
* The scene that the actor is in
|
|
259
268
|
*/
|
|
260
269
|
scene: Scene;
|
|
270
|
+
/**
|
|
271
|
+
* @deprecated will be removed in v0.26.0
|
|
272
|
+
*/
|
|
261
273
|
frames: {
|
|
262
274
|
[key: string]: Drawable;
|
|
263
275
|
};
|
|
@@ -265,7 +277,7 @@ export declare class Actor extends Entity implements Eventable, PointerEvents, C
|
|
|
265
277
|
* Access to the current drawing for the actor, this can be
|
|
266
278
|
* an [[Animation]], [[Sprite]], or [[Polygon]].
|
|
267
279
|
* Set drawings with [[setDrawing]].
|
|
268
|
-
* @deprecated
|
|
280
|
+
* @deprecated will be removed in v0.26.0
|
|
269
281
|
*/
|
|
270
282
|
currentDrawing: Drawable;
|
|
271
283
|
/**
|
|
@@ -281,26 +293,15 @@ export declare class Actor extends Entity implements Eventable, PointerEvents, C
|
|
|
281
293
|
set draggable(isDraggable: boolean);
|
|
282
294
|
/**
|
|
283
295
|
* Modify the current actor update pipeline.
|
|
296
|
+
* @deprecated will be removed in v0.26.0
|
|
284
297
|
*/
|
|
285
298
|
traits: Trait[];
|
|
286
299
|
/**
|
|
287
|
-
* Sets the color of the actor
|
|
288
|
-
* drawn if no [[Drawable]] is specified as the actors drawing.
|
|
289
|
-
*
|
|
290
|
-
* The default is `null` which prevents a rectangle from being drawn.
|
|
300
|
+
* Sets the color of the actor's current graphic
|
|
291
301
|
*/
|
|
292
302
|
get color(): Color;
|
|
293
303
|
set color(v: Color);
|
|
294
304
|
private _color;
|
|
295
|
-
/**
|
|
296
|
-
* Whether or not to enable the [[Traits.CapturePointer]] trait that propagates
|
|
297
|
-
* pointer events to this actor
|
|
298
|
-
*/
|
|
299
|
-
enableCapturePointer: boolean;
|
|
300
|
-
/**
|
|
301
|
-
* Configuration for [[Traits.CapturePointer]] trait
|
|
302
|
-
*/
|
|
303
|
-
capturePointer: CapturePointerConfig;
|
|
304
305
|
/**
|
|
305
306
|
*
|
|
306
307
|
* @param config
|
|
@@ -321,10 +322,6 @@ export declare class Actor extends Entity implements Eventable, PointerEvents, C
|
|
|
321
322
|
* @internal
|
|
322
323
|
*/
|
|
323
324
|
_initialize(engine: Engine): void;
|
|
324
|
-
private _capturePointerEvents;
|
|
325
|
-
private _captureMoveEvents;
|
|
326
|
-
private _captureDragEvents;
|
|
327
|
-
private _checkForPointerOptIn;
|
|
328
325
|
on(eventName: Events.exittrigger, handler: (event: ExitTriggerEvent) => void): void;
|
|
329
326
|
on(eventName: Events.entertrigger, handler: (event: EnterTriggerEvent) => void): void;
|
|
330
327
|
/**
|
|
@@ -379,11 +376,11 @@ export declare class Actor extends Entity implements Eventable, PointerEvents, C
|
|
|
379
376
|
on(eventName: Events.pointermove, handler: (event: PointerEvent) => void): void;
|
|
380
377
|
on(eventName: Events.pointercancel, handler: (event: PointerEvent) => void): void;
|
|
381
378
|
on(eventName: Events.pointerwheel, handler: (event: WheelEvent) => void): void;
|
|
382
|
-
on(eventName: Events.pointerdragstart, handler: (event:
|
|
383
|
-
on(eventName: Events.pointerdragend, handler: (event:
|
|
384
|
-
on(eventName: Events.pointerdragenter, handler: (event:
|
|
385
|
-
on(eventName: Events.pointerdragleave, handler: (event:
|
|
386
|
-
on(eventName: Events.pointerdragmove, handler: (event:
|
|
379
|
+
on(eventName: Events.pointerdragstart, handler: (event: PointerEvent) => void): void;
|
|
380
|
+
on(eventName: Events.pointerdragend, handler: (event: PointerEvent) => void): void;
|
|
381
|
+
on(eventName: Events.pointerdragenter, handler: (event: PointerEvent) => void): void;
|
|
382
|
+
on(eventName: Events.pointerdragleave, handler: (event: PointerEvent) => void): void;
|
|
383
|
+
on(eventName: Events.pointerdragmove, handler: (event: PointerEvent) => void): void;
|
|
387
384
|
on(eventName: Events.enterviewport, handler: (event: EnterViewPortEvent) => void): void;
|
|
388
385
|
on(eventName: Events.exitviewport, handler: (event: ExitViewPortEvent) => void): void;
|
|
389
386
|
on(eventName: string, handler: (event: GameEvent<Actor>) => void): void;
|
|
@@ -441,11 +438,11 @@ export declare class Actor extends Entity implements Eventable, PointerEvents, C
|
|
|
441
438
|
once(eventName: Events.pointermove, handler: (event: PointerEvent) => void): void;
|
|
442
439
|
once(eventName: Events.pointercancel, handler: (event: PointerEvent) => void): void;
|
|
443
440
|
once(eventName: Events.pointerwheel, handler: (event: WheelEvent) => void): void;
|
|
444
|
-
once(eventName: Events.pointerdragstart, handler: (event:
|
|
445
|
-
once(eventName: Events.pointerdragend, handler: (event:
|
|
446
|
-
once(eventName: Events.pointerdragenter, handler: (event:
|
|
447
|
-
once(eventName: Events.pointerdragleave, handler: (event:
|
|
448
|
-
once(eventName: Events.pointerdragmove, handler: (event:
|
|
441
|
+
once(eventName: Events.pointerdragstart, handler: (event: PointerEvent) => void): void;
|
|
442
|
+
once(eventName: Events.pointerdragend, handler: (event: PointerEvent) => void): void;
|
|
443
|
+
once(eventName: Events.pointerdragenter, handler: (event: PointerEvent) => void): void;
|
|
444
|
+
once(eventName: Events.pointerdragleave, handler: (event: PointerEvent) => void): void;
|
|
445
|
+
once(eventName: Events.pointerdragmove, handler: (event: PointerEvent) => void): void;
|
|
449
446
|
once(eventName: Events.enterviewport, handler: (event: EnterViewPortEvent) => void): void;
|
|
450
447
|
once(eventName: Events.exitviewport, handler: (event: ExitViewPortEvent) => void): void;
|
|
451
448
|
once(eventName: string, handler: (event: GameEvent<Actor>) => void): void;
|
|
@@ -493,11 +490,11 @@ export declare class Actor extends Entity implements Eventable, PointerEvents, C
|
|
|
493
490
|
off(eventName: Events.pointermove, handler?: (event: PointerEvent) => void): void;
|
|
494
491
|
off(eventName: Events.pointercancel, handler?: (event: PointerEvent) => void): void;
|
|
495
492
|
off(eventName: Events.pointerwheel, handler?: (event: WheelEvent) => void): void;
|
|
496
|
-
off(eventName: Events.pointerdragstart, handler?: (event:
|
|
497
|
-
off(eventName: Events.pointerdragend, handler?: (event:
|
|
498
|
-
off(eventName: Events.pointerdragenter, handler?: (event:
|
|
499
|
-
off(eventName: Events.pointerdragleave, handler?: (event:
|
|
500
|
-
off(eventName: Events.pointerdragmove, handler?: (event:
|
|
493
|
+
off(eventName: Events.pointerdragstart, handler?: (event: PointerEvent) => void): void;
|
|
494
|
+
off(eventName: Events.pointerdragend, handler?: (event: PointerEvent) => void): void;
|
|
495
|
+
off(eventName: Events.pointerdragenter, handler?: (event: PointerEvent) => void): void;
|
|
496
|
+
off(eventName: Events.pointerdragleave, handler?: (event: PointerEvent) => void): void;
|
|
497
|
+
off(eventName: Events.pointerdragmove, handler?: (event: PointerEvent) => void): void;
|
|
501
498
|
off(eventName: Events.prekill, handler?: (event: PreKillEvent) => void): void;
|
|
502
499
|
off(eventName: Events.postkill, handler?: (event: PostKillEvent) => void): void;
|
|
503
500
|
off(eventName: Events.initialize, handler?: (event: Events.InitializeEvent<Actor>) => void): void;
|
|
@@ -563,19 +560,19 @@ export declare class Actor extends Entity implements Eventable, PointerEvents, C
|
|
|
563
560
|
setDrawing(key: number): void;
|
|
564
561
|
/**
|
|
565
562
|
* Adds a whole texture as the "default" drawing. Set a drawing using [[setDrawing]].
|
|
566
|
-
* @deprecated Use [[GraphicsComponent.add|Actor.graphics.add]]
|
|
563
|
+
* @deprecated Use [[GraphicsComponent.add|Actor.graphics.add]], will be removed in v0.26.0
|
|
567
564
|
*/
|
|
568
565
|
addDrawing(texture: Texture): void;
|
|
569
566
|
/**
|
|
570
567
|
* Adds a whole sprite as the "default" drawing. Set a drawing using [[setDrawing]].
|
|
571
|
-
* @deprecated Use [[GraphicsComponent.add|Actor.graphics.add]]
|
|
568
|
+
* @deprecated Use [[GraphicsComponent.add|Actor.graphics.add]], will be removed in v0.26.0
|
|
572
569
|
*/
|
|
573
570
|
addDrawing(sprite: Sprite): void;
|
|
574
571
|
/**
|
|
575
572
|
* Adds a drawing to the list of available drawings for an actor. Set a drawing using [[setDrawing]].
|
|
576
573
|
* @param key The key to associate with a drawing for this actor
|
|
577
574
|
* @param drawing This can be an [[Animation]], [[Sprite]], or [[Polygon]].
|
|
578
|
-
* @deprecated Use [[GraphicsComponent.add|Actor.graphics.add]]
|
|
575
|
+
* @deprecated Use [[GraphicsComponent.add|Actor.graphics.add]], will be removed in v0.26.0
|
|
579
576
|
*/
|
|
580
577
|
addDrawing(key: any, drawing: Drawable): void;
|
|
581
578
|
/**
|
|
@@ -584,7 +581,7 @@ export declare class Actor extends Entity implements Eventable, PointerEvents, C
|
|
|
584
581
|
*/
|
|
585
582
|
get z(): number;
|
|
586
583
|
/**
|
|
587
|
-
* @deprecated Use [[Actor.z]]
|
|
584
|
+
* @deprecated Use [[Actor.z]], will be removed in v0.26.0
|
|
588
585
|
*/
|
|
589
586
|
getZIndex(): number;
|
|
590
587
|
/**
|
|
@@ -596,13 +593,17 @@ export declare class Actor extends Entity implements Eventable, PointerEvents, C
|
|
|
596
593
|
set z(newZ: number);
|
|
597
594
|
/**
|
|
598
595
|
* @param newIndex new z-index to assign
|
|
599
|
-
* @deprecated Use [[Actor.z]]
|
|
596
|
+
* @deprecated Use [[Actor.z]], will be removed in v0.26.0
|
|
600
597
|
*/
|
|
601
598
|
setZIndex(newIndex: number): void;
|
|
602
599
|
/**
|
|
603
|
-
* Get the center point of an actor
|
|
600
|
+
* Get the center point of an actor (global position)
|
|
604
601
|
*/
|
|
605
602
|
get center(): Vector;
|
|
603
|
+
/**
|
|
604
|
+
* Get the local center point of an actor
|
|
605
|
+
*/
|
|
606
|
+
get localCenter(): Vector;
|
|
606
607
|
get width(): number;
|
|
607
608
|
get height(): number;
|
|
608
609
|
/**
|
|
@@ -720,7 +721,7 @@ export declare class Actor extends Entity implements Eventable, PointerEvents, C
|
|
|
720
721
|
*
|
|
721
722
|
*
|
|
722
723
|
* **Warning** only works with Flags.useLegacyDrawing() enabled
|
|
723
|
-
* @deprecated
|
|
724
|
+
* @deprecated will be removed in v0.26.0
|
|
724
725
|
* @internal
|
|
725
726
|
*/
|
|
726
727
|
debugDraw(_ctx: CanvasRenderingContext2D): void;
|
package/build/esm/Camera.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ import { PreUpdateEvent, PostUpdateEvent, GameEvent, InitializeEvent } from './E
|
|
|
7
7
|
import { Class } from './Class';
|
|
8
8
|
import { BoundingBox } from './Collision/BoundingBox';
|
|
9
9
|
import { ExcaliburGraphicsContext } from './Graphics/Context/ExcaliburGraphicsContext';
|
|
10
|
+
import { Matrix } from './Math/matrix';
|
|
10
11
|
/**
|
|
11
12
|
* Interface that describes a custom camera strategy for tracking targets
|
|
12
13
|
*/
|
|
@@ -148,6 +149,8 @@ export declare class LimitCameraBoundsStrategy implements CameraStrategy<Boundin
|
|
|
148
149
|
*
|
|
149
150
|
*/
|
|
150
151
|
export declare class Camera extends Class implements CanUpdate, CanInitialize {
|
|
152
|
+
transform: Matrix;
|
|
153
|
+
inverse: Matrix;
|
|
151
154
|
protected _follow: Actor;
|
|
152
155
|
private _cameraStrategies;
|
|
153
156
|
strategy: StrategyContainer;
|
|
@@ -171,6 +174,7 @@ export declare class Camera extends Class implements CanUpdate, CanInitialize {
|
|
|
171
174
|
rotation: number;
|
|
172
175
|
/**
|
|
173
176
|
* Current angular velocity
|
|
177
|
+
* @deprecated will be removed in v0.26.0, use angularVelocity
|
|
174
178
|
*/
|
|
175
179
|
rx: number;
|
|
176
180
|
/**
|
|
@@ -190,7 +194,7 @@ export declare class Camera extends Class implements CanUpdate, CanInitialize {
|
|
|
190
194
|
*/
|
|
191
195
|
vel: Vector;
|
|
192
196
|
/**
|
|
193
|
-
*
|
|
197
|
+
* Get or set the camera's acceleration
|
|
194
198
|
*/
|
|
195
199
|
acc: Vector;
|
|
196
200
|
private _cameraMoving;
|
|
@@ -328,6 +332,7 @@ export declare class Camera extends Class implements CanUpdate, CanInitialize {
|
|
|
328
332
|
*/
|
|
329
333
|
onPostUpdate(_engine: Engine, _delta: number): void;
|
|
330
334
|
private _engine;
|
|
335
|
+
private _screen;
|
|
331
336
|
private _isInitialized;
|
|
332
337
|
get isInitialized(): boolean;
|
|
333
338
|
_initialize(_engine: Engine): void;
|
|
@@ -348,13 +353,16 @@ export declare class Camera extends Class implements CanUpdate, CanInitialize {
|
|
|
348
353
|
once(eventName: 'preupdate', handler: (event: PreUpdateEvent) => void): void;
|
|
349
354
|
once(eventName: 'postupdate', handler: (event: PostUpdateEvent) => void): void;
|
|
350
355
|
once(eventName: string, handler: (event: GameEvent<Camera>) => void): void;
|
|
356
|
+
runStrategies(engine: Engine, delta: number): void;
|
|
357
|
+
updateViewport(): void;
|
|
351
358
|
update(_engine: Engine, delta: number): void;
|
|
352
359
|
/**
|
|
353
360
|
* Applies the relevant transformations to the game canvas to "move" or apply effects to the Camera
|
|
354
|
-
* @param ctx
|
|
361
|
+
* @param ctx Canvas context to apply transformations
|
|
355
362
|
*/
|
|
356
363
|
draw(ctx: CanvasRenderingContext2D): void;
|
|
357
364
|
draw(ctx: ExcaliburGraphicsContext): void;
|
|
365
|
+
updateTransform(): void;
|
|
358
366
|
debugDraw(_ctx: CanvasRenderingContext2D): void;
|
|
359
367
|
private _isDoneShaking;
|
|
360
368
|
}
|
package/build/esm/Class.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { GameEvent } from './Events';
|
|
2
1
|
import { EventDispatcher } from './EventDispatcher';
|
|
3
2
|
import { Eventable } from './Interfaces/Evented';
|
|
4
3
|
/**
|
|
@@ -17,7 +16,7 @@ export declare class Class implements Eventable {
|
|
|
17
16
|
* @param eventName Name of the event to listen for
|
|
18
17
|
* @param handler Event handler for the thrown event
|
|
19
18
|
*/
|
|
20
|
-
on(eventName: string, handler: (event:
|
|
19
|
+
on(eventName: string, handler: (event: any) => void): void;
|
|
21
20
|
/**
|
|
22
21
|
* Alias for `removeEventListener`. If only the eventName is specified
|
|
23
22
|
* it will remove all handlers registered for that specific event. If the eventName
|
|
@@ -26,18 +25,18 @@ export declare class Class implements Eventable {
|
|
|
26
25
|
* @param eventName Name of the event to listen for
|
|
27
26
|
* @param handler Event handler for the thrown event
|
|
28
27
|
*/
|
|
29
|
-
off(eventName: string, handler?: (event:
|
|
28
|
+
off(eventName: string, handler?: (event: any) => void): void;
|
|
30
29
|
/**
|
|
31
30
|
* Emits a new event
|
|
32
31
|
* @param eventName Name of the event to emit
|
|
33
32
|
* @param eventObject Data associated with this event
|
|
34
33
|
*/
|
|
35
|
-
emit(eventName: string, eventObject:
|
|
34
|
+
emit(eventName: string, eventObject: any): void;
|
|
36
35
|
/**
|
|
37
36
|
* Once listens to an event one time, then unsubscribes from that event
|
|
38
37
|
*
|
|
39
38
|
* @param eventName The name of the event to subscribe to once
|
|
40
39
|
* @param handler The handler of the event that will be auto unsubscribed
|
|
41
40
|
*/
|
|
42
|
-
once(eventName: string, handler: (event:
|
|
41
|
+
once(eventName: string, handler: (event: any) => void): void;
|
|
43
42
|
}
|
|
@@ -26,7 +26,7 @@ export declare class BodyComponent extends Component<'ex.body'> implements Clona
|
|
|
26
26
|
dependencies: (typeof TransformComponent | typeof MotionComponent)[];
|
|
27
27
|
static _ID: number;
|
|
28
28
|
readonly id: Id<'body'>;
|
|
29
|
-
events: EventDispatcher<
|
|
29
|
+
events: EventDispatcher<any>;
|
|
30
30
|
constructor(options?: BodyComponentOptions);
|
|
31
31
|
/**
|
|
32
32
|
* Collision type for the rigidbody physics simulation, by default [[CollisionType.PreventCollision]]
|
|
@@ -195,7 +195,7 @@ export declare class BodyComponent extends Component<'ex.body'> implements Clona
|
|
|
195
195
|
*/
|
|
196
196
|
applyLinearImpulse(impulse: Vector): void;
|
|
197
197
|
/**
|
|
198
|
-
* Apply only angular
|
|
198
|
+
* Apply only angular impulse to the body
|
|
199
199
|
* @param point
|
|
200
200
|
* @param impulse
|
|
201
201
|
*/
|
|
@@ -204,5 +204,9 @@ export declare class BodyComponent extends Component<'ex.body'> implements Clona
|
|
|
204
204
|
* Sets the old versions of pos, vel, acc, and scale.
|
|
205
205
|
*/
|
|
206
206
|
captureOldTransform(): void;
|
|
207
|
+
/**
|
|
208
|
+
* @deprecated signature will change in v0.26.0
|
|
209
|
+
* @param _ctx
|
|
210
|
+
*/
|
|
207
211
|
debugDraw(_ctx: CanvasRenderingContext2D): void;
|
|
208
212
|
}
|
|
@@ -99,6 +99,12 @@ export declare class BoundingBox {
|
|
|
99
99
|
* @param bb The other actor to test
|
|
100
100
|
*/
|
|
101
101
|
intersectWithSide(bb: BoundingBox): Side;
|
|
102
|
+
/**
|
|
103
|
+
*
|
|
104
|
+
* @deprecated signature will change in v0.26.0
|
|
105
|
+
* @param ctx
|
|
106
|
+
* @param color
|
|
107
|
+
*/
|
|
102
108
|
debugDraw(ctx: CanvasRenderingContext2D, color?: Color): void;
|
|
103
109
|
/**
|
|
104
110
|
* Draw a debug bounding box
|
|
@@ -12,7 +12,7 @@ import { PolygonCollider } from './Colliders/PolygonCollider';
|
|
|
12
12
|
import { EdgeCollider } from './Colliders/EdgeCollider';
|
|
13
13
|
export declare class ColliderComponent extends Component<'ex.collider'> {
|
|
14
14
|
readonly type = "ex.collider";
|
|
15
|
-
events: EventDispatcher<
|
|
15
|
+
events: EventDispatcher<any>;
|
|
16
16
|
/**
|
|
17
17
|
* Observable that notifies when a collider is added to the body
|
|
18
18
|
*/
|
|
@@ -25,7 +25,6 @@ export declare class ColliderComponent extends Component<'ex.collider'> {
|
|
|
25
25
|
private _collider;
|
|
26
26
|
/**
|
|
27
27
|
* Get the current collider geometry
|
|
28
|
-
* @returns
|
|
29
28
|
*/
|
|
30
29
|
get(): Collider;
|
|
31
30
|
/**
|
|
@@ -53,7 +52,6 @@ export declare class ColliderComponent extends Component<'ex.collider'> {
|
|
|
53
52
|
/**
|
|
54
53
|
* Collide component with another
|
|
55
54
|
* @param other
|
|
56
|
-
* @returns
|
|
57
55
|
*/
|
|
58
56
|
collide(other: ColliderComponent): CollisionContact[];
|
|
59
57
|
onAdd(entity: Entity): void;
|
|
@@ -92,7 +90,6 @@ export declare class ColliderComponent extends Component<'ex.collider'> {
|
|
|
92
90
|
/**
|
|
93
91
|
* Setups up a [[CompositeCollider]] which can define any arbitrary set of excalibur colliders
|
|
94
92
|
* @param colliders
|
|
95
|
-
* @returns
|
|
96
93
|
*/
|
|
97
94
|
useCompositeCollider(colliders: Collider[]): CompositeCollider;
|
|
98
95
|
}
|
|
@@ -27,10 +27,15 @@ export declare class CircleCollider extends Collider {
|
|
|
27
27
|
*/
|
|
28
28
|
offset: Vector;
|
|
29
29
|
get worldPos(): Vector;
|
|
30
|
+
private _naturalRadius;
|
|
30
31
|
/**
|
|
31
|
-
*
|
|
32
|
+
* Get the radius of the circle
|
|
32
33
|
*/
|
|
33
|
-
radius: number;
|
|
34
|
+
get radius(): number;
|
|
35
|
+
/**
|
|
36
|
+
* Set the radius of the circle
|
|
37
|
+
*/
|
|
38
|
+
set radius(val: number);
|
|
34
39
|
private _transform;
|
|
35
40
|
constructor(options: CircleColliderOptions);
|
|
36
41
|
/**
|
|
@@ -86,7 +91,18 @@ export declare class CircleCollider extends Collider {
|
|
|
86
91
|
* Project the circle along a specified axis
|
|
87
92
|
*/
|
|
88
93
|
project(axis: Vector): Projection;
|
|
94
|
+
/**
|
|
95
|
+
* @deprecated signature will change in v0.26.0
|
|
96
|
+
* @param ctx
|
|
97
|
+
* @param color
|
|
98
|
+
* @param pos
|
|
99
|
+
*/
|
|
89
100
|
draw(ctx: CanvasRenderingContext2D, color?: Color, pos?: Vector): void;
|
|
90
101
|
debug(ex: ExcaliburGraphicsContext, color: Color): void;
|
|
102
|
+
/**
|
|
103
|
+
* @deprecated signature will change in v0.26.0
|
|
104
|
+
* @param ctx
|
|
105
|
+
* @param color
|
|
106
|
+
*/
|
|
91
107
|
debugDraw(ctx: CanvasRenderingContext2D, color?: Color): void;
|
|
92
108
|
}
|
|
@@ -16,11 +16,11 @@ export interface SeparationInfo {
|
|
|
16
16
|
*/
|
|
17
17
|
separation: number;
|
|
18
18
|
/**
|
|
19
|
-
* Axis of separation from the collider's
|
|
19
|
+
* Axis of separation from the collider's perspective
|
|
20
20
|
*/
|
|
21
21
|
axis: Vector;
|
|
22
22
|
/**
|
|
23
|
-
* Side of separation (reference) from the collider's
|
|
23
|
+
* Side of separation (reference) from the collider's perspective
|
|
24
24
|
*/
|
|
25
25
|
side?: Line;
|
|
26
26
|
/**
|
|
@@ -5,12 +5,12 @@ import { Collider } from '../Colliders/Collider';
|
|
|
5
5
|
import { CollisionContact } from '../Detection/CollisionContact';
|
|
6
6
|
import { ExcaliburGraphicsContext } from '../..';
|
|
7
7
|
/**
|
|
8
|
-
* Responsible for performing the collision broadphase (locating potential
|
|
8
|
+
* Responsible for performing the collision broadphase (locating potential collisions) and
|
|
9
9
|
* the narrowphase (actual collision contacts)
|
|
10
10
|
*/
|
|
11
11
|
export declare class DynamicTreeCollisionProcessor implements CollisionProcessor {
|
|
12
12
|
private _dynamicCollisionTree;
|
|
13
|
-
private
|
|
13
|
+
private _pairs;
|
|
14
14
|
private _collisionPairCache;
|
|
15
15
|
private _colliders;
|
|
16
16
|
getColliders(): readonly Collider[];
|
|
@@ -22,9 +22,9 @@ export declare class DynamicTreeCollisionProcessor implements CollisionProcessor
|
|
|
22
22
|
* Untracks a physics body
|
|
23
23
|
*/
|
|
24
24
|
untrack(target: Collider): void;
|
|
25
|
-
private
|
|
25
|
+
private _pairExists;
|
|
26
26
|
/**
|
|
27
|
-
* Detects potential collision pairs in a broadphase approach with the dynamic
|
|
27
|
+
* Detects potential collision pairs in a broadphase approach with the dynamic AABB tree strategy
|
|
28
28
|
*/
|
|
29
29
|
broadphase(targets: Collider[], delta: number, stats?: FrameStats): Pair[];
|
|
30
30
|
/**
|
|
@@ -9,6 +9,11 @@ export declare class Pair {
|
|
|
9
9
|
colliderB: Collider;
|
|
10
10
|
id: string;
|
|
11
11
|
constructor(colliderA: Collider, colliderB: Collider);
|
|
12
|
+
/**
|
|
13
|
+
* Returns whether a it is allowed for 2 colliders in a Pair to collide
|
|
14
|
+
* @param colliderA
|
|
15
|
+
* @param colliderB
|
|
16
|
+
*/
|
|
12
17
|
static canCollide(colliderA: Collider, colliderB: Collider): boolean;
|
|
13
18
|
/**
|
|
14
19
|
* Returns whether or not it is possible for the pairs to collide
|
|
@@ -21,7 +26,6 @@ export declare class Pair {
|
|
|
21
26
|
/**
|
|
22
27
|
* Check if the collider is part of the pair
|
|
23
28
|
* @param collider
|
|
24
|
-
* @returns
|
|
25
29
|
*/
|
|
26
30
|
hasCollider(collider: Collider): boolean;
|
|
27
31
|
/**
|
|
@@ -85,7 +85,6 @@ export declare class CollisionGroup {
|
|
|
85
85
|
* Combine collision groups with each other. The new group includes all of the previous groups.
|
|
86
86
|
*
|
|
87
87
|
* @param collisionGroups
|
|
88
|
-
* @returns
|
|
89
88
|
*/
|
|
90
89
|
static combine(collisionGroups: CollisionGroup[]): CollisionGroup;
|
|
91
90
|
/**
|
|
@@ -7,5 +7,9 @@ export declare class MotionSystem extends System<TransformComponent | MotionComp
|
|
|
7
7
|
systemType: SystemType;
|
|
8
8
|
priority: number;
|
|
9
9
|
update(_entities: Entity[], elapsedMs: number): void;
|
|
10
|
+
/**
|
|
11
|
+
* @deprecated signature will change in v0.26.0
|
|
12
|
+
* @param _ctx
|
|
13
|
+
*/
|
|
10
14
|
debugDraw(_ctx: CanvasRenderingContext2D): void;
|
|
11
15
|
}
|
|
@@ -31,7 +31,7 @@ export declare abstract class CollisionSolver {
|
|
|
31
31
|
*/
|
|
32
32
|
abstract solveVelocity(contacts: CollisionContact[]): void;
|
|
33
33
|
/**
|
|
34
|
-
* Solve position adjust the position of
|
|
34
|
+
* Solve position adjust the position of colliders so that they are not overlapping
|
|
35
35
|
* @param contacts
|
|
36
36
|
* @inheritdoc
|
|
37
37
|
*/
|
|
@@ -2,6 +2,7 @@ import { DebugFlags, ColorBlindFlags } from './DebugFlags';
|
|
|
2
2
|
import { Engine } from '../Engine';
|
|
3
3
|
import { Color } from '../Color';
|
|
4
4
|
import { CollisionContact } from '../Collision/Detection/CollisionContact';
|
|
5
|
+
import { StandardClock, TestClock } from '..';
|
|
5
6
|
/**
|
|
6
7
|
* Debug stats containing current and previous frame statistics
|
|
7
8
|
*/
|
|
@@ -129,12 +130,27 @@ export interface GraphicsStatistics {
|
|
|
129
130
|
export declare class Debug implements DebugFlags {
|
|
130
131
|
private _engine;
|
|
131
132
|
constructor(engine: Engine);
|
|
133
|
+
/**
|
|
134
|
+
* Switch the current excalibur clock with the [[TestClock]] and return
|
|
135
|
+
* it in the same running state.
|
|
136
|
+
*
|
|
137
|
+
* This is useful when you need to debug frame by frame.
|
|
138
|
+
*/
|
|
139
|
+
useTestClock(): TestClock;
|
|
140
|
+
/**
|
|
141
|
+
* Switch the current excalibur clock with the [[StandardClock]] and
|
|
142
|
+
* return it in the same running state.
|
|
143
|
+
*
|
|
144
|
+
* This is useful when you need to switch back to normal mode after
|
|
145
|
+
* debugging.
|
|
146
|
+
*/
|
|
147
|
+
useStandardClock(): StandardClock;
|
|
132
148
|
/**
|
|
133
149
|
* Performance statistics
|
|
134
150
|
*/
|
|
135
151
|
stats: DebugStats;
|
|
136
152
|
/**
|
|
137
|
-
* Correct or simulate color blindness using [[
|
|
153
|
+
* Correct or simulate color blindness using [[ColorBlindnessPostProcessor]].
|
|
138
154
|
* @warning Will reduce FPS.
|
|
139
155
|
*/
|
|
140
156
|
colorBlindMode: ColorBlindFlags;
|
|
@@ -160,6 +176,7 @@ export declare class Debug implements DebugFlags {
|
|
|
160
176
|
transform: {
|
|
161
177
|
showAll: boolean;
|
|
162
178
|
showPosition: boolean;
|
|
179
|
+
showPositionLabel: boolean;
|
|
163
180
|
positionColor: Color;
|
|
164
181
|
showScale: boolean;
|
|
165
182
|
scaleColor: Color;
|
|
@@ -1,11 +1,24 @@
|
|
|
1
|
+
import { ColorBlindnessMode } from '../Graphics/PostProcessor/ColorBlindnessMode';
|
|
1
2
|
import { Engine } from '../Engine';
|
|
2
|
-
import { ColorBlindness } from '../PostProcessing/Index';
|
|
3
3
|
export interface DebugFlags {
|
|
4
4
|
colorBlindMode: ColorBlindFlags;
|
|
5
5
|
}
|
|
6
6
|
export declare class ColorBlindFlags {
|
|
7
7
|
private _engine;
|
|
8
|
+
private _colorBlindPostProcessor;
|
|
8
9
|
constructor(engine: Engine);
|
|
9
|
-
|
|
10
|
-
|
|
10
|
+
/**
|
|
11
|
+
* Correct colors for a specified color blindness
|
|
12
|
+
* @param colorBlindness
|
|
13
|
+
*/
|
|
14
|
+
correct(colorBlindness: ColorBlindnessMode): void;
|
|
15
|
+
/**
|
|
16
|
+
* Simulate colors for a specified color blindness
|
|
17
|
+
* @param colorBlindness
|
|
18
|
+
*/
|
|
19
|
+
simulate(colorBlindness: ColorBlindnessMode): void;
|
|
20
|
+
/**
|
|
21
|
+
* Remove color blindness post processor
|
|
22
|
+
*/
|
|
23
|
+
clear(): void;
|
|
11
24
|
}
|