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/build/dist/excalibur.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* excalibur - 0.
|
|
2
|
+
* excalibur - 0.29.0-alpha.2+5c28d4e - 2023-12-22
|
|
3
3
|
* https://github.com/excaliburjs/Excalibur
|
|
4
4
|
* Copyright (c) 2023 Excalibur.js <https://github.com/excaliburjs/Excalibur/graphs/contributors>
|
|
5
5
|
* Licensed BSD-2-Clause
|
|
@@ -34,129 +34,129 @@ return /******/ (() => { // webpackBootstrap
|
|
|
34
34
|
|
|
35
35
|
var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
|
|
36
36
|
// Module
|
|
37
|
-
___CSS_LOADER_EXPORT___.push([module.id, `/* Buttons styles start */
|
|
38
|
-
|
|
39
|
-
button#excalibur-play {
|
|
40
|
-
display: inline-block;
|
|
41
|
-
position: relative;
|
|
42
|
-
z-index: 999;
|
|
43
|
-
border-radius: 6px;
|
|
44
|
-
border: none;
|
|
45
|
-
/*border: 3px solid;
|
|
46
|
-
border-color: white;
|
|
47
|
-
box-shadow: 0 0 10px #ccc;*/
|
|
48
|
-
padding: 1rem 1.5rem 1rem 4rem;
|
|
49
|
-
margin: 0;
|
|
50
|
-
text-decoration: none;
|
|
51
|
-
background: #00b233;
|
|
52
|
-
color: #ffffff;
|
|
53
|
-
font-family: sans-serif;
|
|
54
|
-
font-size: 2rem;
|
|
55
|
-
white-space: nowrap;
|
|
56
|
-
line-height: 1;
|
|
57
|
-
cursor: pointer;
|
|
58
|
-
text-align: center;
|
|
59
|
-
transition: background 250ms ease-in-out, transform 150ms ease;
|
|
60
|
-
-webkit-appearance: none;
|
|
61
|
-
-moz-appearance: none;
|
|
62
|
-
|
|
63
|
-
-webkit-animation: excalibur-button-fadein 200ms; /* Safari, Chrome and Opera > 12.1 */
|
|
64
|
-
-moz-animation: excalibur-button-fadein 200ms; /* Firefox < 16 */
|
|
65
|
-
-ms-animation: excalibur-button-fadein 200ms; /* Internet Explorer */
|
|
66
|
-
-o-animation: excalibur-button-fadein 200ms; /* Opera < 12.1 */
|
|
67
|
-
animation: excalibur-button-fadein 200ms;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
/*
|
|
71
|
-
button#excalibur-play {
|
|
72
|
-
display: none;
|
|
73
|
-
}*/
|
|
74
|
-
|
|
75
|
-
button#excalibur-play:after {
|
|
76
|
-
position: absolute;
|
|
77
|
-
content: '';
|
|
78
|
-
border: 8px solid;
|
|
79
|
-
border-color: transparent transparent transparent white;
|
|
80
|
-
left: 35px;
|
|
81
|
-
top: 24px;
|
|
82
|
-
width: 0;
|
|
83
|
-
height: 0;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
button#excalibur-play:before {
|
|
87
|
-
position: absolute;
|
|
88
|
-
content: '';
|
|
89
|
-
border: 3px solid;
|
|
90
|
-
left: 19px;
|
|
91
|
-
top: 14px;
|
|
92
|
-
border-radius: 20px;
|
|
93
|
-
width: 30px;
|
|
94
|
-
height: 30px;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
button#excalibur-play:hover,
|
|
98
|
-
button#excalibur-play:focus {
|
|
99
|
-
background: #00982c;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
button#excalibur-play:focus {
|
|
103
|
-
outline: 1px solid #fff;
|
|
104
|
-
outline-offset: -4px;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
button#excalibur-play:active {
|
|
108
|
-
transform: scale(0.99);
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
@keyframes excalibur-button-fadein {
|
|
112
|
-
from {
|
|
113
|
-
opacity: 0;
|
|
114
|
-
}
|
|
115
|
-
to {
|
|
116
|
-
opacity: 1;
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
/* Firefox < 16 */
|
|
121
|
-
@-moz-keyframes excalibur-button-fadein {
|
|
122
|
-
from {
|
|
123
|
-
opacity: 0;
|
|
124
|
-
}
|
|
125
|
-
to {
|
|
126
|
-
opacity: 1;
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
/* Safari, Chrome and Opera > 12.1 */
|
|
131
|
-
@-webkit-keyframes excalibur-button-fadein {
|
|
132
|
-
from {
|
|
133
|
-
opacity: 0;
|
|
134
|
-
}
|
|
135
|
-
to {
|
|
136
|
-
opacity: 1;
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
/* Internet Explorer */
|
|
141
|
-
@-ms-keyframes excalibur-button-fadein {
|
|
142
|
-
from {
|
|
143
|
-
opacity: 0;
|
|
144
|
-
}
|
|
145
|
-
to {
|
|
146
|
-
opacity: 1;
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
/* Opera < 12.1 */
|
|
151
|
-
@-o-keyframes excalibur-button-fadein {
|
|
152
|
-
from {
|
|
153
|
-
opacity: 0;
|
|
154
|
-
}
|
|
155
|
-
to {
|
|
156
|
-
opacity: 1;
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
`, "",{"version":3,"sources":["webpack://./Loader.css"],"names":[],"mappings":"AAAA,yBAAyB;;AAEzB;EACE,qBAAqB;EACrB,kBAAkB;EAClB,YAAY;EACZ,kBAAkB;EAClB,YAAY;EACZ;;+BAE6B;EAC7B,8BAA8B;EAC9B,SAAS;EACT,qBAAqB;EACrB,mBAAmB;EACnB,cAAc;EACd,uBAAuB;EACvB,eAAe;EACf,mBAAmB;EACnB,cAAc;EACd,eAAe;EACf,kBAAkB;EAClB,8DAA8D;EAC9D,wBAAwB;EACxB,qBAAqB;;EAErB,gDAAgD,EAAE,oCAAoC;EACtF,6CAA6C,EAAE,iBAAiB;EAChE,4CAA4C,EAAE,sBAAsB;EACpE,2CAA2C,EAAE,iBAAiB;EAC9D,wCAAwC;AAC1C;;AAEA;;;EAGE;;AAEF;EACE,kBAAkB;EAClB,WAAW;EACX,iBAAiB;EACjB,uDAAuD;EACvD,UAAU;EACV,SAAS;EACT,QAAQ;EACR,SAAS;AACX;;AAEA;EACE,kBAAkB;EAClB,WAAW;EACX,iBAAiB;EACjB,UAAU;EACV,SAAS;EACT,mBAAmB;EACnB,WAAW;EACX,YAAY;AACd;;AAEA;;EAEE,mBAAmB;AACrB;;AAEA;EACE,uBAAuB;EACvB,oBAAoB;AACtB;;AAEA;EACE,sBAAsB;AACxB;;AAEA;EACE;IACE,UAAU;EACZ;EACA;IACE,UAAU;EACZ;AACF;;AAEA,iBAAiB;AACjB;EACE;IACE,UAAU;EACZ;EACA;IACE,UAAU;EACZ;AACF;;AAEA,oCAAoC;AACpC;EACE;IACE,UAAU;EACZ;EACA;IACE,UAAU;EACZ;AACF;;AAEA,sBAAsB;AACtB;EACE;IACE,UAAU;EACZ;EACA;IACE,UAAU;EACZ;AACF;;AAEA,iBAAiB;AACjB;EACE;IACE,UAAU;EACZ;EACA;IACE,UAAU;EACZ;AACF","sourcesContent":["/* Buttons styles start */\
|
|
37
|
+
___CSS_LOADER_EXPORT___.push([module.id, `/* Buttons styles start */
|
|
38
|
+
|
|
39
|
+
button#excalibur-play {
|
|
40
|
+
display: inline-block;
|
|
41
|
+
position: relative;
|
|
42
|
+
z-index: 999;
|
|
43
|
+
border-radius: 6px;
|
|
44
|
+
border: none;
|
|
45
|
+
/*border: 3px solid;
|
|
46
|
+
border-color: white;
|
|
47
|
+
box-shadow: 0 0 10px #ccc;*/
|
|
48
|
+
padding: 1rem 1.5rem 1rem 4rem;
|
|
49
|
+
margin: 0;
|
|
50
|
+
text-decoration: none;
|
|
51
|
+
background: #00b233;
|
|
52
|
+
color: #ffffff;
|
|
53
|
+
font-family: sans-serif;
|
|
54
|
+
font-size: 2rem;
|
|
55
|
+
white-space: nowrap;
|
|
56
|
+
line-height: 1;
|
|
57
|
+
cursor: pointer;
|
|
58
|
+
text-align: center;
|
|
59
|
+
transition: background 250ms ease-in-out, transform 150ms ease;
|
|
60
|
+
-webkit-appearance: none;
|
|
61
|
+
-moz-appearance: none;
|
|
62
|
+
|
|
63
|
+
-webkit-animation: excalibur-button-fadein 200ms; /* Safari, Chrome and Opera > 12.1 */
|
|
64
|
+
-moz-animation: excalibur-button-fadein 200ms; /* Firefox < 16 */
|
|
65
|
+
-ms-animation: excalibur-button-fadein 200ms; /* Internet Explorer */
|
|
66
|
+
-o-animation: excalibur-button-fadein 200ms; /* Opera < 12.1 */
|
|
67
|
+
animation: excalibur-button-fadein 200ms;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/*
|
|
71
|
+
button#excalibur-play {
|
|
72
|
+
display: none;
|
|
73
|
+
}*/
|
|
74
|
+
|
|
75
|
+
button#excalibur-play:after {
|
|
76
|
+
position: absolute;
|
|
77
|
+
content: '';
|
|
78
|
+
border: 8px solid;
|
|
79
|
+
border-color: transparent transparent transparent white;
|
|
80
|
+
left: 35px;
|
|
81
|
+
top: 24px;
|
|
82
|
+
width: 0;
|
|
83
|
+
height: 0;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
button#excalibur-play:before {
|
|
87
|
+
position: absolute;
|
|
88
|
+
content: '';
|
|
89
|
+
border: 3px solid;
|
|
90
|
+
left: 19px;
|
|
91
|
+
top: 14px;
|
|
92
|
+
border-radius: 20px;
|
|
93
|
+
width: 30px;
|
|
94
|
+
height: 30px;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
button#excalibur-play:hover,
|
|
98
|
+
button#excalibur-play:focus {
|
|
99
|
+
background: #00982c;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
button#excalibur-play:focus {
|
|
103
|
+
outline: 1px solid #fff;
|
|
104
|
+
outline-offset: -4px;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
button#excalibur-play:active {
|
|
108
|
+
transform: scale(0.99);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
@keyframes excalibur-button-fadein {
|
|
112
|
+
from {
|
|
113
|
+
opacity: 0;
|
|
114
|
+
}
|
|
115
|
+
to {
|
|
116
|
+
opacity: 1;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/* Firefox < 16 */
|
|
121
|
+
@-moz-keyframes excalibur-button-fadein {
|
|
122
|
+
from {
|
|
123
|
+
opacity: 0;
|
|
124
|
+
}
|
|
125
|
+
to {
|
|
126
|
+
opacity: 1;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/* Safari, Chrome and Opera > 12.1 */
|
|
131
|
+
@-webkit-keyframes excalibur-button-fadein {
|
|
132
|
+
from {
|
|
133
|
+
opacity: 0;
|
|
134
|
+
}
|
|
135
|
+
to {
|
|
136
|
+
opacity: 1;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
/* Internet Explorer */
|
|
141
|
+
@-ms-keyframes excalibur-button-fadein {
|
|
142
|
+
from {
|
|
143
|
+
opacity: 0;
|
|
144
|
+
}
|
|
145
|
+
to {
|
|
146
|
+
opacity: 1;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
/* Opera < 12.1 */
|
|
151
|
+
@-o-keyframes excalibur-button-fadein {
|
|
152
|
+
from {
|
|
153
|
+
opacity: 0;
|
|
154
|
+
}
|
|
155
|
+
to {
|
|
156
|
+
opacity: 1;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
`, "",{"version":3,"sources":["webpack://./Loader.css"],"names":[],"mappings":"AAAA,yBAAyB;;AAEzB;EACE,qBAAqB;EACrB,kBAAkB;EAClB,YAAY;EACZ,kBAAkB;EAClB,YAAY;EACZ;;+BAE6B;EAC7B,8BAA8B;EAC9B,SAAS;EACT,qBAAqB;EACrB,mBAAmB;EACnB,cAAc;EACd,uBAAuB;EACvB,eAAe;EACf,mBAAmB;EACnB,cAAc;EACd,eAAe;EACf,kBAAkB;EAClB,8DAA8D;EAC9D,wBAAwB;EACxB,qBAAqB;;EAErB,gDAAgD,EAAE,oCAAoC;EACtF,6CAA6C,EAAE,iBAAiB;EAChE,4CAA4C,EAAE,sBAAsB;EACpE,2CAA2C,EAAE,iBAAiB;EAC9D,wCAAwC;AAC1C;;AAEA;;;EAGE;;AAEF;EACE,kBAAkB;EAClB,WAAW;EACX,iBAAiB;EACjB,uDAAuD;EACvD,UAAU;EACV,SAAS;EACT,QAAQ;EACR,SAAS;AACX;;AAEA;EACE,kBAAkB;EAClB,WAAW;EACX,iBAAiB;EACjB,UAAU;EACV,SAAS;EACT,mBAAmB;EACnB,WAAW;EACX,YAAY;AACd;;AAEA;;EAEE,mBAAmB;AACrB;;AAEA;EACE,uBAAuB;EACvB,oBAAoB;AACtB;;AAEA;EACE,sBAAsB;AACxB;;AAEA;EACE;IACE,UAAU;EACZ;EACA;IACE,UAAU;EACZ;AACF;;AAEA,iBAAiB;AACjB;EACE;IACE,UAAU;EACZ;EACA;IACE,UAAU;EACZ;AACF;;AAEA,oCAAoC;AACpC;EACE;IACE,UAAU;EACZ;EACA;IACE,UAAU;EACZ;AACF;;AAEA,sBAAsB;AACtB;EACE;IACE,UAAU;EACZ;EACA;IACE,UAAU;EACZ;AACF;;AAEA,iBAAiB;AACjB;EACE;IACE,UAAU;EACZ;EACA;IACE,UAAU;EACZ;AACF","sourcesContent":["/* Buttons styles start */\n\nbutton#excalibur-play {\n display: inline-block;\n position: relative;\n z-index: 999;\n border-radius: 6px;\n border: none;\n /*border: 3px solid;\n border-color: white;\n box-shadow: 0 0 10px #ccc;*/\n padding: 1rem 1.5rem 1rem 4rem;\n margin: 0;\n text-decoration: none;\n background: #00b233;\n color: #ffffff;\n font-family: sans-serif;\n font-size: 2rem;\n white-space: nowrap;\n line-height: 1;\n cursor: pointer;\n text-align: center;\n transition: background 250ms ease-in-out, transform 150ms ease;\n -webkit-appearance: none;\n -moz-appearance: none;\n\n -webkit-animation: excalibur-button-fadein 200ms; /* Safari, Chrome and Opera > 12.1 */\n -moz-animation: excalibur-button-fadein 200ms; /* Firefox < 16 */\n -ms-animation: excalibur-button-fadein 200ms; /* Internet Explorer */\n -o-animation: excalibur-button-fadein 200ms; /* Opera < 12.1 */\n animation: excalibur-button-fadein 200ms;\n}\n\n/*\nbutton#excalibur-play {\n display: none;\n}*/\n\nbutton#excalibur-play:after {\n position: absolute;\n content: '';\n border: 8px solid;\n border-color: transparent transparent transparent white;\n left: 35px;\n top: 24px;\n width: 0;\n height: 0;\n}\n\nbutton#excalibur-play:before {\n position: absolute;\n content: '';\n border: 3px solid;\n left: 19px;\n top: 14px;\n border-radius: 20px;\n width: 30px;\n height: 30px;\n}\n\nbutton#excalibur-play:hover,\nbutton#excalibur-play:focus {\n background: #00982c;\n}\n\nbutton#excalibur-play:focus {\n outline: 1px solid #fff;\n outline-offset: -4px;\n}\n\nbutton#excalibur-play:active {\n transform: scale(0.99);\n}\n\n@keyframes excalibur-button-fadein {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n\n/* Firefox < 16 */\n@-moz-keyframes excalibur-button-fadein {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n\n/* Safari, Chrome and Opera > 12.1 */\n@-webkit-keyframes excalibur-button-fadein {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n\n/* Internet Explorer */\n@-ms-keyframes excalibur-button-fadein {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n\n/* Opera < 12.1 */\n@-o-keyframes excalibur-button-fadein {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n"],"sourceRoot":""}]);
|
|
160
160
|
// Exports
|
|
161
161
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
|
|
162
162
|
|
|
@@ -178,35 +178,35 @@ button#excalibur-play:active {
|
|
|
178
178
|
|
|
179
179
|
var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
|
|
180
180
|
// Module
|
|
181
|
-
___CSS_LOADER_EXPORT___.push([module.id, `
|
|
182
|
-
#ex-toast-container {
|
|
183
|
-
position: absolute;
|
|
184
|
-
height: 0;
|
|
185
|
-
min-width: 50%;
|
|
186
|
-
left: 50%;
|
|
187
|
-
top: 0;
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
.ex-toast-message {
|
|
191
|
-
left: -50%;
|
|
192
|
-
position: relative;
|
|
193
|
-
display: flex;
|
|
194
|
-
justify-content: space-between;
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
padding: 10px;
|
|
198
|
-
margin-top: 5px;
|
|
199
|
-
font-size: 18px;
|
|
200
|
-
font-family: sans-serif;
|
|
201
|
-
border-radius: 6px;
|
|
202
|
-
border: 3px solid #b7b779;
|
|
203
|
-
background-color: rgb(253, 253, 192);
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
.ex-toast-message button {
|
|
208
|
-
align-self: flex-start;
|
|
209
|
-
}`, "",{"version":3,"sources":["webpack://./Util/Toaster.css"],"names":[],"mappings":";AACA;EACE,kBAAkB;EAClB,SAAS;EACT,cAAc;EACd,SAAS;EACT,MAAM;AACR;;AAEA;EACE,UAAU;EACV,kBAAkB;EAClB,aAAa;EACb,8BAA8B;;;EAG9B,aAAa;EACb,eAAe;EACf,eAAe;EACf,uBAAuB;EACvB,kBAAkB;EAClB,yBAAyB;EACzB,oCAAoC;AACtC;;;AAGA;EACE,sBAAsB;AACxB","sourcesContent":["\
|
|
181
|
+
___CSS_LOADER_EXPORT___.push([module.id, `
|
|
182
|
+
#ex-toast-container {
|
|
183
|
+
position: absolute;
|
|
184
|
+
height: 0;
|
|
185
|
+
min-width: 50%;
|
|
186
|
+
left: 50%;
|
|
187
|
+
top: 0;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
.ex-toast-message {
|
|
191
|
+
left: -50%;
|
|
192
|
+
position: relative;
|
|
193
|
+
display: flex;
|
|
194
|
+
justify-content: space-between;
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
padding: 10px;
|
|
198
|
+
margin-top: 5px;
|
|
199
|
+
font-size: 18px;
|
|
200
|
+
font-family: sans-serif;
|
|
201
|
+
border-radius: 6px;
|
|
202
|
+
border: 3px solid #b7b779;
|
|
203
|
+
background-color: rgb(253, 253, 192);
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
.ex-toast-message button {
|
|
208
|
+
align-self: flex-start;
|
|
209
|
+
}`, "",{"version":3,"sources":["webpack://./Util/Toaster.css"],"names":[],"mappings":";AACA;EACE,kBAAkB;EAClB,SAAS;EACT,cAAc;EACd,SAAS;EACT,MAAM;AACR;;AAEA;EACE,UAAU;EACV,kBAAkB;EAClB,aAAa;EACb,8BAA8B;;;EAG9B,aAAa;EACb,eAAe;EACf,eAAe;EACf,uBAAuB;EACvB,kBAAkB;EAClB,yBAAyB;EACzB,oCAAoC;AACtC;;;AAGA;EACE,sBAAsB;AACxB","sourcesContent":["\n#ex-toast-container {\n position: absolute;\n height: 0;\n min-width: 50%;\n left: 50%;\n top: 0;\n}\n\n.ex-toast-message {\n left: -50%;\n position: relative;\n display: flex;\n justify-content: space-between;\n\n\n padding: 10px;\n margin-top: 5px;\n font-size: 18px;\n font-family: sans-serif;\n border-radius: 6px;\n border: 3px solid #b7b779;\n background-color: rgb(253, 253, 192);\n}\n\n\n.ex-toast-message button {\n align-self: flex-start;\n}"],"sourceRoot":""}]);
|
|
210
210
|
// Exports
|
|
211
211
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
|
|
212
212
|
|
|
@@ -2704,6 +2704,7 @@ __webpack_require__.d(Util_Index_namespaceObject, {
|
|
|
2704
2704
|
delay: () => (delay),
|
|
2705
2705
|
fail: () => (fail),
|
|
2706
2706
|
getPosition: () => (getPosition),
|
|
2707
|
+
omit: () => (omit),
|
|
2707
2708
|
removeItemFromArray: () => (removeItemFromArray)
|
|
2708
2709
|
});
|
|
2709
2710
|
|
|
@@ -6077,6 +6078,20 @@ function delay(milliseconds, clock) {
|
|
|
6077
6078
|
}, milliseconds);
|
|
6078
6079
|
return future.promise;
|
|
6079
6080
|
}
|
|
6081
|
+
/**
|
|
6082
|
+
* Remove keys from object literals
|
|
6083
|
+
* @param object
|
|
6084
|
+
* @param keys
|
|
6085
|
+
*/
|
|
6086
|
+
function omit(object, keys) {
|
|
6087
|
+
const newObj = {};
|
|
6088
|
+
for (const key in object) {
|
|
6089
|
+
if (!keys.includes(key)) {
|
|
6090
|
+
newObj[key] = object[key];
|
|
6091
|
+
}
|
|
6092
|
+
}
|
|
6093
|
+
return newObj;
|
|
6094
|
+
}
|
|
6080
6095
|
|
|
6081
6096
|
;// CONCATENATED MODULE: ./Math/matrix.ts
|
|
6082
6097
|
|
|
@@ -6527,11 +6542,11 @@ class Matrix {
|
|
|
6527
6542
|
this.data[15] === 1);
|
|
6528
6543
|
}
|
|
6529
6544
|
toString() {
|
|
6530
|
-
return `
|
|
6531
|
-
[${this.data[0]} ${this.data[4]} ${this.data[8]} ${this.data[12]}]
|
|
6532
|
-
[${this.data[1]} ${this.data[5]} ${this.data[9]} ${this.data[13]}]
|
|
6533
|
-
[${this.data[2]} ${this.data[6]} ${this.data[10]} ${this.data[14]}]
|
|
6534
|
-
[${this.data[3]} ${this.data[7]} ${this.data[11]} ${this.data[15]}]
|
|
6545
|
+
return `
|
|
6546
|
+
[${this.data[0]} ${this.data[4]} ${this.data[8]} ${this.data[12]}]
|
|
6547
|
+
[${this.data[1]} ${this.data[5]} ${this.data[9]} ${this.data[13]}]
|
|
6548
|
+
[${this.data[2]} ${this.data[6]} ${this.data[10]} ${this.data[14]}]
|
|
6549
|
+
[${this.data[3]} ${this.data[7]} ${this.data[11]} ${this.data[15]}]
|
|
6535
6550
|
`;
|
|
6536
6551
|
}
|
|
6537
6552
|
}
|
|
@@ -6860,10 +6875,10 @@ class AffineMatrix {
|
|
|
6860
6875
|
return mat;
|
|
6861
6876
|
}
|
|
6862
6877
|
toString() {
|
|
6863
|
-
return `
|
|
6864
|
-
[${this.data[0]} ${this.data[2]} ${this.data[4]}]
|
|
6865
|
-
[${this.data[1]} ${this.data[3]} ${this.data[5]}]
|
|
6866
|
-
[0 0 1]
|
|
6878
|
+
return `
|
|
6879
|
+
[${this.data[0]} ${this.data[2]} ${this.data[4]}]
|
|
6880
|
+
[${this.data[1]} ${this.data[3]} ${this.data[5]}]
|
|
6881
|
+
[0 0 1]
|
|
6867
6882
|
`;
|
|
6868
6883
|
}
|
|
6869
6884
|
}
|
|
@@ -7159,7 +7174,7 @@ class Graphic {
|
|
|
7159
7174
|
this._transformStale = true;
|
|
7160
7175
|
}
|
|
7161
7176
|
constructor(options) {
|
|
7162
|
-
var _a, _b, _c, _d, _e, _f;
|
|
7177
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
7163
7178
|
this.id = Graphic._ID++;
|
|
7164
7179
|
this.transform = AffineMatrix.identity();
|
|
7165
7180
|
this.tint = null;
|
|
@@ -7186,16 +7201,20 @@ class Graphic {
|
|
|
7186
7201
|
this.rotation = (_d = options.rotation) !== null && _d !== void 0 ? _d : this.rotation;
|
|
7187
7202
|
this.opacity = (_e = options.opacity) !== null && _e !== void 0 ? _e : this.opacity;
|
|
7188
7203
|
this.scale = (_f = options.scale) !== null && _f !== void 0 ? _f : this.scale;
|
|
7204
|
+
this.tint = (_g = options.tint) !== null && _g !== void 0 ? _g : this.tint;
|
|
7189
7205
|
}
|
|
7190
7206
|
}
|
|
7191
7207
|
cloneGraphicOptions() {
|
|
7192
7208
|
return {
|
|
7209
|
+
width: this.width / this.scale.x,
|
|
7210
|
+
height: this.height / this.scale.y,
|
|
7193
7211
|
origin: this.origin ? this.origin.clone() : null,
|
|
7194
7212
|
flipHorizontal: this.flipHorizontal,
|
|
7195
7213
|
flipVertical: this.flipVertical,
|
|
7196
7214
|
rotation: this.rotation,
|
|
7197
7215
|
opacity: this.opacity,
|
|
7198
|
-
scale: this.scale ? this.scale.clone() : null
|
|
7216
|
+
scale: this.scale ? this.scale.clone() : null,
|
|
7217
|
+
tint: this.tint ? this.tint.clone() : null
|
|
7199
7218
|
};
|
|
7200
7219
|
}
|
|
7201
7220
|
/**
|
|
@@ -8019,9 +8038,9 @@ class RenderTarget {
|
|
|
8019
8038
|
}
|
|
8020
8039
|
|
|
8021
8040
|
;// CONCATENATED MODULE: ./Graphics/Context/line-renderer/line-vertex.glsl
|
|
8022
|
-
/* harmony default export */ const line_vertex = ("#version 300 es\
|
|
8041
|
+
/* harmony default export */ const line_vertex = ("#version 300 es\nin vec2 a_position;\nin vec4 a_color;\n\nout lowp vec4 v_color;\n\nuniform mat4 u_matrix;\n\nvoid main() {\n // Set the vertex position using the ortho transform matrix\n gl_Position = u_matrix * vec4(a_position, 0.0, 1.0);\n\n // Passthrough the color\n v_color = a_color;\n}");
|
|
8023
8042
|
;// CONCATENATED MODULE: ./Graphics/Context/line-renderer/line-fragment.glsl
|
|
8024
|
-
/* harmony default export */ const line_fragment = ("#version 300 es\
|
|
8043
|
+
/* harmony default export */ const line_fragment = ("#version 300 es\nprecision mediump float;\n\n// Color\nin lowp vec4 v_color;\n\nout vec4 fragColor;\n\nvoid main() {\n fragColor = v_color;\n}");
|
|
8025
8044
|
;// CONCATENATED MODULE: ./Graphics/Context/webgl-util.ts
|
|
8026
8045
|
/**
|
|
8027
8046
|
* Return the size of the GlType in bytes
|
|
@@ -8722,9 +8741,9 @@ class LineRenderer {
|
|
|
8722
8741
|
}
|
|
8723
8742
|
|
|
8724
8743
|
;// CONCATENATED MODULE: ./Graphics/Context/point-renderer/point-vertex.glsl
|
|
8725
|
-
/* harmony default export */ const point_vertex = ("#version 300 es\
|
|
8744
|
+
/* harmony default export */ const point_vertex = ("#version 300 es\nin vec2 a_position;\nin vec4 a_color;\nin float a_size;\nout lowp vec4 v_color;\nuniform mat4 u_matrix;\n\nvoid main() {\n gl_Position = u_matrix * vec4(a_position, 0.0, 1.0);\n gl_PointSize = a_size * 2.0;\n v_color = a_color;\n}");
|
|
8726
8745
|
;// CONCATENATED MODULE: ./Graphics/Context/point-renderer/point-fragment.glsl
|
|
8727
|
-
/* harmony default export */ const point_fragment = ("#version 300 es\
|
|
8746
|
+
/* harmony default export */ const point_fragment = ("#version 300 es\n\nprecision mediump float;\nin lowp vec4 v_color;\n\nout vec4 fragColor;\n\nvoid main() {\n float r = 0.0, delta = 0.0, alpha = 1.0;\n vec2 cxy = 2.0 * gl_PointCoord - 1.0;\n r = dot(cxy, cxy);\n\n delta = fwidth(r);\n alpha = 1.0 - smoothstep(1.0 - delta, 1.0 + delta, r);\n // \"premultiply\" the color by alpha\n vec4 color = v_color;\n color.a = color.a * alpha;\n color.rgb = color.rgb * color.a;\n fragColor = color;\n}");
|
|
8728
8747
|
;// CONCATENATED MODULE: ./Graphics/Context/point-renderer/point-renderer.ts
|
|
8729
8748
|
|
|
8730
8749
|
|
|
@@ -8818,9 +8837,9 @@ class PointRenderer {
|
|
|
8818
8837
|
}
|
|
8819
8838
|
|
|
8820
8839
|
;// CONCATENATED MODULE: ./Graphics/Context/screen-pass-painter/screen-vertex.glsl
|
|
8821
|
-
/* harmony default export */ const screen_vertex = ("#version 300 es\
|
|
8840
|
+
/* harmony default export */ const screen_vertex = ("#version 300 es\nin vec2 a_position;\n\nin vec2 a_texcoord;\nout vec2 v_texcoord;\n\nvoid main() {\n gl_Position = vec4(a_position, 0.0, 1.0);\n\n // Pass the texcoord to the fragment shader.\n v_texcoord = a_texcoord;\n}");
|
|
8822
8841
|
;// CONCATENATED MODULE: ./Graphics/Context/screen-pass-painter/screen-fragment.glsl
|
|
8823
|
-
/* harmony default export */ const screen_fragment = ("#version 300 es\
|
|
8842
|
+
/* harmony default export */ const screen_fragment = ("#version 300 es\nprecision mediump float;\n\n// Passed in from the vertex shader.\nin vec2 v_texcoord;\n\n// The texture.\nuniform sampler2D u_texture;\n\nout vec4 fragColor;\n\nvoid main() {\n fragColor = texture(u_texture, v_texcoord);\n}");
|
|
8824
8843
|
;// CONCATENATED MODULE: ./Graphics/Context/screen-pass-painter/screen-pass-painter.ts
|
|
8825
8844
|
|
|
8826
8845
|
|
|
@@ -8947,9 +8966,9 @@ class QuadIndexBuffer {
|
|
|
8947
8966
|
}
|
|
8948
8967
|
|
|
8949
8968
|
;// CONCATENATED MODULE: ./Graphics/Context/image-renderer/image-renderer.frag.glsl
|
|
8950
|
-
/* harmony default export */ const image_renderer_frag = ("#version 300 es\
|
|
8969
|
+
/* harmony default export */ const image_renderer_frag = ("#version 300 es\nprecision mediump float;\n\n// UV coord\nin vec2 v_texcoord;\n\n// Texture index\nin lowp float v_textureIndex;\n\n// Textures in the current draw\nuniform sampler2D u_textures[%%count%%];\n\n// Opacity\nin float v_opacity;\n\nin vec4 v_tint;\n\nout vec4 fragColor;\n\nvoid main() {\n // In order to support the most efficient sprite batching, we have multiple\n // textures loaded into the gpu (usually 8) this picker logic skips over textures\n // that do not apply to a particular sprite.\n\n vec4 color = vec4(1.0, 0, 0, 1.0);\n\n // GLSL is templated out to pick the right texture and set the vec4 color\n %%texture_picker%%\n\n color.rgb = color.rgb * v_opacity;\n color.a = color.a * v_opacity;\n fragColor = color * v_tint;\n}");
|
|
8951
8970
|
;// CONCATENATED MODULE: ./Graphics/Context/image-renderer/image-renderer.vert.glsl
|
|
8952
|
-
/* harmony default export */ const image_renderer_vert = ("#version 300 es\
|
|
8971
|
+
/* harmony default export */ const image_renderer_vert = ("#version 300 es\nin vec2 a_position;\n\n// Opacity \nin float a_opacity;\nout float v_opacity;\n\n// UV coordinate\nin vec2 a_texcoord;\nout vec2 v_texcoord;\n\n// Texture number\nin lowp float a_textureIndex;\nout lowp float v_textureIndex;\n\nin vec4 a_tint;\nout vec4 v_tint;\n\nuniform mat4 u_matrix;\n\nvoid main() {\n // Set the vertex position using the ortho transform matrix\n gl_Position = u_matrix * vec4(a_position, 0.0, 1.0);\n\n // Pass through the Opacity to the fragment shader\n v_opacity = a_opacity;\n // Pass through the UV coord to the fragment shader\n v_texcoord = a_texcoord;\n // Pass through the texture number to the fragment shader\n v_textureIndex = a_textureIndex;\n // Pass through the tint\n v_tint = a_tint;\n}");
|
|
8953
8972
|
;// CONCATENATED MODULE: ./Graphics/Context/image-renderer/image-renderer.ts
|
|
8954
8973
|
|
|
8955
8974
|
|
|
@@ -9198,9 +9217,9 @@ class ImageRenderer {
|
|
|
9198
9217
|
}
|
|
9199
9218
|
|
|
9200
9219
|
;// CONCATENATED MODULE: ./Graphics/Context/rectangle-renderer/rectangle-renderer.frag.glsl
|
|
9201
|
-
/* harmony default export */ const rectangle_renderer_frag = ("#version 300 es\
|
|
9220
|
+
/* harmony default export */ const rectangle_renderer_frag = ("#version 300 es\n\nprecision mediump float;\n\n// UV coord\nin vec2 v_uv;\n\nin vec2 v_size; // in pixels\n\n// Color coord to blend with image\nin lowp vec4 v_color;\n\n// Stroke color if used\nin lowp vec4 v_strokeColor;\n\n// Stroke thickness if used\nin lowp float v_strokeThickness; // in pixels\n\n// Opacity\nin float v_opacity;\n\nout vec4 fragColor;\n\nvoid main() {\n // modified from https://stackoverflow.com/questions/59197671/glsl-rounded-rectangle-with-variable-border\n vec2 uv = v_uv;\n vec2 fragCoord = uv * v_size;\n float maxX = v_size.x - v_strokeThickness;\n float minX = v_strokeThickness;\n float maxY = v_size.y - v_strokeThickness;\n float minY = v_strokeThickness;\n\n if (fragCoord.x < maxX && fragCoord.x > minX &&\n fragCoord.y < maxY && fragCoord.y > minY) {\n fragColor = v_color;\n } else {\n fragColor = v_strokeColor;\n }\n fragColor.a *= v_opacity;\n fragColor.rgb *= fragColor.a;\n\n // vec2 v2CenteredPos = abs(fragCoord - v_size.xy / 2.0);\n // vec2 v2HalfShapeSizePx = v_size.xy/2.0 - v_strokeThickness/2.0;\n\n // float fHalfBorderDist = 0.0;\n // float fHalfBorderThickness = 0.0;\n\n // if (fragCoord.x > max(v_radius, v_strokeThickness) && \n // fragCoord.x < v_size.x - max(v_radius, v_strokeThickness))\n // {\n // fHalfBorderDist = v2CenteredPos.y - v2HalfShapeSizePx.y;\n // fHalfBorderThickness = v_strokeThickness / 2.0;\n // }\n // else if (fragCoord.y > max(v_radius, v_strokeThickness) && \n // fragCoord.y < v_size.y - max(v_radius, v_strokeThickness))\n // {\n // fHalfBorderDist = v2CenteredPos.x - v2HalfShapeSizePx.x;\n // fHalfBorderThickness = v_strokeThickness / 2.0;\n // }\n // else\n // {\n // vec2 edgeVec = max(vec2(0.0), v_radius - vec2(\n // uv.x > 0.5 ? v_size.x - fragCoord.x : fragCoord.x,\n // uv.y > 0.5 ? v_size.y - fragCoord.y : fragCoord.y));\n \n // float ellipse_ab = v_radius-v_strokeThickness;\n // vec2 ellipse_isect = (v_strokeThickness > v_radius || v_strokeThickness > v_radius) ? vec2(0.0) :\n // edgeVec.xy * ellipse_ab*ellipse_ab / length(ellipse_ab*edgeVec.yx); \n \n // fHalfBorderThickness = (v_radius - length(ellipse_isect)) / 2.0;\n // fHalfBorderDist = length(edgeVec) - (v_radius - fHalfBorderThickness);\n // }\n\n // vec4 v4FromColor = v_strokeColor;\n // v4FromColor.rgb *= v4FromColor.a;\n // vec4 v4ToColor = vec4(0.0); // background color is transparent\n // if (fHalfBorderDist < 0.0) {\n // v4ToColor = v_color;\n // v4ToColor.rgb *= v4ToColor.a;\n // }\n\n // float mixPct = abs(fHalfBorderDist) - fHalfBorderThickness;\n\n // vec4 finalColor = mix(v4FromColor, v4ToColor, mixPct);\n // gl_FragColor = finalColor;\n}");
|
|
9202
9221
|
;// CONCATENATED MODULE: ./Graphics/Context/rectangle-renderer/rectangle-renderer.vert.glsl
|
|
9203
|
-
/* harmony default export */ const rectangle_renderer_vert = ("#version 300 es\
|
|
9222
|
+
/* harmony default export */ const rectangle_renderer_vert = ("#version 300 es\nin vec2 a_position;\n\n// UV coordinate\nin vec2 a_uv;\nout vec2 v_uv;\n\nin vec2 a_size;\nout vec2 v_size;\n\n// Opacity \nin float a_opacity;\nout float v_opacity;\n\nin vec4 a_color;\nout vec4 v_color;\n\nin vec4 a_strokeColor;\nout vec4 v_strokeColor;\n\nin float a_strokeThickness;\nout float v_strokeThickness;\n\nuniform mat4 u_matrix;\n\n\nvoid main() {\n // Set the vertex position using the ortho transform matrix\n gl_Position = u_matrix * vec4(a_position, 0.0, 1.0);\n\n // Pass through UV coords\n v_uv = a_uv;\n // Pass through size\n v_size = a_size;\n // Pass through the Opacity to the fragment shader\n v_opacity = a_opacity;\n // Pass through the color to the fragment shader\n v_color = a_color;\n // Pass through the stroke color to the fragment shader\n v_strokeColor = a_strokeColor;\n // Pass through the stroke thickenss to the fragment shader\n v_strokeThickness = a_strokeThickness;\n}");
|
|
9204
9223
|
;// CONCATENATED MODULE: ./Graphics/Context/rectangle-renderer/rectangle-renderer.ts
|
|
9205
9224
|
|
|
9206
9225
|
|
|
@@ -9508,9 +9527,9 @@ class RectangleRenderer {
|
|
|
9508
9527
|
}
|
|
9509
9528
|
|
|
9510
9529
|
;// CONCATENATED MODULE: ./Graphics/Context/circle-renderer/circle-renderer.frag.glsl
|
|
9511
|
-
/* harmony default export */ const circle_renderer_frag = ("#version 300 es\
|
|
9530
|
+
/* harmony default export */ const circle_renderer_frag = ("#version 300 es\nprecision highp float;\n\n// UV coord\nin vec2 v_uv;\n\n// Color coord to blend with image\nin lowp vec4 v_color;\n\n// Stroke color if used\nin lowp vec4 v_strokeColor;\n\n// Stroke thickness if used\nin lowp float v_strokeThickness;\n\n// Opacity\nin float v_opacity;\n\nout vec4 fragColor;\n\nvoid main() {\n // make (0, 0) the center the uv \n vec2 uv = v_uv * 2.0 - 1.0;\n\n vec4 color = v_color;\n vec4 strokeColor = v_strokeColor;\n\n // circle border is at radius 1.0 \n // dist is > 0 when inside the circle \n float d = length(uv);\n float dist = 1.0 - length(uv);\n\n // Fade based on fwidth\n float fade = fwidth(dot(uv, uv));\n\n // if dist is greater than 0 step to 1;\n // when we cross this 0 threshold add a smooth fade\n float fill = smoothstep(-fade/2.0, fade/2.0, dist);\n\n // if dist is greater than the stroke thickness step to 1\n float stroke = 1.0 - smoothstep(v_strokeThickness, v_strokeThickness + fade, dist);\n\n strokeColor.a *= fill * stroke;\n strokeColor.rgb *= strokeColor.a;\n\n color.a *= fill * (1.0 - stroke);\n color.rgb *= color.a;\n\n vec4 finalColor = mix(vec4(0.0), (color + strokeColor), fill);\n finalColor.rgb = finalColor.rgb * v_opacity;\n finalColor.a = finalColor.a * v_opacity;\n fragColor = finalColor;\n}");
|
|
9512
9531
|
;// CONCATENATED MODULE: ./Graphics/Context/circle-renderer/circle-renderer.vert.glsl
|
|
9513
|
-
/* harmony default export */ const circle_renderer_vert = ("#version 300 es\
|
|
9532
|
+
/* harmony default export */ const circle_renderer_vert = ("#version 300 es\nin vec2 a_position;\n\n// UV coordinate\nin vec2 a_uv;\nout vec2 v_uv;\n\n// Opacity \nin float a_opacity;\nout float v_opacity;\n\nin vec4 a_color;\nout vec4 v_color;\n\nin vec4 a_strokeColor;\nout vec4 v_strokeColor;\n\nin float a_strokeThickness;\nout float v_strokeThickness;\n\nuniform mat4 u_matrix;\n\n\nvoid main() {\n // Set the vertex position using the ortho transform matrix\n gl_Position = u_matrix * vec4(a_position, 0.0, 1.0);\n\n // Pass through UV coords\n v_uv = a_uv;\n // Pass through the Opacity to the fragment shader\n v_opacity = a_opacity;\n // Pass through the color to the fragment shader\n v_color = a_color;\n // Pass through the stroke color to the fragment shader\n v_strokeColor = a_strokeColor;\n // Pass through the stroke thickenss to the fragment shader\n v_strokeThickness = a_strokeThickness;\n}");
|
|
9514
9533
|
;// CONCATENATED MODULE: ./Graphics/Context/circle-renderer/circle-renderer.ts
|
|
9515
9534
|
|
|
9516
9535
|
|
|
@@ -9780,22 +9799,26 @@ class DrawCall {
|
|
|
9780
9799
|
|
|
9781
9800
|
;// CONCATENATED MODULE: ./Graphics/Context/material.ts
|
|
9782
9801
|
|
|
9783
|
-
const defaultVertexSource = `#version 300 es
|
|
9784
|
-
in vec2 a_position;
|
|
9785
|
-
|
|
9786
|
-
in vec2 a_uv;
|
|
9787
|
-
out vec2 v_uv;
|
|
9788
|
-
|
|
9789
|
-
|
|
9790
|
-
|
|
9791
|
-
|
|
9792
|
-
|
|
9793
|
-
|
|
9794
|
-
|
|
9795
|
-
|
|
9796
|
-
//
|
|
9797
|
-
|
|
9798
|
-
|
|
9802
|
+
const defaultVertexSource = `#version 300 es
|
|
9803
|
+
in vec2 a_position;
|
|
9804
|
+
|
|
9805
|
+
in vec2 a_uv;
|
|
9806
|
+
out vec2 v_uv;
|
|
9807
|
+
|
|
9808
|
+
in vec2 a_screenuv;
|
|
9809
|
+
out vec2 v_screenuv;
|
|
9810
|
+
|
|
9811
|
+
uniform mat4 u_matrix;
|
|
9812
|
+
uniform mat4 u_transform;
|
|
9813
|
+
|
|
9814
|
+
void main() {
|
|
9815
|
+
// Set the vertex position using the ortho & transform matrix
|
|
9816
|
+
gl_Position = u_matrix * u_transform * vec4(a_position, 0.0, 1.0);
|
|
9817
|
+
|
|
9818
|
+
// Pass through the UV coord to the fragment shader
|
|
9819
|
+
v_uv = a_uv;
|
|
9820
|
+
v_screenuv = a_screenuv;
|
|
9821
|
+
}
|
|
9799
9822
|
`;
|
|
9800
9823
|
class Material {
|
|
9801
9824
|
constructor(options) {
|
|
@@ -9822,6 +9845,15 @@ class Material {
|
|
|
9822
9845
|
var _a;
|
|
9823
9846
|
return (_a = this._name) !== null && _a !== void 0 ? _a : 'anonymous material';
|
|
9824
9847
|
}
|
|
9848
|
+
get isUsingScreenTexture() {
|
|
9849
|
+
return this._fragmentSource.includes('u_screen_texture');
|
|
9850
|
+
}
|
|
9851
|
+
update(callback) {
|
|
9852
|
+
if (this._shader) {
|
|
9853
|
+
this._shader.use();
|
|
9854
|
+
callback(this._shader);
|
|
9855
|
+
}
|
|
9856
|
+
}
|
|
9825
9857
|
getShader() {
|
|
9826
9858
|
return this._shader;
|
|
9827
9859
|
}
|
|
@@ -9857,7 +9889,7 @@ class MaterialRenderer {
|
|
|
9857
9889
|
// Setup memory layout
|
|
9858
9890
|
this._buffer = new VertexBuffer({
|
|
9859
9891
|
gl,
|
|
9860
|
-
size:
|
|
9892
|
+
size: 6 * 4, // 6 components * 4 verts
|
|
9861
9893
|
type: 'dynamic'
|
|
9862
9894
|
});
|
|
9863
9895
|
// Setup a vertex layout/buffer to the material
|
|
@@ -9866,7 +9898,8 @@ class MaterialRenderer {
|
|
|
9866
9898
|
vertexBuffer: this._buffer,
|
|
9867
9899
|
attributes: [
|
|
9868
9900
|
['a_position', 2],
|
|
9869
|
-
['a_uv', 2]
|
|
9901
|
+
['a_uv', 2],
|
|
9902
|
+
['a_screenuv', 2]
|
|
9870
9903
|
]
|
|
9871
9904
|
});
|
|
9872
9905
|
// Setup index buffer
|
|
@@ -9912,26 +9945,40 @@ class MaterialRenderer {
|
|
|
9912
9945
|
const uvy0 = (sy) / imageHeight;
|
|
9913
9946
|
const uvx1 = (sx + sw - 0.01) / imageWidth;
|
|
9914
9947
|
const uvy1 = (sy + sh - 0.01) / imageHeight;
|
|
9948
|
+
const topLeftScreen = transform.getPosition();
|
|
9949
|
+
const bottomRightScreen = topLeftScreen.add(bottomRight);
|
|
9950
|
+
const screenUVX0 = topLeftScreen.x / this._context.width;
|
|
9951
|
+
const screenUVY0 = topLeftScreen.y / this._context.height;
|
|
9952
|
+
const screenUVX1 = bottomRightScreen.x / this._context.width;
|
|
9953
|
+
const screenUVY1 = bottomRightScreen.y / this._context.height;
|
|
9915
9954
|
// (0, 0) - 0
|
|
9916
9955
|
vertexBuffer[vertexIndex++] = topLeft.x;
|
|
9917
9956
|
vertexBuffer[vertexIndex++] = topLeft.y;
|
|
9918
9957
|
vertexBuffer[vertexIndex++] = uvx0;
|
|
9919
9958
|
vertexBuffer[vertexIndex++] = uvy0;
|
|
9959
|
+
vertexBuffer[vertexIndex++] = screenUVX0;
|
|
9960
|
+
vertexBuffer[vertexIndex++] = screenUVY0;
|
|
9920
9961
|
// (0, 1) - 1
|
|
9921
9962
|
vertexBuffer[vertexIndex++] = bottomLeft.x;
|
|
9922
9963
|
vertexBuffer[vertexIndex++] = bottomLeft.y;
|
|
9923
9964
|
vertexBuffer[vertexIndex++] = uvx0;
|
|
9924
9965
|
vertexBuffer[vertexIndex++] = uvy1;
|
|
9966
|
+
vertexBuffer[vertexIndex++] = screenUVX0;
|
|
9967
|
+
vertexBuffer[vertexIndex++] = screenUVY1;
|
|
9925
9968
|
// (1, 0) - 2
|
|
9926
9969
|
vertexBuffer[vertexIndex++] = topRight.x;
|
|
9927
9970
|
vertexBuffer[vertexIndex++] = topRight.y;
|
|
9928
9971
|
vertexBuffer[vertexIndex++] = uvx1;
|
|
9929
9972
|
vertexBuffer[vertexIndex++] = uvy0;
|
|
9973
|
+
vertexBuffer[vertexIndex++] = screenUVX1;
|
|
9974
|
+
vertexBuffer[vertexIndex++] = screenUVY0;
|
|
9930
9975
|
// (1, 1) - 3
|
|
9931
9976
|
vertexBuffer[vertexIndex++] = bottomRight.x;
|
|
9932
9977
|
vertexBuffer[vertexIndex++] = bottomRight.y;
|
|
9933
9978
|
vertexBuffer[vertexIndex++] = uvx1;
|
|
9934
9979
|
vertexBuffer[vertexIndex++] = uvy1;
|
|
9980
|
+
vertexBuffer[vertexIndex++] = screenUVX1;
|
|
9981
|
+
vertexBuffer[vertexIndex++] = screenUVY1;
|
|
9935
9982
|
// This creates and uploads the texture if not already done
|
|
9936
9983
|
const texture = this._addImageAsTexture(image);
|
|
9937
9984
|
// apply material
|
|
@@ -9939,6 +9986,8 @@ class MaterialRenderer {
|
|
|
9939
9986
|
this._layout.shader = shader;
|
|
9940
9987
|
// apply layout and geometry
|
|
9941
9988
|
this._layout.use(true);
|
|
9989
|
+
// apply time in ms since the page (performance.now())
|
|
9990
|
+
shader.trySetUniformFloat('u_time_ms', performance.now());
|
|
9942
9991
|
// apply opacity
|
|
9943
9992
|
shader.trySetUniformFloat('u_opacity', opacity);
|
|
9944
9993
|
// apply resolution
|
|
@@ -9955,6 +10004,10 @@ class MaterialRenderer {
|
|
|
9955
10004
|
gl.activeTexture(gl.TEXTURE0 + 0);
|
|
9956
10005
|
gl.bindTexture(gl.TEXTURE_2D, texture);
|
|
9957
10006
|
shader.trySetUniformInt('u_graphic', 0);
|
|
10007
|
+
// bind the screen texture
|
|
10008
|
+
gl.activeTexture(gl.TEXTURE0 + 1);
|
|
10009
|
+
gl.bindTexture(gl.TEXTURE_2D, this._context.materialScreenTexture);
|
|
10010
|
+
shader.trySetUniformInt('u_screen_texture', 1);
|
|
9958
10011
|
// bind quad index buffer
|
|
9959
10012
|
this._quads.bind();
|
|
9960
10013
|
// Draw a single quad
|
|
@@ -10157,6 +10210,14 @@ class ExcaliburGraphicsContextWebGL {
|
|
|
10157
10210
|
this.register(new CircleRenderer());
|
|
10158
10211
|
this.register(new PointRenderer());
|
|
10159
10212
|
this.register(new LineRenderer());
|
|
10213
|
+
this.materialScreenTexture = gl.createTexture();
|
|
10214
|
+
gl.bindTexture(gl.TEXTURE_2D, this.materialScreenTexture);
|
|
10215
|
+
gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, this.width, this.height, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);
|
|
10216
|
+
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);
|
|
10217
|
+
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);
|
|
10218
|
+
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.REPEAT);
|
|
10219
|
+
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.REPEAT);
|
|
10220
|
+
gl.bindTexture(gl.TEXTURE_2D, null);
|
|
10160
10221
|
this._screenRenderer = new ScreenPassPainter(gl);
|
|
10161
10222
|
this._renderTarget = new RenderTarget({
|
|
10162
10223
|
gl,
|
|
@@ -10415,6 +10476,13 @@ class ExcaliburGraphicsContextWebGL {
|
|
|
10415
10476
|
currentRendererName = this._drawCalls[i].renderer;
|
|
10416
10477
|
currentRenderer = this._renderers.get(currentRendererName);
|
|
10417
10478
|
}
|
|
10479
|
+
// ! hack to grab screen texture before materials run because they might want it
|
|
10480
|
+
if (currentRenderer instanceof MaterialRenderer && this.material.isUsingScreenTexture) {
|
|
10481
|
+
const gl = this.__gl;
|
|
10482
|
+
gl.bindTexture(gl.TEXTURE_2D, this.materialScreenTexture);
|
|
10483
|
+
gl.copyTexImage2D(gl.TEXTURE_2D, 0, gl.RGBA, 0, 0, this.width, this.height, 0);
|
|
10484
|
+
this._renderTarget.use();
|
|
10485
|
+
}
|
|
10418
10486
|
// If we are still using the same renderer we can add to the current batch
|
|
10419
10487
|
currentRenderer.draw(...this._drawCalls[i].args);
|
|
10420
10488
|
}
|
|
@@ -11680,6 +11748,7 @@ var Loader_0 = __webpack_require__(1388);
|
|
|
11680
11748
|
|
|
11681
11749
|
|
|
11682
11750
|
|
|
11751
|
+
|
|
11683
11752
|
/**
|
|
11684
11753
|
* A Raster is a Graphic that needs to be first painted to a HTMLCanvasElement before it can be drawn to the
|
|
11685
11754
|
* [[ExcaliburGraphicsContext]]. This is useful for generating custom images using the 2D canvas api.
|
|
@@ -11689,7 +11758,7 @@ var Loader_0 = __webpack_require__(1388);
|
|
|
11689
11758
|
class Raster extends Graphic {
|
|
11690
11759
|
constructor(options) {
|
|
11691
11760
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
11692
|
-
super(options);
|
|
11761
|
+
super(omit(options, ['width', 'height'])); // rasters do some special sauce with width/height
|
|
11693
11762
|
this.filtering = null;
|
|
11694
11763
|
this.lineCap = 'butt';
|
|
11695
11764
|
this.quality = 1;
|
|
@@ -14239,9 +14308,9 @@ class CollisionGroup {
|
|
|
14239
14308
|
return CollisionGroupManager.create(combinedName, combinedMask);
|
|
14240
14309
|
}
|
|
14241
14310
|
toString() {
|
|
14242
|
-
return `
|
|
14243
|
-
category: ${this.category.toString(2).padStart(32, '0')}
|
|
14244
|
-
mask: ${(this.mask >>> 0).toString(2).padStart(32, '0')}
|
|
14311
|
+
return `
|
|
14312
|
+
category: ${this.category.toString(2).padStart(32, '0')}
|
|
14313
|
+
mask: ${(this.mask >>> 0).toString(2).padStart(32, '0')}
|
|
14245
14314
|
`;
|
|
14246
14315
|
}
|
|
14247
14316
|
}
|
|
@@ -20824,7 +20893,7 @@ class FontCache {
|
|
|
20824
20893
|
const currentHashCodes = new Set();
|
|
20825
20894
|
for (const [textInstance, time] of FontCache._TEXT_USAGE.entries()) {
|
|
20826
20895
|
// if bitmap hasn't been used in 100 ms clear it
|
|
20827
|
-
if (time +
|
|
20896
|
+
if (time + FontCache.FONT_TIMEOUT < performance.now()) {
|
|
20828
20897
|
FontCache._LOGGER.debug(`Text cache entry timed out ${textInstance.text}`);
|
|
20829
20898
|
deferred.push(textInstance);
|
|
20830
20899
|
textInstance.dispose();
|
|
@@ -20868,6 +20937,7 @@ class FontCache {
|
|
|
20868
20937
|
FontCache._MEASURE_CACHE.clear();
|
|
20869
20938
|
}
|
|
20870
20939
|
}
|
|
20940
|
+
FontCache.FONT_TIMEOUT = 500;
|
|
20871
20941
|
FontCache._LOGGER = Logger.getInstance();
|
|
20872
20942
|
FontCache._TEXT_USAGE = new Map();
|
|
20873
20943
|
FontCache._TEXT_CACHE = new Map();
|
|
@@ -22244,7 +22314,6 @@ class QuadTree {
|
|
|
22244
22314
|
|
|
22245
22315
|
|
|
22246
22316
|
|
|
22247
|
-
|
|
22248
22317
|
const TileMapEvents = {
|
|
22249
22318
|
PreUpdate: 'preupdate',
|
|
22250
22319
|
PostUpdate: 'postupdate',
|
|
@@ -22362,7 +22431,7 @@ class TileMap extends Entity {
|
|
|
22362
22431
|
this.addComponent(new GraphicsComponent({
|
|
22363
22432
|
onPostDraw: (ctx, delta) => this.draw(ctx, delta)
|
|
22364
22433
|
}));
|
|
22365
|
-
this.addComponent(new DebugGraphicsComponent((ctx) => this.debug(ctx), false));
|
|
22434
|
+
this.addComponent(new DebugGraphicsComponent((ctx, debugFlags) => this.debug(ctx, debugFlags), false));
|
|
22366
22435
|
this.addComponent(new ColliderComponent());
|
|
22367
22436
|
this._graphics = this.get(GraphicsComponent);
|
|
22368
22437
|
this._transform = this.get(TransformComponent);
|
|
@@ -22441,14 +22510,53 @@ class TileMap extends Entity {
|
|
|
22441
22510
|
const colliders = [];
|
|
22442
22511
|
this._composite = this._collider.useCompositeCollider([]);
|
|
22443
22512
|
let current;
|
|
22444
|
-
|
|
22513
|
+
/**
|
|
22514
|
+
* Returns wether or not the 2 boxes share an edge and are the same height
|
|
22515
|
+
* @param prev
|
|
22516
|
+
* @param next
|
|
22517
|
+
* @returns true if they share and edge, false if not
|
|
22518
|
+
*/
|
|
22519
|
+
const shareEdges = (prev, next) => {
|
|
22520
|
+
if (prev && next) {
|
|
22521
|
+
// same top/bottom
|
|
22522
|
+
return prev.top === next.top &&
|
|
22523
|
+
prev.bottom === next.bottom &&
|
|
22524
|
+
// Shared right/left edge
|
|
22525
|
+
prev.right === next.left;
|
|
22526
|
+
}
|
|
22527
|
+
return false;
|
|
22528
|
+
};
|
|
22529
|
+
/**
|
|
22530
|
+
* Potentially merges the current collider into a list of previous ones, mutating the list
|
|
22531
|
+
* If checkAndCombine returns true, the collider was successfully merged and should be thrown away
|
|
22532
|
+
* @param current current collider to test
|
|
22533
|
+
* @param colliders List of colliders to consider merging with
|
|
22534
|
+
* @param maxLookBack The amount of colliders to look back for combindation
|
|
22535
|
+
* @returns false when no combination found, true when successfully combined
|
|
22536
|
+
*/
|
|
22537
|
+
const checkAndCombine = (current, colliders, maxLookBack = 10) => {
|
|
22538
|
+
if (!current) {
|
|
22539
|
+
return false;
|
|
22540
|
+
}
|
|
22541
|
+
// walk backwards through the list of colliders and combine with the first that shares an edge
|
|
22542
|
+
for (let i = colliders.length - 1; i >= 0; i--) {
|
|
22543
|
+
if (maxLookBack-- < 0) {
|
|
22544
|
+
// blunt the O(n^2) algorithm a bit
|
|
22545
|
+
return false;
|
|
22546
|
+
}
|
|
22547
|
+
const prev = colliders[i];
|
|
22548
|
+
if (shareEdges(prev, current)) {
|
|
22549
|
+
colliders[i] = prev.combine(current);
|
|
22550
|
+
return true;
|
|
22551
|
+
}
|
|
22552
|
+
}
|
|
22553
|
+
return false;
|
|
22554
|
+
};
|
|
22555
|
+
// ? configurable bias perhaps, horizontal strips vs. vertical ones
|
|
22556
|
+
// Bad tile collider packing algorithm
|
|
22445
22557
|
for (let i = 0; i < this.columns; i++) {
|
|
22446
22558
|
// Scan column for colliders
|
|
22447
22559
|
for (let j = 0; j < this.rows; j++) {
|
|
22448
|
-
// Columns start with a new collider
|
|
22449
|
-
if (j === 0) {
|
|
22450
|
-
current = null;
|
|
22451
|
-
}
|
|
22452
22560
|
const tile = this.tiles[i + j * this.columns];
|
|
22453
22561
|
// Current tile in column is solid build up current collider
|
|
22454
22562
|
if (tile.solid) {
|
|
@@ -22462,7 +22570,7 @@ class TileMap extends Entity {
|
|
|
22462
22570
|
this._composite.addCollider(collider);
|
|
22463
22571
|
}
|
|
22464
22572
|
//we push any current collider before nulling the current run
|
|
22465
|
-
if (current) {
|
|
22573
|
+
if (current && !checkAndCombine(current, colliders)) {
|
|
22466
22574
|
colliders.push(current);
|
|
22467
22575
|
}
|
|
22468
22576
|
current = null;
|
|
@@ -22481,24 +22589,20 @@ class TileMap extends Entity {
|
|
|
22481
22589
|
}
|
|
22482
22590
|
else {
|
|
22483
22591
|
// Not solid skip and cut off the current collider
|
|
22484
|
-
|
|
22592
|
+
// End of run check and combine
|
|
22593
|
+
if (current && !checkAndCombine(current, colliders)) {
|
|
22485
22594
|
colliders.push(current);
|
|
22486
22595
|
}
|
|
22487
22596
|
current = null;
|
|
22488
22597
|
}
|
|
22489
22598
|
}
|
|
22490
22599
|
// After a column is complete check to see if it can be merged into the last one
|
|
22491
|
-
|
|
22492
|
-
|
|
22493
|
-
|
|
22494
|
-
|
|
22495
|
-
colliders[colliders.length - 1] = prev.combine(current);
|
|
22496
|
-
}
|
|
22497
|
-
else {
|
|
22498
|
-
// else new collider
|
|
22499
|
-
colliders.push(current);
|
|
22500
|
-
}
|
|
22600
|
+
// Eno of run check and combine
|
|
22601
|
+
if (current && !checkAndCombine(current, colliders)) {
|
|
22602
|
+
// else new collider if no combination
|
|
22603
|
+
colliders.push(current);
|
|
22501
22604
|
}
|
|
22605
|
+
current = null;
|
|
22502
22606
|
}
|
|
22503
22607
|
for (const c of colliders) {
|
|
22504
22608
|
const collider = Shape.Box(c.width, c.height, Vector.Zero, vec(c.left - this.pos.x, c.top - this.pos.y));
|
|
@@ -22604,37 +22708,53 @@ class TileMap extends Entity {
|
|
|
22604
22708
|
}
|
|
22605
22709
|
this.emit('postdraw', new PostDrawEvent(ctx, delta, this));
|
|
22606
22710
|
}
|
|
22607
|
-
debug(gfx) {
|
|
22711
|
+
debug(gfx, debugFlags) {
|
|
22712
|
+
const { showAll, showGrid, gridColor, gridWidth, showSolidBounds: showColliderBounds, solidBoundsColor: colliderBoundsColor, showColliderGeometry, colliderGeometryColor, showQuadTree } = debugFlags.tilemap;
|
|
22608
22713
|
const width = this.tileWidth * this.columns * this.scale.x;
|
|
22609
22714
|
const height = this.tileHeight * this.rows * this.scale.y;
|
|
22610
22715
|
const pos = this.pos;
|
|
22611
|
-
|
|
22612
|
-
|
|
22613
|
-
|
|
22614
|
-
|
|
22615
|
-
|
|
22616
|
-
|
|
22617
|
-
|
|
22716
|
+
if (showGrid || showAll) {
|
|
22717
|
+
for (let r = 0; r < this.rows + 1; r++) {
|
|
22718
|
+
const yOffset = vec(0, r * this.tileHeight * this.scale.y);
|
|
22719
|
+
gfx.drawLine(pos.add(yOffset), pos.add(vec(width, yOffset.y)), gridColor, gridWidth);
|
|
22720
|
+
}
|
|
22721
|
+
for (let c = 0; c < this.columns + 1; c++) {
|
|
22722
|
+
const xOffset = vec(c * this.tileWidth * this.scale.x, 0);
|
|
22723
|
+
gfx.drawLine(pos.add(xOffset), pos.add(vec(xOffset.x, height)), gridColor, gridWidth);
|
|
22724
|
+
}
|
|
22618
22725
|
}
|
|
22619
|
-
|
|
22620
|
-
|
|
22621
|
-
|
|
22622
|
-
|
|
22623
|
-
|
|
22624
|
-
const
|
|
22625
|
-
|
|
22626
|
-
|
|
22627
|
-
|
|
22628
|
-
|
|
22726
|
+
if (showAll || showColliderBounds || showColliderGeometry) {
|
|
22727
|
+
const colliders = this._composite.getColliders();
|
|
22728
|
+
gfx.save();
|
|
22729
|
+
gfx.translate(this.pos.x, this.pos.y);
|
|
22730
|
+
gfx.scale(this.scale.x, this.scale.y);
|
|
22731
|
+
for (const collider of colliders) {
|
|
22732
|
+
const bounds = collider.localBounds;
|
|
22733
|
+
const pos = collider.worldPos.sub(this.pos);
|
|
22734
|
+
if (showColliderBounds) {
|
|
22735
|
+
gfx.drawRectangle(pos, bounds.width, bounds.height, colliderBoundsColor);
|
|
22736
|
+
}
|
|
22737
|
+
}
|
|
22738
|
+
gfx.restore();
|
|
22739
|
+
if (showColliderGeometry) {
|
|
22740
|
+
for (const collider of colliders) {
|
|
22741
|
+
collider.debug(gfx, colliderGeometryColor);
|
|
22742
|
+
}
|
|
22743
|
+
}
|
|
22629
22744
|
}
|
|
22630
|
-
|
|
22631
|
-
|
|
22632
|
-
|
|
22633
|
-
|
|
22634
|
-
|
|
22635
|
-
|
|
22745
|
+
if (showAll || showQuadTree || showColliderBounds) {
|
|
22746
|
+
gfx.save();
|
|
22747
|
+
gfx.z = 999;
|
|
22748
|
+
if (showQuadTree) {
|
|
22749
|
+
this._quadTree.debug(gfx);
|
|
22750
|
+
}
|
|
22751
|
+
if (showColliderBounds) {
|
|
22752
|
+
for (let i = 0; i < this.tiles.length; i++) {
|
|
22753
|
+
this.tiles[i].bounds.draw(gfx);
|
|
22754
|
+
}
|
|
22755
|
+
}
|
|
22756
|
+
gfx.restore();
|
|
22636
22757
|
}
|
|
22637
|
-
gfx.restore();
|
|
22638
22758
|
}
|
|
22639
22759
|
}
|
|
22640
22760
|
/**
|
|
@@ -26060,7 +26180,7 @@ class DebugSystem extends System {
|
|
|
26060
26180
|
if (!debugDraw.useTransform) {
|
|
26061
26181
|
this._graphicsContext.restore();
|
|
26062
26182
|
}
|
|
26063
|
-
debugDraw.draw(this._graphicsContext);
|
|
26183
|
+
debugDraw.draw(this._graphicsContext, this._engine.debug);
|
|
26064
26184
|
if (!debugDraw.useTransform) {
|
|
26065
26185
|
this._graphicsContext.save();
|
|
26066
26186
|
this._applyTransform(entity);
|
|
@@ -27061,7 +27181,7 @@ var ColorBlindnessMode;
|
|
|
27061
27181
|
})(ColorBlindnessMode || (ColorBlindnessMode = {}));
|
|
27062
27182
|
|
|
27063
27183
|
;// CONCATENATED MODULE: ./Graphics/PostProcessor/color-blind-fragment.glsl
|
|
27064
|
-
/* harmony default export */ const color_blind_fragment = ("#version 300 es\
|
|
27184
|
+
/* harmony default export */ const color_blind_fragment = ("#version 300 es\nprecision mediump float;\n// our texture\nuniform sampler2D u_image;\n// the texCoords passed in from the vertex shader.\nin vec2 v_texcoord;\n\n// color blind type\nuniform int u_type;\n\n// simulation?\nuniform bool u_simulate;\n\nout vec4 fragColor;\n\nvoid main() {\n vec4 o = texture(u_image, v_texcoord);\n // RGB to LMS matrix conversion\n float L = (17.8824 * o.r) + (43.5161 * o.g) + (4.11935 * o.b);\n float M = (3.45565 * o.r) + (27.1554 * o.g) + (3.86714 * o.b);\n float S = (0.0299566 * o.r) + (0.184309 * o.g) + (1.46709 * o.b);\n // Simulate color blindness\n float l;\n float m;\n float s;\n //MODE CODE//\n if (u_type == 0) {\n // Protanope\n l = 0.0 * L + 2.02344 * M + -2.52581 * S;\n m = 0.0 * L + 1.0 * M + 0.0 * S;\n s = 0.0 * L + 0.0 * M + 1.0 * S;;\n } else if (u_type == 1) {\n // Deuteranope\n l = 1.0 * L + 0.0 * M + 0.0 * S;\n m = 0.494207 * L + 0.0 * M + 1.24827 * S;\n s = 0.0 * L + 0.0 * M + 1.0 * S;\n } else if (u_type == 2) {\n // Tritanope\n l = 1.0 * L + 0.0 * M + 0.0 * S;\n m = 0.0 * L + 1.0 * M + 0.0 * S;\n s = -0.395913 * L + 0.801109 * M + 0.0 * S;\n }\n\n // LMS to RGB matrix conversion\n vec4 error; // simulate the colors\n error.r = (0.0809444479 * l) + (-0.130504409 * m) + (0.116721066 * s);\n error.g = (-0.0102485335 * l) + (0.0540193266 * m) + (-0.113614708 * s);\n error.b = (-0.000365296938 * l) + (-0.00412161469 * m) + (0.693511405 * s);\n error.a = 1.0;\n vec4 diff = o - error;\n vec4 correction; // correct the colors\n correction.r = 0.0;\n correction.g = (diff.r * 0.7) + (diff.g * 1.0);\n correction.b = (diff.r * 0.7) + (diff.b * 1.0);\n correction = o + correction;\n correction.a = o.a;\n //SIMULATE//\n\n // sim \n if (u_simulate) {\n fragColor = error.rgba;\n } else {\n fragColor = correction.rgba;\n }\n}");
|
|
27065
27185
|
;// CONCATENATED MODULE: ./Graphics/PostProcessor/ScreenShader.ts
|
|
27066
27186
|
|
|
27067
27187
|
|
|
@@ -27076,15 +27196,15 @@ class ScreenShader {
|
|
|
27076
27196
|
constructor(gl, fragmentSource) {
|
|
27077
27197
|
this._shader = new Shader({
|
|
27078
27198
|
gl,
|
|
27079
|
-
vertexSource: `#version 300 es
|
|
27080
|
-
in vec2 a_position;
|
|
27081
|
-
in vec2 a_texcoord;
|
|
27082
|
-
out vec2 v_texcoord;
|
|
27083
|
-
|
|
27084
|
-
void main() {
|
|
27085
|
-
gl_Position = vec4(a_position, 0.0, 1.0);
|
|
27086
|
-
// Pass the texcoord to the fragment shader.
|
|
27087
|
-
v_texcoord = a_texcoord;
|
|
27199
|
+
vertexSource: `#version 300 es
|
|
27200
|
+
in vec2 a_position;
|
|
27201
|
+
in vec2 a_texcoord;
|
|
27202
|
+
out vec2 v_texcoord;
|
|
27203
|
+
|
|
27204
|
+
void main() {
|
|
27205
|
+
gl_Position = vec4(a_position, 0.0, 1.0);
|
|
27206
|
+
// Pass the texcoord to the fragment shader.
|
|
27207
|
+
v_texcoord = a_texcoord;
|
|
27088
27208
|
}`,
|
|
27089
27209
|
fragmentSource: fragmentSource
|
|
27090
27210
|
});
|
|
@@ -27340,6 +27460,17 @@ class Debug {
|
|
|
27340
27460
|
focusColor: Color.Red,
|
|
27341
27461
|
showZoom: false
|
|
27342
27462
|
};
|
|
27463
|
+
this.tilemap = {
|
|
27464
|
+
showAll: false,
|
|
27465
|
+
showGrid: false,
|
|
27466
|
+
gridColor: Color.Red,
|
|
27467
|
+
gridWidth: .5,
|
|
27468
|
+
showSolidBounds: false,
|
|
27469
|
+
solidBoundsColor: Color.fromHex('#8080807F'), // grayish
|
|
27470
|
+
showColliderGeometry: true,
|
|
27471
|
+
colliderGeometryColor: Color.Green,
|
|
27472
|
+
showQuadTree: false
|
|
27473
|
+
};
|
|
27343
27474
|
this._engine = engine;
|
|
27344
27475
|
this.colorBlindMode = new ColorBlindFlags(this._engine);
|
|
27345
27476
|
}
|
|
@@ -28979,9 +29110,9 @@ class Engine {
|
|
|
28979
29110
|
// eslint-disable-next-line no-console
|
|
28980
29111
|
console.log(`%cPowered by Excalibur.js (v${EX_VERSION})`, 'background: #176BAA; color: white; border-radius: 5px; padding: 15px; font-size: 1.5em; line-height: 80px;');
|
|
28981
29112
|
// eslint-disable-next-line no-console
|
|
28982
|
-
console.log('\n\
|
|
28983
|
-
/| ________________\n\
|
|
28984
|
-
O|===|* >________________>\n\
|
|
29113
|
+
console.log('\n\
|
|
29114
|
+
/| ________________\n\
|
|
29115
|
+
O|===|* >________________>\n\
|
|
28985
29116
|
\\|');
|
|
28986
29117
|
// eslint-disable-next-line no-console
|
|
28987
29118
|
console.log('Visit', 'http://excaliburjs.com', 'for more information');
|
|
@@ -31121,7 +31252,7 @@ class Semaphore {
|
|
|
31121
31252
|
* The current Excalibur version string
|
|
31122
31253
|
* @description `process.env.__EX_VERSION` gets replaced by Webpack on build
|
|
31123
31254
|
*/
|
|
31124
|
-
const EX_VERSION = "0.
|
|
31255
|
+
const EX_VERSION = "0.29.0-alpha.2+5c28d4e";
|
|
31125
31256
|
|
|
31126
31257
|
polyfill();
|
|
31127
31258
|
// This file is used as the bundle entry point and exports everything
|