excalibur 0.28.3 → 0.28.4
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/.gitattributes +63 -63
- package/CHANGELOG.md +2003 -1955
- package/LICENSE.md +25 -25
- package/README.md +134 -134
- package/STYLEGUIDE.md +136 -136
- package/build/dist/Actions/Action/ActionSequence.js +31 -0
- package/build/dist/Actions/Action/ActionSequence.js.map +1 -0
- package/build/dist/Actions/Action/Blink.js +54 -0
- package/build/dist/Actions/Action/Blink.js.map +1 -0
- package/build/dist/Actions/Action/CallMethod.js +21 -0
- package/build/dist/Actions/Action/CallMethod.js.map +1 -0
- package/build/dist/Actions/Action/Delay.js +26 -0
- package/build/dist/Actions/Action/Delay.js.map +1 -0
- package/build/dist/Actions/Action/Die.js +22 -0
- package/build/dist/Actions/Action/Die.js.map +1 -0
- package/build/dist/Actions/Action/EaseBy.js +70 -0
- package/build/dist/Actions/Action/EaseBy.js.map +1 -0
- package/build/dist/Actions/Action/EaseTo.js +69 -0
- package/build/dist/Actions/Action/EaseTo.js.map +1 -0
- package/build/dist/Actions/Action/Fade.js +48 -0
- package/build/dist/Actions/Action/Fade.js.map +1 -0
- package/build/dist/Actions/Action/Follow.js +56 -0
- package/build/dist/Actions/Action/Follow.js.map +1 -0
- package/build/dist/Actions/Action/Meet.js +54 -0
- package/build/dist/Actions/Action/Meet.js.map +1 -0
- package/build/dist/Actions/Action/MoveBy.js +48 -0
- package/build/dist/Actions/Action/MoveBy.js.map +1 -0
- package/build/dist/Actions/Action/MoveTo.js +41 -0
- package/build/dist/Actions/Action/MoveTo.js.map +1 -0
- package/build/dist/Actions/Action/ParallelActions.js +23 -0
- package/build/dist/Actions/Action/ParallelActions.js.map +1 -0
- package/build/dist/Actions/Action/Repeat.js +31 -0
- package/build/dist/Actions/Action/Repeat.js.map +1 -0
- package/build/dist/Actions/Action/RepeatForever.js +37 -0
- package/build/dist/Actions/Action/RepeatForever.js.map +1 -0
- package/build/dist/Actions/Action/RotateBy.js +95 -0
- package/build/dist/Actions/Action/RotateBy.js.map +1 -0
- package/build/dist/Actions/Action/RotateTo.js +91 -0
- package/build/dist/Actions/Action/RotateTo.js.map +1 -0
- package/build/dist/Actions/Action/ScaleBy.js +46 -0
- package/build/dist/Actions/Action/ScaleBy.js.map +1 -0
- package/build/dist/Actions/Action/ScaleTo.js +58 -0
- package/build/dist/Actions/Action/ScaleTo.js.map +1 -0
- package/build/dist/Actions/Action.js +2 -0
- package/build/dist/Actions/Action.js.map +1 -0
- package/build/dist/Actions/ActionContext.js +322 -0
- package/build/dist/Actions/ActionContext.js.map +1 -0
- package/build/dist/Actions/ActionQueue.js +87 -0
- package/build/dist/Actions/ActionQueue.js.map +1 -0
- package/build/dist/Actions/Actionable.js +2 -0
- package/build/dist/Actions/Actionable.js.map +1 -0
- package/build/dist/Actions/ActionsComponent.js +195 -0
- package/build/dist/Actions/ActionsComponent.js.map +1 -0
- package/build/dist/Actions/ActionsSystem.js +30 -0
- package/build/dist/Actions/ActionsSystem.js.map +1 -0
- package/build/dist/Actions/Index.js +26 -0
- package/build/dist/Actions/Index.js.map +1 -0
- package/build/dist/Actions/RotationType.js +27 -0
- package/build/dist/Actions/RotationType.js.map +1 -0
- package/build/dist/Actor.js +629 -0
- package/build/dist/Actor.js.map +1 -0
- package/build/dist/Camera.js +660 -0
- package/build/dist/Camera.js.map +1 -0
- package/build/dist/Collision/BoundingBox.js +415 -0
- package/build/dist/Collision/BoundingBox.js.map +1 -0
- package/build/dist/Collision/ColliderComponent.js +202 -0
- package/build/dist/Collision/ColliderComponent.js.map +1 -0
- package/build/dist/Collision/Colliders/CircleCollider.js +226 -0
- package/build/dist/Collision/Colliders/CircleCollider.js.map +1 -0
- package/build/dist/Collision/Colliders/ClosestLineJumpTable.js +211 -0
- package/build/dist/Collision/Colliders/ClosestLineJumpTable.js.map +1 -0
- package/build/dist/Collision/Colliders/Collider.js +32 -0
- package/build/dist/Collision/Colliders/Collider.js.map +1 -0
- package/build/dist/Collision/Colliders/CollisionJumpTable.js +300 -0
- package/build/dist/Collision/Colliders/CollisionJumpTable.js.map +1 -0
- package/build/dist/Collision/Colliders/EdgeCollider.js +229 -0
- package/build/dist/Collision/Colliders/EdgeCollider.js.map +1 -0
- package/build/dist/Collision/Colliders/PolygonCollider.js +556 -0
- package/build/dist/Collision/Colliders/PolygonCollider.js.map +1 -0
- package/build/dist/Collision/Colliders/SeparatingAxis.js +67 -0
- package/build/dist/Collision/Colliders/SeparatingAxis.js.map +1 -0
- package/build/dist/Collision/Colliders/Shape.js +99 -0
- package/build/dist/Collision/Colliders/Shape.js.map +1 -0
- package/build/dist/Collision/CollisionType.js +33 -0
- package/build/dist/Collision/CollisionType.js.map +1 -0
- package/build/dist/Collision/Detection/CollisionContact.js +51 -0
- package/build/dist/Collision/Detection/CollisionContact.js.map +1 -0
- package/build/dist/Collision/Detection/CollisionProcessor.js +2 -0
- package/build/dist/Collision/Detection/CollisionProcessor.js.map +1 -0
- package/build/dist/Collision/Detection/DynamicTree.js +442 -0
- package/build/dist/Collision/Detection/DynamicTree.js.map +1 -0
- package/build/dist/Collision/Detection/Pair.js +92 -0
- package/build/dist/Collision/Detection/Pair.js.map +1 -0
- package/build/dist/Collision/Detection/QuadTree.js +193 -0
- package/build/dist/Collision/Detection/QuadTree.js.map +1 -0
- package/build/dist/Collision/Group/CollisionGroup.js +3 -3
- package/build/dist/Collision/Integrator.js +25 -0
- package/build/dist/Collision/Integrator.js.map +1 -0
- package/build/dist/Collision/MotionSystem.js +35 -0
- package/build/dist/Collision/MotionSystem.js.map +1 -0
- package/build/dist/Collision/Physics.js +163 -0
- package/build/dist/Collision/Physics.js.map +1 -0
- package/build/dist/Collision/PhysicsWorld.js +10 -0
- package/build/dist/Collision/PhysicsWorld.js.map +1 -0
- package/build/dist/Collision/Side.js +51 -0
- package/build/dist/Collision/Side.js.map +1 -0
- package/build/dist/Collision/Solver/ArcadeSolver.js +154 -0
- package/build/dist/Collision/Solver/ArcadeSolver.js.map +1 -0
- package/build/dist/Collision/Solver/ContactConstraintPoint.js +87 -0
- package/build/dist/Collision/Solver/ContactConstraintPoint.js.map +1 -0
- package/build/dist/Collision/Solver/RealisticSolver.js +293 -0
- package/build/dist/Collision/Solver/RealisticSolver.js.map +1 -0
- package/build/dist/Collision/Solver/Solver.js +2 -0
- package/build/dist/Collision/Solver/Solver.js.map +1 -0
- package/build/dist/Color.js +417 -0
- package/build/dist/Color.js.map +1 -0
- package/build/dist/Configurable.js +32 -0
- package/build/dist/Configurable.js.map +1 -0
- package/build/dist/Debug/Debug.d.ts +11 -0
- package/build/dist/Debug/Debug.js +385 -0
- package/build/dist/Debug/Debug.js.map +1 -0
- package/build/dist/Debug/DebugFlags.js +40 -0
- package/build/dist/Debug/DebugFlags.js.map +1 -0
- package/build/dist/Debug/DebugSystem.js +263 -0
- package/build/dist/Debug/DebugSystem.js.map +1 -0
- package/build/dist/Debug/index.js +4 -0
- package/build/dist/Debug/index.js.map +1 -0
- package/build/dist/Deprecated.js +2 -0
- package/build/dist/Deprecated.js.map +1 -0
- package/build/dist/Engine.js +986 -0
- package/build/dist/Engine.js.map +1 -0
- package/build/dist/EntityComponentSystem/Component.js +65 -0
- package/build/dist/EntityComponentSystem/Component.js.map +1 -0
- package/build/dist/EntityComponentSystem/Components/MotionComponent.js +33 -0
- package/build/dist/EntityComponentSystem/Components/MotionComponent.js.map +1 -0
- package/build/dist/EntityComponentSystem/Components/TransformComponent.js +107 -0
- package/build/dist/EntityComponentSystem/Components/TransformComponent.js.map +1 -0
- package/build/dist/EntityComponentSystem/Entity.js +487 -0
- package/build/dist/EntityComponentSystem/Entity.js.map +1 -0
- package/build/dist/EntityComponentSystem/EntityManager.js +137 -0
- package/build/dist/EntityComponentSystem/EntityManager.js.map +1 -0
- package/build/dist/EntityComponentSystem/Query.js +90 -0
- package/build/dist/EntityComponentSystem/Query.js.map +1 -0
- package/build/dist/EntityComponentSystem/QueryManager.js +90 -0
- package/build/dist/EntityComponentSystem/QueryManager.js.map +1 -0
- package/build/dist/EntityComponentSystem/System.js +76 -0
- package/build/dist/EntityComponentSystem/System.js.map +1 -0
- package/build/dist/EntityComponentSystem/SystemManager.js +104 -0
- package/build/dist/EntityComponentSystem/SystemManager.js.map +1 -0
- package/build/dist/EntityComponentSystem/Util.js +5 -0
- package/build/dist/EntityComponentSystem/Util.js.map +1 -0
- package/build/dist/EntityComponentSystem/World.js +55 -0
- package/build/dist/EntityComponentSystem/World.js.map +1 -0
- package/build/dist/EntityComponentSystem/index.js +11 -0
- package/build/dist/EntityComponentSystem/index.js.map +1 -0
- package/build/dist/EventDispatcher.js +122 -0
- package/build/dist/EventDispatcher.js.map +1 -0
- package/build/dist/EventEmitter.js +86 -0
- package/build/dist/EventEmitter.js.map +1 -0
- package/build/dist/Events/ExEvent.js +12 -0
- package/build/dist/Events/ExEvent.js.map +1 -0
- package/build/dist/Events/MediaEvents.js +75 -0
- package/build/dist/Events/MediaEvents.js.map +1 -0
- package/build/dist/Events/PointerEvents.js +52 -0
- package/build/dist/Events/PointerEvents.js.map +1 -0
- package/build/dist/Events.js +473 -0
- package/build/dist/Events.js.map +1 -0
- package/build/dist/Flags.js +67 -0
- package/build/dist/Flags.js.map +1 -0
- package/build/dist/Graphics/Animation.js +344 -0
- package/build/dist/Graphics/Animation.js.map +1 -0
- package/build/dist/Graphics/Canvas.js +38 -0
- package/build/dist/Graphics/Canvas.js.map +1 -0
- package/build/dist/Graphics/Circle.js +48 -0
- package/build/dist/Graphics/Circle.js.map +1 -0
- package/build/dist/Graphics/Context/ExcaliburGraphicsContext.js +2 -0
- package/build/dist/Graphics/Context/ExcaliburGraphicsContext.js.map +1 -0
- package/build/dist/Graphics/Context/ExcaliburGraphicsContext2DCanvas.js +237 -0
- package/build/dist/Graphics/Context/ExcaliburGraphicsContext2DCanvas.js.map +1 -0
- package/build/dist/Graphics/Context/ExcaliburGraphicsContextWebGL.d.ts +1 -0
- package/build/dist/Graphics/Context/ExcaliburGraphicsContextWebGL.js +481 -0
- package/build/dist/Graphics/Context/ExcaliburGraphicsContextWebGL.js.map +1 -0
- package/build/dist/Graphics/Context/circle-renderer/circle-renderer.frag.glsl +52 -52
- package/build/dist/Graphics/Context/circle-renderer/circle-renderer.js +174 -0
- package/build/dist/Graphics/Context/circle-renderer/circle-renderer.js.map +1 -0
- package/build/dist/Graphics/Context/circle-renderer/circle-renderer.vert.glsl +37 -37
- package/build/dist/Graphics/Context/debug-text.js +47 -0
- package/build/dist/Graphics/Context/debug-text.js.map +1 -0
- package/build/dist/Graphics/Context/draw-call.js +16 -0
- package/build/dist/Graphics/Context/draw-call.js.map +1 -0
- package/build/dist/Graphics/Context/image-renderer/image-renderer.frag.glsl +32 -32
- package/build/dist/Graphics/Context/image-renderer/image-renderer.js +246 -0
- package/build/dist/Graphics/Context/image-renderer/image-renderer.js.map +1 -0
- package/build/dist/Graphics/Context/image-renderer/image-renderer.vert.glsl +32 -32
- package/build/dist/Graphics/Context/line-renderer/line-fragment.glsl +10 -10
- package/build/dist/Graphics/Context/line-renderer/line-renderer.js +90 -0
- package/build/dist/Graphics/Context/line-renderer/line-renderer.js.map +1 -0
- package/build/dist/Graphics/Context/line-renderer/line-vertex.glsl +14 -14
- package/build/dist/Graphics/Context/material-renderer/material-renderer.js +23 -2
- package/build/dist/Graphics/Context/material-renderer/material-renderer.js.map +1 -1
- package/build/dist/Graphics/Context/material.d.ts +2 -0
- package/build/dist/Graphics/Context/material.js +72 -0
- package/build/dist/Graphics/Context/material.js.map +1 -0
- package/build/dist/Graphics/Context/point-renderer/point-fragment.glsl +19 -19
- package/build/dist/Graphics/Context/point-renderer/point-renderer.js +91 -0
- package/build/dist/Graphics/Context/point-renderer/point-renderer.js.map +1 -0
- package/build/dist/Graphics/Context/point-renderer/point-vertex.glsl +11 -11
- package/build/dist/Graphics/Context/quad-index-buffer.js +67 -0
- package/build/dist/Graphics/Context/quad-index-buffer.js.map +1 -0
- package/build/dist/Graphics/Context/rectangle-renderer/rectangle-renderer.frag.glsl +85 -85
- package/build/dist/Graphics/Context/rectangle-renderer/rectangle-renderer.js +305 -0
- package/build/dist/Graphics/Context/rectangle-renderer/rectangle-renderer.js.map +1 -0
- package/build/dist/Graphics/Context/rectangle-renderer/rectangle-renderer.vert.glsl +42 -42
- package/build/dist/Graphics/Context/render-source.js +16 -0
- package/build/dist/Graphics/Context/render-source.js.map +1 -0
- package/build/dist/Graphics/Context/render-target.js +65 -0
- package/build/dist/Graphics/Context/render-target.js.map +1 -0
- package/build/dist/Graphics/Context/renderer.js +2 -0
- package/build/dist/Graphics/Context/renderer.js.map +1 -0
- package/build/dist/Graphics/Context/screen-pass-painter/screen-fragment.glsl +13 -13
- package/build/dist/Graphics/Context/screen-pass-painter/screen-pass-painter.js +56 -0
- package/build/dist/Graphics/Context/screen-pass-painter/screen-pass-painter.js.map +1 -0
- package/build/dist/Graphics/Context/screen-pass-painter/screen-vertex.glsl +11 -11
- package/build/dist/Graphics/Context/state-stack.js +37 -0
- package/build/dist/Graphics/Context/state-stack.js.map +1 -0
- package/build/dist/Graphics/Context/texture-loader.js +109 -0
- package/build/dist/Graphics/Context/texture-loader.js.map +1 -0
- package/build/dist/Graphics/Context/transform-stack.js +30 -0
- package/build/dist/Graphics/Context/transform-stack.js.map +1 -0
- package/build/dist/Graphics/Context/vertex-buffer.js +53 -0
- package/build/dist/Graphics/Context/vertex-buffer.js.map +1 -0
- package/build/dist/Graphics/Context/webgl-util.js +79 -0
- package/build/dist/Graphics/Context/webgl-util.js.map +1 -0
- package/build/dist/Graphics/DebugGraphicsComponent.d.ts +3 -2
- package/build/dist/Graphics/DebugGraphicsComponent.js +16 -0
- package/build/dist/Graphics/DebugGraphicsComponent.js.map +1 -0
- package/build/dist/Graphics/Filtering.js +17 -0
- package/build/dist/Graphics/Filtering.js.map +1 -0
- package/build/dist/Graphics/Font.js +148 -0
- package/build/dist/Graphics/Font.js.map +1 -0
- package/build/dist/Graphics/FontCache.d.ts +1 -0
- package/build/dist/Graphics/FontCache.js +80 -0
- package/build/dist/Graphics/FontCache.js.map +1 -0
- package/build/dist/Graphics/FontCommon.js +109 -0
- package/build/dist/Graphics/FontCommon.js.map +1 -0
- package/build/dist/Graphics/FontTextInstance.js +230 -0
- package/build/dist/Graphics/FontTextInstance.js.map +1 -0
- package/build/dist/Graphics/Graphic.js +208 -0
- package/build/dist/Graphics/Graphic.js.map +1 -0
- package/build/dist/Graphics/GraphicsComponent.js +336 -0
- package/build/dist/Graphics/GraphicsComponent.js.map +1 -0
- package/build/dist/Graphics/GraphicsDiagnostics.js +9 -0
- package/build/dist/Graphics/GraphicsDiagnostics.js.map +1 -0
- package/build/dist/Graphics/GraphicsGroup.js +69 -0
- package/build/dist/Graphics/GraphicsGroup.js.map +1 -0
- package/build/dist/Graphics/GraphicsSystem.js +210 -0
- package/build/dist/Graphics/GraphicsSystem.js.map +1 -0
- package/build/dist/Graphics/ImageSource.js +124 -0
- package/build/dist/Graphics/ImageSource.js.map +1 -0
- package/build/dist/Graphics/Line.js +45 -0
- package/build/dist/Graphics/Line.js.map +1 -0
- package/build/dist/Graphics/OffscreenSystem.js +64 -0
- package/build/dist/Graphics/OffscreenSystem.js.map +1 -0
- package/build/dist/Graphics/ParallaxComponent.js +11 -0
- package/build/dist/Graphics/ParallaxComponent.js.map +1 -0
- package/build/dist/Graphics/Polygon.js +59 -0
- package/build/dist/Graphics/Polygon.js.map +1 -0
- package/build/dist/Graphics/PostProcessor/ColorBlindnessMode.js +7 -0
- package/build/dist/Graphics/PostProcessor/ColorBlindnessMode.js.map +1 -0
- package/build/dist/Graphics/PostProcessor/ColorBlindnessPostProcessor.js +52 -0
- package/build/dist/Graphics/PostProcessor/ColorBlindnessPostProcessor.js.map +1 -0
- package/build/dist/Graphics/PostProcessor/PostProcessor.js +2 -0
- package/build/dist/Graphics/PostProcessor/PostProcessor.js.map +1 -0
- package/build/dist/Graphics/PostProcessor/ScreenShader.js +59 -0
- package/build/dist/Graphics/PostProcessor/ScreenShader.js.map +1 -0
- package/build/dist/Graphics/PostProcessor/color-blind-fragment.glsl +64 -64
- package/build/dist/Graphics/Raster.js +215 -0
- package/build/dist/Graphics/Raster.js.map +1 -0
- package/build/dist/Graphics/Rectangle.js +29 -0
- package/build/dist/Graphics/Rectangle.js.map +1 -0
- package/build/dist/Graphics/Sprite.js +82 -0
- package/build/dist/Graphics/Sprite.js.map +1 -0
- package/build/dist/Graphics/SpriteFont.js +139 -0
- package/build/dist/Graphics/SpriteFont.js.map +1 -0
- package/build/dist/Graphics/SpriteSheet.js +116 -0
- package/build/dist/Graphics/SpriteSheet.js.map +1 -0
- package/build/dist/Graphics/Text.js +103 -0
- package/build/dist/Graphics/Text.js.map +1 -0
- package/build/dist/Graphics/index.js +46 -0
- package/build/dist/Graphics/index.js.map +1 -0
- package/build/dist/Id.js +8 -0
- package/build/dist/Id.js.map +1 -0
- package/build/dist/Input/CapturePointerConfig.js +5 -0
- package/build/dist/Input/CapturePointerConfig.js.map +1 -0
- package/build/dist/Input/EngineInput.js +2 -0
- package/build/dist/Input/EngineInput.js.map +1 -0
- package/build/dist/Input/Gamepad.js +422 -0
- package/build/dist/Input/Gamepad.js.map +1 -0
- package/build/dist/Input/Index.js +88 -0
- package/build/dist/Input/Index.js.map +1 -0
- package/build/dist/Input/InputMapper.js +45 -0
- package/build/dist/Input/InputMapper.js.map +1 -0
- package/build/dist/Input/Keyboard.js +348 -0
- package/build/dist/Input/Keyboard.js.map +1 -0
- package/build/dist/Input/NativePointerButton.js +12 -0
- package/build/dist/Input/NativePointerButton.js.map +1 -0
- package/build/dist/Input/PointerAbstraction.js +44 -0
- package/build/dist/Input/PointerAbstraction.js.map +1 -0
- package/build/dist/Input/PointerButton.js +12 -0
- package/build/dist/Input/PointerButton.js.map +1 -0
- package/build/dist/Input/PointerComponent.js +28 -0
- package/build/dist/Input/PointerComponent.js.map +1 -0
- package/build/dist/Input/PointerEvent.js +25 -0
- package/build/dist/Input/PointerEvent.js.map +1 -0
- package/build/dist/Input/PointerEventReceiver.js +456 -0
- package/build/dist/Input/PointerEventReceiver.js.map +1 -0
- package/build/dist/Input/PointerScope.js +16 -0
- package/build/dist/Input/PointerScope.js.map +1 -0
- package/build/dist/Input/PointerSystem.js +249 -0
- package/build/dist/Input/PointerSystem.js.map +1 -0
- package/build/dist/Input/PointerType.js +11 -0
- package/build/dist/Input/PointerType.js.map +1 -0
- package/build/dist/Input/WheelDeltaMode.js +7 -0
- package/build/dist/Input/WheelDeltaMode.js.map +1 -0
- package/build/dist/Input/WheelEvent.js +21 -0
- package/build/dist/Input/WheelEvent.js.map +1 -0
- package/build/dist/Interfaces/Audio.js +2 -0
- package/build/dist/Interfaces/Audio.js.map +1 -0
- package/build/dist/Interfaces/AudioImplementation.js +11 -0
- package/build/dist/Interfaces/AudioImplementation.js.map +1 -0
- package/build/dist/Interfaces/Clonable.js +2 -0
- package/build/dist/Interfaces/Clonable.js.map +1 -0
- package/build/dist/Interfaces/Evented.js +2 -0
- package/build/dist/Interfaces/Evented.js.map +1 -0
- package/build/dist/Interfaces/Index.js +8 -0
- package/build/dist/Interfaces/Index.js.map +1 -0
- package/build/dist/Interfaces/LifecycleEvents.js +51 -0
- package/build/dist/Interfaces/LifecycleEvents.js.map +1 -0
- package/build/dist/Interfaces/Loadable.js +2 -0
- package/build/dist/Interfaces/Loadable.js.map +1 -0
- package/build/dist/Interfaces/PointerEventHandlers.js +2 -0
- package/build/dist/Interfaces/PointerEventHandlers.js.map +1 -0
- package/build/dist/Label.js +81 -0
- package/build/dist/Label.js.map +1 -0
- package/build/dist/Loader.js +416 -0
- package/build/dist/Loader.js.map +1 -0
- package/build/dist/Math/Index.js +13 -0
- package/build/dist/Math/Index.js.map +1 -0
- package/build/dist/Math/Random.js +239 -0
- package/build/dist/Math/Random.js.map +1 -0
- package/build/dist/Math/affine-matrix.js +331 -0
- package/build/dist/Math/affine-matrix.js.map +1 -0
- package/build/dist/Math/coord-plane.js +17 -0
- package/build/dist/Math/coord-plane.js.map +1 -0
- package/build/dist/Math/global-coordinates.js +30 -0
- package/build/dist/Math/global-coordinates.js.map +1 -0
- package/build/dist/Math/line-segment.js +205 -0
- package/build/dist/Math/line-segment.js.map +1 -0
- package/build/dist/Math/matrix.js +457 -0
- package/build/dist/Math/matrix.js.map +1 -0
- package/build/dist/Math/projection.js +24 -0
- package/build/dist/Math/projection.js.map +1 -0
- package/build/dist/Math/ray.js +52 -0
- package/build/dist/Math/ray.js.map +1 -0
- package/build/dist/Math/transform.js +219 -0
- package/build/dist/Math/transform.js.map +1 -0
- package/build/dist/Math/util.js +82 -0
- package/build/dist/Math/util.js.map +1 -0
- package/build/dist/Math/vector-view.js +25 -0
- package/build/dist/Math/vector-view.js.map +1 -0
- package/build/dist/Math/vector.js +340 -0
- package/build/dist/Math/vector.js.map +1 -0
- package/build/dist/Math/watch-vector.js +26 -0
- package/build/dist/Math/watch-vector.js.map +1 -0
- package/build/dist/Particles.js +430 -0
- package/build/dist/Particles.js.map +1 -0
- package/build/dist/Polyfill.js +56 -0
- package/build/dist/Polyfill.js.map +1 -0
- package/build/dist/Resources/Gif.js +464 -0
- package/build/dist/Resources/Gif.js.map +1 -0
- package/build/dist/Resources/Index.js +4 -0
- package/build/dist/Resources/Index.js.map +1 -0
- package/build/dist/Resources/Resource.js +81 -0
- package/build/dist/Resources/Resource.js.map +1 -0
- package/build/dist/Resources/Sound/AudioContext.js +16 -0
- package/build/dist/Resources/Sound/AudioContext.js.map +1 -0
- package/build/dist/Resources/Sound/Index.js +4 -0
- package/build/dist/Resources/Sound/Index.js.map +1 -0
- package/build/dist/Resources/Sound/Sound.js +326 -0
- package/build/dist/Resources/Sound/Sound.js.map +1 -0
- package/build/dist/Resources/Sound/WebAudioInstance.js +190 -0
- package/build/dist/Resources/Sound/WebAudioInstance.js.map +1 -0
- package/build/dist/Scene.js +444 -0
- package/build/dist/Scene.js.map +1 -0
- package/build/dist/Screen.js +782 -0
- package/build/dist/Screen.js.map +1 -0
- package/build/dist/ScreenElement.js +43 -0
- package/build/dist/ScreenElement.js.map +1 -0
- package/build/dist/TileMap/IsometricEntityComponent.js +17 -0
- package/build/dist/TileMap/IsometricEntityComponent.js.map +1 -0
- package/build/dist/TileMap/IsometricEntitySystem.js +23 -0
- package/build/dist/TileMap/IsometricEntitySystem.js.map +1 -0
- package/build/dist/TileMap/IsometricMap.js +311 -0
- package/build/dist/TileMap/IsometricMap.js.map +1 -0
- package/build/dist/TileMap/TileMap.d.ts +2 -1
- package/build/dist/TileMap/TileMap.js +630 -0
- package/build/dist/TileMap/TileMap.js.map +1 -0
- package/build/dist/TileMap/index.js +5 -0
- package/build/dist/TileMap/index.js.map +1 -0
- package/build/dist/Timer.js +202 -0
- package/build/dist/Timer.js.map +1 -0
- package/build/dist/Trigger.js +94 -0
- package/build/dist/Trigger.js.map +1 -0
- package/build/dist/Util/Browser.js +66 -0
- package/build/dist/Util/Browser.js.map +1 -0
- package/build/dist/Util/Clock.js +219 -0
- package/build/dist/Util/Clock.js.map +1 -0
- package/build/dist/Util/Decorators.js +78 -0
- package/build/dist/Util/Decorators.js.map +1 -0
- package/build/dist/Util/Detector.js +167 -0
- package/build/dist/Util/Detector.js.map +1 -0
- package/build/dist/Util/DrawUtil.js +115 -0
- package/build/dist/Util/DrawUtil.js.map +1 -0
- package/build/dist/Util/EasingFunctions.js +102 -0
- package/build/dist/Util/EasingFunctions.js.map +1 -0
- package/build/dist/Util/Fps.js +47 -0
- package/build/dist/Util/Fps.js.map +1 -0
- package/build/dist/Util/Future.js +30 -0
- package/build/dist/Util/Future.js.map +1 -0
- package/build/dist/Util/IFrame.js +23 -0
- package/build/dist/Util/IFrame.js.map +1 -0
- package/build/dist/Util/Index.js +7 -0
- package/build/dist/Util/Index.js.map +1 -0
- package/build/dist/Util/Log.js +195 -0
- package/build/dist/Util/Log.js.map +1 -0
- package/build/dist/Util/Observable.js +66 -0
- package/build/dist/Util/Observable.js.map +1 -0
- package/build/dist/Util/Pool.js +74 -0
- package/build/dist/Util/Pool.js.map +1 -0
- package/build/dist/Util/Semaphore.js +55 -0
- package/build/dist/Util/Semaphore.js.map +1 -0
- package/build/dist/Util/Sound.js +22 -0
- package/build/dist/Util/Sound.js.map +1 -0
- package/build/dist/Util/StateMachine.js +79 -0
- package/build/dist/Util/StateMachine.js.map +1 -0
- package/build/dist/Util/Toaster.css +28 -28
- package/build/dist/Util/Toaster.js +84 -0
- package/build/dist/Util/Toaster.js.map +1 -0
- package/build/dist/Util/Util.d.ts +6 -0
- package/build/dist/Util/Util.js +95 -0
- package/build/dist/Util/Util.js.map +1 -0
- package/build/dist/Util/Watch.js +67 -0
- package/build/dist/Util/Watch.js.map +1 -0
- package/build/dist/Util/WebAudio.js +62 -0
- package/build/dist/Util/WebAudio.js.map +1 -0
- package/build/dist/excalibur.d.ts +2 -2
- package/build/dist/excalibur.js +389 -258
- package/build/dist/excalibur.js.map +1 -1
- package/build/dist/excalibur.min.js +1 -1
- package/build/dist/excalibur.min.js.LICENSE.txt +1 -1
- package/build/dist/excalibur.min.js.map +1 -1
- package/build/dist/index.js +81 -0
- package/build/dist/index.js.map +1 -0
- package/build/esm/Debug/Debug.d.ts +11 -0
- package/build/esm/Graphics/Context/ExcaliburGraphicsContextWebGL.d.ts +1 -0
- package/build/esm/Graphics/Context/material.d.ts +2 -0
- package/build/esm/Graphics/DebugGraphicsComponent.d.ts +3 -2
- package/build/esm/Graphics/FontCache.d.ts +1 -0
- package/build/esm/TileMap/TileMap.d.ts +2 -1
- package/build/esm/Util/Util.d.ts +6 -0
- package/build/esm/excalibur.d.ts +2 -2
- package/build/esm/excalibur.js +389 -258
- package/build/esm/excalibur.js.map +1 -1
- package/build/esm/excalibur.min.js +1 -1
- package/build/esm/excalibur.min.js.LICENSE.txt +1 -1
- package/build/esm/excalibur.min.js.map +1 -1
- package/docker-compose.yml +11 -11
- package/package.json +131 -131
- package/build/dist/Loader.css +0 -122
- package/build/nuget/Excalibur.0.28.3.nupkg +0 -0
- package/build/v0.28.3.zip +0 -0
- package/excalibur-0.28.3.tgz +0 -0
package/LICENSE.md
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
BSD 2-Clause License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2013, Erik Onarheim
|
|
4
|
-
All rights reserved.
|
|
5
|
-
|
|
6
|
-
Redistribution and use in source and binary forms, with or without
|
|
7
|
-
modification, are permitted provided that the following conditions are met:
|
|
8
|
-
|
|
9
|
-
* Redistributions of source code must retain the above copyright notice, this
|
|
10
|
-
list of conditions and the following disclaimer.
|
|
11
|
-
|
|
12
|
-
* Redistributions in binary form must reproduce the above copyright notice,
|
|
13
|
-
this list of conditions and the following disclaimer in the documentation
|
|
14
|
-
and/or other materials provided with the distribution.
|
|
15
|
-
|
|
16
|
-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
17
|
-
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
18
|
-
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
19
|
-
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
20
|
-
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
21
|
-
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
22
|
-
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
23
|
-
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
24
|
-
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
25
|
-
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
1
|
+
BSD 2-Clause License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2013, Erik Onarheim
|
|
4
|
+
All rights reserved.
|
|
5
|
+
|
|
6
|
+
Redistribution and use in source and binary forms, with or without
|
|
7
|
+
modification, are permitted provided that the following conditions are met:
|
|
8
|
+
|
|
9
|
+
* Redistributions of source code must retain the above copyright notice, this
|
|
10
|
+
list of conditions and the following disclaimer.
|
|
11
|
+
|
|
12
|
+
* Redistributions in binary form must reproduce the above copyright notice,
|
|
13
|
+
this list of conditions and the following disclaimer in the documentation
|
|
14
|
+
and/or other materials provided with the distribution.
|
|
15
|
+
|
|
16
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
17
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
18
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
19
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
20
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
21
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
22
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
23
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
24
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
25
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
package/README.md
CHANGED
|
@@ -1,134 +1,134 @@
|
|
|
1
|
-

|
|
2
|
-
|
|
3
|
-
[](https://ci.appveyor.com/project/eonarheim/excalibur)
|
|
4
|
-
[](https://coveralls.io/github/excaliburjs/Excalibur?branch=main)
|
|
5
|
-
[](https://www.npmjs.com/package/excalibur)
|
|
6
|
-
[](https://www.npmjs.com/package/excalibur)
|
|
7
|
-
[](https://www.nuget.org/packages/Excalibur/)
|
|
8
|
-
|
|
9
|
-

|
|
10
|
-
|
|
11
|
-
Excalibur is a free game engine written in TypeScript for making 2D games in HTML5 canvas. Our goal is to make it easier for you to create 2D HTML/JS games, whether you're new to game development or you're an experienced game developer. We take care of all of the boilerplate engine code, cross-platform targeting (using [browserstack](http://browserstack.com/) 😎), and more! Use as much or as little as you need!
|
|
12
|
-
|
|
13
|
-
Excalibur is an open source project licensed under the 2-clause BSD license (this means you can use it in commercial projects!). It's free and always will be. We welcome any feedback or contributions! If you make something with Excalibur, please [let us know](https://github.com/excaliburjs/Excalibur/discussions?discussions_q=category%3A%22Show+and+tell%22)!
|
|
14
|
-
|
|
15
|
-
# Get Started
|
|
16
|
-
|
|
17
|
-
Our user documentation is at https://excaliburjs.com/docs (and you can contribute to the docs at https://github.com/excaliburjs/excaliburjs.github.io)
|
|
18
|
-
|
|
19
|
-
- Follow our [Installation](https://excaliburjs.com/docs/installation) guide to learn how to install Excalibur.
|
|
20
|
-
- Follow our [Getting Started](https://excaliburjs.com/docs/getting-started) guide if you're looking to get started.
|
|
21
|
-
- Learn what [Features](https://excaliburjs.com/docs) are available for you to leverage in your games.
|
|
22
|
-
- View the [1.0 Release roadmap](https://github.com/excaliburjs/Excalibur/issues/1161) to see what's coming next.
|
|
23
|
-
|
|
24
|
-
:exclamation: **_Note:_** Excalibur is still in version 0.x, which means this project and its associated plugins may be a little rough around the edges. We try to minimize API changes, but breaking changes **will occur** in new released versions. Excalibur is a labor of love and the product of many hours of spare time. Thanks for checking it out!
|
|
25
|
-
|
|
26
|
-
# API Reference
|
|
27
|
-
|
|
28
|
-
Visit the [API Reference](https://excaliburjs.com/docs/api/edge) section for fully-annotated documentation of the API.
|
|
29
|
-
|
|
30
|
-
# Questions
|
|
31
|
-
|
|
32
|
-
- :question: Ask us anything in the [GitHub Discussions area](https://github.com/excaliburjs/Excalibur/discussions).
|
|
33
|
-
- :bug: If you find a bug, report it on the [GitHub issues page](https://github.com/excaliburjs/Excalibur/issues) (please review our [guidelines for reporting bugs](https://github.com/excaliburjs/Excalibur/blob/main/.github/CONTRIBUTING.md#reporting-bugs)).
|
|
34
|
-
- :mega: You can also follow us on Twitter [@excaliburjs](http://twitter.com/excaliburjs) or [read the blog](http://blog.excaliburjs.com).
|
|
35
|
-
|
|
36
|
-
# Samples
|
|
37
|
-
|
|
38
|
-
Compiled examples can be found [in the Excalibur Samples collection](http://excaliburjs.com/samples/).
|
|
39
|
-
|
|
40
|
-
# Contributing
|
|
41
|
-
|
|
42
|
-
Please read our [Contributing Guidelines](.github/CONTRIBUTING.md) and our [Code of Conduct](.github/CODE_OF_CONDUCT.md). Whether you've spotted a bug, have a question, or think of a new feature, we thank you for your help!
|
|
43
|
-
|
|
44
|
-
## Mac
|
|
45
|
-
|
|
46
|
-
Prerequisites
|
|
47
|
-
* Docker for Mac https://docs.docker.com/desktop/mac/install/
|
|
48
|
-
* In the root, run `docker-compose build` (setup build environment and installs dependencies, only needed once)
|
|
49
|
-
* To run tests in watch mode `docker-compose run --rm dev npm run test:watch`
|
|
50
|
-
* To run a build `docker-compose run --rm dev npm run all`
|
|
51
|
-
|
|
52
|
-
# Writing Documentation
|
|
53
|
-
|
|
54
|
-
We love when people help improve our documentation. You can contribute to the docs in [this repository](https://github.com/excaliburjs/excaliburjs.github.io).
|
|
55
|
-
|
|
56
|
-
## Environment Setup
|
|
57
|
-
|
|
58
|
-
The Excalibur.js team primarily uses [Visual Studio Code](http://code.visualstudio.com) as a platform agnostic editor to
|
|
59
|
-
allow the widest contributions possible. However, you can always use your own preferred editor.
|
|
60
|
-
|
|
61
|
-
## Testing
|
|
62
|
-
|
|
63
|
-
[](http://browserstack.com/)
|
|
64
|
-
|
|
65
|
-
Excalibur is committed to supporting the latest 2 versions of popular desktop and mobile browsers. We leverage [browserstack](http://browserstack.com/) automated testing to ensure that Excalibur is automatically tested as thoroughly as possible on all our supported platforms.
|
|
66
|
-
|
|
67
|
-
### Prerequisites
|
|
68
|
-
|
|
69
|
-
- **Required:** [Node.js](https://nodejs.org/) 14.x & npm 6.x
|
|
70
|
-
- _Recommended:_ [Prettier plugin for VS Code](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode)
|
|
71
|
-
- _Recommended:_ [ESLint plugin for VS Code](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint)
|
|
72
|
-
|
|
73
|
-
After cloning the repository, run:
|
|
74
|
-
|
|
75
|
-
```sh
|
|
76
|
-
npm install
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
You can then run the npm tasks for various purposes:
|
|
80
|
-
|
|
81
|
-
```bash
|
|
82
|
-
# Run compilation, linting, and all unit & visual tests
|
|
83
|
-
# Recommend to do this before finalizing pull requests
|
|
84
|
-
npm run all
|
|
85
|
-
|
|
86
|
-
# Run engine core compilation only
|
|
87
|
-
# Useful for quick checks to ensure everything compiles
|
|
88
|
-
npm run build
|
|
89
|
-
|
|
90
|
-
# Run engine tests only (does not run compile task)
|
|
91
|
-
# Useful to run tests ad-hoc
|
|
92
|
-
npm test
|
|
93
|
-
npm run test
|
|
94
|
-
|
|
95
|
-
# Start Storybook-based sandbox
|
|
96
|
-
# Used for creating interactive visual tests and examples for docs
|
|
97
|
-
npm run sandbox
|
|
98
|
-
|
|
99
|
-
# Compile API docs
|
|
100
|
-
npm run apidocs
|
|
101
|
-
|
|
102
|
-
# Build a nuget package and specify a version
|
|
103
|
-
npm run nuget -- 1.1.1
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
# License
|
|
107
|
-
|
|
108
|
-
Excalibur is open source and operates under the 2-clause BSD license:
|
|
109
|
-
|
|
110
|
-
BSD 2-Clause License
|
|
111
|
-
|
|
112
|
-
Copyright (c) 2014, Erik Onarheim
|
|
113
|
-
All rights reserved.
|
|
114
|
-
|
|
115
|
-
Redistribution and use in source and binary forms, with or without
|
|
116
|
-
modification, are permitted provided that the following conditions are met:
|
|
117
|
-
|
|
118
|
-
* Redistributions of source code must retain the above copyright notice, this
|
|
119
|
-
list of conditions and the following disclaimer.
|
|
120
|
-
|
|
121
|
-
* Redistributions in binary form must reproduce the above copyright notice,
|
|
122
|
-
this list of conditions and the following disclaimer in the documentation
|
|
123
|
-
and/or other materials provided with the distribution.
|
|
124
|
-
|
|
125
|
-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
126
|
-
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
127
|
-
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
128
|
-
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
129
|
-
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
130
|
-
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
131
|
-
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
132
|
-
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
133
|
-
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
134
|
-
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
1
|
+

|
|
2
|
+
|
|
3
|
+
[](https://ci.appveyor.com/project/eonarheim/excalibur)
|
|
4
|
+
[](https://coveralls.io/github/excaliburjs/Excalibur?branch=main)
|
|
5
|
+
[](https://www.npmjs.com/package/excalibur)
|
|
6
|
+
[](https://www.npmjs.com/package/excalibur)
|
|
7
|
+
[](https://www.nuget.org/packages/Excalibur/)
|
|
8
|
+
|
|
9
|
+

|
|
10
|
+
|
|
11
|
+
Excalibur is a free game engine written in TypeScript for making 2D games in HTML5 canvas. Our goal is to make it easier for you to create 2D HTML/JS games, whether you're new to game development or you're an experienced game developer. We take care of all of the boilerplate engine code, cross-platform targeting (using [browserstack](http://browserstack.com/) 😎), and more! Use as much or as little as you need!
|
|
12
|
+
|
|
13
|
+
Excalibur is an open source project licensed under the 2-clause BSD license (this means you can use it in commercial projects!). It's free and always will be. We welcome any feedback or contributions! If you make something with Excalibur, please [let us know](https://github.com/excaliburjs/Excalibur/discussions?discussions_q=category%3A%22Show+and+tell%22)!
|
|
14
|
+
|
|
15
|
+
# Get Started
|
|
16
|
+
|
|
17
|
+
Our user documentation is at https://excaliburjs.com/docs (and you can contribute to the docs at https://github.com/excaliburjs/excaliburjs.github.io)
|
|
18
|
+
|
|
19
|
+
- Follow our [Installation](https://excaliburjs.com/docs/installation) guide to learn how to install Excalibur.
|
|
20
|
+
- Follow our [Getting Started](https://excaliburjs.com/docs/getting-started) guide if you're looking to get started.
|
|
21
|
+
- Learn what [Features](https://excaliburjs.com/docs) are available for you to leverage in your games.
|
|
22
|
+
- View the [1.0 Release roadmap](https://github.com/excaliburjs/Excalibur/issues/1161) to see what's coming next.
|
|
23
|
+
|
|
24
|
+
:exclamation: **_Note:_** Excalibur is still in version 0.x, which means this project and its associated plugins may be a little rough around the edges. We try to minimize API changes, but breaking changes **will occur** in new released versions. Excalibur is a labor of love and the product of many hours of spare time. Thanks for checking it out!
|
|
25
|
+
|
|
26
|
+
# API Reference
|
|
27
|
+
|
|
28
|
+
Visit the [API Reference](https://excaliburjs.com/docs/api/edge) section for fully-annotated documentation of the API.
|
|
29
|
+
|
|
30
|
+
# Questions
|
|
31
|
+
|
|
32
|
+
- :question: Ask us anything in the [GitHub Discussions area](https://github.com/excaliburjs/Excalibur/discussions).
|
|
33
|
+
- :bug: If you find a bug, report it on the [GitHub issues page](https://github.com/excaliburjs/Excalibur/issues) (please review our [guidelines for reporting bugs](https://github.com/excaliburjs/Excalibur/blob/main/.github/CONTRIBUTING.md#reporting-bugs)).
|
|
34
|
+
- :mega: You can also follow us on Twitter [@excaliburjs](http://twitter.com/excaliburjs) or [read the blog](http://blog.excaliburjs.com).
|
|
35
|
+
|
|
36
|
+
# Samples
|
|
37
|
+
|
|
38
|
+
Compiled examples can be found [in the Excalibur Samples collection](http://excaliburjs.com/samples/).
|
|
39
|
+
|
|
40
|
+
# Contributing
|
|
41
|
+
|
|
42
|
+
Please read our [Contributing Guidelines](.github/CONTRIBUTING.md) and our [Code of Conduct](.github/CODE_OF_CONDUCT.md). Whether you've spotted a bug, have a question, or think of a new feature, we thank you for your help!
|
|
43
|
+
|
|
44
|
+
## Mac
|
|
45
|
+
|
|
46
|
+
Prerequisites
|
|
47
|
+
* Docker for Mac https://docs.docker.com/desktop/mac/install/
|
|
48
|
+
* In the root, run `docker-compose build` (setup build environment and installs dependencies, only needed once)
|
|
49
|
+
* To run tests in watch mode `docker-compose run --rm dev npm run test:watch`
|
|
50
|
+
* To run a build `docker-compose run --rm dev npm run all`
|
|
51
|
+
|
|
52
|
+
# Writing Documentation
|
|
53
|
+
|
|
54
|
+
We love when people help improve our documentation. You can contribute to the docs in [this repository](https://github.com/excaliburjs/excaliburjs.github.io).
|
|
55
|
+
|
|
56
|
+
## Environment Setup
|
|
57
|
+
|
|
58
|
+
The Excalibur.js team primarily uses [Visual Studio Code](http://code.visualstudio.com) as a platform agnostic editor to
|
|
59
|
+
allow the widest contributions possible. However, you can always use your own preferred editor.
|
|
60
|
+
|
|
61
|
+
## Testing
|
|
62
|
+
|
|
63
|
+
[](http://browserstack.com/)
|
|
64
|
+
|
|
65
|
+
Excalibur is committed to supporting the latest 2 versions of popular desktop and mobile browsers. We leverage [browserstack](http://browserstack.com/) automated testing to ensure that Excalibur is automatically tested as thoroughly as possible on all our supported platforms.
|
|
66
|
+
|
|
67
|
+
### Prerequisites
|
|
68
|
+
|
|
69
|
+
- **Required:** [Node.js](https://nodejs.org/) 14.x & npm 6.x
|
|
70
|
+
- _Recommended:_ [Prettier plugin for VS Code](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode)
|
|
71
|
+
- _Recommended:_ [ESLint plugin for VS Code](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint)
|
|
72
|
+
|
|
73
|
+
After cloning the repository, run:
|
|
74
|
+
|
|
75
|
+
```sh
|
|
76
|
+
npm install
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
You can then run the npm tasks for various purposes:
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
# Run compilation, linting, and all unit & visual tests
|
|
83
|
+
# Recommend to do this before finalizing pull requests
|
|
84
|
+
npm run all
|
|
85
|
+
|
|
86
|
+
# Run engine core compilation only
|
|
87
|
+
# Useful for quick checks to ensure everything compiles
|
|
88
|
+
npm run build
|
|
89
|
+
|
|
90
|
+
# Run engine tests only (does not run compile task)
|
|
91
|
+
# Useful to run tests ad-hoc
|
|
92
|
+
npm test
|
|
93
|
+
npm run test
|
|
94
|
+
|
|
95
|
+
# Start Storybook-based sandbox
|
|
96
|
+
# Used for creating interactive visual tests and examples for docs
|
|
97
|
+
npm run sandbox
|
|
98
|
+
|
|
99
|
+
# Compile API docs
|
|
100
|
+
npm run apidocs
|
|
101
|
+
|
|
102
|
+
# Build a nuget package and specify a version
|
|
103
|
+
npm run nuget -- 1.1.1
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
# License
|
|
107
|
+
|
|
108
|
+
Excalibur is open source and operates under the 2-clause BSD license:
|
|
109
|
+
|
|
110
|
+
BSD 2-Clause License
|
|
111
|
+
|
|
112
|
+
Copyright (c) 2014, Erik Onarheim
|
|
113
|
+
All rights reserved.
|
|
114
|
+
|
|
115
|
+
Redistribution and use in source and binary forms, with or without
|
|
116
|
+
modification, are permitted provided that the following conditions are met:
|
|
117
|
+
|
|
118
|
+
* Redistributions of source code must retain the above copyright notice, this
|
|
119
|
+
list of conditions and the following disclaimer.
|
|
120
|
+
|
|
121
|
+
* Redistributions in binary form must reproduce the above copyright notice,
|
|
122
|
+
this list of conditions and the following disclaimer in the documentation
|
|
123
|
+
and/or other materials provided with the distribution.
|
|
124
|
+
|
|
125
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
126
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
127
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
128
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
129
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
130
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
131
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
132
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
133
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
134
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
package/STYLEGUIDE.md
CHANGED
|
@@ -1,136 +1,136 @@
|
|
|
1
|
-
# Excalibur Style Guide
|
|
2
|
-
|
|
3
|
-
## General Code:
|
|
4
|
-
|
|
5
|
-
#### DO
|
|
6
|
-
|
|
7
|
-
- Prefer readable code over shorter code
|
|
8
|
-
- Prefer code locality over dynamism, code that is related should be near each other
|
|
9
|
-
- Use modern ES features like `const` or `let`
|
|
10
|
-
- Write tests for all new code
|
|
11
|
-
- Provide JSDoc comments on all methods
|
|
12
|
-
|
|
13
|
-
#### CONSIDER
|
|
14
|
-
|
|
15
|
-
- Keeping methods short < 100 lines
|
|
16
|
-
- Using the SOLID principles where possible ([the course by Mark Seemann is good](https://www.pluralsight.com/courses/encapsulation-solid))
|
|
17
|
-
- **S**ingle Responsibility Principle
|
|
18
|
-
- **O**pen-closed Principle
|
|
19
|
-
- **L**iskov substitution principle
|
|
20
|
-
- **I**nterface segregation principle
|
|
21
|
-
- **D**ependency inversion principle
|
|
22
|
-
|
|
23
|
-
#### AVOID
|
|
24
|
-
|
|
25
|
-
- Using `function()`
|
|
26
|
-
|
|
27
|
-
#### DON’T
|
|
28
|
-
|
|
29
|
-
- Use the `var` keyword
|
|
30
|
-
|
|
31
|
-
## Classes:
|
|
32
|
-
|
|
33
|
-
#### DO
|
|
34
|
-
|
|
35
|
-
- Only name things with “Base” if they are an abstract class, or cannot be instantiated normally
|
|
36
|
-
|
|
37
|
-
#### CONSIDER
|
|
38
|
-
|
|
39
|
-
-
|
|
40
|
-
|
|
41
|
-
#### AVOID
|
|
42
|
-
|
|
43
|
-
- Using inheritance, prefer composition when building up types
|
|
44
|
-
- Using the singleton pattern, consider factory or an adapter pattern
|
|
45
|
-
|
|
46
|
-
#### DON’T
|
|
47
|
-
|
|
48
|
-
- Name things with a “Base” if they can be instantiated normally
|
|
49
|
-
|
|
50
|
-
## Methods:
|
|
51
|
-
|
|
52
|
-
#### DO
|
|
53
|
-
|
|
54
|
-
- Have descriptive and verbose parameter names, especially for similar looking methods
|
|
55
|
-
- Use JavaScript getters/setters for things that feel like properties, but have logic behind them
|
|
56
|
-
- Use getters for things that should be strict `readonly` properties
|
|
57
|
-
- Use properties for quantities that have no logic behind them
|
|
58
|
-
- Use methods for commands, performing an action, or making queries
|
|
59
|
-
- Prefer verbs like `show()` or `hide()` for booleans instead of properties like `.isVisible = true`
|
|
60
|
-
- Example: `isDebug` should be `enableDebug()`/`disableDebug()` or `toggleDebug() // returns current mode`
|
|
61
|
-
|
|
62
|
-
#### CONSIDER
|
|
63
|
-
|
|
64
|
-
- Consider `get` or `set` when needing to return non-trivial types or perform non-trivial calculation, for example `getConfiguration()`
|
|
65
|
-
- Shorter descriptive names over longer names
|
|
66
|
-
- Prefer less words over more where appropriate
|
|
67
|
-
- Use option bags for parameters with interface typings, for example
|
|
68
|
-
|
|
69
|
-
```typescript
|
|
70
|
-
export interface EngineOptions { … }
|
|
71
|
-
class Engine {
|
|
72
|
-
constructor(options?: EngineOptions) {
|
|
73
|
-
...
|
|
74
|
-
}
|
|
75
|
-
...
|
|
76
|
-
}
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
#### AVOID
|
|
80
|
-
|
|
81
|
-
- The words `get` or `set` for primitive types like `number` or `string`
|
|
82
|
-
Abbreviations for parameter names
|
|
83
|
-
|
|
84
|
-
#### DON’T
|
|
85
|
-
|
|
86
|
-
- Make parameter lists larger than 3 required parameters `someMethod(parm1, param2, param3, param4)`, use an option bag.
|
|
87
|
-
|
|
88
|
-
## Interfaces:
|
|
89
|
-
|
|
90
|
-
#### DO
|
|
91
|
-
|
|
92
|
-
- Name with a verb suffix “-able” or "-like", for example `Updatable` or `Drawable` except in the case of option bag parameters
|
|
93
|
-
|
|
94
|
-
#### CONSIDER
|
|
95
|
-
|
|
96
|
-
- Keep interfaces short and simple, if they get too large can they be broken into **multiple** interfaces. See the **Interface Segregation Principle**
|
|
97
|
-
|
|
98
|
-
### DON’T
|
|
99
|
-
|
|
100
|
-
- Use an “I” prefix, do not use things like `IDrawable` should be `Drawable`
|
|
101
|
-
|
|
102
|
-
## Enums
|
|
103
|
-
|
|
104
|
-
#### DO
|
|
105
|
-
|
|
106
|
-
- Use `number`ed or `string` enums, preferring `string` enums for more robust type support, robust refactorings, and debuggability at run-time
|
|
107
|
-
|
|
108
|
-
```typescript
|
|
109
|
-
export enum CollisionType {
|
|
110
|
-
/**
|
|
111
|
-
* Actors with the `PreventCollision` setting do not participate in any
|
|
112
|
-
* collisions and do not raise collision events.
|
|
113
|
-
*/
|
|
114
|
-
PreventCollision = 'PreventCollision',
|
|
115
|
-
/**
|
|
116
|
-
* Actors with the `Passive` setting only raise collision events, but are not
|
|
117
|
-
* influenced or moved by other actors and do not influence or move other actors.
|
|
118
|
-
*/
|
|
119
|
-
Passive = 'Passive',
|
|
120
|
-
/**
|
|
121
|
-
* Actors with the `Active` setting raise collision events and participate
|
|
122
|
-
* in collisions with other actors and will be push or moved by actors sharing
|
|
123
|
-
* the `Active` or `Fixed` setting.
|
|
124
|
-
*/
|
|
125
|
-
Active = 'Active',
|
|
126
|
-
/**
|
|
127
|
-
* Actors with the `Fixed` setting raise collision events and participate in
|
|
128
|
-
* collisions with other actors. Actors with the `Fixed` setting will not be
|
|
129
|
-
* pushed or moved by other actors sharing the `Fixed`. Think of Fixed
|
|
130
|
-
* actors as "immovable/unstoppable" objects. If two `Fixed` actors meet they will
|
|
131
|
-
* not be pushed or moved by each other, they will not interact except to throw
|
|
132
|
-
* collision events.
|
|
133
|
-
*/
|
|
134
|
-
Fixed = 'Fixed'
|
|
135
|
-
}
|
|
136
|
-
```
|
|
1
|
+
# Excalibur Style Guide
|
|
2
|
+
|
|
3
|
+
## General Code:
|
|
4
|
+
|
|
5
|
+
#### DO
|
|
6
|
+
|
|
7
|
+
- Prefer readable code over shorter code
|
|
8
|
+
- Prefer code locality over dynamism, code that is related should be near each other
|
|
9
|
+
- Use modern ES features like `const` or `let`
|
|
10
|
+
- Write tests for all new code
|
|
11
|
+
- Provide JSDoc comments on all methods
|
|
12
|
+
|
|
13
|
+
#### CONSIDER
|
|
14
|
+
|
|
15
|
+
- Keeping methods short < 100 lines
|
|
16
|
+
- Using the SOLID principles where possible ([the course by Mark Seemann is good](https://www.pluralsight.com/courses/encapsulation-solid))
|
|
17
|
+
- **S**ingle Responsibility Principle
|
|
18
|
+
- **O**pen-closed Principle
|
|
19
|
+
- **L**iskov substitution principle
|
|
20
|
+
- **I**nterface segregation principle
|
|
21
|
+
- **D**ependency inversion principle
|
|
22
|
+
|
|
23
|
+
#### AVOID
|
|
24
|
+
|
|
25
|
+
- Using `function()`
|
|
26
|
+
|
|
27
|
+
#### DON’T
|
|
28
|
+
|
|
29
|
+
- Use the `var` keyword
|
|
30
|
+
|
|
31
|
+
## Classes:
|
|
32
|
+
|
|
33
|
+
#### DO
|
|
34
|
+
|
|
35
|
+
- Only name things with “Base” if they are an abstract class, or cannot be instantiated normally
|
|
36
|
+
|
|
37
|
+
#### CONSIDER
|
|
38
|
+
|
|
39
|
+
-
|
|
40
|
+
|
|
41
|
+
#### AVOID
|
|
42
|
+
|
|
43
|
+
- Using inheritance, prefer composition when building up types
|
|
44
|
+
- Using the singleton pattern, consider factory or an adapter pattern
|
|
45
|
+
|
|
46
|
+
#### DON’T
|
|
47
|
+
|
|
48
|
+
- Name things with a “Base” if they can be instantiated normally
|
|
49
|
+
|
|
50
|
+
## Methods:
|
|
51
|
+
|
|
52
|
+
#### DO
|
|
53
|
+
|
|
54
|
+
- Have descriptive and verbose parameter names, especially for similar looking methods
|
|
55
|
+
- Use JavaScript getters/setters for things that feel like properties, but have logic behind them
|
|
56
|
+
- Use getters for things that should be strict `readonly` properties
|
|
57
|
+
- Use properties for quantities that have no logic behind them
|
|
58
|
+
- Use methods for commands, performing an action, or making queries
|
|
59
|
+
- Prefer verbs like `show()` or `hide()` for booleans instead of properties like `.isVisible = true`
|
|
60
|
+
- Example: `isDebug` should be `enableDebug()`/`disableDebug()` or `toggleDebug() // returns current mode`
|
|
61
|
+
|
|
62
|
+
#### CONSIDER
|
|
63
|
+
|
|
64
|
+
- Consider `get` or `set` when needing to return non-trivial types or perform non-trivial calculation, for example `getConfiguration()`
|
|
65
|
+
- Shorter descriptive names over longer names
|
|
66
|
+
- Prefer less words over more where appropriate
|
|
67
|
+
- Use option bags for parameters with interface typings, for example
|
|
68
|
+
|
|
69
|
+
```typescript
|
|
70
|
+
export interface EngineOptions { … }
|
|
71
|
+
class Engine {
|
|
72
|
+
constructor(options?: EngineOptions) {
|
|
73
|
+
...
|
|
74
|
+
}
|
|
75
|
+
...
|
|
76
|
+
}
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
#### AVOID
|
|
80
|
+
|
|
81
|
+
- The words `get` or `set` for primitive types like `number` or `string`
|
|
82
|
+
Abbreviations for parameter names
|
|
83
|
+
|
|
84
|
+
#### DON’T
|
|
85
|
+
|
|
86
|
+
- Make parameter lists larger than 3 required parameters `someMethod(parm1, param2, param3, param4)`, use an option bag.
|
|
87
|
+
|
|
88
|
+
## Interfaces:
|
|
89
|
+
|
|
90
|
+
#### DO
|
|
91
|
+
|
|
92
|
+
- Name with a verb suffix “-able” or "-like", for example `Updatable` or `Drawable` except in the case of option bag parameters
|
|
93
|
+
|
|
94
|
+
#### CONSIDER
|
|
95
|
+
|
|
96
|
+
- Keep interfaces short and simple, if they get too large can they be broken into **multiple** interfaces. See the **Interface Segregation Principle**
|
|
97
|
+
|
|
98
|
+
### DON’T
|
|
99
|
+
|
|
100
|
+
- Use an “I” prefix, do not use things like `IDrawable` should be `Drawable`
|
|
101
|
+
|
|
102
|
+
## Enums
|
|
103
|
+
|
|
104
|
+
#### DO
|
|
105
|
+
|
|
106
|
+
- Use `number`ed or `string` enums, preferring `string` enums for more robust type support, robust refactorings, and debuggability at run-time
|
|
107
|
+
|
|
108
|
+
```typescript
|
|
109
|
+
export enum CollisionType {
|
|
110
|
+
/**
|
|
111
|
+
* Actors with the `PreventCollision` setting do not participate in any
|
|
112
|
+
* collisions and do not raise collision events.
|
|
113
|
+
*/
|
|
114
|
+
PreventCollision = 'PreventCollision',
|
|
115
|
+
/**
|
|
116
|
+
* Actors with the `Passive` setting only raise collision events, but are not
|
|
117
|
+
* influenced or moved by other actors and do not influence or move other actors.
|
|
118
|
+
*/
|
|
119
|
+
Passive = 'Passive',
|
|
120
|
+
/**
|
|
121
|
+
* Actors with the `Active` setting raise collision events and participate
|
|
122
|
+
* in collisions with other actors and will be push or moved by actors sharing
|
|
123
|
+
* the `Active` or `Fixed` setting.
|
|
124
|
+
*/
|
|
125
|
+
Active = 'Active',
|
|
126
|
+
/**
|
|
127
|
+
* Actors with the `Fixed` setting raise collision events and participate in
|
|
128
|
+
* collisions with other actors. Actors with the `Fixed` setting will not be
|
|
129
|
+
* pushed or moved by other actors sharing the `Fixed`. Think of Fixed
|
|
130
|
+
* actors as "immovable/unstoppable" objects. If two `Fixed` actors meet they will
|
|
131
|
+
* not be pushed or moved by each other, they will not interact except to throw
|
|
132
|
+
* collision events.
|
|
133
|
+
*/
|
|
134
|
+
Fixed = 'Fixed'
|
|
135
|
+
}
|
|
136
|
+
```
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { ActionContext } from '../ActionContext';
|
|
2
|
+
/**
|
|
3
|
+
* Action that can represent a sequence of actions, this can be useful in conjunction with
|
|
4
|
+
* [[ParallelActions]] to run multiple sequences in parallel.
|
|
5
|
+
*/
|
|
6
|
+
export class ActionSequence {
|
|
7
|
+
constructor(entity, actionBuilder) {
|
|
8
|
+
this._stopped = false;
|
|
9
|
+
this._sequenceBuilder = actionBuilder;
|
|
10
|
+
this._sequenceContext = new ActionContext(entity);
|
|
11
|
+
this._actionQueue = this._sequenceContext.getQueue();
|
|
12
|
+
this._sequenceBuilder(this._sequenceContext);
|
|
13
|
+
}
|
|
14
|
+
update(delta) {
|
|
15
|
+
this._actionQueue.update(delta);
|
|
16
|
+
}
|
|
17
|
+
isComplete() {
|
|
18
|
+
return this._stopped || this._actionQueue.isComplete();
|
|
19
|
+
}
|
|
20
|
+
stop() {
|
|
21
|
+
this._stopped = true;
|
|
22
|
+
}
|
|
23
|
+
reset() {
|
|
24
|
+
this._stopped = false;
|
|
25
|
+
this._actionQueue.reset();
|
|
26
|
+
}
|
|
27
|
+
clone(entity) {
|
|
28
|
+
return new ActionSequence(entity, this._sequenceBuilder);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=ActionSequence.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ActionSequence.js","sourceRoot":"","sources":["../../../../src/engine/Actions/Action/ActionSequence.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAGjD;;;GAGG;AACH,MAAM,OAAO,cAAc;IAKzB,YAAY,MAAc,EAAE,aAAoD;QAHxE,aAAQ,GAAY,KAAK,CAAC;QAIhC,IAAI,CAAC,gBAAgB,GAAG,aAAa,CAAC;QACtC,IAAI,CAAC,gBAAgB,GAAG,IAAI,aAAa,CAAC,MAAM,CAAC,CAAC;QAClD,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,gBAAgB,CAAC,QAAQ,EAAE,CAAC;QACrD,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;IAC/C,CAAC;IAEM,MAAM,CAAC,KAAa;QACzB,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IAClC,CAAC;IAEM,UAAU;QACf,OAAO,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,YAAY,CAAC,UAAU,EAAE,CAAC;IACzD,CAAC;IAEM,IAAI;QACT,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;IACvB,CAAC;IAEM,KAAK;QACV,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;QACtB,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,CAAC;IAC5B,CAAC;IAEM,KAAK,CAAC,MAAc;QACzB,OAAO,IAAI,cAAc,CAAC,MAAM,EAAE,IAAI,CAAC,gBAAgB,CAAC,CAAC;IAC3D,CAAC;CACF"}
|