@codexo/exojs 0.7.11 → 0.7.13
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 +442 -0
- package/dist/esm/animation/Tween.d.ts +60 -1
- package/dist/esm/animation/Tween.js +60 -1
- package/dist/esm/animation/Tween.js.map +1 -1
- package/dist/esm/animation/TweenManager.d.ts +10 -0
- package/dist/esm/animation/TweenManager.js +10 -0
- package/dist/esm/animation/TweenManager.js.map +1 -1
- package/dist/esm/animation/types.d.ts +15 -0
- package/dist/esm/animation/types.js +6 -0
- package/dist/esm/animation/types.js.map +1 -1
- package/dist/esm/audio/AbstractMedia.d.ts +11 -0
- package/dist/esm/audio/AbstractMedia.js +10 -0
- package/dist/esm/audio/AbstractMedia.js.map +1 -1
- package/dist/esm/audio/AudioAnalyser.d.ts +21 -0
- package/dist/esm/audio/AudioAnalyser.js +16 -0
- package/dist/esm/audio/AudioAnalyser.js.map +1 -1
- package/dist/esm/audio/AudioBus.d.ts +37 -0
- package/dist/esm/audio/AudioBus.js +36 -0
- package/dist/esm/audio/AudioBus.js.map +1 -1
- package/dist/esm/audio/AudioFilter.d.ts +7 -0
- package/dist/esm/audio/AudioFilter.js +6 -0
- package/dist/esm/audio/AudioFilter.js.map +1 -1
- package/dist/esm/audio/AudioListener.d.ts +19 -0
- package/dist/esm/audio/AudioListener.js +11 -0
- package/dist/esm/audio/AudioListener.js.map +1 -1
- package/dist/esm/audio/AudioManager.d.ts +37 -0
- package/dist/esm/audio/AudioManager.js +37 -0
- package/dist/esm/audio/AudioManager.js.map +1 -1
- package/dist/esm/audio/BeatDetector.d.ts +21 -0
- package/dist/esm/audio/BeatDetector.js +21 -0
- package/dist/esm/audio/BeatDetector.js.map +1 -1
- package/dist/esm/audio/Media.d.ts +11 -0
- package/dist/esm/audio/Music.d.ts +12 -0
- package/dist/esm/audio/Music.js +12 -0
- package/dist/esm/audio/Music.js.map +1 -1
- package/dist/esm/audio/Sound.d.ts +25 -0
- package/dist/esm/audio/Sound.js +18 -0
- package/dist/esm/audio/Sound.js.map +1 -1
- package/dist/esm/audio/audio-context.d.ts +48 -0
- package/dist/esm/audio/audio-context.js +48 -5
- package/dist/esm/audio/audio-context.js.map +1 -1
- package/dist/esm/audio/filters/ChorusFilter.d.ts +5 -0
- package/dist/esm/audio/filters/ChorusFilter.js +4 -0
- package/dist/esm/audio/filters/ChorusFilter.js.map +1 -1
- package/dist/esm/audio/filters/CompressorFilter.d.ts +12 -0
- package/dist/esm/audio/filters/CompressorFilter.js +11 -0
- package/dist/esm/audio/filters/CompressorFilter.js.map +1 -1
- package/dist/esm/audio/filters/DelayFilter.d.ts +11 -0
- package/dist/esm/audio/filters/DelayFilter.js +10 -0
- package/dist/esm/audio/filters/DelayFilter.js.map +1 -1
- package/dist/esm/audio/filters/DuckingFilter.d.ts +13 -0
- package/dist/esm/audio/filters/DuckingFilter.js +12 -0
- package/dist/esm/audio/filters/DuckingFilter.js.map +1 -1
- package/dist/esm/audio/filters/EqualizerFilter.d.ts +20 -0
- package/dist/esm/audio/filters/EqualizerFilter.js +40 -0
- package/dist/esm/audio/filters/EqualizerFilter.js.map +1 -1
- package/dist/esm/audio/filters/GranularFilter.d.ts +6 -0
- package/dist/esm/audio/filters/GranularFilter.js +6 -0
- package/dist/esm/audio/filters/GranularFilter.js.map +1 -1
- package/dist/esm/audio/filters/HighpassFilter.d.ts +10 -0
- package/dist/esm/audio/filters/HighpassFilter.js +9 -0
- package/dist/esm/audio/filters/HighpassFilter.js.map +1 -1
- package/dist/esm/audio/filters/LowpassFilter.d.ts +10 -0
- package/dist/esm/audio/filters/LowpassFilter.js +9 -0
- package/dist/esm/audio/filters/LowpassFilter.js.map +1 -1
- package/dist/esm/audio/filters/PitchShiftFilter.d.ts +2 -0
- package/dist/esm/audio/filters/PitchShiftFilter.js +2 -0
- package/dist/esm/audio/filters/PitchShiftFilter.js.map +1 -1
- package/dist/esm/audio/filters/ReverbFilter.d.ts +12 -0
- package/dist/esm/audio/filters/ReverbFilter.js +11 -0
- package/dist/esm/audio/filters/ReverbFilter.js.map +1 -1
- package/dist/esm/audio/filters/VocoderFilter.d.ts +11 -0
- package/dist/esm/audio/filters/VocoderFilter.js +11 -0
- package/dist/esm/audio/filters/VocoderFilter.js.map +1 -1
- package/dist/esm/audio/filters/WorkletFilter.d.ts +6 -1
- package/dist/esm/audio/filters/WorkletFilter.js +6 -1
- package/dist/esm/audio/filters/WorkletFilter.js.map +1 -1
- package/dist/esm/core/Application.d.ts +66 -1
- package/dist/esm/core/Application.js +68 -6
- package/dist/esm/core/Application.js.map +1 -1
- package/dist/esm/core/Bounds.d.ts +23 -0
- package/dist/esm/core/Bounds.js +23 -0
- package/dist/esm/core/Bounds.js.map +1 -1
- package/dist/esm/core/Clock.d.ts +21 -0
- package/dist/esm/core/Clock.js +21 -0
- package/dist/esm/core/Clock.js.map +1 -1
- package/dist/esm/core/Color.d.ts +35 -0
- package/dist/esm/core/Color.js +35 -0
- package/dist/esm/core/Color.js.map +1 -1
- package/dist/esm/core/Scene.d.ts +76 -0
- package/dist/esm/core/Scene.js +83 -0
- package/dist/esm/core/Scene.js.map +1 -1
- package/dist/esm/core/SceneManager.d.ts +62 -0
- package/dist/esm/core/SceneManager.js +51 -2
- package/dist/esm/core/SceneManager.js.map +1 -1
- package/dist/esm/core/SceneNode.d.ts +31 -0
- package/dist/esm/core/SceneNode.js +31 -0
- package/dist/esm/core/SceneNode.js.map +1 -1
- package/dist/esm/core/Signal.d.ts +44 -0
- package/dist/esm/core/Signal.js +39 -0
- package/dist/esm/core/Signal.js.map +1 -1
- package/dist/esm/core/Time.d.ts +21 -0
- package/dist/esm/core/Time.js +21 -0
- package/dist/esm/core/Time.js.map +1 -1
- package/dist/esm/core/Timer.d.ts +7 -0
- package/dist/esm/core/Timer.js +7 -0
- package/dist/esm/core/Timer.js.map +1 -1
- package/dist/esm/core/capabilities.d.ts +12 -0
- package/dist/esm/core/capabilities.js +12 -0
- package/dist/esm/core/capabilities.js.map +1 -1
- package/dist/esm/core/types.d.ts +37 -0
- package/dist/esm/core/utils.d.ts +48 -0
- package/dist/esm/core/utils.js +48 -0
- package/dist/esm/core/utils.js.map +1 -1
- package/dist/esm/debug/BoundingBoxesLayer.d.ts +8 -0
- package/dist/esm/debug/BoundingBoxesLayer.js +8 -0
- package/dist/esm/debug/BoundingBoxesLayer.js.map +1 -1
- package/dist/esm/debug/DebugLayer.d.ts +16 -3
- package/dist/esm/debug/DebugLayer.js +11 -3
- package/dist/esm/debug/DebugLayer.js.map +1 -1
- package/dist/esm/debug/DebugOverlay.d.ts +11 -0
- package/dist/esm/debug/DebugOverlay.js +8 -2
- package/dist/esm/debug/DebugOverlay.js.map +1 -1
- package/dist/esm/debug/HitTestLayer.d.ts +9 -0
- package/dist/esm/debug/HitTestLayer.js +9 -0
- package/dist/esm/debug/HitTestLayer.js.map +1 -1
- package/dist/esm/debug/PerformanceLayer.d.ts +17 -1
- package/dist/esm/debug/PerformanceLayer.js +18 -0
- package/dist/esm/debug/PerformanceLayer.js.map +1 -1
- package/dist/esm/debug/PointerStackLayer.d.ts +8 -0
- package/dist/esm/debug/PointerStackLayer.js +11 -3
- package/dist/esm/debug/PointerStackLayer.js.map +1 -1
- package/dist/esm/index.js +6 -5
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/input/ArcadeStickGamepadMapping.d.ts +7 -0
- package/dist/esm/input/ArcadeStickGamepadMapping.js +25 -19
- package/dist/esm/input/ArcadeStickGamepadMapping.js.map +1 -1
- package/dist/esm/input/GameCubeGamepadMapping.d.ts +9 -0
- package/dist/esm/input/GameCubeGamepadMapping.js +9 -0
- package/dist/esm/input/GameCubeGamepadMapping.js.map +1 -1
- package/dist/esm/input/Gamepad.d.ts +181 -31
- package/dist/esm/input/Gamepad.js +307 -108
- package/dist/esm/input/Gamepad.js.map +1 -1
- package/dist/esm/input/GamepadAxis.d.ts +120 -0
- package/dist/esm/input/GamepadAxis.js +106 -0
- package/dist/esm/input/GamepadAxis.js.map +1 -0
- package/dist/esm/input/GamepadButton.d.ts +110 -0
- package/dist/esm/input/GamepadButton.js +99 -0
- package/dist/esm/input/GamepadButton.js.map +1 -0
- package/dist/esm/input/GamepadDefinitions.d.ts +64 -1
- package/dist/esm/input/GamepadDefinitions.js +44 -1
- package/dist/esm/input/GamepadDefinitions.js.map +1 -1
- package/dist/esm/input/GamepadMapping.d.ts +42 -8
- package/dist/esm/input/GamepadMapping.js +46 -5
- package/dist/esm/input/GamepadMapping.js.map +1 -1
- package/dist/esm/input/GamepadPromptLayouts.d.ts +35 -2
- package/dist/esm/input/GamepadPromptLayouts.js +43 -18
- package/dist/esm/input/GamepadPromptLayouts.js.map +1 -1
- package/dist/esm/input/GenericDualAnalogGamepadMapping.d.ts +13 -0
- package/dist/esm/input/GenericDualAnalogGamepadMapping.js +62 -43
- package/dist/esm/input/GenericDualAnalogGamepadMapping.js.map +1 -1
- package/dist/esm/input/GestureRecognizer.d.ts +11 -2
- package/dist/esm/input/GestureRecognizer.js +11 -2
- package/dist/esm/input/GestureRecognizer.js.map +1 -1
- package/dist/esm/input/InputBinding.d.ts +74 -0
- package/dist/esm/input/InputBinding.js +100 -0
- package/dist/esm/input/InputBinding.js.map +1 -0
- package/dist/esm/input/InputManager.d.ts +100 -21
- package/dist/esm/input/InputManager.js +248 -90
- package/dist/esm/input/InputManager.js.map +1 -1
- package/dist/esm/input/InteractionEvent.d.ts +13 -0
- package/dist/esm/input/InteractionEvent.js +8 -0
- package/dist/esm/input/InteractionEvent.js.map +1 -1
- package/dist/esm/input/InteractionManager.d.ts +34 -5
- package/dist/esm/input/InteractionManager.js +46 -17
- package/dist/esm/input/InteractionManager.js.map +1 -1
- package/dist/esm/input/JoyConLeftGamepadMapping.d.ts +17 -3
- package/dist/esm/input/JoyConLeftGamepadMapping.js +42 -3
- package/dist/esm/input/JoyConLeftGamepadMapping.js.map +1 -1
- package/dist/esm/input/JoyConRightGamepadMapping.d.ts +17 -3
- package/dist/esm/input/JoyConRightGamepadMapping.js +38 -3
- package/dist/esm/input/JoyConRightGamepadMapping.js.map +1 -1
- package/dist/esm/input/PlayStationGamepadMapping.d.ts +8 -0
- package/dist/esm/input/PlayStationGamepadMapping.js +8 -0
- package/dist/esm/input/PlayStationGamepadMapping.js.map +1 -1
- package/dist/esm/input/Pointer.d.ts +106 -71
- package/dist/esm/input/Pointer.js +93 -71
- package/dist/esm/input/Pointer.js.map +1 -1
- package/dist/esm/input/SteamControllerGamepadMapping.d.ts +8 -0
- package/dist/esm/input/SteamControllerGamepadMapping.js +8 -0
- package/dist/esm/input/SteamControllerGamepadMapping.js.map +1 -1
- package/dist/esm/input/SteamDeckGamepadMapping.d.ts +18 -0
- package/dist/esm/input/SteamDeckGamepadMapping.js +76 -0
- package/dist/esm/input/SteamDeckGamepadMapping.js.map +1 -0
- package/dist/esm/input/SwitchProGamepadMapping.d.ts +9 -0
- package/dist/esm/input/SwitchProGamepadMapping.js +9 -0
- package/dist/esm/input/SwitchProGamepadMapping.js.map +1 -1
- package/dist/esm/input/XboxGamepadMapping.d.ts +8 -0
- package/dist/esm/input/XboxGamepadMapping.js +8 -0
- package/dist/esm/input/XboxGamepadMapping.js.map +1 -1
- package/dist/esm/input/index.d.ts +7 -4
- package/dist/esm/input/types.d.ts +17 -73
- package/dist/esm/input/types.js +18 -77
- package/dist/esm/input/types.js.map +1 -1
- package/dist/esm/math/AbstractVector.d.ts +83 -0
- package/dist/esm/math/AbstractVector.js +83 -0
- package/dist/esm/math/AbstractVector.js.map +1 -1
- package/dist/esm/math/Circle.d.ts +32 -0
- package/dist/esm/math/Circle.js +34 -2
- package/dist/esm/math/Circle.js.map +1 -1
- package/dist/esm/math/CircleLike.d.ts +1 -0
- package/dist/esm/math/Collision.d.ts +39 -0
- package/dist/esm/math/Collision.js +5 -0
- package/dist/esm/math/Collision.js.map +1 -1
- package/dist/esm/math/Ellipse.d.ts +11 -0
- package/dist/esm/math/Ellipse.js +18 -2
- package/dist/esm/math/Ellipse.js.map +1 -1
- package/dist/esm/math/EllipseLike.d.ts +3 -0
- package/dist/esm/math/Flags.d.ts +31 -0
- package/dist/esm/math/Flags.js +31 -0
- package/dist/esm/math/Flags.js.map +1 -1
- package/dist/esm/math/Interval.d.ts +15 -0
- package/dist/esm/math/Interval.js +15 -0
- package/dist/esm/math/Interval.js.map +1 -1
- package/dist/esm/math/Line.d.ts +17 -1
- package/dist/esm/math/Line.js +17 -1
- package/dist/esm/math/Line.js.map +1 -1
- package/dist/esm/math/LineLike.d.ts +1 -0
- package/dist/esm/math/Matrix.d.ts +44 -3
- package/dist/esm/math/Matrix.js +44 -3
- package/dist/esm/math/Matrix.js.map +1 -1
- package/dist/esm/math/ObservableSize.d.ts +7 -0
- package/dist/esm/math/ObservableSize.js +7 -0
- package/dist/esm/math/ObservableSize.js.map +1 -1
- package/dist/esm/math/ObservableVector.d.ts +9 -0
- package/dist/esm/math/ObservableVector.js +9 -0
- package/dist/esm/math/ObservableVector.js.map +1 -1
- package/dist/esm/math/PointLike.d.ts +1 -0
- package/dist/esm/math/PolarVector.d.ts +15 -0
- package/dist/esm/math/PolarVector.js +16 -1
- package/dist/esm/math/PolarVector.js.map +1 -1
- package/dist/esm/math/Polygon.d.ts +20 -0
- package/dist/esm/math/Polygon.js +20 -0
- package/dist/esm/math/Polygon.js.map +1 -1
- package/dist/esm/math/PolygonLike.d.ts +4 -0
- package/dist/esm/math/Quadtree.d.ts +40 -3
- package/dist/esm/math/Quadtree.js +39 -3
- package/dist/esm/math/Quadtree.js.map +1 -1
- package/dist/esm/math/Random.d.ts +25 -0
- package/dist/esm/math/Random.js +25 -0
- package/dist/esm/math/Random.js.map +1 -1
- package/dist/esm/math/Rectangle.d.ts +15 -0
- package/dist/esm/math/Rectangle.js +17 -2
- package/dist/esm/math/Rectangle.js.map +1 -1
- package/dist/esm/math/RectangleLike.d.ts +1 -0
- package/dist/esm/math/Segment.d.ts +7 -0
- package/dist/esm/math/Segment.js +7 -0
- package/dist/esm/math/Segment.js.map +1 -1
- package/dist/esm/math/ShapeLike.d.ts +6 -0
- package/dist/esm/math/Size.d.ts +9 -0
- package/dist/esm/math/Size.js +9 -0
- package/dist/esm/math/Size.js.map +1 -1
- package/dist/esm/math/Vector.d.ts +16 -0
- package/dist/esm/math/Vector.js +16 -0
- package/dist/esm/math/Vector.js.map +1 -1
- package/dist/esm/math/collision-detection.d.ts +47 -1
- package/dist/esm/math/collision-detection.js +228 -17
- package/dist/esm/math/collision-detection.js.map +1 -1
- package/dist/esm/math/collision-primitives.d.ts +23 -0
- package/dist/esm/math/collision-primitives.js +23 -0
- package/dist/esm/math/collision-primitives.js.map +1 -1
- package/dist/esm/math/geometry.d.ts +42 -0
- package/dist/esm/math/geometry.js +37 -0
- package/dist/esm/math/geometry.js.map +1 -1
- package/dist/esm/math/utils.d.ts +41 -0
- package/dist/esm/math/utils.js +41 -0
- package/dist/esm/math/utils.js.map +1 -1
- package/dist/esm/particles/Particle.d.ts +37 -0
- package/dist/esm/particles/Particle.js +37 -0
- package/dist/esm/particles/Particle.js.map +1 -1
- package/dist/esm/particles/ParticleProperties.d.ts +15 -0
- package/dist/esm/particles/ParticleSystem.d.ts +69 -0
- package/dist/esm/particles/ParticleSystem.js +69 -0
- package/dist/esm/particles/ParticleSystem.js.map +1 -1
- package/dist/esm/particles/affectors/ColorAffector.d.ts +13 -0
- package/dist/esm/particles/affectors/ColorAffector.js +13 -0
- package/dist/esm/particles/affectors/ColorAffector.js.map +1 -1
- package/dist/esm/particles/affectors/ForceAffector.d.ts +11 -0
- package/dist/esm/particles/affectors/ForceAffector.js +11 -0
- package/dist/esm/particles/affectors/ForceAffector.js.map +1 -1
- package/dist/esm/particles/affectors/ParticleAffector.d.ts +13 -0
- package/dist/esm/particles/affectors/ScaleAffector.d.ts +10 -0
- package/dist/esm/particles/affectors/ScaleAffector.js +10 -0
- package/dist/esm/particles/affectors/ScaleAffector.js.map +1 -1
- package/dist/esm/particles/affectors/TorqueAffector.d.ts +11 -0
- package/dist/esm/particles/affectors/TorqueAffector.js +11 -0
- package/dist/esm/particles/affectors/TorqueAffector.js.map +1 -1
- package/dist/esm/particles/emitters/ParticleEmitter.d.ts +13 -0
- package/dist/esm/particles/emitters/ParticleOptions.d.ts +16 -0
- package/dist/esm/particles/emitters/ParticleOptions.js +16 -0
- package/dist/esm/particles/emitters/ParticleOptions.js.map +1 -1
- package/dist/esm/particles/emitters/UniversalEmitter.d.ts +23 -0
- package/dist/esm/particles/emitters/UniversalEmitter.js +23 -0
- package/dist/esm/particles/emitters/UniversalEmitter.js.map +1 -1
- package/dist/esm/rendering/CallbackRenderPass.d.ts +12 -0
- package/dist/esm/rendering/CallbackRenderPass.js +12 -0
- package/dist/esm/rendering/CallbackRenderPass.js.map +1 -1
- package/dist/esm/rendering/Container.d.ts +43 -0
- package/dist/esm/rendering/Container.js +43 -0
- package/dist/esm/rendering/Container.js.map +1 -1
- package/dist/esm/rendering/Drawable.d.ts +22 -0
- package/dist/esm/rendering/Drawable.js +22 -0
- package/dist/esm/rendering/Drawable.js.map +1 -1
- package/dist/esm/rendering/RenderBackend.d.ts +13 -0
- package/dist/esm/rendering/RenderBackendType.d.ts +4 -0
- package/dist/esm/rendering/RenderBackendType.js +4 -0
- package/dist/esm/rendering/RenderBackendType.js.map +1 -1
- package/dist/esm/rendering/RenderNode.d.ts +18 -0
- package/dist/esm/rendering/RenderNode.js +18 -0
- package/dist/esm/rendering/RenderNode.js.map +1 -1
- package/dist/esm/rendering/RenderPass.d.ts +8 -0
- package/dist/esm/rendering/RenderStats.d.ts +19 -0
- package/dist/esm/rendering/RenderStats.js +7 -0
- package/dist/esm/rendering/RenderStats.js.map +1 -1
- package/dist/esm/rendering/RenderTarget.d.ts +17 -0
- package/dist/esm/rendering/RenderTarget.js +17 -0
- package/dist/esm/rendering/RenderTarget.js.map +1 -1
- package/dist/esm/rendering/RenderTargetPass.d.ts +11 -0
- package/dist/esm/rendering/RenderTargetPass.js +7 -0
- package/dist/esm/rendering/RenderTargetPass.js.map +1 -1
- package/dist/esm/rendering/Renderer.d.ts +15 -0
- package/dist/esm/rendering/RendererRegistry.d.ts +7 -0
- package/dist/esm/rendering/RendererRegistry.js +7 -0
- package/dist/esm/rendering/RendererRegistry.js.map +1 -1
- package/dist/esm/rendering/View.d.ts +67 -2
- package/dist/esm/rendering/View.js +57 -0
- package/dist/esm/rendering/View.js.map +1 -1
- package/dist/esm/rendering/filters/BlurFilter.d.ts +9 -0
- package/dist/esm/rendering/filters/BlurFilter.js +8 -0
- package/dist/esm/rendering/filters/BlurFilter.js.map +1 -1
- package/dist/esm/rendering/filters/ColorFilter.d.ts +7 -0
- package/dist/esm/rendering/filters/ColorFilter.js +7 -0
- package/dist/esm/rendering/filters/ColorFilter.js.map +1 -1
- package/dist/esm/rendering/filters/Filter.d.ts +23 -0
- package/dist/esm/rendering/filters/Filter.js +20 -0
- package/dist/esm/rendering/filters/Filter.js.map +1 -1
- package/dist/esm/rendering/filters/WebGl2ShaderFilter.d.ts +5 -0
- package/dist/esm/rendering/filters/WebGl2ShaderFilter.js +5 -0
- package/dist/esm/rendering/filters/WebGl2ShaderFilter.js.map +1 -1
- package/dist/esm/rendering/filters/WebGpuShaderFilter.d.ts +5 -0
- package/dist/esm/rendering/filters/WebGpuShaderFilter.js +5 -0
- package/dist/esm/rendering/filters/WebGpuShaderFilter.js.map +1 -1
- package/dist/esm/rendering/mesh/Mesh.d.ts +2 -0
- package/dist/esm/rendering/mesh/Mesh.js +2 -0
- package/dist/esm/rendering/mesh/Mesh.js.map +1 -1
- package/dist/esm/rendering/primitives/Graphics.d.ts +34 -0
- package/dist/esm/rendering/primitives/Graphics.js +34 -0
- package/dist/esm/rendering/primitives/Graphics.js.map +1 -1
- package/dist/esm/rendering/shader/Shader.d.ts +36 -0
- package/dist/esm/rendering/shader/Shader.js +26 -0
- package/dist/esm/rendering/shader/Shader.js.map +1 -1
- package/dist/esm/rendering/shader/ShaderAttribute.d.ts +13 -0
- package/dist/esm/rendering/shader/ShaderAttribute.js +13 -0
- package/dist/esm/rendering/shader/ShaderAttribute.js.map +1 -1
- package/dist/esm/rendering/shader/ShaderUniform.d.ts +27 -0
- package/dist/esm/rendering/shader/ShaderUniform.js +28 -1
- package/dist/esm/rendering/shader/ShaderUniform.js.map +1 -1
- package/dist/esm/rendering/sprite/AnimatedSprite.d.ts +38 -0
- package/dist/esm/rendering/sprite/AnimatedSprite.js +36 -0
- package/dist/esm/rendering/sprite/AnimatedSprite.js.map +1 -1
- package/dist/esm/rendering/sprite/Sprite.d.ts +56 -0
- package/dist/esm/rendering/sprite/Sprite.js +56 -0
- package/dist/esm/rendering/sprite/Sprite.js.map +1 -1
- package/dist/esm/rendering/sprite/Spritesheet.d.ts +25 -0
- package/dist/esm/rendering/sprite/Spritesheet.js +20 -0
- package/dist/esm/rendering/sprite/Spritesheet.js.map +1 -1
- package/dist/esm/rendering/text/Text.d.ts +2 -0
- package/dist/esm/rendering/text/Text.js +2 -0
- package/dist/esm/rendering/text/Text.js.map +1 -1
- package/dist/esm/rendering/text/TextStyle.d.ts +29 -0
- package/dist/esm/rendering/text/TextStyle.js +24 -0
- package/dist/esm/rendering/text/TextStyle.js.map +1 -1
- package/dist/esm/rendering/text/types.d.ts +1 -0
- package/dist/esm/rendering/texture/RenderTexture.d.ts +16 -0
- package/dist/esm/rendering/texture/RenderTexture.js +16 -0
- package/dist/esm/rendering/texture/RenderTexture.js.map +1 -1
- package/dist/esm/rendering/texture/Sampler.d.ts +23 -0
- package/dist/esm/rendering/texture/Sampler.js +13 -0
- package/dist/esm/rendering/texture/Sampler.js.map +1 -1
- package/dist/esm/rendering/texture/Texture.d.ts +30 -0
- package/dist/esm/rendering/texture/Texture.js +30 -0
- package/dist/esm/rendering/texture/Texture.js.map +1 -1
- package/dist/esm/rendering/types.d.ts +29 -0
- package/dist/esm/rendering/types.js +29 -0
- package/dist/esm/rendering/types.js.map +1 -1
- package/dist/esm/rendering/utils.d.ts +20 -0
- package/dist/esm/rendering/utils.js +10 -0
- package/dist/esm/rendering/utils.js.map +1 -1
- package/dist/esm/rendering/video/Video.d.ts +35 -1
- package/dist/esm/rendering/video/Video.js +36 -2
- package/dist/esm/rendering/video/Video.js.map +1 -1
- package/dist/esm/rendering/webgl2/AbstractWebGl2BatchedRenderer.d.ts +7 -0
- package/dist/esm/rendering/webgl2/AbstractWebGl2BatchedRenderer.js +7 -0
- package/dist/esm/rendering/webgl2/AbstractWebGl2BatchedRenderer.js.map +1 -1
- package/dist/esm/rendering/webgl2/WebGl2Backend.d.ts +13 -0
- package/dist/esm/rendering/webgl2/WebGl2Backend.js +13 -0
- package/dist/esm/rendering/webgl2/WebGl2Backend.js.map +1 -1
- package/dist/esm/rendering/webgl2/WebGl2RenderBuffer.d.ts +8 -0
- package/dist/esm/rendering/webgl2/WebGl2RenderBuffer.js +8 -0
- package/dist/esm/rendering/webgl2/WebGl2RenderBuffer.js.map +1 -1
- package/dist/esm/rendering/webgpu/WebGpuBackend.d.ts +35 -0
- package/dist/esm/rendering/webgpu/WebGpuBackend.js +135 -5
- package/dist/esm/rendering/webgpu/WebGpuBackend.js.map +1 -1
- package/dist/esm/resources/AbstractAssetFactory.d.ts +20 -0
- package/dist/esm/resources/AbstractAssetFactory.js +20 -0
- package/dist/esm/resources/AbstractAssetFactory.js.map +1 -1
- package/dist/esm/resources/AssetFactory.d.ts +26 -0
- package/dist/esm/resources/AssetManifest.d.ts +45 -0
- package/dist/esm/resources/AssetManifest.js +25 -0
- package/dist/esm/resources/AssetManifest.js.map +1 -1
- package/dist/esm/resources/CacheFirstStrategy.d.ts +15 -0
- package/dist/esm/resources/CacheFirstStrategy.js +19 -4
- package/dist/esm/resources/CacheFirstStrategy.js.map +1 -1
- package/dist/esm/resources/CacheStore.d.ts +23 -0
- package/dist/esm/resources/CacheStrategy.d.ts +28 -0
- package/dist/esm/resources/Database.d.ts +45 -0
- package/dist/esm/resources/FactoryRegistry.d.ts +28 -0
- package/dist/esm/resources/FactoryRegistry.js +24 -0
- package/dist/esm/resources/FactoryRegistry.js.map +1 -1
- package/dist/esm/resources/IndexedDbDatabase.d.ts +22 -1
- package/dist/esm/resources/IndexedDbDatabase.js +21 -0
- package/dist/esm/resources/IndexedDbDatabase.js.map +1 -1
- package/dist/esm/resources/IndexedDbStore.d.ts +20 -0
- package/dist/esm/resources/IndexedDbStore.js +12 -0
- package/dist/esm/resources/IndexedDbStore.js.map +1 -1
- package/dist/esm/resources/Loader.d.ts +172 -0
- package/dist/esm/resources/Loader.js +129 -37
- package/dist/esm/resources/Loader.js.map +1 -1
- package/dist/esm/resources/NetworkOnlyStrategy.d.ts +11 -0
- package/dist/esm/resources/NetworkOnlyStrategy.js +16 -3
- package/dist/esm/resources/NetworkOnlyStrategy.js.map +1 -1
- package/dist/esm/resources/factories/BinaryFactory.d.ts +13 -0
- package/dist/esm/resources/factories/BinaryFactory.js +13 -0
- package/dist/esm/resources/factories/BinaryFactory.js.map +1 -1
- package/dist/esm/resources/factories/FontFactory.d.ts +37 -0
- package/dist/esm/resources/factories/FontFactory.js +26 -0
- package/dist/esm/resources/factories/FontFactory.js.map +1 -1
- package/dist/esm/resources/factories/ImageFactory.d.ts +26 -2
- package/dist/esm/resources/factories/ImageFactory.js +19 -0
- package/dist/esm/resources/factories/ImageFactory.js.map +1 -1
- package/dist/esm/resources/factories/JsonFactory.d.ts +13 -0
- package/dist/esm/resources/factories/JsonFactory.js +13 -0
- package/dist/esm/resources/factories/JsonFactory.js.map +1 -1
- package/dist/esm/resources/factories/MusicFactory.d.ts +36 -0
- package/dist/esm/resources/factories/MusicFactory.js +44 -4
- package/dist/esm/resources/factories/MusicFactory.js.map +1 -1
- package/dist/esm/resources/factories/SoundFactory.d.ts +29 -0
- package/dist/esm/resources/factories/SoundFactory.js +18 -0
- package/dist/esm/resources/factories/SoundFactory.js.map +1 -1
- package/dist/esm/resources/factories/SvgFactory.d.ts +19 -0
- package/dist/esm/resources/factories/SvgFactory.js +19 -0
- package/dist/esm/resources/factories/SvgFactory.js.map +1 -1
- package/dist/esm/resources/factories/TextFactory.d.ts +11 -0
- package/dist/esm/resources/factories/TextFactory.js +11 -0
- package/dist/esm/resources/factories/TextFactory.js.map +1 -1
- package/dist/esm/resources/factories/TextureFactory.d.ts +27 -2
- package/dist/esm/resources/factories/TextureFactory.js +20 -0
- package/dist/esm/resources/factories/TextureFactory.js.map +1 -1
- package/dist/esm/resources/factories/VideoFactory.d.ts +37 -0
- package/dist/esm/resources/factories/VideoFactory.js +48 -5
- package/dist/esm/resources/factories/VideoFactory.js.map +1 -1
- package/dist/esm/resources/factories/VttFactory.d.ts +18 -0
- package/dist/esm/resources/factories/VttFactory.js +104 -3
- package/dist/esm/resources/factories/VttFactory.js.map +1 -1
- package/dist/esm/resources/factories/WasmFactory.d.ts +16 -0
- package/dist/esm/resources/factories/WasmFactory.js +16 -0
- package/dist/esm/resources/factories/WasmFactory.js.map +1 -1
- package/dist/esm/resources/utils.d.ts +10 -0
- package/dist/esm/resources/utils.js +10 -0
- package/dist/esm/resources/utils.js.map +1 -1
- package/dist/exo.esm.js +4673 -745
- package/dist/exo.esm.js.map +1 -1
- package/package.json +8 -8
- package/dist/esm/input/GamepadChannels.d.ts +0 -39
- package/dist/esm/input/GamepadChannels.js +0 -45
- package/dist/esm/input/GamepadChannels.js.map +0 -1
- package/dist/esm/input/GamepadControl.d.ts +0 -15
- package/dist/esm/input/GamepadControl.js +0 -29
- package/dist/esm/input/GamepadControl.js.map +0 -1
- package/dist/esm/input/Input.d.ts +0 -28
- package/dist/esm/input/Input.js +0 -68
- package/dist/esm/input/Input.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,448 @@ All notable changes to ExoJS are documented in this file.
|
|
|
4
4
|
|
|
5
5
|
The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and the project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
6
|
|
|
7
|
+
## [0.7.13] - 2026-05-07
|
|
8
|
+
|
|
9
|
+
Major gamepad-input refactor. Replaces the `new Input(...)` +
|
|
10
|
+
`inputManager.add(...)` pattern with a fluent listener API, splits the
|
|
11
|
+
unified `GamepadChannel` enum into disjoint `GamepadButton` /
|
|
12
|
+
`GamepadAxis` for type-safe button-vs-axis distinction, introduces
|
|
13
|
+
always-4 stable gamepad slots with disconnect-aware listeners, and adds
|
|
14
|
+
rumble, generic per-pad signals, slot-strategy configuration, aggregate
|
|
15
|
+
signed stick channels, and Joy-Con-honest mappings.
|
|
16
|
+
|
|
17
|
+
### Added — Listener API
|
|
18
|
+
|
|
19
|
+
```ts
|
|
20
|
+
// Per inputManager (manual unbind):
|
|
21
|
+
app.input.onTrigger(GamepadButton.South, () => player.jump());
|
|
22
|
+
app.input.onActive(GamepadAxis.LeftStickX, (v) => player.x += v * 5);
|
|
23
|
+
app.input.onStart([Keyboard.Space, GamepadButton.South], () => fire());
|
|
24
|
+
|
|
25
|
+
// Per gamepad (slot-aware, listener survives disconnect/reconnect):
|
|
26
|
+
const pad = app.input.getGamepad(0);
|
|
27
|
+
pad.onTrigger(GamepadButton.South, () => p1.jump());
|
|
28
|
+
|
|
29
|
+
// Per scene (auto-disposed on scene unload):
|
|
30
|
+
this.inputs.onTrigger(Keyboard.Escape, () => this.app.sceneManager.popScene());
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Each method returns an `InputBinding` with `.unbind()` for manual
|
|
34
|
+
lifecycle. Single channel or array of channels is accepted.
|
|
35
|
+
|
|
36
|
+
### Added — Always-4 gamepad slots
|
|
37
|
+
|
|
38
|
+
`InputManager.gamepads` is now a fixed
|
|
39
|
+
`readonly [Gamepad, Gamepad, Gamepad, Gamepad]` tuple. Each `Gamepad`
|
|
40
|
+
instance lives for the application's lifetime; check `pad.connected` for
|
|
41
|
+
hardware presence. Listeners attached when a slot is empty automatically
|
|
42
|
+
activate when a pad connects to that slot — no rebinding required.
|
|
43
|
+
|
|
44
|
+
Convenience accessors on `app.input`:
|
|
45
|
+
|
|
46
|
+
- `getGamepad(slot)` — readable single-slot accessor (equivalent to
|
|
47
|
+
`gamepads[slot]`).
|
|
48
|
+
- `connectedGamepads: readonly Gamepad[]` — only the currently-attached
|
|
49
|
+
pads, in slot order.
|
|
50
|
+
- `connectedGamepadCount: number`
|
|
51
|
+
- `firstConnectedGamepad: Gamepad | null`
|
|
52
|
+
- `hasGamepad: boolean`
|
|
53
|
+
|
|
54
|
+
Per-pad: `pad.internalIndex` returns the browser's `Gamepad.index` for
|
|
55
|
+
the attached hardware (or `null` when disconnected). Low-level escape
|
|
56
|
+
hatch — prefer `pad.slot` for stable application-side identity.
|
|
57
|
+
|
|
58
|
+
### Added — Slot strategy
|
|
59
|
+
|
|
60
|
+
`new Application({ gamepadSlotStrategy: 'sticky' | 'compact' })` —
|
|
61
|
+
default `'sticky'` (each pad keeps its slot through disconnects).
|
|
62
|
+
`'compact'` shifts higher-numbered pads down to fill gaps after a
|
|
63
|
+
disconnect (good for hot-seat couch coop where "the first N pads are
|
|
64
|
+
the N players" is the desired semantic).
|
|
65
|
+
|
|
66
|
+
In compact mode, the disconnect signal fires on the slot that *ended
|
|
67
|
+
up* empty after the shift (not the slot the disconnected hardware
|
|
68
|
+
originally occupied), keeping `pad.connected === false` consistent with
|
|
69
|
+
the fired event. Slots that received a different physical pad through
|
|
70
|
+
the shift dispatch a separate signal:
|
|
71
|
+
|
|
72
|
+
- `pad.onPadReassigned: Signal<[fromSlot: 0 | 1 | 2 | 3]>`
|
|
73
|
+
- `app.input.onAnyGamepadReassigned: Signal<[Gamepad, fromSlot]>`
|
|
74
|
+
|
|
75
|
+
so player-binding code can re-resolve which `Gamepad` belongs to which
|
|
76
|
+
player when slots renumber.
|
|
77
|
+
|
|
78
|
+
### Added — Generic signals
|
|
79
|
+
|
|
80
|
+
Per-pad:
|
|
81
|
+
- `pad.onConnect: Signal<[]>`
|
|
82
|
+
- `pad.onDisconnect: Signal<[]>`
|
|
83
|
+
- `pad.onButtonDown: Signal<[GamepadButton, number]>`
|
|
84
|
+
- `pad.onButtonUp: Signal<[GamepadButton, number]>`
|
|
85
|
+
- `pad.onAxisChange: Signal<[GamepadAxis, number]>`
|
|
86
|
+
|
|
87
|
+
Aggregate across all pads:
|
|
88
|
+
- `inputManager.onAnyGamepadButtonDown: Signal<[Gamepad, GamepadButton, number]>`
|
|
89
|
+
- `inputManager.onAnyGamepadButtonUp: Signal<[Gamepad, GamepadButton, number]>`
|
|
90
|
+
- `inputManager.onAnyGamepadAxisChange: Signal<[Gamepad, GamepadAxis, number]>`
|
|
91
|
+
|
|
92
|
+
### Added — Vibration
|
|
93
|
+
|
|
94
|
+
```ts
|
|
95
|
+
if (pad.canVibrate) {
|
|
96
|
+
await pad.vibrate({ duration: 200, weakMagnitude: 0.5, strongMagnitude: 1.0 });
|
|
97
|
+
}
|
|
98
|
+
pad.stopVibration();
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
Wraps the W3C `vibrationActuator.playEffect('dual-rumble')` API. Silent
|
|
102
|
+
no-op on platforms without haptic support — use `pad.canVibrate` to
|
|
103
|
+
detect availability for UI gating. Trigger-rumble (PS5 / Xbox Series
|
|
104
|
+
adaptive triggers) is not exposed because browser support is currently
|
|
105
|
+
Chrome-only and non-standard.
|
|
106
|
+
|
|
107
|
+
### Added — Aggregate axis channels
|
|
108
|
+
|
|
109
|
+
`GamepadAxis.LeftStickX`, `LeftStickY`, `RightStickX`, `RightStickY` —
|
|
110
|
+
signed -1..1 values that consume the full bipolar range of the physical
|
|
111
|
+
stick. Use these for stick-style movement input; the existing
|
|
112
|
+
direction-split channels (`LeftStickLeft`, `LeftStickRight`, etc.)
|
|
113
|
+
remain available for buttons-style 0..1 input.
|
|
114
|
+
|
|
115
|
+
```ts
|
|
116
|
+
// Stick-style — one binding per axis, signed value:
|
|
117
|
+
this.inputs.onActive(GamepadAxis.LeftStickX, (x) => player.x += x * 5);
|
|
118
|
+
|
|
119
|
+
// Buttons-style — separate bindings per direction, 0..1 each:
|
|
120
|
+
this.inputs.onActive(GamepadAxis.LeftStickLeft, (v) => player.x -= v * 5);
|
|
121
|
+
this.inputs.onActive(GamepadAxis.LeftStickRight, (v) => player.x += v * 5);
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
### Added — `pad.hasChannel(channel)` capability check
|
|
125
|
+
|
|
126
|
+
```ts
|
|
127
|
+
if (pad.hasChannel(GamepadAxis.RightStickX)) {
|
|
128
|
+
pad.onActive(GamepadAxis.RightStickX, (v) => crosshair.x += v * 8);
|
|
129
|
+
}
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
Returns `true` only when the pad's mapping declares the requested
|
|
133
|
+
channel. Useful for graceful degradation on devices with limited
|
|
134
|
+
hardware (e.g. single Joy-Con without a right stick).
|
|
135
|
+
|
|
136
|
+
### Added — `Scene.inputs` proxy
|
|
137
|
+
|
|
138
|
+
Bindings created via `this.inputs.onTrigger(...)` etc. are automatically
|
|
139
|
+
disposed when the scene unloads. No manual cleanup tracking required.
|
|
140
|
+
Internally tracks each binding and calls `.unbind()` in `Scene.destroy`.
|
|
141
|
+
|
|
142
|
+
### Added — Steam Deck / Steam Virtual Gamepad / Valve fallback
|
|
143
|
+
|
|
144
|
+
New `SteamDeckGamepadMapping` covers the raw HID layout reported by the
|
|
145
|
+
Steam Deck (and likely future Valve hardware) when Steam Input is *not*
|
|
146
|
+
intercepting the device. Indices follow the SDL_GameControllerDB Linux
|
|
147
|
+
entry: face buttons at 3-6, D-pad at 16-19, paddles at 20-23, triggers
|
|
148
|
+
as analog axes 8/9.
|
|
149
|
+
|
|
150
|
+
Routing rules added to `builtInGamepadDefinitions`:
|
|
151
|
+
|
|
152
|
+
| Browser ID | Mapping |
|
|
153
|
+
|---|---|
|
|
154
|
+
| `28de:1102`, `28de:1142` | `SteamControllerGamepadMapping` (existing, original Steam Controller raw) |
|
|
155
|
+
| `28de:11ff` (Steam Virtual Gamepad — any controller via Steam Input) | `GenericDualAnalogGamepadMapping` (W3C standard Xbox emulation) |
|
|
156
|
+
| `28de:1205` | `SteamDeckGamepadMapping` (raw Steam Deck) |
|
|
157
|
+
| Vendor `28de` (anything else from Valve, e.g. future Steam Controller 2 raw) | `SteamDeckGamepadMapping` (best-effort fallback) |
|
|
158
|
+
|
|
159
|
+
Enum: `GamepadMappingFamily.SteamDeck` added.
|
|
160
|
+
|
|
161
|
+
### Added — Paddle2/3/4 buttons + Touchpad2X/Y axes
|
|
162
|
+
|
|
163
|
+
The per-gamepad channel allocation is repartitioned into 32 button
|
|
164
|
+
slots + 32 axis slots (was 21 / 22 with mid-block axis indices). 24
|
|
165
|
+
named buttons (`South`-`Paddle4`) plus 8 reserved slots; 24 named axes
|
|
166
|
+
(stick split + aggregate + dual-touchpad XY + 4 auxiliary bipolar) plus
|
|
167
|
+
8 reserved slots. The reserved slots are accessible to custom mappings
|
|
168
|
+
without colliding with future named additions.
|
|
169
|
+
|
|
170
|
+
New named channels:
|
|
171
|
+
|
|
172
|
+
- `GamepadButton.Paddle2`, `.Paddle3`, `.Paddle4` — extra paddles
|
|
173
|
+
/ back buttons on Xbox Elite, PS5 Edge, Steam Deck (R4/L5/R5).
|
|
174
|
+
- `GamepadAxis.Touchpad2X`, `.Touchpad2Y` — secondary touchpad on
|
|
175
|
+
dual-touchpad hardware (Steam Deck right pad).
|
|
176
|
+
|
|
177
|
+
User code that previously read `GamepadButton.Paddle1` etc. is
|
|
178
|
+
unaffected — channel **values** changed (offsets re-laid-out), but the
|
|
179
|
+
namespace constants resolve to the new offsets transparently.
|
|
180
|
+
|
|
181
|
+
### Added — JoyCon-honest mappings
|
|
182
|
+
|
|
183
|
+
`JoyConLeftGamepadMapping` and `JoyConRightGamepadMapping` no longer
|
|
184
|
+
inherit the full DualAnalog 16-axis layout. Each declares only channels
|
|
185
|
+
that physically exist on the device (one stick mapped to LeftStick
|
|
186
|
+
channels, four face buttons, SL/SR shoulders, Minus/Plus, Capture/Home,
|
|
187
|
+
stick-click). Right-stick channels and other phantom hardware are
|
|
188
|
+
intentionally absent — `pad.hasChannel(GamepadAxis.RightStickX)` returns
|
|
189
|
+
`false` on a solo Joy-Con.
|
|
190
|
+
|
|
191
|
+
### Changed — `app.inputManager` renamed to `app.input` (BREAKING)
|
|
192
|
+
|
|
193
|
+
For consistency with `app.audio` and parity with the brevity of
|
|
194
|
+
`app.tweens` / `app.loader` / `app.interaction`. All call sites that
|
|
195
|
+
read or wrote `app.inputManager` need a one-token rename.
|
|
196
|
+
|
|
197
|
+
```ts
|
|
198
|
+
// Before:
|
|
199
|
+
app.inputManager.onTrigger(GamepadButton.South, () => fire());
|
|
200
|
+
app.inputManager.gamepads[0];
|
|
201
|
+
|
|
202
|
+
// After:
|
|
203
|
+
app.input.onTrigger(GamepadButton.South, () => fire());
|
|
204
|
+
app.input.getGamepad(0);
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
### Fixed — Compact-mode disconnect ordering
|
|
208
|
+
|
|
209
|
+
In `'compact'` slot strategy, `onDisconnect` previously fired on the
|
|
210
|
+
slot the disconnected hardware originally occupied — *before* the
|
|
211
|
+
compaction shift moved a different physical pad into that slot. User
|
|
212
|
+
code observing the event would see `pad.connected === true` because
|
|
213
|
+
the slot had been silently re-bound by the shift. Now compaction is
|
|
214
|
+
applied first (silent), and `onDisconnect` fires on the slot that
|
|
215
|
+
ended up empty (the trailing slot). Sticky behaviour is unchanged.
|
|
216
|
+
|
|
217
|
+
### Changed — Channel naming (BREAKING)
|
|
218
|
+
|
|
219
|
+
The unified `GamepadChannel` enum is split into two disjoint enums for
|
|
220
|
+
nominal type safety:
|
|
221
|
+
|
|
222
|
+
| Old | New (user-facing) | New (internal type) |
|
|
223
|
+
|---|---|---|
|
|
224
|
+
| `GamepadChannel.ButtonSouth` | `GamepadButton.South` | `GamepadButtonChannel.South` |
|
|
225
|
+
| `GamepadChannel.ButtonEast` | `GamepadButton.East` | `GamepadButtonChannel.East` |
|
|
226
|
+
| `GamepadChannel.LeftShoulder` | `GamepadButton.LeftShoulder` | `GamepadButtonChannel.LeftShoulder` |
|
|
227
|
+
| `GamepadChannel.LeftStickLeft` | `GamepadAxis.LeftStickLeft` | `GamepadAxisChannel.LeftStickLeft` |
|
|
228
|
+
| ... | ... | ... |
|
|
229
|
+
|
|
230
|
+
User code references the namespace mirrors (`GamepadButton.X`,
|
|
231
|
+
`GamepadAxis.Y`) — same `Pointer.X` / `Keyboard.Space` convention. Type
|
|
232
|
+
checking now rejects passing a button channel where an axis is expected
|
|
233
|
+
(and vice versa).
|
|
234
|
+
|
|
235
|
+
### Changed — `GamepadControl` removed (BREAKING)
|
|
236
|
+
|
|
237
|
+
`GamepadControl` is replaced by two concrete classes:
|
|
238
|
+
|
|
239
|
+
- `GamepadButton` — wraps a button index + channel, with optional
|
|
240
|
+
`invert` and `threshold` options. `transformValue(v)` clamps to [0, 1].
|
|
241
|
+
- `GamepadAxis` — wraps an axis index + channel, with optional `invert`,
|
|
242
|
+
`normalize`, `threshold`, and the new `bipolar` flag.
|
|
243
|
+
`transformValue(v)` clamps to [-1, +1] and applies the pipeline.
|
|
244
|
+
|
|
245
|
+
Custom mappings construct these directly via `new GamepadButton(index, channel)`
|
|
246
|
+
/ `new GamepadAxis(index, channel, options)` —
|
|
247
|
+
`GamepadMapping.createControls()` is removed.
|
|
248
|
+
|
|
249
|
+
### Changed — `Input` class replaced by `InputBinding` (BREAKING)
|
|
250
|
+
|
|
251
|
+
`new Input(channel, { onTrigger: cb })` + `inputManager.add(input)` is
|
|
252
|
+
gone. Use `inputManager.onTrigger(channel, cb)` / `pad.onTrigger(...)` /
|
|
253
|
+
`scene.inputs.onTrigger(...)` instead. Returned `InputBinding` exposes
|
|
254
|
+
the same `onStart`/`onActive`/`onStop`/`onTrigger` Signals plus a
|
|
255
|
+
`.unbind()` method.
|
|
256
|
+
|
|
257
|
+
### Changed — `inputManager.add/remove/clear/getGamepad/onGamepadUpdated` removed (BREAKING)
|
|
258
|
+
|
|
259
|
+
The push-input-objects-into-the-manager API is fully replaced by the
|
|
260
|
+
factory-method API. `getGamepad(index)` is replaced by direct
|
|
261
|
+
`gamepads[slot]` indexing. `onGamepadUpdated` is replaced by
|
|
262
|
+
`onAnyGamepadButtonDown` / `onAnyGamepadButtonUp` /
|
|
263
|
+
`onAnyGamepadAxisChange` which carry semantic transition information
|
|
264
|
+
instead of firing every frame.
|
|
265
|
+
|
|
266
|
+
### Changed — `Gamepad` constructor signature (BREAKING)
|
|
267
|
+
|
|
268
|
+
```ts
|
|
269
|
+
// Before:
|
|
270
|
+
new Gamepad(index, channels, mapping)
|
|
271
|
+
new Gamepad(browserGamepad, channels, definition)
|
|
272
|
+
|
|
273
|
+
// After (engine-internal — InputManager handles slot allocation):
|
|
274
|
+
new Gamepad(slot, channels)
|
|
275
|
+
// followed by pad._bind(browserGamepad, definition) on connect
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
User code does not construct `Gamepad` instances directly. Reads from
|
|
279
|
+
`pad.info` / `pad.mapping` / `pad.connected` instead of the previous
|
|
280
|
+
`pad.name` / `pad.label` / `pad.vendorId` / etc. inline accessors.
|
|
281
|
+
|
|
282
|
+
### Migration guide
|
|
283
|
+
|
|
284
|
+
```ts
|
|
285
|
+
// Before:
|
|
286
|
+
import { Input, GamepadChannel, Keyboard } from '@codexo/exojs';
|
|
287
|
+
|
|
288
|
+
const jump = new Input(GamepadChannel.ButtonSouth, { onTrigger: () => player.jump() });
|
|
289
|
+
app.input.add(jump);
|
|
290
|
+
|
|
291
|
+
// After (any of three styles, depending on lifecycle):
|
|
292
|
+
import { GamepadButton, Keyboard } from '@codexo/exojs';
|
|
293
|
+
|
|
294
|
+
// Manual lifecycle
|
|
295
|
+
const binding = app.input.onTrigger(GamepadButton.South, () => player.jump());
|
|
296
|
+
binding.unbind(); // when done
|
|
297
|
+
|
|
298
|
+
// Auto-disposed on scene unload
|
|
299
|
+
this.inputs.onTrigger(GamepadButton.South, () => player.jump());
|
|
300
|
+
|
|
301
|
+
// Pinned to a specific pad slot
|
|
302
|
+
this.app.input.gamepads[0].onTrigger(GamepadButton.South, () => player.jump());
|
|
303
|
+
```
|
|
304
|
+
|
|
305
|
+
```ts
|
|
306
|
+
// Stick movement — before:
|
|
307
|
+
const moveLeft = new Input(GamepadChannel.LeftStickLeft);
|
|
308
|
+
const moveRight = new Input(GamepadChannel.LeftStickRight);
|
|
309
|
+
app.input.add(moveLeft);
|
|
310
|
+
app.input.add(moveRight);
|
|
311
|
+
// per frame: const x = moveRight.value - moveLeft.value;
|
|
312
|
+
|
|
313
|
+
// After (signed aggregate channel):
|
|
314
|
+
this.inputs.onActive(GamepadAxis.LeftStickX, (x) => player.x += x * 5);
|
|
315
|
+
```
|
|
316
|
+
|
|
317
|
+
```ts
|
|
318
|
+
// Custom mapping — before:
|
|
319
|
+
import { GamepadMapping, GamepadChannel } from '@codexo/exojs';
|
|
320
|
+
const buttons = GamepadMapping.createControls([
|
|
321
|
+
[0, GamepadChannel.ButtonSouth],
|
|
322
|
+
[1, GamepadChannel.ButtonEast],
|
|
323
|
+
]);
|
|
324
|
+
|
|
325
|
+
// After:
|
|
326
|
+
import { GamepadButton, GamepadMapping, GamepadMappingFamily } from '@codexo/exojs';
|
|
327
|
+
class MyMapping extends GamepadMapping {
|
|
328
|
+
public readonly family = GamepadMappingFamily.GenericDualAnalog;
|
|
329
|
+
public constructor() {
|
|
330
|
+
super(
|
|
331
|
+
[
|
|
332
|
+
new GamepadButton(0, GamepadButton.South),
|
|
333
|
+
new GamepadButton(1, GamepadButton.East),
|
|
334
|
+
],
|
|
335
|
+
[],
|
|
336
|
+
);
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
```
|
|
340
|
+
|
|
341
|
+
## [0.7.12] - 2026-05-07
|
|
342
|
+
|
|
343
|
+
API audit cleanup pass — implements collision-response computation that was
|
|
344
|
+
silently returning zero/null, exports previously-internal type aliases that
|
|
345
|
+
callers couldn't otherwise type, and removes a handful of small API papercuts
|
|
346
|
+
surfaced during the JSDoc-coverage pass that landed across `0.7.x`.
|
|
347
|
+
|
|
348
|
+
### Fixed — Collision-response computation
|
|
349
|
+
|
|
350
|
+
Four collision paths were returning a `CollisionResponse` whose `projectionN`
|
|
351
|
+
and `projectionV` were zero vectors (or returning `null` outright), making
|
|
352
|
+
the response unusable for separation/sliding logic.
|
|
353
|
+
|
|
354
|
+
- **`getCollisionRectangleRectangle`** — now returns the minimum-translation
|
|
355
|
+
vector (MTV) along the axis with the smaller penetration, signed by the
|
|
356
|
+
centre-to-centre direction. Existing `overlap` and containment flags are
|
|
357
|
+
unchanged.
|
|
358
|
+
- **`getCollisionCircleRectangle`** — rewritten to use the standard
|
|
359
|
+
closest-point-on-rect algorithm. Previously computed distance against an
|
|
360
|
+
out-of-rect anchor point, producing a wrong result whenever the circle
|
|
361
|
+
centre was inside the rectangle. Normal points from rect surface toward
|
|
362
|
+
circle; falls back to the smaller-exit axis when the circle centre is
|
|
363
|
+
inside the rect.
|
|
364
|
+
- **`Ellipse.collidesWith`** — implements `Ellipse`-vs-`Rectangle` and
|
|
365
|
+
`Ellipse`-vs-`Circle` via the directional ellipse-boundary equation
|
|
366
|
+
`1 / sqrt((dx/rx)² + (dy/ry)²)`. Other targets (ellipse-vs-ellipse,
|
|
367
|
+
ellipse-vs-polygon, ellipse-vs-line) still return `null` —
|
|
368
|
+
`intersectsWith` remains the boolean fallback.
|
|
369
|
+
- **`Line.collidesWith`** — kept returning `null` (lines have no
|
|
370
|
+
meaningful SAT response), but the JSDoc now states the contract
|
|
371
|
+
explicitly so callers don't expect a vector.
|
|
372
|
+
|
|
373
|
+
`Rectangle.collidesWith` and `Circle.collidesWith` route ellipse targets to
|
|
374
|
+
the new functions via the existing `swap` flag.
|
|
375
|
+
|
|
376
|
+
### Fixed — Object-URL leak (re-emphasised; was 0.7.11 fix)
|
|
377
|
+
|
|
378
|
+
The 0.7.11 fix for `MusicFactory` and `VideoFactory` URL revocation is
|
|
379
|
+
unchanged in 0.7.12 — listing it here for completeness because the pre-1.0
|
|
380
|
+
audit findings memory carries a forward reference to it.
|
|
381
|
+
|
|
382
|
+
### Changed — Visibility / readonly tightening (potentially breaking)
|
|
383
|
+
|
|
384
|
+
Pre-1.0 cleanups that narrow the public surface where callers could
|
|
385
|
+
previously poke at internal state:
|
|
386
|
+
|
|
387
|
+
- **`GamepadMapping.buttons` / `.axes`** typed `ReadonlyArray<GamepadControl>`
|
|
388
|
+
instead of `Array<GamepadControl>`. Internal `destroy()` retains the
|
|
389
|
+
`length = 0` clear via a local cast. **Breaking** for callers that were
|
|
390
|
+
pushing or splicing the arrays directly.
|
|
391
|
+
- **`View.updateTransform()` / `.updateBounds()`** changed from `public` to
|
|
392
|
+
`protected`. They were never safe to call externally — invoking them
|
|
393
|
+
bypassed the dirty-flag clearing in `getTransform()` / `getBounds()` and
|
|
394
|
+
could cause redundant recalculation. **Breaking** if you relied on them.
|
|
395
|
+
- **`IndexedDbDatabase.getObjectStore()`** changed from `public` to
|
|
396
|
+
`protected`. Only callers were the class's own `load`/`save`/`delete`
|
|
397
|
+
methods. **Breaking** if any subclass referenced it externally.
|
|
398
|
+
- **`GamepadDefinitions.normalizeIds`** is no longer exported. It was an
|
|
399
|
+
in-file helper that leaked through the barrel. **Breaking** for any
|
|
400
|
+
caller importing it directly.
|
|
401
|
+
- **`GamepadPromptLayouts.buildControlChannelMap()`** renamed to
|
|
402
|
+
`getControlChannelMap()` — the name now matches the behaviour (returns a
|
|
403
|
+
pre-built constant; never builds anything). **Breaking** rename.
|
|
404
|
+
|
|
405
|
+
### Added — API surface
|
|
406
|
+
|
|
407
|
+
Additive changes; not breaking:
|
|
408
|
+
|
|
409
|
+
- `EqualizerFilter` now exposes runtime setters for `lowFrequency`,
|
|
410
|
+
`midFrequency`, and `highFrequency` (previously only construction-time).
|
|
411
|
+
Smooth ramp via `setTargetAtTime` to avoid clicks.
|
|
412
|
+
- `Filter` (abstract base for post-process filters) now declares a
|
|
413
|
+
`destroy()` method with a no-op default. `BlurFilter` / `ColorFilter` /
|
|
414
|
+
`WebGl2ShaderFilter` / `WebGpuShaderFilter` mark their existing
|
|
415
|
+
implementations as `override`. Generic-filter consumers no longer need
|
|
416
|
+
a cast to release filters.
|
|
417
|
+
- `getCollisionEllipseRectangle` and `getCollisionEllipseCircle` are
|
|
418
|
+
exported from the math barrel for direct use.
|
|
419
|
+
|
|
420
|
+
### Changed — Internal cleanups
|
|
421
|
+
|
|
422
|
+
Doc-only and signature-only refactors:
|
|
423
|
+
|
|
424
|
+
- `Sprite._invalidateSubtreeTransform` / `._invalidateBoundsCascade` tagged
|
|
425
|
+
`@internal` (they are `public` only because of TS friend-class limits).
|
|
426
|
+
- `_getDebugQuadtree` (InteractionManager) and `_walkBounds` (Quadtree)
|
|
427
|
+
tagged `@internal` to mark the friend-class link to the debug layer.
|
|
428
|
+
- `PerformanceLayer` declares `viewMode` explicitly to match the other
|
|
429
|
+
debug layers.
|
|
430
|
+
- `PointerStackLayer._buildLines` lost its two unused `_panelX` / `_panelY`
|
|
431
|
+
parameters. Internal-only; not user-visible.
|
|
432
|
+
- `intersectionCirclePoly` got an inline comment explaining the
|
|
433
|
+
negated-frame coordinate transform.
|
|
434
|
+
- `AudioAnalyserOptions` interface picked up per-field JSDoc with documented
|
|
435
|
+
defaults.
|
|
436
|
+
- `SoundFactoryOptions.poolSize` JSDoc names the implicit `Sound` default (8).
|
|
437
|
+
- `ChorusFilter` lost a redundant `as AudioParam` cast.
|
|
438
|
+
- `Video.setupWithAudioContext` is now an arrow-bound field instead of a
|
|
439
|
+
context-bound method; cleaner internally, no API change.
|
|
440
|
+
- `ShaderUniform.propName` uses `String.prototype.substring` instead of the
|
|
441
|
+
deprecated `substr`.
|
|
442
|
+
- `Tween.repeat` JSDoc now ships an `@example` block clarifying that
|
|
443
|
+
`repeat(2)` runs the animation three times total.
|
|
444
|
+
- `Line.collidesWith` documents the always-`null` behaviour as intentional.
|
|
445
|
+
- `RenderTarget.addDestroyListener` / `.removeDestroyListener` got JSDoc
|
|
446
|
+
pointing out that `RenderTexture` (which extends `RenderTarget`) inherits
|
|
447
|
+
them; the audit finding that claimed otherwise was incorrect.
|
|
448
|
+
|
|
7
449
|
## [0.7.11] - 2026-05-07
|
|
8
450
|
|
|
9
451
|
Performance pass — adds a multi-domain benchmark suite, an auto-profiler
|
|
@@ -1,6 +1,34 @@
|
|
|
1
1
|
import { TweenState } from './types';
|
|
2
2
|
import type { EasingFunction, TweenLifecycleCallback, TweenUpdateCallback } from './types';
|
|
3
3
|
import type { TweenManager } from './TweenManager';
|
|
4
|
+
/**
|
|
5
|
+
* Animates numeric properties of `target` from their current value to a
|
|
6
|
+
* configured end value over a duration in seconds. Supports easing, delay,
|
|
7
|
+
* repeat (with optional yoyo), chaining, and lifecycle callbacks
|
|
8
|
+
* ({@link Tween.onStart}, {@link Tween.onUpdate}, {@link Tween.onComplete},
|
|
9
|
+
* {@link Tween.onRepeat}).
|
|
10
|
+
*
|
|
11
|
+
* Tweens are typically created via {@link TweenManager.create}, which attaches
|
|
12
|
+
* them to the manager so they advance once per frame. Stand-alone usage is
|
|
13
|
+
* supported by calling {@link Tween.update} manually with a frame delta.
|
|
14
|
+
*
|
|
15
|
+
* Start values are captured lazily on the first update after {@link Tween.start},
|
|
16
|
+
* so target properties may be mutated between configuration and start without
|
|
17
|
+
* affecting the captured baseline.
|
|
18
|
+
*
|
|
19
|
+
* Only number-typed properties on `target` are interpolated; non-number
|
|
20
|
+
* properties listed in {@link Tween.to} emit a console warning and are skipped.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```ts
|
|
24
|
+
* app.tweens.create(sprite.position)
|
|
25
|
+
* .to({ x: 200 }, 1.5)
|
|
26
|
+
* .easing(Ease.cubicInOut)
|
|
27
|
+
* .yoyo()
|
|
28
|
+
* .repeat(-1)
|
|
29
|
+
* .start();
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
4
32
|
export declare class Tween<T extends object = object> {
|
|
5
33
|
private readonly _target;
|
|
6
34
|
private _state;
|
|
@@ -49,7 +77,18 @@ export declare class Tween<T extends object = object> {
|
|
|
49
77
|
easing(fn: EasingFunction): this;
|
|
50
78
|
/**
|
|
51
79
|
* Number of additional repeat cycles. -1 = infinite. Default 0 (runs once).
|
|
52
|
-
*
|
|
80
|
+
*
|
|
81
|
+
* The argument counts cycles **after** the first, not the total cycle
|
|
82
|
+
* count — `repeat(2)` runs the animation three times total (the initial
|
|
83
|
+
* pass plus two repeats).
|
|
84
|
+
*
|
|
85
|
+
* @example
|
|
86
|
+
* ```ts
|
|
87
|
+
* tween.repeat(0); // runs once
|
|
88
|
+
* tween.repeat(1); // runs twice
|
|
89
|
+
* tween.repeat(2); // runs three times
|
|
90
|
+
* tween.repeat(-1); // runs forever
|
|
91
|
+
* ```
|
|
53
92
|
*/
|
|
54
93
|
repeat(count: number): this;
|
|
55
94
|
/**
|
|
@@ -57,9 +96,29 @@ export declare class Tween<T extends object = object> {
|
|
|
57
96
|
* combined with repeat(). Calling yoyo() without repeat() is a no-op.
|
|
58
97
|
*/
|
|
59
98
|
yoyo(enabled?: boolean): this;
|
|
99
|
+
/**
|
|
100
|
+
* Register a callback fired once when the tween begins interpolating
|
|
101
|
+
* (after any configured delay has elapsed). Fires only on the first
|
|
102
|
+
* cycle — repeats do not re-trigger it.
|
|
103
|
+
*/
|
|
60
104
|
onStart(callback: TweenLifecycleCallback): this;
|
|
105
|
+
/**
|
|
106
|
+
* Register a callback fired on every active update. Receives the eased
|
|
107
|
+
* progress in 0..1 — already direction-flipped for yoyo cycles.
|
|
108
|
+
*/
|
|
61
109
|
onUpdate(callback: TweenUpdateCallback): this;
|
|
110
|
+
/**
|
|
111
|
+
* Register a callback fired when the tween finishes naturally (all repeat
|
|
112
|
+
* cycles exhausted). Does NOT fire when the tween is stopped via
|
|
113
|
+
* {@link Tween.stop}.
|
|
114
|
+
*/
|
|
62
115
|
onComplete(callback: TweenLifecycleCallback): this;
|
|
116
|
+
/**
|
|
117
|
+
* Register a callback fired at the boundary of each repeat cycle, after
|
|
118
|
+
* the cycle counter is decremented and before the next cycle begins. Not
|
|
119
|
+
* fired on the final cycle's completion (use {@link Tween.onComplete}
|
|
120
|
+
* for that).
|
|
121
|
+
*/
|
|
63
122
|
onRepeat(callback: TweenLifecycleCallback): this;
|
|
64
123
|
/**
|
|
65
124
|
* Start the tween. If a manager owns this tween it is already tracked;
|
|
@@ -1,6 +1,34 @@
|
|
|
1
1
|
import { Ease } from './Easing.js';
|
|
2
2
|
import { TweenState } from './types.js';
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* Animates numeric properties of `target` from their current value to a
|
|
6
|
+
* configured end value over a duration in seconds. Supports easing, delay,
|
|
7
|
+
* repeat (with optional yoyo), chaining, and lifecycle callbacks
|
|
8
|
+
* ({@link Tween.onStart}, {@link Tween.onUpdate}, {@link Tween.onComplete},
|
|
9
|
+
* {@link Tween.onRepeat}).
|
|
10
|
+
*
|
|
11
|
+
* Tweens are typically created via {@link TweenManager.create}, which attaches
|
|
12
|
+
* them to the manager so they advance once per frame. Stand-alone usage is
|
|
13
|
+
* supported by calling {@link Tween.update} manually with a frame delta.
|
|
14
|
+
*
|
|
15
|
+
* Start values are captured lazily on the first update after {@link Tween.start},
|
|
16
|
+
* so target properties may be mutated between configuration and start without
|
|
17
|
+
* affecting the captured baseline.
|
|
18
|
+
*
|
|
19
|
+
* Only number-typed properties on `target` are interpolated; non-number
|
|
20
|
+
* properties listed in {@link Tween.to} emit a console warning and are skipped.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```ts
|
|
24
|
+
* app.tweens.create(sprite.position)
|
|
25
|
+
* .to({ x: 200 }, 1.5)
|
|
26
|
+
* .easing(Ease.cubicInOut)
|
|
27
|
+
* .yoyo()
|
|
28
|
+
* .repeat(-1)
|
|
29
|
+
* .start();
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
4
32
|
class Tween {
|
|
5
33
|
_target;
|
|
6
34
|
_state = TweenState.Idle;
|
|
@@ -72,7 +100,18 @@ class Tween {
|
|
|
72
100
|
}
|
|
73
101
|
/**
|
|
74
102
|
* Number of additional repeat cycles. -1 = infinite. Default 0 (runs once).
|
|
75
|
-
*
|
|
103
|
+
*
|
|
104
|
+
* The argument counts cycles **after** the first, not the total cycle
|
|
105
|
+
* count — `repeat(2)` runs the animation three times total (the initial
|
|
106
|
+
* pass plus two repeats).
|
|
107
|
+
*
|
|
108
|
+
* @example
|
|
109
|
+
* ```ts
|
|
110
|
+
* tween.repeat(0); // runs once
|
|
111
|
+
* tween.repeat(1); // runs twice
|
|
112
|
+
* tween.repeat(2); // runs three times
|
|
113
|
+
* tween.repeat(-1); // runs forever
|
|
114
|
+
* ```
|
|
76
115
|
*/
|
|
77
116
|
repeat(count) {
|
|
78
117
|
this._repeatTotal = count;
|
|
@@ -86,18 +125,38 @@ class Tween {
|
|
|
86
125
|
this._yoyo = enabled;
|
|
87
126
|
return this;
|
|
88
127
|
}
|
|
128
|
+
/**
|
|
129
|
+
* Register a callback fired once when the tween begins interpolating
|
|
130
|
+
* (after any configured delay has elapsed). Fires only on the first
|
|
131
|
+
* cycle — repeats do not re-trigger it.
|
|
132
|
+
*/
|
|
89
133
|
onStart(callback) {
|
|
90
134
|
this._onStart = callback;
|
|
91
135
|
return this;
|
|
92
136
|
}
|
|
137
|
+
/**
|
|
138
|
+
* Register a callback fired on every active update. Receives the eased
|
|
139
|
+
* progress in 0..1 — already direction-flipped for yoyo cycles.
|
|
140
|
+
*/
|
|
93
141
|
onUpdate(callback) {
|
|
94
142
|
this._onUpdate = callback;
|
|
95
143
|
return this;
|
|
96
144
|
}
|
|
145
|
+
/**
|
|
146
|
+
* Register a callback fired when the tween finishes naturally (all repeat
|
|
147
|
+
* cycles exhausted). Does NOT fire when the tween is stopped via
|
|
148
|
+
* {@link Tween.stop}.
|
|
149
|
+
*/
|
|
97
150
|
onComplete(callback) {
|
|
98
151
|
this._onComplete = callback;
|
|
99
152
|
return this;
|
|
100
153
|
}
|
|
154
|
+
/**
|
|
155
|
+
* Register a callback fired at the boundary of each repeat cycle, after
|
|
156
|
+
* the cycle counter is decremented and before the next cycle begins. Not
|
|
157
|
+
* fired on the final cycle's completion (use {@link Tween.onComplete}
|
|
158
|
+
* for that).
|
|
159
|
+
*/
|
|
101
160
|
onRepeat(callback) {
|
|
102
161
|
this._onRepeat = callback;
|
|
103
162
|
return this;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tween.js","sources":["../../../../src/animation/Tween.ts"],"sourcesContent":[null],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"Tween.js","sources":["../../../../src/animation/Tween.ts"],"sourcesContent":[null],"names":[],"mappings":";;;AAKA;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BG;MACU,KAAK,CAAA;AACG,IAAA,OAAO;AAChB,IAAA,MAAM,GAAe,UAAU,CAAC,IAAI;IAEpC,WAAW,GAAqC,EAAE;IAClD,YAAY,GAAkC,IAAI;IAClD,SAAS,GAAG,CAAC;IACb,MAAM,GAAG,CAAC;AACV,IAAA,OAAO,GAAmB,IAAI,CAAC,MAAM;IAErC,QAAQ,GAAG,CAAC;IACZ,aAAa,GAAG,CAAC;AAEzB;;;AAGG;IACK,YAAY,GAAG,CAAC;;IAEhB,YAAY,GAAG,CAAC;IAChB,KAAK,GAAG,KAAK;;IAEb,UAAU,GAAW,CAAC;IAEtB,QAAQ,GAAkC,IAAI;IAC9C,SAAS,GAA+B,IAAI;IAC5C,WAAW,GAAkC,IAAI;IACjD,SAAS,GAAkC,IAAI;IAE/C,QAAQ,GAAiB,IAAI;IAC7B,QAAQ,GAAwB,IAAI;;IAGpC,WAAW,GAAG,KAAK;AAE3B,IAAA,WAAA,CAAmB,MAAS,EAAA;AACxB,QAAA,IAAI,CAAC,OAAO,GAAG,MAAM;IACzB;AAEA,IAAA,IAAW,MAAM,GAAA;QACb,OAAO,IAAI,CAAC,OAAO;IACvB;AAEA,IAAA,IAAW,KAAK,GAAA;QACZ,OAAO,IAAI,CAAC,MAAM;IACtB;AAEA;;;AAGG;AACH,IAAA,IAAW,QAAQ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QAAA,IAAI,CAAC,QAAQ,EAAE,MAAM,CAAC,IAAI,CAAC;AAC3B,QAAA,IAAI,CAAC,WAAW,IAAI;;AAGpB,QAAA,IAAI,CAAC,QAAQ,EAAE,KAAK,EAAE;IAC1B;AACH;;;;"}
|
|
@@ -1,4 +1,14 @@
|
|
|
1
1
|
import { Tween } from './Tween';
|
|
2
|
+
/**
|
|
3
|
+
* Owns and advances a collection of {@link Tween} instances, driving them
|
|
4
|
+
* once per frame from {@link Application.update}. Created tweens are tracked
|
|
5
|
+
* automatically; manually constructed tweens can be opted in via
|
|
6
|
+
* {@link TweenManager.add}.
|
|
7
|
+
*
|
|
8
|
+
* Update iteration uses a snapshot so callbacks may freely add or remove
|
|
9
|
+
* tweens during the same frame without corrupting the loop. Completed and
|
|
10
|
+
* stopped tweens are evicted automatically.
|
|
11
|
+
*/
|
|
2
12
|
export declare class TweenManager {
|
|
3
13
|
private _tweens;
|
|
4
14
|
private _destroyed;
|