@vpmedia/phaser 1.102.0 → 1.104.0
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/dist/index.d.ts +38 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +21129 -0
- package/dist/index.js.map +1 -0
- package/{types → dist}/phaser/core/animation.d.ts +80 -76
- package/dist/phaser/core/animation.d.ts.map +1 -0
- package/{types → dist}/phaser/core/animation_manager.d.ts +46 -55
- package/dist/phaser/core/animation_manager.d.ts.map +1 -0
- package/dist/phaser/core/animation_parser.d.ts +21 -0
- package/dist/phaser/core/animation_parser.d.ts.map +1 -0
- package/{types → dist}/phaser/core/array_set.d.ts +13 -13
- package/dist/phaser/core/array_set.d.ts.map +1 -0
- package/{types → dist}/phaser/core/cache.d.ts +86 -91
- package/dist/phaser/core/cache.d.ts.map +1 -0
- package/dist/phaser/core/const.d.ts +262 -0
- package/dist/phaser/core/const.d.ts.map +1 -0
- package/dist/phaser/core/device.d.ts +31 -0
- package/dist/phaser/core/device.d.ts.map +1 -0
- package/dist/phaser/core/device_util.d.ts +65 -0
- package/dist/phaser/core/device_util.d.ts.map +1 -0
- package/dist/phaser/core/dom.d.ts +75 -0
- package/dist/phaser/core/dom.d.ts.map +1 -0
- package/dist/phaser/core/error_code.d.ts +9 -0
- package/dist/phaser/core/error_code.d.ts.map +1 -0
- package/{types → dist}/phaser/core/event_manager.d.ts +33 -35
- package/dist/phaser/core/event_manager.d.ts.map +1 -0
- package/{types → dist}/phaser/core/factory.d.ts +10 -15
- package/dist/phaser/core/factory.d.ts.map +1 -0
- package/{types → dist}/phaser/core/frame.d.ts +7 -28
- package/dist/phaser/core/frame.d.ts.map +1 -0
- package/{types → dist}/phaser/core/frame_data.d.ts +14 -15
- package/dist/phaser/core/frame_data.d.ts.map +1 -0
- package/dist/phaser/core/frame_util.d.ts +15 -0
- package/dist/phaser/core/frame_util.d.ts.map +1 -0
- package/{types → dist}/phaser/core/game.d.ts +63 -74
- package/dist/phaser/core/game.d.ts.map +1 -0
- package/{types → dist}/phaser/core/input.d.ts +68 -76
- package/dist/phaser/core/input.d.ts.map +1 -0
- package/{types → dist}/phaser/core/input_handler.d.ts +73 -93
- package/dist/phaser/core/input_handler.d.ts.map +1 -0
- package/dist/phaser/core/input_mouse.d.ts +61 -0
- package/dist/phaser/core/input_mouse.d.ts.map +1 -0
- package/dist/phaser/core/input_mspointer.d.ts +67 -0
- package/dist/phaser/core/input_mspointer.d.ts.map +1 -0
- package/dist/phaser/core/input_pointer.d.ts +150 -0
- package/dist/phaser/core/input_pointer.d.ts.map +1 -0
- package/{types → dist}/phaser/core/input_touch.d.ts +24 -25
- package/dist/phaser/core/input_touch.d.ts.map +1 -0
- package/{types → dist}/phaser/core/loader.d.ts +67 -78
- package/dist/phaser/core/loader.d.ts.map +1 -0
- package/dist/phaser/core/loader_parser.d.ts +35 -0
- package/dist/phaser/core/loader_parser.d.ts.map +1 -0
- package/{types → dist}/phaser/core/raf.d.ts +5 -5
- package/dist/phaser/core/raf.d.ts.map +1 -0
- package/{types → dist}/phaser/core/scale_manager.d.ts +96 -124
- package/dist/phaser/core/scale_manager.d.ts.map +1 -0
- package/{types → dist}/phaser/core/scene.d.ts +7 -3
- package/dist/phaser/core/scene.d.ts.map +1 -0
- package/{types → dist}/phaser/core/scene_manager.d.ts +25 -27
- package/dist/phaser/core/scene_manager.d.ts.map +1 -0
- package/{types → dist}/phaser/core/signal.d.ts +21 -17
- package/dist/phaser/core/signal.d.ts.map +1 -0
- package/{types → dist}/phaser/core/signal_binding.d.ts +15 -15
- package/dist/phaser/core/signal_binding.d.ts.map +1 -0
- package/{types → dist}/phaser/core/sound.d.ts +115 -75
- package/dist/phaser/core/sound.d.ts.map +1 -0
- package/{types → dist}/phaser/core/sound_manager.d.ts +37 -43
- package/dist/phaser/core/sound_manager.d.ts.map +1 -0
- package/dist/phaser/core/sound_sprite.d.ts +33 -0
- package/dist/phaser/core/sound_sprite.d.ts.map +1 -0
- package/{types → dist}/phaser/core/stage.d.ts +33 -17
- package/dist/phaser/core/stage.d.ts.map +1 -0
- package/{types → dist}/phaser/core/time.d.ts +39 -64
- package/dist/phaser/core/time.d.ts.map +1 -0
- package/{types → dist}/phaser/core/timer.d.ts +34 -54
- package/dist/phaser/core/timer.d.ts.map +1 -0
- package/{types → dist}/phaser/core/timer_event.d.ts +11 -11
- package/dist/phaser/core/timer_event.d.ts.map +1 -0
- package/{types → dist}/phaser/core/tween.d.ts +54 -49
- package/dist/phaser/core/tween.d.ts.map +1 -0
- package/{types → dist}/phaser/core/tween_data.d.ts +33 -35
- package/dist/phaser/core/tween_data.d.ts.map +1 -0
- package/dist/phaser/core/tween_easing.d.ts +187 -0
- package/dist/phaser/core/tween_easing.d.ts.map +1 -0
- package/{types → dist}/phaser/core/tween_manager.d.ts +13 -18
- package/dist/phaser/core/tween_manager.d.ts.map +1 -0
- package/{types → dist}/phaser/core/world.d.ts +3 -3
- package/dist/phaser/core/world.d.ts.map +1 -0
- package/{types → dist}/phaser/display/bitmap_text.d.ts +65 -71
- package/dist/phaser/display/bitmap_text.d.ts.map +1 -0
- package/{types → dist}/phaser/display/button.d.ts +53 -37
- package/dist/phaser/display/button.d.ts.map +1 -0
- package/{types → dist}/phaser/display/canvas/buffer.d.ts +7 -7
- package/dist/phaser/display/canvas/buffer.d.ts.map +1 -0
- package/dist/phaser/display/canvas/graphics.d.ts +18 -0
- package/dist/phaser/display/canvas/graphics.d.ts.map +1 -0
- package/dist/phaser/display/canvas/masker.d.ts +12 -0
- package/dist/phaser/display/canvas/masker.d.ts.map +1 -0
- package/dist/phaser/display/canvas/pool.d.ts +40 -0
- package/dist/phaser/display/canvas/pool.d.ts.map +1 -0
- package/{types → dist}/phaser/display/canvas/renderer.d.ts +19 -28
- package/dist/phaser/display/canvas/renderer.d.ts.map +1 -0
- package/dist/phaser/display/canvas/tinter.d.ts +41 -0
- package/dist/phaser/display/canvas/tinter.d.ts.map +1 -0
- package/dist/phaser/display/canvas/util.d.ts +70 -0
- package/dist/phaser/display/canvas/util.d.ts.map +1 -0
- package/{types → dist}/phaser/display/display_object.d.ts +90 -95
- package/dist/phaser/display/display_object.d.ts.map +1 -0
- package/{types → dist}/phaser/display/graphics.d.ts +77 -65
- package/dist/phaser/display/graphics.d.ts.map +1 -0
- package/{types → dist}/phaser/display/graphics_data.d.ts +12 -12
- package/dist/phaser/display/graphics_data.d.ts.map +1 -0
- package/dist/phaser/display/graphics_data_util.d.ts +8 -0
- package/dist/phaser/display/graphics_data_util.d.ts.map +1 -0
- package/{types → dist}/phaser/display/group.d.ts +50 -40
- package/dist/phaser/display/group.d.ts.map +1 -0
- package/{types → dist}/phaser/display/image.d.ts +89 -50
- package/dist/phaser/display/image.d.ts.map +1 -0
- package/dist/phaser/display/sprite_batch.d.ts +9 -0
- package/dist/phaser/display/sprite_batch.d.ts.map +1 -0
- package/dist/phaser/display/sprite_util.d.ts +35 -0
- package/dist/phaser/display/sprite_util.d.ts.map +1 -0
- package/{types → dist}/phaser/display/text.d.ts +176 -181
- package/dist/phaser/display/text.d.ts.map +1 -0
- package/{types → dist}/phaser/display/webgl/abstract_filter.d.ts +8 -8
- package/dist/phaser/display/webgl/abstract_filter.d.ts.map +1 -0
- package/{types → dist}/phaser/display/webgl/base_texture.d.ts +15 -15
- package/dist/phaser/display/webgl/base_texture.d.ts.map +1 -0
- package/{types → dist}/phaser/display/webgl/blend_manager.d.ts +9 -5
- package/dist/phaser/display/webgl/blend_manager.d.ts.map +1 -0
- package/{types → dist}/phaser/display/webgl/earcut.d.ts +28 -27
- package/dist/phaser/display/webgl/earcut.d.ts.map +1 -0
- package/{types → dist}/phaser/display/webgl/earcut_node.d.ts +11 -11
- package/dist/phaser/display/webgl/earcut_node.d.ts.map +1 -0
- package/{types → dist}/phaser/display/webgl/fast_sprite_batch.d.ts +21 -28
- package/dist/phaser/display/webgl/fast_sprite_batch.d.ts.map +1 -0
- package/{types → dist}/phaser/display/webgl/filter_manager.d.ts +9 -7
- package/dist/phaser/display/webgl/filter_manager.d.ts.map +1 -0
- package/{types → dist}/phaser/display/webgl/filter_texture.d.ts +7 -9
- package/dist/phaser/display/webgl/filter_texture.d.ts.map +1 -0
- package/dist/phaser/display/webgl/graphics.d.ts +78 -0
- package/dist/phaser/display/webgl/graphics.d.ts.map +1 -0
- package/dist/phaser/display/webgl/graphics_data.d.ts +25 -0
- package/dist/phaser/display/webgl/graphics_data.d.ts.map +1 -0
- package/dist/phaser/display/webgl/mask_manager.d.ts +13 -0
- package/dist/phaser/display/webgl/mask_manager.d.ts.map +1 -0
- package/{types → dist}/phaser/display/webgl/render_texture.d.ts +15 -13
- package/dist/phaser/display/webgl/render_texture.d.ts.map +1 -0
- package/dist/phaser/display/webgl/renderer.d.ts +68 -0
- package/dist/phaser/display/webgl/renderer.d.ts.map +1 -0
- package/dist/phaser/display/webgl/shader/complex.d.ts +21 -0
- package/dist/phaser/display/webgl/shader/complex.d.ts.map +1 -0
- package/dist/phaser/display/webgl/shader/fast.d.ts +22 -0
- package/dist/phaser/display/webgl/shader/fast.d.ts.map +1 -0
- package/dist/phaser/display/webgl/shader/normal.d.ts +39 -0
- package/dist/phaser/display/webgl/shader/normal.d.ts.map +1 -0
- package/dist/phaser/display/webgl/shader/primitive.d.ts +21 -0
- package/dist/phaser/display/webgl/shader/primitive.d.ts.map +1 -0
- package/dist/phaser/display/webgl/shader/strip.d.ts +21 -0
- package/dist/phaser/display/webgl/shader/strip.d.ts.map +1 -0
- package/dist/phaser/display/webgl/shader_manager.d.ts +37 -0
- package/dist/phaser/display/webgl/shader_manager.d.ts.map +1 -0
- package/{types → dist}/phaser/display/webgl/sprite_batch.d.ts +24 -31
- package/dist/phaser/display/webgl/sprite_batch.d.ts.map +1 -0
- package/{types → dist}/phaser/display/webgl/stencil_manager.d.ts +12 -9
- package/dist/phaser/display/webgl/stencil_manager.d.ts.map +1 -0
- package/dist/phaser/display/webgl/texture.d.ts +56 -0
- package/dist/phaser/display/webgl/texture.d.ts.map +1 -0
- package/dist/phaser/display/webgl/texture_util.d.ts +17 -0
- package/dist/phaser/display/webgl/texture_util.d.ts.map +1 -0
- package/dist/phaser/display/webgl/util.d.ts +54 -0
- package/dist/phaser/display/webgl/util.d.ts.map +1 -0
- package/{types → dist}/phaser/geom/circle.d.ts +35 -41
- package/dist/phaser/geom/circle.d.ts.map +1 -0
- package/{types → dist}/phaser/geom/ellipse.d.ts +12 -18
- package/dist/phaser/geom/ellipse.d.ts.map +1 -0
- package/{types → dist}/phaser/geom/line.d.ts +20 -23
- package/dist/phaser/geom/line.d.ts.map +1 -0
- package/{types → dist}/phaser/geom/matrix.d.ts +21 -29
- package/dist/phaser/geom/matrix.d.ts.map +1 -0
- package/{types → dist}/phaser/geom/point.d.ts +30 -33
- package/dist/phaser/geom/point.d.ts.map +1 -0
- package/{types → dist}/phaser/geom/polygon.d.ts +18 -24
- package/dist/phaser/geom/polygon.d.ts.map +1 -0
- package/{types → dist}/phaser/geom/rectangle.d.ts +74 -79
- package/dist/phaser/geom/rectangle.d.ts.map +1 -0
- package/{types → dist}/phaser/geom/rounded_rectangle.d.ts +9 -9
- package/dist/phaser/geom/rounded_rectangle.d.ts.map +1 -0
- package/dist/phaser/geom/util/circle.d.ts +55 -0
- package/dist/phaser/geom/util/circle.d.ts.map +1 -0
- package/dist/phaser/geom/util/ellipse.d.ts +9 -0
- package/dist/phaser/geom/util/ellipse.d.ts.map +1 -0
- package/dist/phaser/geom/util/line.d.ts +42 -0
- package/dist/phaser/geom/util/line.d.ts.map +1 -0
- package/dist/phaser/geom/util/matrix.d.ts +18 -0
- package/dist/phaser/geom/util/matrix.d.ts.map +1 -0
- package/dist/phaser/geom/util/point.d.ts +159 -0
- package/dist/phaser/geom/util/point.d.ts.map +1 -0
- package/dist/phaser/geom/util/polygon.d.ts +8 -0
- package/dist/phaser/geom/util/polygon.d.ts.map +1 -0
- package/dist/phaser/geom/util/rectangle.d.ts +123 -0
- package/dist/phaser/geom/util/rectangle.d.ts.map +1 -0
- package/dist/phaser/geom/util/rounded_rectangle.d.ts +8 -0
- package/dist/phaser/geom/util/rounded_rectangle.d.ts.map +1 -0
- package/dist/phaser/util/math.d.ts +154 -0
- package/dist/phaser/util/math.d.ts.map +1 -0
- package/package.json +26 -12
- package/src/phaser/core/{animation.js → animation.ts} +50 -3
- package/src/phaser/core/{animation_manager.js → animation_manager.ts} +11 -1
- package/src/phaser/core/{array_set.js → array_set.ts} +4 -1
- package/src/phaser/core/{cache.js → cache.ts} +10 -1
- package/src/phaser/core/{device.js → device.ts} +25 -1
- package/src/phaser/core/{dom.js → dom.ts} +7 -0
- package/src/phaser/core/{event_manager.js → event_manager.ts} +18 -1
- package/src/phaser/core/{factory.js → factory.ts} +2 -0
- package/src/phaser/core/{frame.js → frame.ts} +2 -1
- package/src/phaser/core/{frame_data.js → frame_data.ts} +4 -1
- package/src/phaser/core/{frame_util.js → frame_util.ts} +2 -1
- package/src/phaser/core/{game.js → game.ts} +61 -4
- package/src/phaser/core/{input.js → input.ts} +52 -0
- package/src/phaser/core/{input_handler.js → input_handler.ts} +42 -0
- package/src/phaser/core/{input_mouse.js → input_mouse.ts} +24 -0
- package/src/phaser/core/{input_mspointer.js → input_mspointer.ts} +17 -0
- package/src/phaser/core/{input_pointer.js → input_pointer.ts} +45 -0
- package/src/phaser/core/{input_touch.js → input_touch.ts} +18 -0
- package/src/phaser/core/{loader.js → loader.ts} +30 -1
- package/src/phaser/core/{loader_parser.js → loader_parser.ts} +2 -1
- package/src/phaser/core/{raf.js → raf.ts} +3 -0
- package/src/phaser/core/{scale_manager.js → scale_manager.ts} +56 -0
- package/src/phaser/core/{scene.js → scene.ts} +3 -0
- package/src/phaser/core/{scene_manager.js → scene_manager.ts} +16 -0
- package/src/phaser/core/{signal.js → signal.ts} +7 -0
- package/src/phaser/core/{signal_binding.js → signal_binding.ts} +10 -0
- package/src/phaser/core/{sound.js → sound.ts} +100 -6
- package/src/phaser/core/{sound_manager.js → sound_manager.ts} +19 -1
- package/src/phaser/core/{sound_sprite.js → sound_sprite.ts} +8 -1
- package/src/phaser/core/{stage.js → stage.ts} +5 -0
- package/src/phaser/core/{time.js → time.ts} +29 -1
- package/src/phaser/core/{timer.js → timer.ts} +22 -1
- package/src/phaser/core/{timer_event.js → timer_event.ts} +11 -1
- package/src/phaser/core/{tween.js → tween.ts} +49 -2
- package/src/phaser/core/{tween_data.js → tween_data.ts} +26 -1
- package/src/phaser/core/{tween_manager.js → tween_manager.ts} +6 -1
- package/src/phaser/core/{world.js → world.ts} +1 -0
- package/src/phaser/display/{bitmap_text.js → bitmap_text.ts} +14 -0
- package/src/phaser/display/{button.js → button.ts} +29 -0
- package/src/phaser/display/canvas/{buffer.js → buffer.ts} +5 -0
- package/src/phaser/display/canvas/{graphics.js → graphics.ts} +1 -0
- package/src/phaser/display/canvas/{masker.js → masker.ts} +1 -0
- package/src/phaser/display/canvas/{pool.js → pool.ts} +1 -0
- package/src/phaser/display/canvas/{renderer.js → renderer.ts} +14 -0
- package/src/phaser/display/canvas/{tinter.js → tinter.ts} +1 -0
- package/src/phaser/display/{display_object.js → display_object.ts} +92 -31
- package/src/phaser/display/{graphics.js → graphics.ts} +19 -0
- package/src/phaser/display/{graphics_data.js → graphics_data.ts} +11 -0
- package/src/phaser/display/{graphics_data_util.js → graphics_data_util.ts} +1 -0
- package/src/phaser/display/{group.js → group.ts} +29 -0
- package/src/phaser/display/{image.js → image.ts} +45 -6
- package/src/phaser/display/{sprite_batch.js → sprite_batch.ts} +1 -0
- package/src/phaser/display/{sprite_util.js → sprite_util.ts} +1 -0
- package/src/phaser/display/{text.js → text.ts} +1 -0
- package/src/phaser/display/webgl/{abstract_filter.js → abstract_filter.ts} +7 -0
- package/src/phaser/display/webgl/{base_texture.js → base_texture.ts} +13 -0
- package/src/phaser/display/webgl/{blend_manager.js → blend_manager.ts} +3 -0
- package/src/phaser/display/webgl/{earcut.js → earcut.ts} +2 -2
- package/src/phaser/display/webgl/{earcut_node.js → earcut_node.ts} +10 -0
- package/src/phaser/display/webgl/{fast_sprite_batch.js → fast_sprite_batch.ts} +16 -0
- package/src/phaser/display/webgl/{filter_manager.js → filter_manager.ts} +4 -0
- package/src/phaser/display/webgl/{filter_texture.js → filter_texture.ts} +5 -0
- package/src/phaser/display/webgl/{graphics.js → graphics.ts} +1 -0
- package/src/phaser/display/webgl/{graphics_data.js → graphics_data.ts} +10 -0
- package/src/phaser/display/webgl/{mask_manager.js → mask_manager.ts} +1 -0
- package/src/phaser/display/webgl/{render_texture.js → render_texture.ts} +11 -0
- package/src/phaser/display/webgl/{renderer.js → renderer.ts} +18 -0
- package/src/phaser/display/webgl/shader/{complex.js → complex.ts} +6 -0
- package/src/phaser/display/webgl/shader/{fast.js → fast.ts} +7 -0
- package/src/phaser/display/webgl/shader/{normal.js → normal.ts} +11 -0
- package/src/phaser/display/webgl/shader/{primitive.js → primitive.ts} +6 -0
- package/src/phaser/display/webgl/shader/{strip.js → strip.ts} +6 -0
- package/src/phaser/display/webgl/{shader_manager.js → shader_manager.ts} +11 -0
- package/src/phaser/display/webgl/{sprite_batch.js → sprite_batch.ts} +17 -0
- package/src/phaser/display/webgl/{stencil_manager.js → stencil_manager.ts} +4 -0
- package/src/phaser/display/webgl/{texture.js → texture.ts} +21 -0
- package/src/phaser/display/webgl/{texture_util.js → texture_util.ts} +1 -0
- package/src/phaser/geom/{circle.js → circle.ts} +7 -1
- package/src/phaser/geom/{ellipse.js → ellipse.ts} +6 -0
- package/src/phaser/geom/{line.js → line.ts} +4 -0
- package/src/phaser/geom/{matrix.js → matrix.ts} +8 -0
- package/src/phaser/geom/{point.js → point.ts} +5 -1
- package/src/phaser/geom/{polygon.js → polygon.ts} +6 -0
- package/src/phaser/geom/{rectangle.js → rectangle.ts} +10 -4
- package/src/phaser/geom/{rounded_rectangle.js → rounded_rectangle.ts} +7 -0
- package/.vscode/extensions.json +0 -6
- package/.vscode/settings.json +0 -27
- package/AGENTS.md +0 -1
- package/CHANGELOG.md +0 -336
- package/CLAUDE.md +0 -1
- package/SECURITY.md +0 -5
- package/typedefs/global.d.ts +0 -7
- package/types/index.d.ts +0 -38
- package/types/index.d.ts.map +0 -1
- package/types/phaser/core/animation.d.ts.map +0 -1
- package/types/phaser/core/animation_manager.d.ts.map +0 -1
- package/types/phaser/core/animation_parser.d.ts +0 -4
- package/types/phaser/core/animation_parser.d.ts.map +0 -1
- package/types/phaser/core/array_set.d.ts.map +0 -1
- package/types/phaser/core/cache.d.ts.map +0 -1
- package/types/phaser/core/const.d.ts +0 -262
- package/types/phaser/core/const.d.ts.map +0 -1
- package/types/phaser/core/device.d.ts +0 -96
- package/types/phaser/core/device.d.ts.map +0 -1
- package/types/phaser/core/device_util.d.ts +0 -13
- package/types/phaser/core/device_util.d.ts.map +0 -1
- package/types/phaser/core/dom.d.ts +0 -180
- package/types/phaser/core/dom.d.ts.map +0 -1
- package/types/phaser/core/error_code.d.ts +0 -9
- package/types/phaser/core/error_code.d.ts.map +0 -1
- package/types/phaser/core/event_manager.d.ts.map +0 -1
- package/types/phaser/core/factory.d.ts.map +0 -1
- package/types/phaser/core/frame.d.ts.map +0 -1
- package/types/phaser/core/frame_data.d.ts.map +0 -1
- package/types/phaser/core/frame_util.d.ts +0 -5
- package/types/phaser/core/frame_util.d.ts.map +0 -1
- package/types/phaser/core/game.d.ts.map +0 -1
- package/types/phaser/core/input.d.ts.map +0 -1
- package/types/phaser/core/input_handler.d.ts.map +0 -1
- package/types/phaser/core/input_mouse.d.ts +0 -86
- package/types/phaser/core/input_mouse.d.ts.map +0 -1
- package/types/phaser/core/input_mspointer.d.ts +0 -67
- package/types/phaser/core/input_mspointer.d.ts.map +0 -1
- package/types/phaser/core/input_pointer.d.ts +0 -170
- package/types/phaser/core/input_pointer.d.ts.map +0 -1
- package/types/phaser/core/input_touch.d.ts.map +0 -1
- package/types/phaser/core/loader.d.ts.map +0 -1
- package/types/phaser/core/loader_parser.d.ts +0 -5
- package/types/phaser/core/loader_parser.d.ts.map +0 -1
- package/types/phaser/core/raf.d.ts.map +0 -1
- package/types/phaser/core/scale_manager.d.ts.map +0 -1
- package/types/phaser/core/scene.d.ts.map +0 -1
- package/types/phaser/core/scene_manager.d.ts.map +0 -1
- package/types/phaser/core/signal.d.ts.map +0 -1
- package/types/phaser/core/signal_binding.d.ts.map +0 -1
- package/types/phaser/core/sound.d.ts.map +0 -1
- package/types/phaser/core/sound_manager.d.ts.map +0 -1
- package/types/phaser/core/sound_sprite.d.ts +0 -36
- package/types/phaser/core/sound_sprite.d.ts.map +0 -1
- package/types/phaser/core/stage.d.ts.map +0 -1
- package/types/phaser/core/time.d.ts.map +0 -1
- package/types/phaser/core/timer.d.ts.map +0 -1
- package/types/phaser/core/timer_event.d.ts.map +0 -1
- package/types/phaser/core/tween.d.ts.map +0 -1
- package/types/phaser/core/tween_data.d.ts.map +0 -1
- package/types/phaser/core/tween_easing.d.ts +0 -32
- package/types/phaser/core/tween_easing.d.ts.map +0 -1
- package/types/phaser/core/tween_manager.d.ts.map +0 -1
- package/types/phaser/core/world.d.ts.map +0 -1
- package/types/phaser/display/bitmap_text.d.ts.map +0 -1
- package/types/phaser/display/button.d.ts.map +0 -1
- package/types/phaser/display/canvas/buffer.d.ts.map +0 -1
- package/types/phaser/display/canvas/graphics.d.ts +0 -4
- package/types/phaser/display/canvas/graphics.d.ts.map +0 -1
- package/types/phaser/display/canvas/masker.d.ts +0 -3
- package/types/phaser/display/canvas/masker.d.ts.map +0 -1
- package/types/phaser/display/canvas/pool.d.ts +0 -11
- package/types/phaser/display/canvas/pool.d.ts.map +0 -1
- package/types/phaser/display/canvas/renderer.d.ts.map +0 -1
- package/types/phaser/display/canvas/tinter.d.ts +0 -7
- package/types/phaser/display/canvas/tinter.d.ts.map +0 -1
- package/types/phaser/display/canvas/util.d.ts +0 -10
- package/types/phaser/display/canvas/util.d.ts.map +0 -1
- package/types/phaser/display/display_object.d.ts.map +0 -1
- package/types/phaser/display/graphics.d.ts.map +0 -1
- package/types/phaser/display/graphics_data.d.ts.map +0 -1
- package/types/phaser/display/graphics_data_util.d.ts +0 -3
- package/types/phaser/display/graphics_data_util.d.ts.map +0 -1
- package/types/phaser/display/group.d.ts.map +0 -1
- package/types/phaser/display/image.d.ts.map +0 -1
- package/types/phaser/display/sprite_batch.d.ts +0 -4
- package/types/phaser/display/sprite_batch.d.ts.map +0 -1
- package/types/phaser/display/sprite_util.d.ts +0 -6
- package/types/phaser/display/sprite_util.d.ts.map +0 -1
- package/types/phaser/display/text.d.ts.map +0 -1
- package/types/phaser/display/webgl/abstract_filter.d.ts.map +0 -1
- package/types/phaser/display/webgl/base_texture.d.ts.map +0 -1
- package/types/phaser/display/webgl/blend_manager.d.ts.map +0 -1
- package/types/phaser/display/webgl/earcut.d.ts.map +0 -1
- package/types/phaser/display/webgl/earcut_node.d.ts.map +0 -1
- package/types/phaser/display/webgl/fast_sprite_batch.d.ts.map +0 -1
- package/types/phaser/display/webgl/filter_manager.d.ts.map +0 -1
- package/types/phaser/display/webgl/filter_texture.d.ts.map +0 -1
- package/types/phaser/display/webgl/graphics.d.ts +0 -16
- package/types/phaser/display/webgl/graphics.d.ts.map +0 -1
- package/types/phaser/display/webgl/graphics_data.d.ts +0 -27
- package/types/phaser/display/webgl/graphics_data.d.ts.map +0 -1
- package/types/phaser/display/webgl/mask_manager.d.ts +0 -3
- package/types/phaser/display/webgl/mask_manager.d.ts.map +0 -1
- package/types/phaser/display/webgl/render_texture.d.ts.map +0 -1
- package/types/phaser/display/webgl/renderer.d.ts +0 -87
- package/types/phaser/display/webgl/renderer.d.ts.map +0 -1
- package/types/phaser/display/webgl/shader/complex.d.ts +0 -33
- package/types/phaser/display/webgl/shader/complex.d.ts.map +0 -1
- package/types/phaser/display/webgl/shader/fast.d.ts +0 -36
- package/types/phaser/display/webgl/shader/fast.d.ts.map +0 -1
- package/types/phaser/display/webgl/shader/normal.d.ts +0 -52
- package/types/phaser/display/webgl/shader/normal.d.ts.map +0 -1
- package/types/phaser/display/webgl/shader/primitive.d.ts +0 -32
- package/types/phaser/display/webgl/shader/primitive.d.ts.map +0 -1
- package/types/phaser/display/webgl/shader/strip.d.ts +0 -33
- package/types/phaser/display/webgl/shader/strip.d.ts.map +0 -1
- package/types/phaser/display/webgl/shader_manager.d.ts +0 -44
- package/types/phaser/display/webgl/shader_manager.d.ts.map +0 -1
- package/types/phaser/display/webgl/sprite_batch.d.ts.map +0 -1
- package/types/phaser/display/webgl/stencil_manager.d.ts.map +0 -1
- package/types/phaser/display/webgl/texture.d.ts +0 -63
- package/types/phaser/display/webgl/texture.d.ts.map +0 -1
- package/types/phaser/display/webgl/texture_util.d.ts +0 -5
- package/types/phaser/display/webgl/texture_util.d.ts.map +0 -1
- package/types/phaser/display/webgl/util.d.ts +0 -15
- package/types/phaser/display/webgl/util.d.ts.map +0 -1
- package/types/phaser/geom/circle.d.ts.map +0 -1
- package/types/phaser/geom/ellipse.d.ts.map +0 -1
- package/types/phaser/geom/line.d.ts.map +0 -1
- package/types/phaser/geom/matrix.d.ts.map +0 -1
- package/types/phaser/geom/point.d.ts.map +0 -1
- package/types/phaser/geom/polygon.d.ts.map +0 -1
- package/types/phaser/geom/rectangle.d.ts.map +0 -1
- package/types/phaser/geom/rounded_rectangle.d.ts.map +0 -1
- package/types/phaser/geom/util/circle.d.ts +0 -10
- package/types/phaser/geom/util/circle.d.ts.map +0 -1
- package/types/phaser/geom/util/ellipse.d.ts +0 -2
- package/types/phaser/geom/util/ellipse.d.ts.map +0 -1
- package/types/phaser/geom/util/line.d.ts +0 -8
- package/types/phaser/geom/util/line.d.ts.map +0 -1
- package/types/phaser/geom/util/matrix.d.ts +0 -5
- package/types/phaser/geom/util/matrix.d.ts.map +0 -1
- package/types/phaser/geom/util/point.d.ts +0 -22
- package/types/phaser/geom/util/point.d.ts.map +0 -1
- package/types/phaser/geom/util/polygon.d.ts +0 -3
- package/types/phaser/geom/util/polygon.d.ts.map +0 -1
- package/types/phaser/geom/util/rectangle.d.ts +0 -19
- package/types/phaser/geom/util/rectangle.d.ts.map +0 -1
- package/types/phaser/geom/util/rounded_rectangle.d.ts +0 -3
- package/types/phaser/geom/util/rounded_rectangle.d.ts.map +0 -1
- package/types/phaser/util/math.d.ts +0 -58
- package/types/phaser/util/math.d.ts.map +0 -1
- /package/src/{index.js → index.ts} +0 -0
- /package/src/phaser/core/{animation_parser.js → animation_parser.ts} +0 -0
- /package/src/phaser/core/{const.js → const.ts} +0 -0
- /package/src/phaser/core/{device_util.js → device_util.ts} +0 -0
- /package/src/phaser/core/{error_code.js → error_code.ts} +0 -0
- /package/src/phaser/core/{signal.test.js → signal.test.ts} +0 -0
- /package/src/phaser/core/{tween_easing.js → tween_easing.ts} +0 -0
- /package/src/phaser/display/canvas/{util.js → util.ts} +0 -0
- /package/src/phaser/display/webgl/{util.js → util.ts} +0 -0
- /package/src/phaser/geom/{circle.test.js → circle.test.ts} +0 -0
- /package/src/phaser/geom/{ellipse.test.js → ellipse.test.ts} +0 -0
- /package/src/phaser/geom/{line.test.js → line.test.ts} +0 -0
- /package/src/phaser/geom/{matrix.test.js → matrix.test.ts} +0 -0
- /package/src/phaser/geom/{point.test.js → point.test.ts} +0 -0
- /package/src/phaser/geom/{rectangle.test.js → rectangle.test.ts} +0 -0
- /package/src/phaser/geom/{rounded_rectangle.test.js → rounded_rectangle.test.ts} +0 -0
- /package/src/phaser/geom/util/{circle.test.js → circle.test.ts} +0 -0
- /package/src/phaser/geom/util/{circle.js → circle.ts} +0 -0
- /package/src/phaser/geom/util/{ellipse.test.js → ellipse.test.ts} +0 -0
- /package/src/phaser/geom/util/{ellipse.js → ellipse.ts} +0 -0
- /package/src/phaser/geom/util/{line.test.js → line.test.ts} +0 -0
- /package/src/phaser/geom/util/{line.js → line.ts} +0 -0
- /package/src/phaser/geom/util/{matrix.test.js → matrix.test.ts} +0 -0
- /package/src/phaser/geom/util/{matrix.js → matrix.ts} +0 -0
- /package/src/phaser/geom/util/{point.test.js → point.test.ts} +0 -0
- /package/src/phaser/geom/util/{point.js → point.ts} +0 -0
- /package/src/phaser/geom/util/{polygon.test.js → polygon.test.ts} +0 -0
- /package/src/phaser/geom/util/{polygon.js → polygon.ts} +0 -0
- /package/src/phaser/geom/util/{rectangle.test.js → rectangle.test.ts} +0 -0
- /package/src/phaser/geom/util/{rectangle.js → rectangle.ts} +0 -0
- /package/src/phaser/geom/util/{rounded_rectangle.test.js → rounded_rectangle.test.ts} +0 -0
- /package/src/phaser/geom/util/{rounded_rectangle.js → rounded_rectangle.ts} +0 -0
- /package/src/phaser/util/{math.test.js → math.test.ts} +0 -0
- /package/src/phaser/util/{math.js → math.ts} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"math.d.ts","sourceRoot":"","sources":["../../../src/phaser/util/math.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU,QAAgB,CAAC;AACxC,eAAO,MAAM,UAAU,QAAgB,CAAC;AACxC,eAAO,MAAM,IAAI,QAAc,CAAC;AAEhC;;;;GAIG;AACH,eAAO,MAAM,OAAO,GAAI,QAAG,aAE1B,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,OAAO,GAAI,QAAG,WAE1B,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,GAAI,UAAK,QAUtC,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,YAAY,GAAI,UAAK,EAAE,WAAM,YAEzC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,QAAQ,GAAI,YAAO,WAE/B,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,QAAQ,GAAI,YAAO,WAE/B,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,OAAO,GAAI,QAAG,EAAE,QAAG,WAE/B,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,UAAU,GAAI,UAAK,EAAE,YAAO,EAAE,cAAS,QAOnD,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,IAAI,GAAI,UAAK,EAAE,QAAG,EAAE,QAAG,QAUnC,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,MAAM,GAAI,OAAE,EAAE,OAAE,EAAE,MAAC,QAE/B,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,UAAU,GAAI,MAAC,EAAE,MAAC,WAE9B,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,GAAI,MAAC,EAAE,MAAC,QAWvC,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,QAAQ,GAAI,OAAE,EAAE,OAAE,EAAE,OAAE,EAAE,OAAE,WAItC,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,MAAM,GAAI,MAAC,EAAE,MAAC,EAAE,cAAS,YAErC,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,UAAU,GAAI,MAAC,EAAE,MAAC,EAAE,MAAC,EAAE,MAAC,WAEpC,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,QAAQ,GAAI,MAAC,EAAE,MAAC,EAAE,MAAC,WAE/B,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,UAAU,GAAI,UAAK,EAAE,QAAG,SASpC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,UAAU,GAAI,UAAK,EAAE,QAAG,SAQpC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,MAAM,GAAI,UAAK;;;;;;;;;CAwB3B,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,YAAY,GAAI,UAAK,EAAE,QAAG,QAsBtC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vpmedia/phaser",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.104.0",
|
|
4
4
|
"description": "@vpmedia/phaser is the modern ECMAScript port of the popular Phaser game engine v2.6.2",
|
|
5
5
|
"author": "Andras Csizmadia <andras@vpmedia.hu> (www.vpmedia.hu)",
|
|
6
6
|
"license": "MIT",
|
|
@@ -19,27 +19,41 @@
|
|
|
19
19
|
"webgl",
|
|
20
20
|
"canvas"
|
|
21
21
|
],
|
|
22
|
-
"main": "./
|
|
23
|
-
"
|
|
22
|
+
"main": "./dist/index.js",
|
|
23
|
+
"module": "./dist/index.js",
|
|
24
|
+
"types": "./dist/index.d.ts",
|
|
24
25
|
"type": "module",
|
|
26
|
+
"files": [
|
|
27
|
+
"dist",
|
|
28
|
+
"src"
|
|
29
|
+
],
|
|
30
|
+
"exports": {
|
|
31
|
+
".": {
|
|
32
|
+
"types": "./dist/index.d.ts",
|
|
33
|
+
"import": "./dist/index.js"
|
|
34
|
+
}
|
|
35
|
+
},
|
|
25
36
|
"dependencies": {
|
|
26
|
-
"@vpmedia/simplify": "^1.
|
|
37
|
+
"@vpmedia/simplify": "^1.76.0",
|
|
27
38
|
"uuid": "^14.0.0"
|
|
28
39
|
},
|
|
29
40
|
"devDependencies": {
|
|
30
|
-
"@commitlint/cli": "^
|
|
31
|
-
"@commitlint/config-conventional": "^
|
|
32
|
-
"@types
|
|
41
|
+
"@commitlint/cli": "^21.0.0",
|
|
42
|
+
"@commitlint/config-conventional": "^21.0.0",
|
|
43
|
+
"@commitlint/types": "^21.0.0",
|
|
44
|
+
"@types/node": "^25.6.2",
|
|
33
45
|
"@vitest/coverage-v8": "^4.1.5",
|
|
34
|
-
"jsdom": "^29.
|
|
35
|
-
"oxfmt": "^0.
|
|
36
|
-
"oxlint": "^1.
|
|
37
|
-
"oxlint-tsgolint": "^0.
|
|
46
|
+
"jsdom": "^29.1.1",
|
|
47
|
+
"oxfmt": "^0.48.0",
|
|
48
|
+
"oxlint": "^1.63.0",
|
|
49
|
+
"oxlint-tsgolint": "^0.22.1",
|
|
50
|
+
"rolldown": "1.0.0",
|
|
38
51
|
"typescript": "^6.0.3",
|
|
39
52
|
"vitest": "^4.1.5"
|
|
40
53
|
},
|
|
41
54
|
"scripts": {
|
|
42
|
-
"build": "
|
|
55
|
+
"build": "rolldown -c && tsc",
|
|
56
|
+
"clean": "rm -rf dist",
|
|
43
57
|
"check": "pnpm lint && pnpm test && pnpm typecheck",
|
|
44
58
|
"format": "oxfmt --write \"./**/*.{js,jsx,mjs,cjs,ts,tsx,json,css}\"",
|
|
45
59
|
"lint": "oxlint src",
|
|
@@ -1,6 +1,53 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
1
2
|
import { Signal } from './signal.js';
|
|
2
3
|
|
|
3
4
|
export class Animation {
|
|
5
|
+
/** @type {import('./game.js').Game} */
|
|
6
|
+
game;
|
|
7
|
+
/** @type {import('../display/image.js').Image} */
|
|
8
|
+
_parent;
|
|
9
|
+
/** @type {import('./frame_data.js').FrameData} */
|
|
10
|
+
_frameData;
|
|
11
|
+
/** @type {string} */
|
|
12
|
+
name;
|
|
13
|
+
/** @type {Array<string|number>} */
|
|
14
|
+
_frames;
|
|
15
|
+
/** @type {number} */
|
|
16
|
+
delay;
|
|
17
|
+
/** @type {boolean} */
|
|
18
|
+
loop;
|
|
19
|
+
/** @type {number} */
|
|
20
|
+
loopCount;
|
|
21
|
+
/** @type {boolean} */
|
|
22
|
+
isFinished;
|
|
23
|
+
/** @type {boolean} */
|
|
24
|
+
isPlaying;
|
|
25
|
+
/** @type {boolean} */
|
|
26
|
+
isPaused;
|
|
27
|
+
/** @type {number} */
|
|
28
|
+
_pauseStartTime;
|
|
29
|
+
/** @type {number} */
|
|
30
|
+
_frameIndex;
|
|
31
|
+
/** @type {number} */
|
|
32
|
+
_frameDiff;
|
|
33
|
+
/** @type {number} */
|
|
34
|
+
_frameSkip;
|
|
35
|
+
/** @type {import('./frame.js').Frame} */
|
|
36
|
+
currentFrame;
|
|
37
|
+
/** @type {Signal} */
|
|
38
|
+
onStart;
|
|
39
|
+
/** @type {Signal | null} */
|
|
40
|
+
onUpdate;
|
|
41
|
+
/** @type {Signal} */
|
|
42
|
+
onComplete;
|
|
43
|
+
/** @type {Signal} */
|
|
44
|
+
onLoop;
|
|
45
|
+
/** @type {boolean} */
|
|
46
|
+
isReversed;
|
|
47
|
+
/** @type {number} */
|
|
48
|
+
_timeLastFrame;
|
|
49
|
+
/** @type {number} */
|
|
50
|
+
_timeNextFrame;
|
|
4
51
|
/**
|
|
5
52
|
* Creates a new Animation instance.
|
|
6
53
|
* @param {import('./game.js').Game} game - The game instance this animation belongs to.
|
|
@@ -120,7 +167,7 @@ export class Animation {
|
|
|
120
167
|
*/
|
|
121
168
|
reverseOnce() {
|
|
122
169
|
this.onComplete.addOnce(this.reverse, this);
|
|
123
|
-
return this.
|
|
170
|
+
return this.toReversed();
|
|
124
171
|
}
|
|
125
172
|
|
|
126
173
|
/**
|
|
@@ -242,7 +289,7 @@ export class Animation {
|
|
|
242
289
|
if (this.onUpdate) {
|
|
243
290
|
this.onUpdate.dispatch(this, this.currentFrame);
|
|
244
291
|
// False if the animation was destroyed from within a callback
|
|
245
|
-
return
|
|
292
|
+
return Boolean(this._frameData);
|
|
246
293
|
}
|
|
247
294
|
return true;
|
|
248
295
|
}
|
|
@@ -275,7 +322,7 @@ export class Animation {
|
|
|
275
322
|
if (this.onUpdate && signalUpdate) {
|
|
276
323
|
this.onUpdate.dispatch(this, this.currentFrame);
|
|
277
324
|
// False if the animation was destroyed from within a callback
|
|
278
|
-
return
|
|
325
|
+
return Boolean(this._frameData);
|
|
279
326
|
}
|
|
280
327
|
return true;
|
|
281
328
|
}
|
|
@@ -1,7 +1,17 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
1
2
|
import { Animation } from './animation.js';
|
|
2
3
|
import { ENGINE_ERROR_CANNOT_SET_FRAME, ENGINE_ERROR_CANNOT_SET_FRAME_NAME } from './error_code.js';
|
|
3
4
|
|
|
4
5
|
export class AnimationManager {
|
|
6
|
+
sprite;
|
|
7
|
+
game;
|
|
8
|
+
currentFrame;
|
|
9
|
+
currentAnim;
|
|
10
|
+
updateIfVisible;
|
|
11
|
+
isLoaded;
|
|
12
|
+
_frameData;
|
|
13
|
+
_anims;
|
|
14
|
+
_outputFrames;
|
|
5
15
|
/**
|
|
6
16
|
* Creates a new AnimationManager instance.
|
|
7
17
|
* @param {import('../display/image.js').Image} sprite - Reference to the parent Sprite.
|
|
@@ -345,4 +355,4 @@ export class AnimationManager {
|
|
|
345
355
|
});
|
|
346
356
|
}
|
|
347
357
|
}
|
|
348
|
-
}
|
|
358
|
+
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
1
2
|
import { BaseTexture } from '../display/webgl/base_texture.js';
|
|
2
3
|
import { Texture } from '../display/webgl/texture.js';
|
|
3
4
|
import { JSONDataHash } from './animation_parser.js';
|
|
@@ -18,6 +19,14 @@ export const XML = 8;
|
|
|
18
19
|
export const RENDER_TEXTURE = 9;
|
|
19
20
|
|
|
20
21
|
export class Cache {
|
|
22
|
+
game;
|
|
23
|
+
autoResolveURL;
|
|
24
|
+
_cache;
|
|
25
|
+
_urlMap;
|
|
26
|
+
_urlResolver;
|
|
27
|
+
_urlTemp;
|
|
28
|
+
onSoundUnlock;
|
|
29
|
+
_cacheMap;
|
|
21
30
|
/**
|
|
22
31
|
* Creates a new Cache instance.
|
|
23
32
|
* @param {import('./game.js').Game} game - The game instance.
|
|
@@ -770,4 +779,4 @@ export class Cache {
|
|
|
770
779
|
this._urlResolver = null;
|
|
771
780
|
this._urlTemp = null;
|
|
772
781
|
}
|
|
773
|
-
}
|
|
782
|
+
}
|
|
@@ -1,4 +1,28 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
1
2
|
export class Device {
|
|
3
|
+
desktop;
|
|
4
|
+
iOS;
|
|
5
|
+
android;
|
|
6
|
+
chromeOS;
|
|
7
|
+
linux;
|
|
8
|
+
macOS;
|
|
9
|
+
windows;
|
|
10
|
+
windowsPhone;
|
|
11
|
+
canvas;
|
|
12
|
+
touch;
|
|
13
|
+
mspointer;
|
|
14
|
+
wheelEvent;
|
|
15
|
+
chrome;
|
|
16
|
+
firefox;
|
|
17
|
+
edge;
|
|
18
|
+
safari;
|
|
19
|
+
fullscreen;
|
|
20
|
+
requestFullscreen;
|
|
21
|
+
cancelFullscreen;
|
|
22
|
+
fullscreenKeyboard;
|
|
23
|
+
noAudioFormat;
|
|
24
|
+
supportedAudioFormats;
|
|
25
|
+
supportedImageFormats;
|
|
2
26
|
/**
|
|
3
27
|
* Creates a new Device instance.
|
|
4
28
|
* This class provides information about the current device and browser capabilities.
|
|
@@ -94,4 +118,4 @@ export class Device {
|
|
|
94
118
|
*/
|
|
95
119
|
this.supportedImageFormats = {};
|
|
96
120
|
}
|
|
97
|
-
}
|
|
121
|
+
}
|
|
@@ -180,6 +180,13 @@ class DocumentBoundsRectangle {
|
|
|
180
180
|
}
|
|
181
181
|
|
|
182
182
|
export class DOM {
|
|
183
|
+
treatAsDesktop: boolean;
|
|
184
|
+
visualBounds: any;
|
|
185
|
+
layoutBounds: any;
|
|
186
|
+
documentBounds: any;
|
|
187
|
+
scrollXProvider: () => number;
|
|
188
|
+
scrollYProvider: () => number;
|
|
189
|
+
|
|
183
190
|
/**
|
|
184
191
|
* TBD.
|
|
185
192
|
* @param {import('./device.js').Device} device - TBD.
|
|
@@ -1,6 +1,23 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
1
2
|
import { Signal } from './signal.js';
|
|
2
3
|
|
|
3
4
|
export class EventManager {
|
|
5
|
+
parent;
|
|
6
|
+
_onAddedToGroup;
|
|
7
|
+
_onRemovedFromGroup;
|
|
8
|
+
_onDestroy;
|
|
9
|
+
_onOutOfBounds;
|
|
10
|
+
_onEnterBounds;
|
|
11
|
+
_onInputOver;
|
|
12
|
+
_onInputOut;
|
|
13
|
+
_onInputDown;
|
|
14
|
+
_onInputUp;
|
|
15
|
+
_onDragStart;
|
|
16
|
+
_onDragUpdate;
|
|
17
|
+
_onDragStop;
|
|
18
|
+
_onAnimationStart;
|
|
19
|
+
_onAnimationComplete;
|
|
20
|
+
_onAnimationLoop;
|
|
4
21
|
/**
|
|
5
22
|
* Creates a new EventManager instance.
|
|
6
23
|
* @param {import('../display/display_object.js').DisplayObject} sprite - Reference to the parent DisplayObject.
|
|
@@ -390,4 +407,4 @@ export class EventManager {
|
|
|
390
407
|
this._onAnimationLoop.dispatch(...args);
|
|
391
408
|
}
|
|
392
409
|
}
|
|
393
|
-
}
|
|
410
|
+
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
1
2
|
import { BitmapText } from '../display/bitmap_text.js';
|
|
2
3
|
import { Button } from '../display/button.js';
|
|
3
4
|
import { Graphics } from '../display/graphics.js';
|
|
@@ -6,6 +7,7 @@ import { Image } from '../display/image.js';
|
|
|
6
7
|
import { Text } from '../display/text.js';
|
|
7
8
|
|
|
8
9
|
export class GameObjectFactory {
|
|
10
|
+
game;
|
|
9
11
|
/**
|
|
10
12
|
* Creates a new GameObjectFactory instance.
|
|
11
13
|
* @param {import('./game.js').Game} game - The game instance this factory belongs to.
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
1
2
|
import { Rectangle } from '../geom/rectangle.js';
|
|
2
3
|
import { distance } from '../util/math.js';
|
|
3
4
|
import { cloneFrame } from './frame_util.js';
|
|
@@ -107,4 +108,4 @@ export class Frame {
|
|
|
107
108
|
result.setTo(this.x, this.y, this.width, this.height);
|
|
108
109
|
return result;
|
|
109
110
|
}
|
|
110
|
-
}
|
|
111
|
+
}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
1
2
|
import { cloneFrameData } from './frame_util.js';
|
|
2
3
|
|
|
3
4
|
export class FrameData {
|
|
5
|
+
_frames;
|
|
6
|
+
_frameNames;
|
|
4
7
|
/**
|
|
5
8
|
* Creates a new FrameData instance.
|
|
6
9
|
* This class holds data about frames in a texture atlas or sprite sheet.
|
|
@@ -130,4 +133,4 @@ export class FrameData {
|
|
|
130
133
|
get total() {
|
|
131
134
|
return this._frames.length;
|
|
132
135
|
}
|
|
133
|
-
}
|
|
136
|
+
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
1
2
|
import { Frame } from './frame.js';
|
|
2
3
|
import { FrameData } from './frame_data.js';
|
|
3
4
|
|
|
@@ -25,4 +26,4 @@ export const cloneFrameData = (frameData, output = null) => {
|
|
|
25
26
|
result.addFrame(frameData.getFrame(i).clone());
|
|
26
27
|
}
|
|
27
28
|
return result;
|
|
28
|
-
};
|
|
29
|
+
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
1
2
|
import { Logger } from '@vpmedia/simplify';
|
|
2
3
|
import { CanvasRenderer } from '../display/canvas/renderer.js';
|
|
3
4
|
import { addToDOM, create, removeFromDOM, setTouchAction } from '../display/canvas/util.js';
|
|
@@ -20,6 +21,62 @@ import { TweenManager } from './tween_manager.js';
|
|
|
20
21
|
import { World } from './world.js';
|
|
21
22
|
|
|
22
23
|
export class Game {
|
|
24
|
+
/** @type {object} */
|
|
25
|
+
config;
|
|
26
|
+
/** @type {number} */
|
|
27
|
+
id;
|
|
28
|
+
/** @type {string|HTMLElement} */
|
|
29
|
+
parent;
|
|
30
|
+
/** @type {number} */
|
|
31
|
+
width;
|
|
32
|
+
/** @type {number} */
|
|
33
|
+
height;
|
|
34
|
+
/** @type {CanvasRenderer | WebGLRenderer} */
|
|
35
|
+
renderer;
|
|
36
|
+
/** @type {SceneManager} */
|
|
37
|
+
state;
|
|
38
|
+
/** @type {boolean} */
|
|
39
|
+
isBooted;
|
|
40
|
+
/** @type {boolean} */
|
|
41
|
+
paused;
|
|
42
|
+
/** @type {RequestAnimationFrame} */
|
|
43
|
+
raf;
|
|
44
|
+
/** @type {GameObjectFactory} */
|
|
45
|
+
add;
|
|
46
|
+
/** @type {Cache} */
|
|
47
|
+
cache;
|
|
48
|
+
/** @type {Input} */
|
|
49
|
+
input;
|
|
50
|
+
/** @type {Loader} */
|
|
51
|
+
load;
|
|
52
|
+
/** @type {ScaleManager} */
|
|
53
|
+
scale;
|
|
54
|
+
/** @type {SoundManager} */
|
|
55
|
+
sound;
|
|
56
|
+
/** @type {Stage} */
|
|
57
|
+
stage;
|
|
58
|
+
/** @type {Time} */
|
|
59
|
+
time;
|
|
60
|
+
/** @type {TweenManager} */
|
|
61
|
+
tweens;
|
|
62
|
+
/** @type {World} */
|
|
63
|
+
world;
|
|
64
|
+
/** @type {Device} */
|
|
65
|
+
device;
|
|
66
|
+
/** @type {Logger} */
|
|
67
|
+
logger;
|
|
68
|
+
/** @type {HTMLCanvasElement} */
|
|
69
|
+
canvas;
|
|
70
|
+
/** @type {CanvasRenderingContext2D | ImageBitmapRenderingContext | WebGLRenderingContext | WebGL2RenderingContext} */
|
|
71
|
+
context;
|
|
72
|
+
/** @type {Signal} */
|
|
73
|
+
onPause;
|
|
74
|
+
/** @type {Signal} */
|
|
75
|
+
onResume;
|
|
76
|
+
/** @type {Signal} */
|
|
77
|
+
onBoot;
|
|
78
|
+
/** @type {boolean} */
|
|
79
|
+
isPaused;
|
|
23
80
|
/**
|
|
24
81
|
* Creates a new Game instance.
|
|
25
82
|
* @param {object} gameConfig - The configuration object for the game.
|
|
@@ -222,9 +279,9 @@ export class Game {
|
|
|
222
279
|
this.logger.info('parseConfig');
|
|
223
280
|
this.parseConfigElement(config, 'width', 800);
|
|
224
281
|
this.parseConfigElement(config, 'height', 600);
|
|
225
|
-
this.parseConfigElement(config, 'backgroundColor',
|
|
282
|
+
this.parseConfigElement(config, 'backgroundColor', 0x00_00_00);
|
|
226
283
|
this.parseConfigElement(config, 'canvasID', '');
|
|
227
|
-
this.parseConfigElement(config, 'canvasStyle'
|
|
284
|
+
this.parseConfigElement(config, 'canvasStyle');
|
|
228
285
|
this.parseConfigElement(config, 'resolution', 1);
|
|
229
286
|
this.parseConfigElement(config, 'transparent', false);
|
|
230
287
|
this.parseConfigElement(config, 'antialias', false);
|
|
@@ -239,7 +296,7 @@ export class Game {
|
|
|
239
296
|
}
|
|
240
297
|
let state = null;
|
|
241
298
|
if (config.state) {
|
|
242
|
-
state = config
|
|
299
|
+
({ state } = config);
|
|
243
300
|
}
|
|
244
301
|
this.state = new SceneManager(this, state);
|
|
245
302
|
}
|
|
@@ -264,7 +321,7 @@ export class Game {
|
|
|
264
321
|
this.logger.info('contextRestored', event);
|
|
265
322
|
if (this.renderer) {
|
|
266
323
|
this.renderer.initContext(this);
|
|
267
|
-
//
|
|
324
|
+
// This.cache.clearGLTextures();
|
|
268
325
|
this.renderer.contextLost = false;
|
|
269
326
|
}
|
|
270
327
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
1
2
|
import { create, remove } from '../display/canvas/pool.js';
|
|
2
3
|
import { Graphics } from '../display/graphics.js';
|
|
3
4
|
import { Image } from '../display/image.js';
|
|
@@ -14,6 +15,57 @@ import { Signal } from './signal.js';
|
|
|
14
15
|
const MAX_POINTERS = 10;
|
|
15
16
|
|
|
16
17
|
export class Input {
|
|
18
|
+
game;
|
|
19
|
+
hitCanvas;
|
|
20
|
+
hitContext;
|
|
21
|
+
moveCallbacks;
|
|
22
|
+
lockCallbacks;
|
|
23
|
+
customCandidateHandler;
|
|
24
|
+
customCandidateHandlerContext;
|
|
25
|
+
pollRate;
|
|
26
|
+
enabled;
|
|
27
|
+
multiInputOverride;
|
|
28
|
+
position;
|
|
29
|
+
speed;
|
|
30
|
+
circle;
|
|
31
|
+
scale;
|
|
32
|
+
maxPointers;
|
|
33
|
+
tapRate;
|
|
34
|
+
doubleTapRate;
|
|
35
|
+
holdRate;
|
|
36
|
+
justPressedRate;
|
|
37
|
+
justReleasedRate;
|
|
38
|
+
recordPointerHistory;
|
|
39
|
+
recordRate;
|
|
40
|
+
recordLimit;
|
|
41
|
+
pointer1;
|
|
42
|
+
pointer2;
|
|
43
|
+
pointer3;
|
|
44
|
+
pointer4;
|
|
45
|
+
pointer5;
|
|
46
|
+
pointer6;
|
|
47
|
+
pointer7;
|
|
48
|
+
pointer8;
|
|
49
|
+
pointer9;
|
|
50
|
+
pointer10;
|
|
51
|
+
pointers;
|
|
52
|
+
activePointer;
|
|
53
|
+
mousePointer;
|
|
54
|
+
mouse;
|
|
55
|
+
touch;
|
|
56
|
+
mspointer;
|
|
57
|
+
resetLocked;
|
|
58
|
+
onDown;
|
|
59
|
+
onUp;
|
|
60
|
+
onTap;
|
|
61
|
+
onHold;
|
|
62
|
+
minPriorityID;
|
|
63
|
+
interactiveItems;
|
|
64
|
+
_localPoint;
|
|
65
|
+
_pollCounter;
|
|
66
|
+
_oldPosition;
|
|
67
|
+
_x;
|
|
68
|
+
_y;
|
|
17
69
|
/**
|
|
18
70
|
* TBD.
|
|
19
71
|
* @param {import('./game.js').Game} game - TBD.
|
|
@@ -1,8 +1,50 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
1
2
|
import { Point } from '../geom/point.js';
|
|
2
3
|
import { distance } from '../util/math.js';
|
|
3
4
|
import { GROUP } from './const.js';
|
|
4
5
|
|
|
5
6
|
export class InputHandler {
|
|
7
|
+
sprite;
|
|
8
|
+
game;
|
|
9
|
+
enabled;
|
|
10
|
+
checked;
|
|
11
|
+
priorityID;
|
|
12
|
+
useHandCursor;
|
|
13
|
+
_setHandCursor;
|
|
14
|
+
isDragged;
|
|
15
|
+
allowHorizontalDrag;
|
|
16
|
+
allowVerticalDrag;
|
|
17
|
+
bringToTop;
|
|
18
|
+
snapOffset;
|
|
19
|
+
snapOnDrag;
|
|
20
|
+
snapOnRelease;
|
|
21
|
+
snapX;
|
|
22
|
+
snapY;
|
|
23
|
+
snapOffsetX;
|
|
24
|
+
snapOffsetY;
|
|
25
|
+
pixelPerfectOver;
|
|
26
|
+
pixelPerfectClick;
|
|
27
|
+
pixelPerfectAlpha;
|
|
28
|
+
draggable;
|
|
29
|
+
boundsRect;
|
|
30
|
+
boundsSprite;
|
|
31
|
+
scaleLayer;
|
|
32
|
+
dragOffset;
|
|
33
|
+
dragFromCenter;
|
|
34
|
+
dragStopBlocksInputUp;
|
|
35
|
+
dragStartPoint;
|
|
36
|
+
dragDistanceThreshold;
|
|
37
|
+
dragTimeThreshold;
|
|
38
|
+
downPoint;
|
|
39
|
+
snapPoint;
|
|
40
|
+
_dragPoint;
|
|
41
|
+
_dragPhase;
|
|
42
|
+
_pendingDrag;
|
|
43
|
+
_dragTimePass;
|
|
44
|
+
_dragDistancePass;
|
|
45
|
+
_wasEnabled;
|
|
46
|
+
_tempPoint;
|
|
47
|
+
_pointerData;
|
|
6
48
|
/**
|
|
7
49
|
* TBD.
|
|
8
50
|
* @param {import('../display/image.js').Image} sprite - TBD.
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
1
2
|
/* const NO_BUTTON = -1;
|
|
2
3
|
const LEFT_BUTTON = 0;
|
|
3
4
|
const MIDDLE_BUTTON = 1;
|
|
@@ -8,6 +9,29 @@ const WHEEL_UP = 1;
|
|
|
8
9
|
const WHEEL_DOWN = -1; */
|
|
9
10
|
|
|
10
11
|
class WheelEventProxy {
|
|
12
|
+
game;
|
|
13
|
+
input;
|
|
14
|
+
callbackContext;
|
|
15
|
+
mouseDownCallback;
|
|
16
|
+
mouseUpCallback;
|
|
17
|
+
mouseOutCallback;
|
|
18
|
+
mouseOverCallback;
|
|
19
|
+
mouseWheelCallback;
|
|
20
|
+
mouseMoveCallback;
|
|
21
|
+
capture;
|
|
22
|
+
button;
|
|
23
|
+
wheelDelta;
|
|
24
|
+
enabled;
|
|
25
|
+
locked;
|
|
26
|
+
stopOnGameOut;
|
|
27
|
+
event;
|
|
28
|
+
_onMouseDown;
|
|
29
|
+
_onMouseMove;
|
|
30
|
+
_onMouseUp;
|
|
31
|
+
_onMouseOut;
|
|
32
|
+
_onMouseOver;
|
|
33
|
+
_onMouseWheel;
|
|
34
|
+
_wheelEvent;
|
|
11
35
|
/**
|
|
12
36
|
* TBD.
|
|
13
37
|
* @param {number} scaleFactor - TBD.
|
|
@@ -1,4 +1,21 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
1
2
|
export class MSPointer {
|
|
3
|
+
game;
|
|
4
|
+
input;
|
|
5
|
+
callbackContext;
|
|
6
|
+
pointerDownCallback;
|
|
7
|
+
pointerMoveCallback;
|
|
8
|
+
pointerUpCallback;
|
|
9
|
+
capture;
|
|
10
|
+
button;
|
|
11
|
+
event;
|
|
12
|
+
enabled;
|
|
13
|
+
_onMSPointerDown;
|
|
14
|
+
_onMSPointerMove;
|
|
15
|
+
_onMSPointerUp;
|
|
16
|
+
_onMSPointerUpGlobal;
|
|
17
|
+
_onMSPointerOut;
|
|
18
|
+
_onMSPointerOver;
|
|
2
19
|
/**
|
|
3
20
|
* TBD.
|
|
4
21
|
* @param {import('./game.js').Game} game - TBD.
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
1
2
|
import { Circle } from '../geom/circle.js';
|
|
2
3
|
import { Point } from '../geom/point.js';
|
|
3
4
|
import {
|
|
@@ -10,6 +11,50 @@ import {
|
|
|
10
11
|
} from './const.js';
|
|
11
12
|
|
|
12
13
|
export class Pointer {
|
|
14
|
+
game;
|
|
15
|
+
id;
|
|
16
|
+
type;
|
|
17
|
+
exists;
|
|
18
|
+
identifier;
|
|
19
|
+
pointerId;
|
|
20
|
+
pointerMode;
|
|
21
|
+
target;
|
|
22
|
+
button;
|
|
23
|
+
_holdSent;
|
|
24
|
+
_history;
|
|
25
|
+
_nextDrop;
|
|
26
|
+
_stateReset;
|
|
27
|
+
withinGame;
|
|
28
|
+
clientX;
|
|
29
|
+
clientY;
|
|
30
|
+
pageX;
|
|
31
|
+
pageY;
|
|
32
|
+
screenX;
|
|
33
|
+
screenY;
|
|
34
|
+
rawMovementX;
|
|
35
|
+
rawMovementY;
|
|
36
|
+
movementX;
|
|
37
|
+
movementY;
|
|
38
|
+
x;
|
|
39
|
+
y;
|
|
40
|
+
isMouse;
|
|
41
|
+
isDown;
|
|
42
|
+
isUp;
|
|
43
|
+
timeDown;
|
|
44
|
+
timeUp;
|
|
45
|
+
previousTapTime;
|
|
46
|
+
totalTouches;
|
|
47
|
+
msSinceLastClick;
|
|
48
|
+
targetObject;
|
|
49
|
+
interactiveCandidates;
|
|
50
|
+
active;
|
|
51
|
+
dirty;
|
|
52
|
+
position;
|
|
53
|
+
positionDown;
|
|
54
|
+
positionUp;
|
|
55
|
+
circle;
|
|
56
|
+
_clickTrampolines;
|
|
57
|
+
_trampolineTargetObject;
|
|
13
58
|
/**
|
|
14
59
|
* TBD.
|
|
15
60
|
* @param {import('./game.js').Game} game - TBD.
|
|
@@ -1,4 +1,22 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
1
2
|
export class Touch {
|
|
3
|
+
game;
|
|
4
|
+
enabled;
|
|
5
|
+
callbackContext;
|
|
6
|
+
touchStartCallback;
|
|
7
|
+
touchMoveCallback;
|
|
8
|
+
touchEndCallback;
|
|
9
|
+
touchEnterCallback;
|
|
10
|
+
touchLeaveCallback;
|
|
11
|
+
touchCancelCallback;
|
|
12
|
+
preventDefault;
|
|
13
|
+
event;
|
|
14
|
+
_onTouchStart;
|
|
15
|
+
_onTouchMove;
|
|
16
|
+
_onTouchEnd;
|
|
17
|
+
_onTouchEnter;
|
|
18
|
+
_onTouchLeave;
|
|
19
|
+
_onTouchCancel;
|
|
2
20
|
/**
|
|
3
21
|
* TBD.
|
|
4
22
|
* @param {import('./game.js').Game} game - TBD.
|