@vpmedia/phaser 1.11.0 → 1.13.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/README.md +1 -1
- package/package.json +8 -5
- package/src/index.js +19 -19
- package/src/phaser/core/animation.js +12 -9
- package/src/phaser/core/animation_manager.js +16 -6
- package/src/phaser/core/animation_parser.js +40 -17
- package/src/phaser/core/array_set.js +3 -5
- package/src/phaser/core/cache.js +12 -12
- package/src/phaser/core/const.js +1 -1
- package/src/phaser/core/device.js +2 -4
- package/src/phaser/core/device_util.js +50 -17
- package/src/phaser/core/dom.js +36 -27
- package/src/phaser/core/event_manager.js +47 -19
- package/src/phaser/core/factory.js +34 -12
- package/src/phaser/core/frame.js +3 -5
- package/src/phaser/core/frame_data.js +2 -4
- package/src/phaser/core/frame_util.js +11 -9
- package/src/phaser/core/game.js +22 -19
- package/src/phaser/core/input.js +24 -16
- package/src/phaser/core/input_handler.js +102 -28
- package/src/phaser/core/input_mouse.js +12 -16
- package/src/phaser/core/input_mspointer.js +11 -10
- package/src/phaser/core/input_pointer.js +61 -20
- package/src/phaser/core/input_touch.js +7 -9
- package/src/phaser/core/loader.js +171 -54
- package/src/phaser/core/loader_parser.js +29 -22
- package/src/phaser/core/raf.js +2 -4
- package/src/phaser/core/scale_manager.js +75 -31
- package/src/phaser/core/scene.js +2 -4
- package/src/phaser/core/scene_manager.js +9 -6
- package/src/phaser/core/signal.js +19 -11
- package/src/phaser/core/signal_binding.js +12 -7
- package/src/phaser/core/sound.js +23 -14
- package/src/phaser/core/sound_manager.js +62 -26
- package/src/phaser/core/sound_sprite.js +34 -34
- package/src/phaser/core/stage.js +4 -7
- package/src/phaser/core/time.js +3 -5
- package/src/phaser/core/timer.js +27 -10
- package/src/phaser/core/timer_event.js +1 -3
- package/src/phaser/core/tween.js +36 -12
- package/src/phaser/core/tween_data.js +17 -9
- package/src/phaser/core/tween_easing.js +87 -83
- package/src/phaser/core/tween_manager.js +34 -16
- package/src/phaser/core/world.js +3 -5
- package/src/phaser/display/bitmap_text.js +25 -14
- package/src/phaser/display/button.js +35 -8
- package/src/phaser/display/canvas/buffer.js +1 -3
- package/src/phaser/display/canvas/graphics.js +30 -15
- package/src/phaser/display/canvas/masker.js +7 -5
- package/src/phaser/display/canvas/pool.js +18 -11
- package/src/phaser/display/canvas/renderer.js +40 -20
- package/src/phaser/display/canvas/tinter.js +61 -19
- package/src/phaser/display/canvas/util.js +44 -35
- package/src/phaser/display/display_object.js +42 -24
- package/src/phaser/display/graphics.js +72 -39
- package/src/phaser/display/graphics_data.js +3 -4
- package/src/phaser/display/graphics_data_util.js +15 -5
- package/src/phaser/display/group.js +15 -9
- package/src/phaser/display/image.js +17 -9
- package/src/phaser/display/sprite_batch.js +8 -4
- package/src/phaser/display/sprite_util.js +67 -26
- package/src/phaser/display/text.js +92 -31
- package/src/phaser/display/webgl/abstract_filter.js +1 -3
- package/src/phaser/display/webgl/base_texture.js +8 -5
- package/src/phaser/display/webgl/blend_manager.js +1 -3
- package/src/phaser/display/webgl/earcut.js +170 -129
- package/src/phaser/display/webgl/earcut_node.js +1 -3
- package/src/phaser/display/webgl/fast_sprite_batch.js +48 -47
- package/src/phaser/display/webgl/filter_manager.js +1 -3
- package/src/phaser/display/webgl/filter_texture.js +17 -6
- package/src/phaser/display/webgl/graphics.js +72 -50
- package/src/phaser/display/webgl/graphics_data.js +2 -4
- package/src/phaser/display/webgl/mask_manager.js +17 -7
- package/src/phaser/display/webgl/render_texture.js +19 -10
- package/src/phaser/display/webgl/renderer.js +41 -9
- package/src/phaser/display/webgl/shader/complex.js +1 -3
- package/src/phaser/display/webgl/shader/fast.js +9 -4
- package/src/phaser/display/webgl/shader/normal.js +43 -15
- package/src/phaser/display/webgl/shader/primitive.js +1 -3
- package/src/phaser/display/webgl/shader/strip.js +1 -3
- package/src/phaser/display/webgl/shader_manager.js +1 -3
- package/src/phaser/display/webgl/sprite_batch.js +14 -15
- package/src/phaser/display/webgl/stencil_manager.js +19 -21
- package/src/phaser/display/webgl/texture.js +14 -10
- package/src/phaser/display/webgl/texture_util.js +11 -9
- package/src/phaser/display/webgl/util.js +21 -18
- package/src/phaser/geom/circle.js +27 -11
- package/src/phaser/geom/ellipse.js +26 -10
- package/src/phaser/geom/line.js +31 -13
- package/src/phaser/geom/matrix.js +14 -5
- package/src/phaser/geom/point.js +18 -13
- package/src/phaser/geom/polygon.js +13 -8
- package/src/phaser/geom/rectangle.js +57 -14
- package/src/phaser/geom/rounded_rectangle.js +12 -4
- package/src/phaser/geom/util/circle.js +40 -32
- package/src/phaser/geom/util/ellipse.js +10 -18
- package/src/phaser/geom/util/line.js +46 -37
- package/src/phaser/geom/util/matrix.js +11 -9
- package/src/phaser/geom/util/point.js +101 -79
- package/src/phaser/geom/util/polygon.js +7 -15
- package/src/phaser/geom/util/rectangle.js +95 -69
- package/src/phaser/geom/util/rounded_rectangle.js +7 -15
- package/src/phaser/util/math.js +123 -89
- package/types/global.d.ts +7 -0
- package/types/index.d.ts +22 -0
- package/types/index.d.ts.map +1 -0
- package/types/phaser/core/animation.d.ts +55 -0
- package/types/phaser/core/animation.d.ts.map +1 -0
- package/types/phaser/core/animation_manager.d.ts +35 -0
- package/types/phaser/core/animation_manager.d.ts.map +1 -0
- package/types/phaser/core/animation_parser.d.ts +22 -0
- package/types/phaser/core/animation_parser.d.ts.map +1 -0
- package/types/phaser/core/array_set.d.ts +23 -0
- package/types/phaser/core/array_set.d.ts.map +1 -0
- package/types/phaser/core/cache.d.ts +106 -0
- package/types/phaser/core/cache.d.ts.map +1 -0
- package/types/phaser/core/const.d.ts +81 -0
- package/types/phaser/core/const.d.ts.map +1 -0
- package/types/phaser/core/device.d.ts +36 -0
- package/types/phaser/core/device.d.ts.map +1 -0
- package/types/phaser/core/device_util.d.ts +58 -0
- package/types/phaser/core/device_util.d.ts.map +1 -0
- package/types/phaser/core/dom.d.ts +63 -0
- package/types/phaser/core/dom.d.ts.map +1 -0
- package/types/phaser/core/event_manager.d.ts +53 -0
- package/types/phaser/core/event_manager.d.ts.map +1 -0
- package/types/phaser/core/factory.d.ts +12 -0
- package/types/phaser/core/factory.d.ts.map +1 -0
- package/types/phaser/core/frame.d.ts +30 -0
- package/types/phaser/core/frame.d.ts.map +1 -0
- package/types/phaser/core/frame_data.d.ts +14 -0
- package/types/phaser/core/frame_data.d.ts.map +1 -0
- package/types/phaser/core/frame_util.d.ts +17 -0
- package/types/phaser/core/frame_util.d.ts.map +1 -0
- package/types/phaser/core/game.d.ts +57 -0
- package/types/phaser/core/game.d.ts.map +1 -0
- package/types/phaser/core/input.d.ts +92 -0
- package/types/phaser/core/input.d.ts.map +1 -0
- package/types/phaser/core/input_handler.d.ts +111 -0
- package/types/phaser/core/input_handler.d.ts.map +1 -0
- package/types/phaser/core/input_mouse.d.ts +39 -0
- package/types/phaser/core/input_mouse.d.ts.map +1 -0
- package/types/phaser/core/input_mspointer.d.ts +34 -0
- package/types/phaser/core/input_mspointer.d.ts.map +1 -0
- package/types/phaser/core/input_pointer.d.ts +68 -0
- package/types/phaser/core/input_pointer.d.ts.map +1 -0
- package/types/phaser/core/input_touch.d.ts +37 -0
- package/types/phaser/core/input_touch.d.ts.map +1 -0
- package/types/phaser/core/loader.d.ts +94 -0
- package/types/phaser/core/loader.d.ts.map +1 -0
- package/types/phaser/core/loader_parser.d.ts +39 -0
- package/types/phaser/core/loader_parser.d.ts.map +1 -0
- package/types/phaser/core/raf.d.ts +15 -0
- package/types/phaser/core/raf.d.ts.map +1 -0
- package/types/phaser/core/scale_manager.d.ts +137 -0
- package/types/phaser/core/scale_manager.d.ts.map +1 -0
- package/types/phaser/core/scene.d.ts +17 -0
- package/types/phaser/core/scene.d.ts.map +1 -0
- package/types/phaser/core/scene_manager.d.ts +39 -0
- package/types/phaser/core/scene_manager.d.ts.map +1 -0
- package/types/phaser/core/signal.d.ts +25 -0
- package/types/phaser/core/signal.d.ts.map +1 -0
- package/types/phaser/core/signal_binding.d.ts +26 -0
- package/types/phaser/core/signal_binding.d.ts.map +1 -0
- package/types/phaser/core/sound.d.ts +72 -0
- package/types/phaser/core/sound.d.ts.map +1 -0
- package/types/phaser/core/sound_manager.d.ts +50 -0
- package/types/phaser/core/sound_manager.d.ts.map +1 -0
- package/types/phaser/core/sound_sprite.d.ts +18 -0
- package/types/phaser/core/sound_sprite.d.ts.map +1 -0
- package/types/phaser/core/stage.d.ts +23 -0
- package/types/phaser/core/stage.d.ts.map +1 -0
- package/types/phaser/core/time.d.ts +49 -0
- package/types/phaser/core/time.d.ts.map +1 -0
- package/types/phaser/core/timer.d.ts +49 -0
- package/types/phaser/core/timer.d.ts.map +1 -0
- package/types/phaser/core/timer_event.d.ts +18 -0
- package/types/phaser/core/timer_event.d.ts.map +1 -0
- package/types/phaser/core/tween.d.ts +52 -0
- package/types/phaser/core/tween.d.ts.map +1 -0
- package/types/phaser/core/tween_data.d.ts +37 -0
- package/types/phaser/core/tween_data.d.ts.map +1 -0
- package/types/phaser/core/tween_easing.d.ts +192 -0
- package/types/phaser/core/tween_easing.d.ts.map +1 -0
- package/types/phaser/core/tween_manager.d.ts +94 -0
- package/types/phaser/core/tween_manager.d.ts.map +1 -0
- package/types/phaser/core/world.d.ts +6 -0
- package/types/phaser/core/world.d.ts.map +1 -0
- package/types/phaser/display/bitmap_text.d.ts +59 -0
- package/types/phaser/display/bitmap_text.d.ts.map +1 -0
- package/types/phaser/display/button.d.ts +47 -0
- package/types/phaser/display/button.d.ts.map +1 -0
- package/types/phaser/display/canvas/buffer.d.ts +11 -0
- package/types/phaser/display/canvas/buffer.d.ts.map +1 -0
- package/types/phaser/display/canvas/graphics.d.ts +21 -0
- package/types/phaser/display/canvas/graphics.d.ts.map +1 -0
- package/types/phaser/display/canvas/masker.d.ts +14 -0
- package/types/phaser/display/canvas/masker.d.ts.map +1 -0
- package/types/phaser/display/canvas/pool.d.ts +52 -0
- package/types/phaser/display/canvas/pool.d.ts.map +1 -0
- package/types/phaser/display/canvas/renderer.d.ts +28 -0
- package/types/phaser/display/canvas/renderer.d.ts.map +1 -0
- package/types/phaser/display/canvas/tinter.d.ts +41 -0
- package/types/phaser/display/canvas/tinter.d.ts.map +1 -0
- package/types/phaser/display/canvas/util.d.ts +79 -0
- package/types/phaser/display/canvas/util.d.ts.map +1 -0
- package/types/phaser/display/display_object.d.ts +83 -0
- package/types/phaser/display/display_object.d.ts.map +1 -0
- package/types/phaser/display/graphics.d.ts +60 -0
- package/types/phaser/display/graphics.d.ts.map +1 -0
- package/types/phaser/display/graphics_data.d.ts +15 -0
- package/types/phaser/display/graphics_data.d.ts.map +1 -0
- package/types/phaser/display/graphics_data_util.d.ts +8 -0
- package/types/phaser/display/graphics_data_util.d.ts.map +1 -0
- package/types/phaser/display/group.d.ts +49 -0
- package/types/phaser/display/group.d.ts.map +1 -0
- package/types/phaser/display/image.d.ts +52 -0
- package/types/phaser/display/image.d.ts.map +1 -0
- package/types/phaser/display/sprite_batch.d.ts +11 -0
- package/types/phaser/display/sprite_batch.d.ts.map +1 -0
- package/types/phaser/display/sprite_util.d.ts +40 -0
- package/types/phaser/display/sprite_util.d.ts.map +1 -0
- package/types/phaser/display/text.d.ts +125 -0
- package/types/phaser/display/text.d.ts.map +1 -0
- package/types/phaser/display/webgl/abstract_filter.d.ts +17 -0
- package/types/phaser/display/webgl/abstract_filter.d.ts.map +1 -0
- package/types/phaser/display/webgl/base_texture.d.ts +20 -0
- package/types/phaser/display/webgl/base_texture.d.ts.map +1 -0
- package/types/phaser/display/webgl/blend_manager.d.ts +14 -0
- package/types/phaser/display/webgl/blend_manager.d.ts.map +1 -0
- package/types/phaser/display/webgl/earcut.d.ts +215 -0
- package/types/phaser/display/webgl/earcut.d.ts.map +1 -0
- package/types/phaser/display/webgl/earcut_node.d.ts +19 -0
- package/types/phaser/display/webgl/earcut_node.d.ts.map +1 -0
- package/types/phaser/display/webgl/fast_sprite_batch.d.ts +34 -0
- package/types/phaser/display/webgl/fast_sprite_batch.d.ts.map +1 -0
- package/types/phaser/display/webgl/filter_manager.d.ts +21 -0
- package/types/phaser/display/webgl/filter_manager.d.ts.map +1 -0
- package/types/phaser/display/webgl/filter_texture.d.ts +13 -0
- package/types/phaser/display/webgl/filter_texture.d.ts.map +1 -0
- package/types/phaser/display/webgl/graphics.d.ts +80 -0
- package/types/phaser/display/webgl/graphics.d.ts.map +1 -0
- package/types/phaser/display/webgl/graphics_data.d.ts +23 -0
- package/types/phaser/display/webgl/graphics_data.d.ts.map +1 -0
- package/types/phaser/display/webgl/mask_manager.d.ts +15 -0
- package/types/phaser/display/webgl/mask_manager.d.ts.map +1 -0
- package/types/phaser/display/webgl/render_texture.d.ts +25 -0
- package/types/phaser/display/webgl/render_texture.d.ts.map +1 -0
- package/types/phaser/display/webgl/renderer.d.ts +44 -0
- package/types/phaser/display/webgl/renderer.d.ts.map +1 -0
- package/types/phaser/display/webgl/shader/complex.d.ts +22 -0
- package/types/phaser/display/webgl/shader/complex.d.ts.map +1 -0
- package/types/phaser/display/webgl/shader/fast.d.ts +25 -0
- package/types/phaser/display/webgl/shader/fast.d.ts.map +1 -0
- package/types/phaser/display/webgl/shader/normal.d.ts +25 -0
- package/types/phaser/display/webgl/shader/normal.d.ts.map +1 -0
- package/types/phaser/display/webgl/shader/primitive.d.ts +21 -0
- package/types/phaser/display/webgl/shader/primitive.d.ts.map +1 -0
- package/types/phaser/display/webgl/shader/strip.d.ts +22 -0
- package/types/phaser/display/webgl/shader/strip.d.ts.map +1 -0
- package/types/phaser/display/webgl/shader_manager.d.ts +24 -0
- package/types/phaser/display/webgl/shader_manager.d.ts.map +1 -0
- package/types/phaser/display/webgl/sprite_batch.d.ts +36 -0
- package/types/phaser/display/webgl/sprite_batch.d.ts.map +1 -0
- package/types/phaser/display/webgl/stencil_manager.d.ts +12 -0
- package/types/phaser/display/webgl/stencil_manager.d.ts.map +1 -0
- package/types/phaser/display/webgl/texture.d.ts +30 -0
- package/types/phaser/display/webgl/texture.d.ts.map +1 -0
- package/types/phaser/display/webgl/texture_util.d.ts +17 -0
- package/types/phaser/display/webgl/texture_util.d.ts.map +1 -0
- package/types/phaser/display/webgl/util.d.ts +45 -0
- package/types/phaser/display/webgl/util.d.ts.map +1 -0
- package/types/phaser/geom/circle.d.ts +46 -0
- package/types/phaser/geom/circle.d.ts.map +1 -0
- package/types/phaser/geom/ellipse.d.ts +26 -0
- package/types/phaser/geom/ellipse.d.ts.map +1 -0
- package/types/phaser/geom/line.d.ts +45 -0
- package/types/phaser/geom/line.d.ts.map +1 -0
- package/types/phaser/geom/matrix.d.ts +35 -0
- package/types/phaser/geom/matrix.d.ts.map +1 -0
- package/types/phaser/geom/point.d.ts +43 -0
- package/types/phaser/geom/point.d.ts.map +1 -0
- package/types/phaser/geom/polygon.d.ts +17 -0
- package/types/phaser/geom/polygon.d.ts.map +1 -0
- package/types/phaser/geom/rectangle.d.ts +71 -0
- package/types/phaser/geom/rectangle.d.ts.map +1 -0
- package/types/phaser/geom/rounded_rectangle.d.ts +21 -0
- package/types/phaser/geom/rounded_rectangle.d.ts.map +1 -0
- package/types/phaser/geom/util/circle.d.ts +64 -0
- package/types/phaser/geom/util/circle.d.ts.map +1 -0
- package/types/phaser/geom/util/ellipse.d.ts +16 -0
- package/types/phaser/geom/util/ellipse.d.ts.map +1 -0
- package/types/phaser/geom/util/line.d.ts +49 -0
- package/types/phaser/geom/util/line.d.ts.map +1 -0
- package/types/phaser/geom/util/matrix.d.ts +22 -0
- package/types/phaser/geom/util/matrix.d.ts.map +1 -0
- package/types/phaser/geom/util/point.d.ts +179 -0
- package/types/phaser/geom/util/point.d.ts.map +1 -0
- package/types/phaser/geom/util/polygon.d.ts +10 -0
- package/types/phaser/geom/util/polygon.d.ts.map +1 -0
- package/types/phaser/geom/util/rectangle.d.ts +141 -0
- package/types/phaser/geom/util/rectangle.d.ts.map +1 -0
- package/types/phaser/geom/util/rounded_rectangle.d.ts +10 -0
- package/types/phaser/geom/util/rounded_rectangle.d.ts.map +1 -0
- package/types/phaser/util/math.d.ts +182 -0
- package/types/phaser/util/math.d.ts.map +1 -0
package/src/phaser/core/dom.js
CHANGED
|
@@ -1,18 +1,21 @@
|
|
|
1
1
|
/**
|
|
2
|
+
* @copyright Copyright (c) 2018-present Richard Davey, Photon Storm Ltd., Andras Csizmadia <andras@vpmedia.hu> (www.vpmedia.hu)
|
|
2
3
|
* @author Andras Csizmadia <andras@vpmedia.hu>
|
|
3
4
|
* @author Richard Davey <rich@photonstorm.com>
|
|
4
|
-
* @copyright Copyright (c) 2018-present Richard Davey, Photon Storm Ltd., Andras Csizmadia <andras@vpmedia.hu> (www.vpmedia.hu)
|
|
5
5
|
*/
|
|
6
|
-
import Point from '../geom/point';
|
|
6
|
+
import { Point } from '../geom/point';
|
|
7
7
|
|
|
8
8
|
class VisualBoundsDesktopRectangle {
|
|
9
|
-
|
|
10
9
|
get x() {
|
|
11
|
-
return window &&
|
|
10
|
+
return window && 'pageXOffset' in window
|
|
11
|
+
? window.pageXOffset
|
|
12
|
+
: document.documentElement.scrollLeft;
|
|
12
13
|
}
|
|
13
14
|
|
|
14
15
|
get y() {
|
|
15
|
-
return window &&
|
|
16
|
+
return window && 'pageYOffset' in window
|
|
17
|
+
? window.pageYOffset
|
|
18
|
+
: document.documentElement.scrollTop;
|
|
16
19
|
}
|
|
17
20
|
|
|
18
21
|
get width() {
|
|
@@ -22,11 +25,9 @@ class VisualBoundsDesktopRectangle {
|
|
|
22
25
|
get height() {
|
|
23
26
|
return Math.max(window.innerHeight, document.documentElement.clientHeight);
|
|
24
27
|
}
|
|
25
|
-
|
|
26
28
|
}
|
|
27
29
|
|
|
28
30
|
class LayoutBoundsDesktopRectangle {
|
|
29
|
-
|
|
30
31
|
get x() {
|
|
31
32
|
return 0;
|
|
32
33
|
}
|
|
@@ -42,17 +43,19 @@ class LayoutBoundsDesktopRectangle {
|
|
|
42
43
|
get height() {
|
|
43
44
|
return Math.max(window.innerHeight, document.documentElement.clientHeight);
|
|
44
45
|
}
|
|
45
|
-
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
class VisualBoundsRectangle {
|
|
49
|
-
|
|
50
49
|
get x() {
|
|
51
|
-
return window &&
|
|
50
|
+
return window && 'pageXOffset' in window
|
|
51
|
+
? window.pageXOffset
|
|
52
|
+
: document.documentElement.scrollLeft;
|
|
52
53
|
}
|
|
53
54
|
|
|
54
55
|
get y() {
|
|
55
|
-
return window &&
|
|
56
|
+
return window && 'pageYOffset' in window
|
|
57
|
+
? window.pageYOffset
|
|
58
|
+
: document.documentElement.scrollTop;
|
|
56
59
|
}
|
|
57
60
|
|
|
58
61
|
get width() {
|
|
@@ -62,11 +65,9 @@ class VisualBoundsRectangle {
|
|
|
62
65
|
get height() {
|
|
63
66
|
return window.innerHeight;
|
|
64
67
|
}
|
|
65
|
-
|
|
66
68
|
}
|
|
67
69
|
|
|
68
70
|
class LayoutBoundsRectangle {
|
|
69
|
-
|
|
70
71
|
get x() {
|
|
71
72
|
return 0;
|
|
72
73
|
}
|
|
@@ -86,14 +87,12 @@ class LayoutBoundsRectangle {
|
|
|
86
87
|
const b = window.innerHeight;
|
|
87
88
|
return a < b ? b : a; // max
|
|
88
89
|
}
|
|
89
|
-
|
|
90
90
|
}
|
|
91
91
|
|
|
92
92
|
// For documentBounds
|
|
93
93
|
// Ref. http://www.quirksmode.org/mobile/tableViewport_desktop.html
|
|
94
94
|
|
|
95
95
|
class DocumentBoundsRectangle {
|
|
96
|
-
|
|
97
96
|
get x() {
|
|
98
97
|
return 0;
|
|
99
98
|
}
|
|
@@ -111,18 +110,29 @@ class DocumentBoundsRectangle {
|
|
|
111
110
|
const d = document.documentElement;
|
|
112
111
|
return Math.max(d.clientHeight, d.offsetHeight, d.scrollHeight);
|
|
113
112
|
}
|
|
114
|
-
|
|
115
113
|
}
|
|
116
114
|
|
|
117
115
|
export default class {
|
|
118
|
-
|
|
119
116
|
constructor(device) {
|
|
120
|
-
this.treatAsDesktop =
|
|
121
|
-
|
|
122
|
-
|
|
117
|
+
this.treatAsDesktop =
|
|
118
|
+
device.desktop &&
|
|
119
|
+
document.documentElement.clientWidth <= window.innerWidth &&
|
|
120
|
+
document.documentElement.clientHeight <= window.innerHeight;
|
|
121
|
+
this.visualBounds = this.treatAsDesktop
|
|
122
|
+
? new VisualBoundsDesktopRectangle()
|
|
123
|
+
: new VisualBoundsRectangle();
|
|
124
|
+
this.layoutBounds = this.treatAsDesktop
|
|
125
|
+
? new LayoutBoundsDesktopRectangle()
|
|
126
|
+
: new LayoutBoundsRectangle();
|
|
123
127
|
this.documentBounds = new DocumentBoundsRectangle();
|
|
124
|
-
this.scrollXProvider =
|
|
125
|
-
|
|
128
|
+
this.scrollXProvider =
|
|
129
|
+
window && 'pageXOffset' in window
|
|
130
|
+
? () => window.pageXOffset
|
|
131
|
+
: () => document.documentElement.scrollLeft;
|
|
132
|
+
this.scrollYProvider =
|
|
133
|
+
window && 'pageYOffset' in window
|
|
134
|
+
? () => window.pageYOffset
|
|
135
|
+
: () => document.documentElement.scrollTop;
|
|
126
136
|
}
|
|
127
137
|
|
|
128
138
|
getOffset(element, point = null) {
|
|
@@ -172,12 +182,12 @@ export default class {
|
|
|
172
182
|
const PORTRAIT = 'portrait-primary';
|
|
173
183
|
const LANDSCAPE = 'landscape-primary';
|
|
174
184
|
if (primaryFallback === 'screen') {
|
|
175
|
-
return
|
|
185
|
+
return screen.height > screen.width ? PORTRAIT : LANDSCAPE;
|
|
176
186
|
} else if (primaryFallback === 'viewport') {
|
|
177
|
-
return
|
|
187
|
+
return this.visualBounds.height > this.visualBounds.width ? PORTRAIT : LANDSCAPE;
|
|
178
188
|
} else if (primaryFallback === 'window.orientation' && typeof window.orientation === 'number') {
|
|
179
189
|
// This may change by device based on "natural" orientation.
|
|
180
|
-
return
|
|
190
|
+
return window.orientation === 0 || window.orientation === 180 ? PORTRAIT : LANDSCAPE;
|
|
181
191
|
} else if (window.matchMedia) {
|
|
182
192
|
if (window.matchMedia('(orientation: portrait)').matches) {
|
|
183
193
|
return PORTRAIT;
|
|
@@ -185,7 +195,7 @@ export default class {
|
|
|
185
195
|
return LANDSCAPE;
|
|
186
196
|
}
|
|
187
197
|
}
|
|
188
|
-
return
|
|
198
|
+
return this.visualBounds.height > this.visualBounds.width ? PORTRAIT : LANDSCAPE;
|
|
189
199
|
}
|
|
190
200
|
|
|
191
201
|
get scrollX() {
|
|
@@ -203,5 +213,4 @@ export default class {
|
|
|
203
213
|
get clientHeight() {
|
|
204
214
|
return Math.max(window.innerHeight, document.documentElement.clientHeight);
|
|
205
215
|
}
|
|
206
|
-
|
|
207
216
|
}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
+
* @copyright Copyright (c) 2018-present Richard Davey, Photon Storm Ltd., Andras Csizmadia <andras@vpmedia.hu> (www.vpmedia.hu)
|
|
2
3
|
* @author Andras Csizmadia <andras@vpmedia.hu>
|
|
3
4
|
* @author Richard Davey <rich@photonstorm.com>
|
|
4
|
-
* @copyright Copyright (c) 2018-present Richard Davey, Photon Storm Ltd., Andras Csizmadia <andras@vpmedia.hu> (www.vpmedia.hu)
|
|
5
5
|
*/
|
|
6
|
-
import Signal from
|
|
6
|
+
import { Signal } from './signal';
|
|
7
7
|
|
|
8
8
|
export default class {
|
|
9
|
-
|
|
10
9
|
constructor(sprite) {
|
|
11
10
|
this.parent = sprite;
|
|
12
11
|
this._onAddedToGroup = null;
|
|
@@ -28,21 +27,51 @@ export default class {
|
|
|
28
27
|
|
|
29
28
|
destroy() {
|
|
30
29
|
this._parent = null;
|
|
31
|
-
if (this._onDestroy) {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
if (this.
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
if (this.
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
if (this.
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
if (this.
|
|
44
|
-
|
|
45
|
-
|
|
30
|
+
if (this._onDestroy) {
|
|
31
|
+
this._onDestroy.dispose();
|
|
32
|
+
}
|
|
33
|
+
if (this._onAddedToGroup) {
|
|
34
|
+
this._onAddedToGroup.dispose();
|
|
35
|
+
}
|
|
36
|
+
if (this._onRemovedFromGroup) {
|
|
37
|
+
this._onRemovedFromGroup.dispose();
|
|
38
|
+
}
|
|
39
|
+
if (this._onEnterBounds) {
|
|
40
|
+
this._onEnterBounds.dispose();
|
|
41
|
+
}
|
|
42
|
+
if (this._onOutOfBounds) {
|
|
43
|
+
this._onOutOfBounds.dispose();
|
|
44
|
+
}
|
|
45
|
+
if (this._onInputOver) {
|
|
46
|
+
this._onInputOver.dispose();
|
|
47
|
+
}
|
|
48
|
+
if (this._onInputOut) {
|
|
49
|
+
this._onInputOut.dispose();
|
|
50
|
+
}
|
|
51
|
+
if (this._onInputDown) {
|
|
52
|
+
this._onInputDown.dispose();
|
|
53
|
+
}
|
|
54
|
+
if (this._onInputUp) {
|
|
55
|
+
this._onInputUp.dispose();
|
|
56
|
+
}
|
|
57
|
+
if (this._onDragStart) {
|
|
58
|
+
this._onDragStart.dispose();
|
|
59
|
+
}
|
|
60
|
+
if (this._onDragUpdate) {
|
|
61
|
+
this._onDragUpdate.dispose();
|
|
62
|
+
}
|
|
63
|
+
if (this._onDragStop) {
|
|
64
|
+
this._onDragStop.dispose();
|
|
65
|
+
}
|
|
66
|
+
if (this._onAnimationStart) {
|
|
67
|
+
this._onAnimationStart.dispose();
|
|
68
|
+
}
|
|
69
|
+
if (this._onAnimationComplete) {
|
|
70
|
+
this._onAnimationComplete.dispose();
|
|
71
|
+
}
|
|
72
|
+
if (this._onAnimationLoop) {
|
|
73
|
+
this._onAnimationLoop.dispose();
|
|
74
|
+
}
|
|
46
75
|
}
|
|
47
76
|
|
|
48
77
|
get onAddedToGroup() {
|
|
@@ -239,5 +268,4 @@ export default class {
|
|
|
239
268
|
this._onAnimationLoop.dispatch(...args);
|
|
240
269
|
}
|
|
241
270
|
}
|
|
242
|
-
|
|
243
271
|
}
|
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
|
+
* @copyright Copyright (c) 2018-present Richard Davey, Photon Storm Ltd., Andras Csizmadia <andras@vpmedia.hu> (www.vpmedia.hu)
|
|
2
3
|
* @author Andras Csizmadia <andras@vpmedia.hu>
|
|
3
4
|
* @author Richard Davey <rich@photonstorm.com>
|
|
4
|
-
* @copyright Copyright (c) 2018-present Richard Davey, Photon Storm Ltd., Andras Csizmadia <andras@vpmedia.hu> (www.vpmedia.hu)
|
|
5
5
|
*/
|
|
6
|
-
import BitmapText from
|
|
7
|
-
import Button from
|
|
8
|
-
import Group from
|
|
9
|
-
import Graphics from
|
|
10
|
-
import Image from '../display/image';
|
|
11
|
-
import Text from
|
|
12
|
-
|
|
13
|
-
export default class {
|
|
6
|
+
import { BitmapText } from '../display/bitmap_text';
|
|
7
|
+
import { Button } from '../display/button';
|
|
8
|
+
import { Group } from '../display/group';
|
|
9
|
+
import { Graphics } from '../display/graphics';
|
|
10
|
+
import { Image } from '../display/image';
|
|
11
|
+
import { Text } from '../display/text';
|
|
14
12
|
|
|
13
|
+
export class GameObjectFactory {
|
|
15
14
|
constructor(game) {
|
|
16
15
|
this.game = game;
|
|
17
16
|
}
|
|
@@ -32,9 +31,33 @@ export default class {
|
|
|
32
31
|
return parent.add(new Text(this.game, x, y, text, style));
|
|
33
32
|
}
|
|
34
33
|
|
|
35
|
-
button(
|
|
34
|
+
button(
|
|
35
|
+
x,
|
|
36
|
+
y,
|
|
37
|
+
key,
|
|
38
|
+
callback,
|
|
39
|
+
callbackContext,
|
|
40
|
+
overFrame,
|
|
41
|
+
outFrame,
|
|
42
|
+
downFrame,
|
|
43
|
+
upFrame,
|
|
44
|
+
group = null
|
|
45
|
+
) {
|
|
36
46
|
const parent = group || this.game.world;
|
|
37
|
-
return parent.add(
|
|
47
|
+
return parent.add(
|
|
48
|
+
new Button(
|
|
49
|
+
this.game,
|
|
50
|
+
x,
|
|
51
|
+
y,
|
|
52
|
+
key,
|
|
53
|
+
callback,
|
|
54
|
+
callbackContext,
|
|
55
|
+
overFrame,
|
|
56
|
+
outFrame,
|
|
57
|
+
downFrame,
|
|
58
|
+
upFrame
|
|
59
|
+
)
|
|
60
|
+
);
|
|
38
61
|
}
|
|
39
62
|
|
|
40
63
|
graphics(x, y, group = null) {
|
|
@@ -46,5 +69,4 @@ export default class {
|
|
|
46
69
|
const parent = group || this.game.world;
|
|
47
70
|
return parent.add(new BitmapText(this.game, x, y, font, text, size, align));
|
|
48
71
|
}
|
|
49
|
-
|
|
50
72
|
}
|
package/src/phaser/core/frame.js
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
+
* @copyright Copyright (c) 2018-present Richard Davey, Photon Storm Ltd., Andras Csizmadia <andras@vpmedia.hu> (www.vpmedia.hu)
|
|
2
3
|
* @author Andras Csizmadia <andras@vpmedia.hu>
|
|
3
4
|
* @author Richard Davey <rich@photonstorm.com>
|
|
4
|
-
* @copyright Copyright (c) 2018-present Richard Davey, Photon Storm Ltd., Andras Csizmadia <andras@vpmedia.hu> (www.vpmedia.hu)
|
|
5
5
|
*/
|
|
6
|
-
import Rectangle from
|
|
6
|
+
import { Rectangle } from '../geom/rectangle';
|
|
7
7
|
import { distance } from '../util/math';
|
|
8
8
|
import { cloneFrame } from './frame_util';
|
|
9
9
|
|
|
10
|
-
export
|
|
11
|
-
|
|
10
|
+
export class Frame {
|
|
12
11
|
constructor(index, x, y, width, height, name) {
|
|
13
12
|
this.initialize(index, x, y, width, height, name);
|
|
14
13
|
}
|
|
@@ -71,5 +70,4 @@ export default class {
|
|
|
71
70
|
result.setTo(this.x, this.y, this.width, this.height);
|
|
72
71
|
return result;
|
|
73
72
|
}
|
|
74
|
-
|
|
75
73
|
}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
+
* @copyright Copyright (c) 2018-present Richard Davey, Photon Storm Ltd., Andras Csizmadia <andras@vpmedia.hu> (www.vpmedia.hu)
|
|
2
3
|
* @author Andras Csizmadia <andras@vpmedia.hu>
|
|
3
4
|
* @author Richard Davey <rich@photonstorm.com>
|
|
4
|
-
* @copyright Copyright (c) 2018-present Richard Davey, Photon Storm Ltd., Andras Csizmadia <andras@vpmedia.hu> (www.vpmedia.hu)
|
|
5
5
|
*/
|
|
6
6
|
import { cloneFrameData } from './frame_util';
|
|
7
7
|
|
|
8
|
-
export
|
|
9
|
-
|
|
8
|
+
export class FrameData {
|
|
10
9
|
constructor() {
|
|
11
10
|
this._frames = [];
|
|
12
11
|
this._frameNames = [];
|
|
@@ -80,5 +79,4 @@ export default class {
|
|
|
80
79
|
get total() {
|
|
81
80
|
return this._frames.length;
|
|
82
81
|
}
|
|
83
|
-
|
|
84
82
|
}
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
/**
|
|
2
|
+
* @copyright Copyright (c) 2018-present Richard Davey, Photon Storm Ltd., Andras Csizmadia <andras@vpmedia.hu> (www.vpmedia.hu)
|
|
2
3
|
* @author Andras Csizmadia <andras@vpmedia.hu>
|
|
3
4
|
* @author Richard Davey <rich@photonstorm.com>
|
|
4
|
-
* @copyright Copyright (c) 2018-present Richard Davey, Photon Storm Ltd., Andras Csizmadia <andras@vpmedia.hu> (www.vpmedia.hu)
|
|
5
5
|
*/
|
|
6
|
-
import Frame from './frame';
|
|
7
|
-
import FrameData from './frame_data';
|
|
6
|
+
import { Frame } from './frame';
|
|
7
|
+
import { FrameData } from './frame_data';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
|
+
* TBD.
|
|
10
11
|
*
|
|
11
|
-
* @param {object} frame TBD
|
|
12
|
-
* @param {object} output TBD
|
|
13
|
-
* @returns {object} TBD
|
|
12
|
+
* @param {object} frame - TBD.
|
|
13
|
+
* @param {object} output - TBD.
|
|
14
|
+
* @returns {object} TBD.
|
|
14
15
|
*/
|
|
15
16
|
export function cloneFrame(frame, output = null) {
|
|
16
17
|
const result = output || new Frame();
|
|
@@ -19,10 +20,11 @@ export function cloneFrame(frame, output = null) {
|
|
|
19
20
|
}
|
|
20
21
|
|
|
21
22
|
/**
|
|
23
|
+
* TBD.
|
|
22
24
|
*
|
|
23
|
-
* @param {object} frameData TBD
|
|
24
|
-
* @param {object} output TBD
|
|
25
|
-
* @returns {object} TBD
|
|
25
|
+
* @param {object} frameData - TBD.
|
|
26
|
+
* @param {object} output - TBD.
|
|
27
|
+
* @returns {object} TBD.
|
|
26
28
|
*/
|
|
27
29
|
export function cloneFrameData(frameData, output = null) {
|
|
28
30
|
const result = output || new FrameData();
|
package/src/phaser/core/game.js
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
/**
|
|
2
|
+
* @module core/game
|
|
3
|
+
* @copyright Copyright (c) 2018-present Richard Davey, Photon Storm Ltd., Andras Csizmadia <andras@vpmedia.hu> (www.vpmedia.hu)
|
|
2
4
|
* @author Andras Csizmadia <andras@vpmedia.hu>
|
|
3
5
|
* @author Richard Davey <rich@photonstorm.com>
|
|
4
|
-
* @copyright Copyright (c) 2018-present Richard Davey, Photon Storm Ltd., Andras Csizmadia <andras@vpmedia.hu> (www.vpmedia.hu)
|
|
5
6
|
*/
|
|
6
7
|
import CanvasRenderer from '../display/canvas/renderer';
|
|
7
8
|
import WebGLRenderer from '../display/webgl/renderer';
|
|
8
|
-
import Signal from
|
|
9
|
+
import { Signal } from './signal';
|
|
9
10
|
import Loader from './loader';
|
|
10
11
|
import Cache from './cache';
|
|
11
12
|
import Input from './input';
|
|
12
|
-
import Device from './device';
|
|
13
|
-
import GameObjectFactory from './factory';
|
|
14
|
-
import RequestAnimationFrame from './raf';
|
|
15
|
-
import ScaleManager from './scale_manager';
|
|
16
|
-
import SoundManager from './sound_manager';
|
|
17
|
-
import SceneManager from './scene_manager';
|
|
18
|
-
import Time from './time';
|
|
19
|
-
import TweenManager from './tween_manager';
|
|
20
|
-
import World from './world';
|
|
21
|
-
import Stage from './stage';
|
|
13
|
+
import { Device } from './device';
|
|
14
|
+
import { GameObjectFactory } from './factory';
|
|
15
|
+
import { RequestAnimationFrame } from './raf';
|
|
16
|
+
import { ScaleManager } from './scale_manager';
|
|
17
|
+
import { SoundManager } from './sound_manager';
|
|
18
|
+
import { SceneManager } from './scene_manager';
|
|
19
|
+
import { Time } from './time';
|
|
20
|
+
import { TweenManager } from './tween_manager';
|
|
21
|
+
import { World } from './world';
|
|
22
|
+
import { Stage } from './stage';
|
|
22
23
|
import { RENDER_AUTO, RENDER_WEBGL } from './const';
|
|
23
24
|
import { create, removeFromDOM, addToDOM, setTouchAction } from '../display/canvas/util';
|
|
24
25
|
import { initialize, checkOS } from './device_util';
|
|
25
26
|
|
|
26
|
-
export
|
|
27
|
-
|
|
27
|
+
export class Game {
|
|
28
28
|
constructor(gameConfig = {}) {
|
|
29
29
|
if (!window.PhaserRegistry) {
|
|
30
30
|
window.PhaserRegistry = {};
|
|
@@ -61,10 +61,14 @@ export default class {
|
|
|
61
61
|
initialize(this.device);
|
|
62
62
|
this.boot();
|
|
63
63
|
} else {
|
|
64
|
-
window.addEventListener(
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
64
|
+
window.addEventListener(
|
|
65
|
+
'load',
|
|
66
|
+
() => {
|
|
67
|
+
initialize(this.device);
|
|
68
|
+
this.boot();
|
|
69
|
+
},
|
|
70
|
+
false
|
|
71
|
+
);
|
|
68
72
|
}
|
|
69
73
|
}
|
|
70
74
|
|
|
@@ -276,5 +280,4 @@ export default class {
|
|
|
276
280
|
this.canvas = null;
|
|
277
281
|
this.renderer = null;
|
|
278
282
|
}
|
|
279
|
-
|
|
280
283
|
}
|
package/src/phaser/core/input.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
|
+
* @copyright Copyright (c) 2018-present Richard Davey, Photon Storm Ltd., Andras Csizmadia <andras@vpmedia.hu> (www.vpmedia.hu)
|
|
2
3
|
* @author Andras Csizmadia <andras@vpmedia.hu>
|
|
3
4
|
* @author Richard Davey <rich@photonstorm.com>
|
|
4
|
-
* @copyright Copyright (c) 2018-present Richard Davey, Photon Storm Ltd., Andras Csizmadia <andras@vpmedia.hu> (www.vpmedia.hu)
|
|
5
5
|
*/
|
|
6
|
-
import ArraySet from './array_set';
|
|
7
|
-
import Graphics from
|
|
8
|
-
import Image from '../display/image';
|
|
9
|
-
import Signal from
|
|
10
|
-
import Point from '../geom/point';
|
|
11
|
-
import Circle from
|
|
6
|
+
import { ArraySet } from './array_set';
|
|
7
|
+
import { Graphics } from '../display/graphics';
|
|
8
|
+
import { Image } from '../display/image';
|
|
9
|
+
import { Signal } from './signal';
|
|
10
|
+
import { Point } from '../geom/point';
|
|
11
|
+
import { Circle } from '../geom/circle';
|
|
12
12
|
import Mouse from './input_mouse';
|
|
13
13
|
import MSPointer from './input_mspointer';
|
|
14
14
|
import Pointer from './input_pointer';
|
|
@@ -19,7 +19,6 @@ import { create, remove } from '../display/canvas/pool';
|
|
|
19
19
|
const MAX_POINTERS = 10;
|
|
20
20
|
|
|
21
21
|
export default class {
|
|
22
|
-
|
|
23
22
|
constructor(game) {
|
|
24
23
|
this.game = game;
|
|
25
24
|
this.hitCanvas = null;
|
|
@@ -101,7 +100,7 @@ export default class {
|
|
|
101
100
|
}
|
|
102
101
|
this.mousePointer.active = true;
|
|
103
102
|
const scope = this;
|
|
104
|
-
this._onClickTrampoline = event => scope.onClickTrampoline(event);
|
|
103
|
+
this._onClickTrampoline = (event) => scope.onClickTrampoline(event);
|
|
105
104
|
this.game.canvas.addEventListener('click', this._onClickTrampoline, false);
|
|
106
105
|
}
|
|
107
106
|
|
|
@@ -130,7 +129,10 @@ export default class {
|
|
|
130
129
|
let i = this.moveCallbacks.length;
|
|
131
130
|
while (i) {
|
|
132
131
|
i -= 1;
|
|
133
|
-
if (
|
|
132
|
+
if (
|
|
133
|
+
this.moveCallbacks[i].callback === callback &&
|
|
134
|
+
this.moveCallbacks[i].context === context
|
|
135
|
+
) {
|
|
134
136
|
this.moveCallbacks.splice(i, 1);
|
|
135
137
|
return;
|
|
136
138
|
}
|
|
@@ -253,7 +255,7 @@ export default class {
|
|
|
253
255
|
count -= 1;
|
|
254
256
|
}
|
|
255
257
|
}
|
|
256
|
-
return
|
|
258
|
+
return limit - count;
|
|
257
259
|
}
|
|
258
260
|
|
|
259
261
|
getPointer(isActive = false) {
|
|
@@ -292,7 +294,10 @@ export default class {
|
|
|
292
294
|
const result = output || new Point();
|
|
293
295
|
const wt = displayObject.worldTransform;
|
|
294
296
|
const id = 1 / (wt.a * wt.d + wt.c * -wt.b);
|
|
295
|
-
return result.setTo(
|
|
297
|
+
return result.setTo(
|
|
298
|
+
wt.d * id * pointer.x + -wt.c * id * pointer.y + (wt.ty * wt.c - wt.tx * wt.d) * id,
|
|
299
|
+
wt.a * id * pointer.y + -wt.b * id * pointer.x + (-wt.ty * wt.a + wt.tx * wt.b) * id
|
|
300
|
+
);
|
|
296
301
|
}
|
|
297
302
|
|
|
298
303
|
hitTest(displayObject, pointer, localPoint) {
|
|
@@ -302,7 +307,7 @@ export default class {
|
|
|
302
307
|
this.getLocalPosition(displayObject, pointer, this._localPoint);
|
|
303
308
|
localPoint.copyFrom(this._localPoint);
|
|
304
309
|
if (displayObject.hitArea && displayObject.hitArea.contains) {
|
|
305
|
-
return
|
|
310
|
+
return displayObject.hitArea.contains(this._localPoint.x, this._localPoint.y);
|
|
306
311
|
} else if (displayObject instanceof Image) {
|
|
307
312
|
const width = displayObject.texture.frame.width;
|
|
308
313
|
const height = displayObject.texture.frame.height;
|
|
@@ -316,7 +321,11 @@ export default class {
|
|
|
316
321
|
} else if (displayObject instanceof Graphics) {
|
|
317
322
|
for (let i = 0; i < displayObject.graphicsData.length; i += 1) {
|
|
318
323
|
const data = displayObject.graphicsData[i];
|
|
319
|
-
if (
|
|
324
|
+
if (
|
|
325
|
+
data.fill &&
|
|
326
|
+
data.shape &&
|
|
327
|
+
data.shape.contains(this._localPoint.x, this._localPoint.y)
|
|
328
|
+
) {
|
|
320
329
|
// Only deal with fills..
|
|
321
330
|
return true;
|
|
322
331
|
}
|
|
@@ -352,7 +361,7 @@ export default class {
|
|
|
352
361
|
}
|
|
353
362
|
|
|
354
363
|
get pollLocked() {
|
|
355
|
-
return
|
|
364
|
+
return this.pollRate > 0 && this._pollCounter < this.pollRate;
|
|
356
365
|
}
|
|
357
366
|
|
|
358
367
|
get totalInactivePointers() {
|
|
@@ -370,5 +379,4 @@ export default class {
|
|
|
370
379
|
get worldY() {
|
|
371
380
|
return this.y;
|
|
372
381
|
}
|
|
373
|
-
|
|
374
382
|
}
|