excalibur 0.25.2 → 0.25.3
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/CHANGELOG.md +7 -2
- package/build/dist/Actions/Action/Blink.js +51 -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 +25 -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/EaseTo.js +69 -0
- package/build/dist/Actions/Action/EaseTo.js.map +1 -0
- package/build/dist/Actions/Action/Fade.js +46 -0
- package/build/dist/Actions/Action/Fade.js.map +1 -0
- package/build/dist/Actions/Action/Follow.js +55 -0
- package/build/dist/Actions/Action/Follow.js.map +1 -0
- package/build/dist/Actions/Action/Meet.js +52 -0
- package/build/dist/Actions/Action/Meet.js.map +1 -0
- package/build/dist/Actions/Action/MoveBy.js +47 -0
- package/build/dist/Actions/Action/MoveBy.js.map +1 -0
- package/build/dist/Actions/Action/MoveTo.js +40 -0
- package/build/dist/Actions/Action/MoveTo.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 +91 -0
- package/build/dist/Actions/Action/RotateBy.js.map +1 -0
- package/build/dist/Actions/Action/RotateTo.js +90 -0
- package/build/dist/Actions/Action/RotateTo.js.map +1 -0
- package/build/dist/Actions/Action/ScaleBy.js +45 -0
- package/build/dist/Actions/Action/ScaleBy.js.map +1 -0
- package/build/dist/Actions/Action/ScaleTo.js +56 -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 +305 -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 +198 -0
- package/build/dist/Actions/ActionsComponent.js.map +1 -0
- package/build/dist/Actions/ActionsSystem.js +18 -0
- package/build/dist/Actions/ActionsSystem.js.map +1 -0
- package/build/dist/Actions/Index.js +22 -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 +831 -0
- package/build/dist/Actor.js.map +1 -0
- package/build/dist/Camera.js +663 -0
- package/build/dist/Camera.js.map +1 -0
- package/build/dist/Class.js +48 -0
- package/build/dist/Class.js.map +1 -0
- package/build/dist/Collision/BodyComponent.js +351 -0
- package/build/dist/Collision/BodyComponent.js.map +1 -0
- package/build/dist/Collision/BoundingBox.js +361 -0
- package/build/dist/Collision/BoundingBox.js.map +1 -0
- package/build/dist/Collision/ColliderComponent.js +198 -0
- package/build/dist/Collision/ColliderComponent.js.map +1 -0
- package/build/dist/Collision/Colliders/CircleCollider.js +264 -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 +26 -0
- package/build/dist/Collision/Colliders/Collider.js.map +1 -0
- package/build/dist/Collision/Colliders/CollisionJumpTable.js +301 -0
- package/build/dist/Collision/Colliders/CollisionJumpTable.js.map +1 -0
- package/build/dist/Collision/Colliders/CompositeCollider.js +232 -0
- package/build/dist/Collision/Colliders/CompositeCollider.js.map +1 -0
- package/build/dist/Collision/Colliders/EdgeCollider.js +253 -0
- package/build/dist/Collision/Colliders/EdgeCollider.js.map +1 -0
- package/build/dist/Collision/Colliders/PolygonCollider.js +389 -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 +102 -0
- package/build/dist/Collision/Colliders/Shape.js.map +1 -0
- package/build/dist/Collision/CollisionSystem.js +116 -0
- package/build/dist/Collision/CollisionSystem.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 +46 -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/DynamicTreeCollisionProcessor.js +211 -0
- package/build/dist/Collision/Detection/DynamicTreeCollisionProcessor.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/Group/CollisionGroup.js +114 -0
- package/build/dist/Collision/Group/CollisionGroup.js.map +1 -0
- package/build/dist/Collision/Group/CollisionGroupManager.js +52 -0
- package/build/dist/Collision/Group/CollisionGroupManager.js.map +1 -0
- package/build/dist/Collision/Index.js +29 -0
- package/build/dist/Collision/Index.js.map +1 -0
- package/build/dist/Collision/Integrator.js +11 -0
- package/build/dist/Collision/Integrator.js.map +1 -0
- package/build/dist/Collision/MotionSystem.js +42 -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/Side.js +51 -0
- package/build/dist/Collision/Side.js.map +1 -0
- package/build/dist/Collision/Solver/ArcadeSolver.js +101 -0
- package/build/dist/Collision/Solver/ArcadeSolver.js.map +1 -0
- package/build/dist/Collision/Solver/ContactConstraintPoint.js +83 -0
- package/build/dist/Collision/Solver/ContactConstraintPoint.js.map +1 -0
- package/build/dist/Collision/Solver/RealisticSolver.js +248 -0
- package/build/dist/Collision/Solver/RealisticSolver.js.map +1 -0
- package/build/dist/Collision/Solver/Solver.js +37 -0
- package/build/dist/Collision/Solver/Solver.js.map +1 -0
- package/build/dist/Color.js +461 -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.js +375 -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 +251 -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/Drawing/Animation.js +294 -0
- package/build/dist/Drawing/Animation.js.map +1 -0
- package/build/dist/Drawing/CanvasDrawComponent.js +16 -0
- package/build/dist/Drawing/CanvasDrawComponent.js.map +1 -0
- package/build/dist/Drawing/CanvasDrawingSystem.js +95 -0
- package/build/dist/Drawing/CanvasDrawingSystem.js.map +1 -0
- package/build/dist/Drawing/Index.js +10 -0
- package/build/dist/Drawing/Index.js.map +1 -0
- package/build/dist/Drawing/Polygon.js +139 -0
- package/build/dist/Drawing/Polygon.js.map +1 -0
- package/build/dist/Drawing/Sprite.js +355 -0
- package/build/dist/Drawing/Sprite.js.map +1 -0
- package/build/dist/Drawing/SpriteEffects.js +246 -0
- package/build/dist/Drawing/SpriteEffects.js.map +1 -0
- package/build/dist/Drawing/SpriteSheet.js +413 -0
- package/build/dist/Drawing/SpriteSheet.js.map +1 -0
- package/build/dist/Drawing/Texture.js +69 -0
- package/build/dist/Drawing/Texture.js.map +1 -0
- package/build/dist/Engine.d.ts +4 -1
- package/build/dist/Engine.js +985 -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 +249 -0
- package/build/dist/EntityComponentSystem/Components/TransformComponent.js.map +1 -0
- package/build/dist/EntityComponentSystem/Entity.js +452 -0
- package/build/dist/EntityComponentSystem/Entity.js.map +1 -0
- package/build/dist/EntityComponentSystem/EntityManager.js +128 -0
- package/build/dist/EntityComponentSystem/EntityManager.js.map +1 -0
- package/build/dist/EntityComponentSystem/Query.js +91 -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 +102 -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 +114 -0
- package/build/dist/EventDispatcher.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 +497 -0
- package/build/dist/Events.js.map +1 -0
- package/build/dist/Flags.js +90 -0
- package/build/dist/Flags.js.map +1 -0
- package/build/dist/Graphics/Animation.js +310 -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 +47 -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 +207 -0
- package/build/dist/Graphics/Context/ExcaliburGraphicsContext2DCanvas.js.map +1 -0
- package/build/dist/Graphics/Context/ExcaliburGraphicsContextWebGL.js +331 -0
- package/build/dist/Graphics/Context/ExcaliburGraphicsContextWebGL.js.map +1 -0
- package/build/dist/Graphics/Context/circle-renderer/circle-renderer.js +160 -0
- package/build/dist/Graphics/Context/circle-renderer/circle-renderer.js.map +1 -0
- 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/image-renderer/image-renderer.js +209 -0
- package/build/dist/Graphics/Context/image-renderer/image-renderer.js.map +1 -0
- package/build/dist/Graphics/Context/line-renderer/line-renderer.js +87 -0
- package/build/dist/Graphics/Context/line-renderer/line-renderer.js.map +1 -0
- package/build/dist/Graphics/Context/point-renderer/point-renderer.js +82 -0
- package/build/dist/Graphics/Context/point-renderer/point-renderer.js.map +1 -0
- package/build/dist/Graphics/Context/quad-index-buffer.js +69 -0
- package/build/dist/Graphics/Context/quad-index-buffer.js.map +1 -0
- package/build/dist/Graphics/Context/rectangle-renderer/rectangle-renderer.js +272 -0
- package/build/dist/Graphics/Context/rectangle-renderer/rectangle-renderer.js.map +1 -0
- 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-pass-painter.js +53 -0
- package/build/dist/Graphics/Context/screen-pass-painter/screen-pass-painter.js.map +1 -0
- package/build/dist/Graphics/Context/shader.js +236 -0
- package/build/dist/Graphics/Context/shader.js.map +1 -0
- package/build/dist/Graphics/Context/state-stack.js +27 -0
- package/build/dist/Graphics/Context/state-stack.js.map +1 -0
- package/build/dist/Graphics/Context/texture-loader.d.ts +8 -0
- package/build/dist/Graphics/Context/texture-loader.js +121 -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 +45 -0
- package/build/dist/Graphics/Context/vertex-buffer.js.map +1 -0
- package/build/dist/Graphics/Context/vertex-layout.js +93 -0
- package/build/dist/Graphics/Context/vertex-layout.js.map +1 -0
- package/build/dist/Graphics/Context/webgl-adapter.js +19 -0
- package/build/dist/Graphics/Context/webgl-adapter.js.map +1 -0
- package/build/dist/Graphics/Context/webgl-util.js +105 -0
- package/build/dist/Graphics/Context/webgl-util.js.map +1 -0
- package/build/dist/Graphics/DebugGraphicsComponent.js +15 -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 +293 -0
- package/build/dist/Graphics/Font.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/Graphic.js +200 -0
- package/build/dist/Graphics/Graphic.js.map +1 -0
- package/build/dist/Graphics/GraphicsComponent.js +290 -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 +153 -0
- package/build/dist/Graphics/GraphicsSystem.js.map +1 -0
- package/build/dist/Graphics/ImageSource.js +116 -0
- package/build/dist/Graphics/ImageSource.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 +56 -0
- package/build/dist/Graphics/PostProcessor/ScreenShader.js.map +1 -0
- package/build/dist/Graphics/Raster.js +207 -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 +103 -0
- package/build/dist/Graphics/Sprite.js.map +1 -0
- package/build/dist/Graphics/SpriteFont.js +120 -0
- package/build/dist/Graphics/SpriteFont.js.map +1 -0
- package/build/dist/Graphics/SpriteSheet.js +115 -0
- package/build/dist/Graphics/SpriteSheet.js.map +1 -0
- package/build/dist/Graphics/Text.js +94 -0
- package/build/dist/Graphics/Text.js.map +1 -0
- package/build/dist/Graphics/index.js +42 -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 +358 -0
- package/build/dist/Input/Gamepad.js.map +1 -0
- package/build/dist/Input/Index.js +22 -0
- package/build/dist/Input/Index.js.map +1 -0
- package/build/dist/Input/Keyboard.js +267 -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 +41 -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 +414 -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 +217 -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/Drawable.js +2 -0
- package/build/dist/Interfaces/Drawable.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 +10 -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/Interfaces/Trait.js +2 -0
- package/build/dist/Interfaces/Trait.js.map +1 -0
- package/build/dist/Label.js +273 -0
- package/build/dist/Label.js.map +1 -0
- package/build/dist/Loader.js +367 -0
- package/build/dist/Loader.js.map +1 -0
- package/build/dist/Math/Index.js +10 -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/global-coordinates.js +30 -0
- package/build/dist/Math/global-coordinates.js.map +1 -0
- package/build/dist/Math/line.js +194 -0
- package/build/dist/Math/line.js.map +1 -0
- package/build/dist/Math/matrix.js +446 -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/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 +326 -0
- package/build/dist/Math/vector.js.map +1 -0
- package/build/dist/Particles.js +449 -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/Promises.js +205 -0
- package/build/dist/Promises.js.map +1 -0
- package/build/dist/Resources/Gif.js +479 -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 +74 -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 +240 -0
- package/build/dist/Resources/Sound/Sound.js.map +1 -0
- package/build/dist/Resources/Sound/WebAudioInstance.js +160 -0
- package/build/dist/Resources/Sound/WebAudioInstance.js.map +1 -0
- package/build/dist/Scene.js +458 -0
- package/build/dist/Scene.js.map +1 -0
- package/build/dist/Screen.js +634 -0
- package/build/dist/Screen.js.map +1 -0
- package/build/dist/ScreenElement.js +29 -0
- package/build/dist/ScreenElement.js.map +1 -0
- package/build/dist/TileMap.js +488 -0
- package/build/dist/TileMap.js.map +1 -0
- package/build/dist/Timer.js +198 -0
- package/build/dist/Timer.js.map +1 -0
- package/build/dist/Traits/Index.js +5 -0
- package/build/dist/Traits/Index.js.map +1 -0
- package/build/dist/Traits/OffscreenCulling.js +35 -0
- package/build/dist/Traits/OffscreenCulling.js.map +1 -0
- package/build/dist/Trigger.js +113 -0
- package/build/dist/Trigger.js.map +1 -0
- package/build/dist/Util/Actors.js +19 -0
- package/build/dist/Util/Actors.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/CullingBox.js +104 -0
- package/build/dist/Util/CullingBox.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 +117 -0
- package/build/dist/Util/DrawUtil.js.map +1 -0
- package/build/dist/Util/EasingFunctions.js +118 -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/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 +60 -0
- package/build/dist/Util/Observable.js.map +1 -0
- package/build/dist/Util/Pool.js +66 -0
- package/build/dist/Util/Pool.js.map +1 -0
- package/build/dist/Util/SortedList.js +261 -0
- package/build/dist/Util/SortedList.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/Util.js +294 -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.js +101 -22
- 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 +74 -0
- package/build/dist/index.js.map +1 -0
- package/build/esm/Engine.d.ts +4 -1
- package/build/esm/Graphics/Context/texture-loader.d.ts +8 -0
- package/build/esm/excalibur.js +101 -22
- 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/package.json +23 -22
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { AudioContextFactory } from '../Resources/Sound/AudioContext';
|
|
2
|
+
import { Logger } from './Log';
|
|
3
|
+
/**
|
|
4
|
+
* Patch for detecting legacy web audio in browsers
|
|
5
|
+
* @internal
|
|
6
|
+
* @param source
|
|
7
|
+
*/
|
|
8
|
+
function isLegacyWebAudioSource(source) {
|
|
9
|
+
return !!source.playbackState;
|
|
10
|
+
}
|
|
11
|
+
export class WebAudio {
|
|
12
|
+
/**
|
|
13
|
+
* Play an empty sound to unlock Safari WebAudio context. Call this function
|
|
14
|
+
* right after a user interaction event.
|
|
15
|
+
* @source https://paulbakaus.com/tutorials/html5/web-audio-on-ios/
|
|
16
|
+
*/
|
|
17
|
+
static unlock() {
|
|
18
|
+
const promise = new Promise((resolve, reject) => {
|
|
19
|
+
if (WebAudio._UNLOCKED || !AudioContextFactory.create()) {
|
|
20
|
+
return resolve(true);
|
|
21
|
+
}
|
|
22
|
+
const unlockTimeoutTimer = setTimeout(() => {
|
|
23
|
+
Logger.getInstance().warn('Excalibur was unable to unlock the audio context, audio probably will not play in this browser.');
|
|
24
|
+
resolve(false);
|
|
25
|
+
}, 200);
|
|
26
|
+
const audioContext = AudioContextFactory.create();
|
|
27
|
+
audioContext.resume().then(() => {
|
|
28
|
+
// create empty buffer and play it
|
|
29
|
+
const buffer = audioContext.createBuffer(1, 1, 22050);
|
|
30
|
+
const source = audioContext.createBufferSource();
|
|
31
|
+
let ended = false;
|
|
32
|
+
source.buffer = buffer;
|
|
33
|
+
source.connect(audioContext.destination);
|
|
34
|
+
source.onended = () => (ended = true);
|
|
35
|
+
source.start(0);
|
|
36
|
+
// by checking the play state after some time, we know if we're really unlocked
|
|
37
|
+
setTimeout(() => {
|
|
38
|
+
if (isLegacyWebAudioSource(source)) {
|
|
39
|
+
if (source.playbackState === source.PLAYING_STATE || source.playbackState === source.FINISHED_STATE) {
|
|
40
|
+
WebAudio._UNLOCKED = true;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
else {
|
|
44
|
+
if (audioContext.currentTime > 0 || ended) {
|
|
45
|
+
WebAudio._UNLOCKED = true;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}, 0);
|
|
49
|
+
clearTimeout(unlockTimeoutTimer);
|
|
50
|
+
resolve(true);
|
|
51
|
+
}, () => {
|
|
52
|
+
reject();
|
|
53
|
+
});
|
|
54
|
+
});
|
|
55
|
+
return promise;
|
|
56
|
+
}
|
|
57
|
+
static isUnlocked() {
|
|
58
|
+
return this._UNLOCKED;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
WebAudio._UNLOCKED = false;
|
|
62
|
+
//# sourceMappingURL=WebAudio.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WebAudio.js","sourceRoot":"","sources":["../../../src/engine/Util/WebAudio.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAQ/B;;;;GAIG;AACH,SAAS,sBAAsB,CAAC,MAAW;IACzC,OAAO,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC;AAChC,CAAC;AAED,MAAM,OAAO,QAAQ;IAGnB;;;;OAIG;IACH,MAAM,CAAC,MAAM;QACX,MAAM,OAAO,GAAG,IAAI,OAAO,CAAU,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YACvD,IAAI,QAAQ,CAAC,SAAS,IAAI,CAAC,mBAAmB,CAAC,MAAM,EAAE,EAAE;gBACvD,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC;aACtB;YACD,MAAM,kBAAkB,GAAG,UAAU,CAAC,GAAG,EAAE;gBACzC,MAAM,CAAC,WAAW,EAAE,CAAC,IAAI,CAAC,iGAAiG,CAAC,CAAC;gBAC7H,OAAO,CAAC,KAAK,CAAC,CAAC;YACjB,CAAC,EAAE,GAAG,CAAC,CAAC;YAER,MAAM,YAAY,GAAG,mBAAmB,CAAC,MAAM,EAAE,CAAC;YAClD,YAAY,CAAC,MAAM,EAAE,CAAC,IAAI,CACxB,GAAG,EAAE;gBACH,kCAAkC;gBAClC,MAAM,MAAM,GAAG,YAAY,CAAC,YAAY,CAAC,CAAC,EAAE,CAAC,EAAE,KAAK,CAAC,CAAC;gBACtD,MAAM,MAAM,GAAG,YAAY,CAAC,kBAAkB,EAAE,CAAC;gBACjD,IAAI,KAAK,GAAG,KAAK,CAAC;gBAElB,MAAM,CAAC,MAAM,GAAG,MAAM,CAAC;gBACvB,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,WAAW,CAAC,CAAC;gBACzC,MAAM,CAAC,OAAO,GAAG,GAAG,EAAE,CAAC,CAAC,KAAK,GAAG,IAAI,CAAC,CAAC;gBAEtC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;gBAEhB,+EAA+E;gBAC/E,UAAU,CAAC,GAAG,EAAE;oBACd,IAAI,sBAAsB,CAAC,MAAM,CAAC,EAAE;wBAClC,IAAI,MAAM,CAAC,aAAa,KAAK,MAAM,CAAC,aAAa,IAAI,MAAM,CAAC,aAAa,KAAK,MAAM,CAAC,cAAc,EAAE;4BACnG,QAAQ,CAAC,SAAS,GAAG,IAAI,CAAC;yBAC3B;qBACF;yBAAM;wBACL,IAAI,YAAY,CAAC,WAAW,GAAG,CAAC,IAAI,KAAK,EAAE;4BACzC,QAAQ,CAAC,SAAS,GAAG,IAAI,CAAC;yBAC3B;qBACF;gBACH,CAAC,EAAE,CAAC,CAAC,CAAC;gBAEN,YAAY,CAAC,kBAAkB,CAAC,CAAC;gBACjC,OAAO,CAAC,IAAI,CAAC,CAAC;YAChB,CAAC,EACD,GAAG,EAAE;gBACH,MAAM,EAAE,CAAC;YACX,CAAC,CACF,CAAC;QACJ,CAAC,CAAC,CAAC;QAEH,OAAO,OAAO,CAAC;IACjB,CAAC;IAED,MAAM,CAAC,UAAU;QACf,OAAO,IAAI,CAAC,SAAS,CAAC;IACxB,CAAC;;AA1Dc,kBAAS,GAAY,KAAK,CAAC"}
|
package/build/dist/excalibur.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* excalibur - 0.25.
|
|
2
|
+
* excalibur - 0.25.3 - 2022-2-5
|
|
3
3
|
* https://github.com/excaliburjs/Excalibur
|
|
4
4
|
* Copyright (c) 2022 Excalibur.js <https://github.com/excaliburjs/Excalibur/graphs/contributors>
|
|
5
5
|
* Licensed BSD-2-Clause
|
|
@@ -546,14 +546,30 @@ module.exports = function (exec) {
|
|
|
546
546
|
};
|
|
547
547
|
|
|
548
548
|
|
|
549
|
+
/***/ }),
|
|
550
|
+
|
|
551
|
+
/***/ 7188:
|
|
552
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
553
|
+
|
|
554
|
+
var fails = __webpack_require__(4229);
|
|
555
|
+
|
|
556
|
+
module.exports = !fails(function () {
|
|
557
|
+
var test = (function () { /* empty */ }).bind();
|
|
558
|
+
// eslint-disable-next-line no-prototype-builtins -- safe
|
|
559
|
+
return typeof test != 'function' || test.hasOwnProperty('prototype');
|
|
560
|
+
});
|
|
561
|
+
|
|
562
|
+
|
|
549
563
|
/***/ }),
|
|
550
564
|
|
|
551
565
|
/***/ 266:
|
|
552
|
-
/***/ ((module) => {
|
|
566
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
567
|
+
|
|
568
|
+
var NATIVE_BIND = __webpack_require__(7188);
|
|
553
569
|
|
|
554
570
|
var call = Function.prototype.call;
|
|
555
571
|
|
|
556
|
-
module.exports =
|
|
572
|
+
module.exports = NATIVE_BIND ? call.bind(call) : function () {
|
|
557
573
|
return call.apply(call, arguments);
|
|
558
574
|
};
|
|
559
575
|
|
|
@@ -585,14 +601,16 @@ module.exports = {
|
|
|
585
601
|
/***/ }),
|
|
586
602
|
|
|
587
603
|
/***/ 5968:
|
|
588
|
-
/***/ ((module) => {
|
|
604
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
605
|
+
|
|
606
|
+
var NATIVE_BIND = __webpack_require__(7188);
|
|
589
607
|
|
|
590
608
|
var FunctionPrototype = Function.prototype;
|
|
591
609
|
var bind = FunctionPrototype.bind;
|
|
592
610
|
var call = FunctionPrototype.call;
|
|
593
|
-
var uncurryThis =
|
|
611
|
+
var uncurryThis = NATIVE_BIND && bind.bind(call, call);
|
|
594
612
|
|
|
595
|
-
module.exports =
|
|
613
|
+
module.exports = NATIVE_BIND ? function (fn) {
|
|
596
614
|
return fn && uncurryThis(fn);
|
|
597
615
|
} : function (fn) {
|
|
598
616
|
return fn && function () {
|
|
@@ -688,7 +706,7 @@ var DESCRIPTORS = __webpack_require__(7400);
|
|
|
688
706
|
var fails = __webpack_require__(4229);
|
|
689
707
|
var createElement = __webpack_require__(2635);
|
|
690
708
|
|
|
691
|
-
//
|
|
709
|
+
// Thanks to IE8 for its funny defineProperty
|
|
692
710
|
module.exports = !DESCRIPTORS && !fails(function () {
|
|
693
711
|
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
694
712
|
return Object.defineProperty(createElement('div'), 'a', {
|
|
@@ -1312,9 +1330,11 @@ var store = __webpack_require__(5353);
|
|
|
1312
1330
|
(module.exports = function (key, value) {
|
|
1313
1331
|
return store[key] || (store[key] = value !== undefined ? value : {});
|
|
1314
1332
|
})('versions', []).push({
|
|
1315
|
-
version: '3.
|
|
1333
|
+
version: '3.21.0',
|
|
1316
1334
|
mode: IS_PURE ? 'pure' : 'global',
|
|
1317
|
-
copyright: '© 2022 Denis Pushkarev (zloirock.ru)'
|
|
1335
|
+
copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',
|
|
1336
|
+
license: 'https://github.com/zloirock/core-js/blob/v3.21.0/LICENSE',
|
|
1337
|
+
source: 'https://github.com/zloirock/core-js'
|
|
1318
1338
|
});
|
|
1319
1339
|
|
|
1320
1340
|
|
|
@@ -5542,12 +5562,14 @@ var ImageFiltering;
|
|
|
5542
5562
|
;// CONCATENATED MODULE: ./Graphics/Context/texture-loader.ts
|
|
5543
5563
|
|
|
5544
5564
|
|
|
5565
|
+
|
|
5545
5566
|
/**
|
|
5546
5567
|
* Manages loading image sources into webgl textures, a unique id is associated with all sources
|
|
5547
5568
|
*/
|
|
5548
5569
|
class TextureLoader {
|
|
5549
5570
|
static register(context) {
|
|
5550
5571
|
TextureLoader._GL = context;
|
|
5572
|
+
TextureLoader._MAX_TEXTURE_SIZE = context.getParameter(context.MAX_TEXTURE_SIZE);
|
|
5551
5573
|
}
|
|
5552
5574
|
/**
|
|
5553
5575
|
* Get the WebGL Texture from a source image
|
|
@@ -5592,6 +5614,7 @@ class TextureLoader {
|
|
|
5592
5614
|
// No texture exists create a new one
|
|
5593
5615
|
tex = gl.createTexture();
|
|
5594
5616
|
const source = TextureLoader.toPowerOfTwoImage(image);
|
|
5617
|
+
TextureLoader.checkImageSizeSupportedAndLog(image);
|
|
5595
5618
|
gl.bindTexture(gl.TEXTURE_2D, tex);
|
|
5596
5619
|
gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, true);
|
|
5597
5620
|
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
|
|
@@ -5623,7 +5646,32 @@ class TextureLoader {
|
|
|
5623
5646
|
}
|
|
5624
5647
|
return image;
|
|
5625
5648
|
}
|
|
5649
|
+
/**
|
|
5650
|
+
* Takes an image and returns if it meets size criteria for hardware
|
|
5651
|
+
* @param image
|
|
5652
|
+
* @returns if the image will be supported at runtime
|
|
5653
|
+
*/
|
|
5654
|
+
static checkImageSizeSupportedAndLog(image) {
|
|
5655
|
+
var _a;
|
|
5656
|
+
const originalSrc = (_a = image.dataset.originalSrc) !== null && _a !== void 0 ? _a : 'internal canvas bitmap';
|
|
5657
|
+
if (image.width > TextureLoader._MAX_TEXTURE_SIZE || image.height > TextureLoader._MAX_TEXTURE_SIZE) {
|
|
5658
|
+
TextureLoader._LOGGER.error(`The image [${originalSrc}] provided to Excalibur is too large for the device's maximum texture size of ` +
|
|
5659
|
+
`(${TextureLoader._MAX_TEXTURE_SIZE}x${TextureLoader._MAX_TEXTURE_SIZE}) please resize to an image `
|
|
5660
|
+
+ `for excalibur to render properly.\n\nImages will likely render as black rectangles.\n\n` +
|
|
5661
|
+
`Read more here: https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API/WebGL_best_practices#understand_system_limits`);
|
|
5662
|
+
return false;
|
|
5663
|
+
}
|
|
5664
|
+
else if (image.width > 4096 || image.height > 4096) {
|
|
5665
|
+
// https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API/WebGL_best_practices#understand_system_limits
|
|
5666
|
+
TextureLoader._LOGGER.warn(`The image [${originalSrc}] provided to excalibur is too large may not work on all mobile devices, ` +
|
|
5667
|
+
`it is recommended you resize images to a maximum (4096x4096).\n\n` +
|
|
5668
|
+
`Images will likely render as black rectangles on some mobile platforms.\n\n` +
|
|
5669
|
+
`Read more here: https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API/WebGL_best_practices#understand_system_limits`);
|
|
5670
|
+
}
|
|
5671
|
+
return true;
|
|
5672
|
+
}
|
|
5626
5673
|
}
|
|
5674
|
+
TextureLoader._LOGGER = Logger.getInstance();
|
|
5627
5675
|
/**
|
|
5628
5676
|
* Sets the default filtering for the Excalibur texture loader, default [[ImageFiltering.Blended]]
|
|
5629
5677
|
*/
|
|
@@ -5631,6 +5679,7 @@ TextureLoader.filtering = ImageFiltering.Blended;
|
|
|
5631
5679
|
TextureLoader._POT_CANVAS = document.createElement('canvas');
|
|
5632
5680
|
TextureLoader._POT_CTX = TextureLoader._POT_CANVAS.getContext('2d');
|
|
5633
5681
|
TextureLoader._TEXTURE_MAP = new Map();
|
|
5682
|
+
TextureLoader._MAX_TEXTURE_SIZE = 0;
|
|
5634
5683
|
|
|
5635
5684
|
;// CONCATENATED MODULE: ./Graphics/Raster.ts
|
|
5636
5685
|
|
|
@@ -7451,6 +7500,7 @@ class ImageSource {
|
|
|
7451
7500
|
// Decode the image
|
|
7452
7501
|
const image = new Image();
|
|
7453
7502
|
image.src = url;
|
|
7503
|
+
image.setAttribute('data-original-src', this.path);
|
|
7454
7504
|
await image.decode();
|
|
7455
7505
|
// Set results
|
|
7456
7506
|
this.data = image;
|
|
@@ -9425,7 +9475,8 @@ class ImageRenderer {
|
|
|
9425
9475
|
this._gl = gl;
|
|
9426
9476
|
this._context = context;
|
|
9427
9477
|
// Transform shader source
|
|
9428
|
-
|
|
9478
|
+
// FIXME: PIXEL 6 complains `ERROR: Expression too complex.` if we use it's reported max texture units, 125 seems to work for now...
|
|
9479
|
+
this._maxTextures = Math.min(gl.getParameter(gl.MAX_TEXTURE_IMAGE_UNITS), 125);
|
|
9429
9480
|
const transformedFrag = this._transformFragmentSource(image_renderer_frag, this._maxTextures);
|
|
9430
9481
|
// Compile shader
|
|
9431
9482
|
this._shader = new Shader({
|
|
@@ -10165,11 +10216,8 @@ class ExcaliburGraphicsContextWebGL {
|
|
|
10165
10216
|
*/
|
|
10166
10217
|
checkIfResolutionSupported(dim) {
|
|
10167
10218
|
// Slight hack based on this thread https://groups.google.com/g/webgl-dev-list/c/AHONvz3oQTo
|
|
10168
|
-
const gl = this.__gl;
|
|
10169
|
-
// If any dimension is greater than max texture size (divide by 4 bytes per pixel)
|
|
10170
|
-
const maxDim = gl.getParameter(gl.MAX_TEXTURE_SIZE) / 4;
|
|
10171
10219
|
let supported = true;
|
|
10172
|
-
if (dim.width >
|
|
10220
|
+
if (dim.width > 4096 || dim.height > 4096) {
|
|
10173
10221
|
supported = false;
|
|
10174
10222
|
}
|
|
10175
10223
|
return supported;
|
|
@@ -14645,7 +14693,7 @@ const CollisionJumpTable = {
|
|
|
14645
14693
|
let normal = separation.axis;
|
|
14646
14694
|
let tangent = normal.perpendicular();
|
|
14647
14695
|
// Point Contact A -> B
|
|
14648
|
-
if (polyB.
|
|
14696
|
+
if (polyB.center.sub(polyA.center).dot(normal) < 0) {
|
|
14649
14697
|
normal = normal.negate();
|
|
14650
14698
|
tangent = normal.perpendicular();
|
|
14651
14699
|
}
|
|
@@ -26352,7 +26400,14 @@ class PointerEventReceiver extends Class {
|
|
|
26352
26400
|
*/
|
|
26353
26401
|
init() {
|
|
26354
26402
|
// Disabling the touch action avoids browser/platform gestures from firing on the canvas
|
|
26355
|
-
|
|
26403
|
+
// It is important on mobile to have touch action 'none'
|
|
26404
|
+
// https://stackoverflow.com/questions/48124372/pointermove-event-not-working-with-touch-why-not
|
|
26405
|
+
if (this.target === this.engine.canvas) {
|
|
26406
|
+
this.engine.canvas.style.touchAction = 'none';
|
|
26407
|
+
}
|
|
26408
|
+
else {
|
|
26409
|
+
document.body.style.touchAction = 'none';
|
|
26410
|
+
}
|
|
26356
26411
|
// Preferred pointer events
|
|
26357
26412
|
if (window.PointerEvent) {
|
|
26358
26413
|
this.target.addEventListener('pointerdown', this._boundHandle);
|
|
@@ -26986,6 +27041,7 @@ class Engine extends Class {
|
|
|
26986
27041
|
this._isReadyPromise = new Promise(resolve => {
|
|
26987
27042
|
this._isReadyResolve = resolve;
|
|
26988
27043
|
});
|
|
27044
|
+
this._screenShotRequests = [];
|
|
26989
27045
|
options = { ...Engine._DEFAULT_ENGINE_OPTIONS, ...options };
|
|
26990
27046
|
Flags.freeze();
|
|
26991
27047
|
// Initialize browser events facade
|
|
@@ -27550,6 +27606,7 @@ O|===|* >________________>\n\
|
|
|
27550
27606
|
// Flush any pending drawings
|
|
27551
27607
|
this.graphicsContext.flush();
|
|
27552
27608
|
this.graphicsContext.endDrawLifecycle();
|
|
27609
|
+
this._checkForScreenShots();
|
|
27553
27610
|
}
|
|
27554
27611
|
/**
|
|
27555
27612
|
* @internal
|
|
@@ -27758,12 +27815,34 @@ O|===|* >________________>\n\
|
|
|
27758
27815
|
/**
|
|
27759
27816
|
* Takes a screen shot of the current viewport and returns it as an
|
|
27760
27817
|
* HTML Image Element.
|
|
27818
|
+
* @param preserveHiDPIResolution in the case of HiDPI return the full scaled backing image, by default false
|
|
27761
27819
|
*/
|
|
27762
|
-
screenshot() {
|
|
27763
|
-
const
|
|
27764
|
-
|
|
27765
|
-
|
|
27766
|
-
return
|
|
27820
|
+
screenshot(preserveHiDPIResolution = false) {
|
|
27821
|
+
const screenShotPromise = new Promise((resolve) => {
|
|
27822
|
+
this._screenShotRequests.push({ preserveHiDPIResolution, resolve });
|
|
27823
|
+
});
|
|
27824
|
+
return screenShotPromise;
|
|
27825
|
+
}
|
|
27826
|
+
_checkForScreenShots() {
|
|
27827
|
+
// We must grab the draw buffer before we yield to the browser
|
|
27828
|
+
// the draw buffer is cleared after compositing
|
|
27829
|
+
// the reason for the asynchrony is setting `preserveDrawingBuffer: true`
|
|
27830
|
+
// forces the browser to copy buffers which can have a mass perf impact on mobile
|
|
27831
|
+
for (const request of this._screenShotRequests) {
|
|
27832
|
+
const finalWidth = request.preserveHiDPIResolution ? this.canvas.width : this.screen.resolution.width;
|
|
27833
|
+
const finalHeight = request.preserveHiDPIResolution ? this.canvas.height : this.screen.resolution.height;
|
|
27834
|
+
const screenshot = document.createElement('canvas');
|
|
27835
|
+
screenshot.width = finalWidth;
|
|
27836
|
+
screenshot.height = finalHeight;
|
|
27837
|
+
const ctx = screenshot.getContext('2d');
|
|
27838
|
+
ctx.drawImage(this.canvas, 0, 0, finalWidth, finalHeight);
|
|
27839
|
+
const result = new Image();
|
|
27840
|
+
const raw = screenshot.toDataURL('image/png');
|
|
27841
|
+
result.src = raw;
|
|
27842
|
+
request.resolve(result);
|
|
27843
|
+
}
|
|
27844
|
+
// Reset state
|
|
27845
|
+
this._screenShotRequests.length = 0;
|
|
27767
27846
|
}
|
|
27768
27847
|
/**
|
|
27769
27848
|
* Another option available to you to load resources into the game.
|
|
@@ -30121,7 +30200,7 @@ Promises_Promise = Promise_1 = Promises_decorate([
|
|
|
30121
30200
|
* The current Excalibur version string
|
|
30122
30201
|
* @description `process.env.__EX_VERSION` gets replaced by Webpack on build
|
|
30123
30202
|
*/
|
|
30124
|
-
const EX_VERSION = "0.25.
|
|
30203
|
+
const EX_VERSION = "0.25.3";
|
|
30125
30204
|
|
|
30126
30205
|
polyfill();
|
|
30127
30206
|
// This file is used as the bundle entry point and exports everything
|