@vpmedia/phaser 1.14.0 → 1.16.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 +3 -3
- package/package.json +6 -5
- package/src/index.js +15 -18
- package/src/phaser/core/animation.js +102 -6
- package/src/phaser/core/animation_manager.js +88 -10
- package/src/phaser/core/animation_parser.js +5 -20
- package/src/phaser/core/array_set.js +51 -5
- package/src/phaser/core/cache.js +291 -6
- package/src/phaser/core/const.js +107 -4
- package/src/phaser/core/device.js +5 -6
- package/src/phaser/core/device_util.js +3 -25
- package/src/phaser/core/dom.js +127 -29
- package/src/phaser/core/event_manager.js +128 -6
- package/src/phaser/core/factory.js +69 -34
- package/src/phaser/core/frame.js +43 -6
- package/src/phaser/core/frame_data.js +55 -5
- package/src/phaser/core/frame_util.js +7 -14
- package/src/phaser/core/game.js +35 -7
- package/src/phaser/core/input.js +116 -17
- package/src/phaser/core/input_handler.js +242 -42
- package/src/phaser/core/input_mouse.js +68 -7
- package/src/phaser/core/input_mspointer.js +40 -9
- package/src/phaser/core/input_pointer.js +79 -17
- package/src/phaser/core/input_touch.js +42 -5
- package/src/phaser/core/loader.js +274 -101
- package/src/phaser/core/loader_parser.js +2 -14
- package/src/phaser/core/raf.js +16 -5
- package/src/phaser/core/scale_manager.js +204 -39
- package/src/phaser/core/scene.js +24 -5
- package/src/phaser/core/scene_manager.js +81 -11
- package/src/phaser/core/signal.js +88 -11
- package/src/phaser/core/signal_binding.js +35 -15
- package/src/phaser/core/sound.js +99 -10
- package/src/phaser/core/sound_manager.js +89 -13
- package/src/phaser/core/sound_sprite.js +20 -5
- package/src/phaser/core/stage.js +43 -7
- package/src/phaser/core/time.js +67 -5
- package/src/phaser/core/timer.js +107 -30
- package/src/phaser/core/timer_event.js +11 -6
- package/src/phaser/core/tween.js +124 -30
- package/src/phaser/core/tween_data.js +42 -18
- package/src/phaser/core/tween_easing.js +1 -39
- package/src/phaser/core/tween_manager.js +47 -5
- package/src/phaser/core/world.js +9 -6
- package/src/phaser/display/bitmap_text.js +92 -11
- package/src/phaser/display/button.js +64 -13
- package/src/phaser/display/canvas/buffer.js +16 -6
- package/src/phaser/display/canvas/graphics.js +1 -16
- package/src/phaser/display/canvas/masker.js +0 -8
- package/src/phaser/display/canvas/pool.js +0 -14
- package/src/phaser/display/canvas/renderer.js +28 -8
- package/src/phaser/display/canvas/tinter.js +4 -48
- package/src/phaser/display/canvas/util.js +0 -15
- package/src/phaser/display/display_object.js +192 -20
- package/src/phaser/display/graphics.js +162 -27
- package/src/phaser/display/graphics_data.js +14 -6
- package/src/phaser/display/graphics_data_util.js +2 -9
- package/src/phaser/display/group.js +75 -10
- package/src/phaser/display/image.js +86 -10
- package/src/phaser/display/sprite_batch.js +3 -9
- package/src/phaser/display/sprite_util.js +3 -28
- package/src/phaser/display/text.js +332 -32
- package/src/phaser/display/webgl/abstract_filter.js +8 -7
- package/src/phaser/display/webgl/base_texture.js +20 -12
- package/src/phaser/display/webgl/blend_manager.js +14 -7
- package/src/phaser/display/webgl/earcut.js +4 -50
- package/src/phaser/display/webgl/earcut_node.js +6 -7
- package/src/phaser/display/webgl/fast_sprite_batch.js +34 -11
- package/src/phaser/display/webgl/filter_manager.js +25 -7
- package/src/phaser/display/webgl/filter_texture.js +21 -22
- package/src/phaser/display/webgl/graphics.js +5 -40
- package/src/phaser/display/webgl/graphics_data.js +10 -7
- package/src/phaser/display/webgl/mask_manager.js +0 -8
- package/src/phaser/display/webgl/render_texture.js +33 -21
- package/src/phaser/display/webgl/renderer.js +38 -11
- package/src/phaser/display/webgl/shader/complex.js +10 -6
- package/src/phaser/display/webgl/shader/fast.js +10 -6
- package/src/phaser/display/webgl/shader/normal.js +23 -32
- package/src/phaser/display/webgl/shader/primitive.js +10 -6
- package/src/phaser/display/webgl/shader/strip.js +10 -6
- package/src/phaser/display/webgl/shader_manager.js +18 -6
- package/src/phaser/display/webgl/sprite_batch.js +41 -8
- package/src/phaser/display/webgl/stencil_manager.js +28 -6
- package/src/phaser/display/webgl/texture.js +28 -15
- package/src/phaser/display/webgl/texture_util.js +0 -8
- package/src/phaser/display/webgl/util.js +0 -11
- package/src/phaser/geom/circle.js +123 -19
- package/src/phaser/geom/ellipse.js +39 -19
- package/src/phaser/geom/line.js +148 -17
- package/src/phaser/geom/matrix.js +73 -7
- package/src/phaser/geom/point.js +152 -7
- package/src/phaser/geom/polygon.js +42 -14
- package/src/phaser/geom/rectangle.js +233 -7
- package/src/phaser/geom/rounded_rectangle.js +10 -7
- package/src/phaser/geom/util/circle.js +3 -16
- package/src/phaser/geom/util/ellipse.js +0 -8
- package/src/phaser/geom/util/line.js +5 -19
- package/src/phaser/geom/util/matrix.js +1 -10
- package/src/phaser/geom/util/point.js +0 -26
- package/src/phaser/geom/util/polygon.js +1 -8
- package/src/phaser/geom/util/rectangle.js +1 -23
- package/src/phaser/geom/util/rounded_rectangle.js +1 -8
- package/src/phaser/util/math.js +3 -43
- package/{types → typedefs}/global.d.ts +1 -1
- package/types/index.d.ts +2 -1
- package/types/index.d.ts.map +1 -1
- package/types/phaser/core/animation.d.ts +106 -5
- package/types/phaser/core/animation.d.ts.map +1 -1
- package/types/phaser/core/animation_manager.d.ts +88 -1
- package/types/phaser/core/animation_manager.d.ts.map +1 -1
- package/types/phaser/core/animation_parser.d.ts +5 -6
- package/types/phaser/core/animation_parser.d.ts.map +1 -1
- package/types/phaser/core/array_set.d.ts +53 -7
- package/types/phaser/core/array_set.d.ts.map +1 -1
- package/types/phaser/core/cache.d.ts +348 -58
- package/types/phaser/core/cache.d.ts.map +1 -1
- package/types/phaser/core/const.d.ts +143 -40
- package/types/phaser/core/const.d.ts.map +1 -1
- package/types/phaser/core/device.d.ts +2 -5
- package/types/phaser/core/device.d.ts.map +1 -1
- package/types/phaser/core/device_util.d.ts +1 -10
- package/types/phaser/core/device_util.d.ts.map +1 -1
- package/types/phaser/core/dom.d.ts +122 -3
- package/types/phaser/core/dom.d.ts.map +1 -1
- package/types/phaser/core/event_manager.d.ts +142 -15
- package/types/phaser/core/event_manager.d.ts.map +1 -1
- package/types/phaser/core/factory.d.ts +74 -7
- package/types/phaser/core/factory.d.ts.map +1 -1
- package/types/phaser/core/frame.d.ts +68 -26
- package/types/phaser/core/frame.d.ts.map +1 -1
- package/types/phaser/core/frame_data.d.ts +61 -9
- package/types/phaser/core/frame_data.d.ts.map +1 -1
- package/types/phaser/core/frame_util.d.ts +10 -10
- package/types/phaser/core/frame_util.d.ts.map +1 -1
- package/types/phaser/core/game.d.ts +54 -20
- package/types/phaser/core/game.d.ts.map +1 -1
- package/types/phaser/core/input.d.ts +132 -21
- package/types/phaser/core/input.d.ts.map +1 -1
- package/types/phaser/core/input_handler.d.ts +258 -25
- package/types/phaser/core/input_handler.d.ts.map +1 -1
- package/types/phaser/core/input_mouse.d.ts +59 -12
- package/types/phaser/core/input_mouse.d.ts.map +1 -1
- package/types/phaser/core/input_mspointer.d.ts +49 -15
- package/types/phaser/core/input_mspointer.d.ts.map +1 -1
- package/types/phaser/core/input_pointer.d.ts +80 -4
- package/types/phaser/core/input_pointer.d.ts.map +1 -1
- package/types/phaser/core/input_touch.d.ts +52 -15
- package/types/phaser/core/input_touch.d.ts.map +1 -1
- package/types/phaser/core/loader.d.ts +268 -23
- package/types/phaser/core/loader.d.ts.map +1 -1
- package/types/phaser/core/loader_parser.d.ts +0 -4
- package/types/phaser/core/loader_parser.d.ts.map +1 -1
- package/types/phaser/core/raf.d.ts +17 -7
- package/types/phaser/core/raf.d.ts.map +1 -1
- package/types/phaser/core/scale_manager.d.ts +210 -15
- package/types/phaser/core/scale_manager.d.ts.map +1 -1
- package/types/phaser/core/scene.d.ts +21 -5
- package/types/phaser/core/scene.d.ts.map +1 -1
- package/types/phaser/core/scene_manager.d.ts +90 -10
- package/types/phaser/core/scene_manager.d.ts.map +1 -1
- package/types/phaser/core/signal.d.ts +95 -11
- package/types/phaser/core/signal.d.ts.map +1 -1
- package/types/phaser/core/signal_binding.d.ts +35 -6
- package/types/phaser/core/signal_binding.d.ts.map +1 -1
- package/types/phaser/core/sound.d.ts +111 -14
- package/types/phaser/core/sound.d.ts.map +1 -1
- package/types/phaser/core/sound_manager.d.ts +94 -8
- package/types/phaser/core/sound_manager.d.ts.map +1 -1
- package/types/phaser/core/sound_sprite.d.ts +22 -8
- package/types/phaser/core/sound_sprite.d.ts.map +1 -1
- package/types/phaser/core/stage.d.ts +32 -3
- package/types/phaser/core/stage.d.ts.map +1 -1
- package/types/phaser/core/time.d.ts +73 -6
- package/types/phaser/core/time.d.ts.map +1 -1
- package/types/phaser/core/timer.d.ts +103 -2
- package/types/phaser/core/timer.d.ts.map +1 -1
- package/types/phaser/core/timer_event.d.ts +11 -5
- package/types/phaser/core/timer_event.d.ts.map +1 -1
- package/types/phaser/core/tween.d.ts +123 -3
- package/types/phaser/core/tween.d.ts.map +1 -1
- package/types/phaser/core/tween_data.d.ts +42 -3
- package/types/phaser/core/tween_data.d.ts.map +1 -1
- package/types/phaser/core/tween_easing.d.ts +0 -36
- package/types/phaser/core/tween_easing.d.ts.map +1 -1
- package/types/phaser/core/tween_manager.d.ts +49 -2
- package/types/phaser/core/tween_manager.d.ts.map +1 -1
- package/types/phaser/core/world.d.ts +9 -1
- package/types/phaser/core/world.d.ts.map +1 -1
- package/types/phaser/display/bitmap_text.d.ts +89 -12
- package/types/phaser/display/bitmap_text.d.ts.map +1 -1
- package/types/phaser/display/button.d.ts +68 -11
- package/types/phaser/display/button.d.ts.map +1 -1
- package/types/phaser/display/canvas/buffer.d.ts +21 -5
- package/types/phaser/display/canvas/buffer.d.ts.map +1 -1
- package/types/phaser/display/canvas/graphics.d.ts +0 -3
- package/types/phaser/display/canvas/graphics.d.ts.map +1 -1
- package/types/phaser/display/canvas/masker.d.ts +0 -2
- package/types/phaser/display/canvas/masker.d.ts.map +1 -1
- package/types/phaser/display/canvas/pool.d.ts +0 -13
- package/types/phaser/display/canvas/pool.d.ts.map +1 -1
- package/types/phaser/display/canvas/renderer.d.ts +30 -3
- package/types/phaser/display/canvas/renderer.d.ts.map +1 -1
- package/types/phaser/display/canvas/tinter.d.ts +0 -5
- package/types/phaser/display/canvas/tinter.d.ts.map +1 -1
- package/types/phaser/display/canvas/util.d.ts +0 -9
- package/types/phaser/display/canvas/util.d.ts.map +1 -1
- package/types/phaser/display/display_object.d.ts +196 -9
- package/types/phaser/display/display_object.d.ts.map +1 -1
- package/types/phaser/display/graphics.d.ts +142 -16
- package/types/phaser/display/graphics.d.ts.map +1 -1
- package/types/phaser/display/graphics_data.d.ts +15 -1
- package/types/phaser/display/graphics_data.d.ts.map +1 -1
- package/types/phaser/display/graphics_data_util.d.ts +3 -3
- package/types/phaser/display/graphics_data_util.d.ts.map +1 -1
- package/types/phaser/display/group.d.ts +68 -6
- package/types/phaser/display/group.d.ts.map +1 -1
- package/types/phaser/display/image.d.ts +77 -15
- package/types/phaser/display/image.d.ts.map +1 -1
- package/types/phaser/display/sprite_batch.d.ts +4 -4
- package/types/phaser/display/sprite_batch.d.ts.map +1 -1
- package/types/phaser/display/sprite_util.d.ts +0 -5
- package/types/phaser/display/sprite_util.d.ts.map +1 -1
- package/types/phaser/display/text.d.ts +373 -53
- package/types/phaser/display/text.d.ts.map +1 -1
- package/types/phaser/display/webgl/abstract_filter.d.ts +8 -6
- package/types/phaser/display/webgl/abstract_filter.d.ts.map +1 -1
- package/types/phaser/display/webgl/base_texture.d.ts +20 -1
- package/types/phaser/display/webgl/base_texture.d.ts.map +1 -1
- package/types/phaser/display/webgl/blend_manager.d.ts +11 -6
- package/types/phaser/display/webgl/blend_manager.d.ts.map +1 -1
- package/types/phaser/display/webgl/earcut.d.ts +0 -27
- package/types/phaser/display/webgl/earcut.d.ts.map +1 -1
- package/types/phaser/display/webgl/earcut_node.d.ts +9 -9
- package/types/phaser/display/webgl/earcut_node.d.ts.map +1 -1
- package/types/phaser/display/webgl/fast_sprite_batch.d.ts +33 -6
- package/types/phaser/display/webgl/fast_sprite_batch.d.ts.map +1 -1
- package/types/phaser/display/webgl/filter_manager.d.ts +23 -7
- package/types/phaser/display/webgl/filter_manager.d.ts.map +1 -1
- package/types/phaser/display/webgl/filter_texture.d.ts +21 -3
- package/types/phaser/display/webgl/filter_texture.d.ts.map +1 -1
- package/types/phaser/display/webgl/graphics.d.ts +0 -12
- package/types/phaser/display/webgl/graphics.d.ts.map +1 -1
- package/types/phaser/display/webgl/graphics_data.d.ts +12 -8
- package/types/phaser/display/webgl/graphics_data.d.ts.map +1 -1
- package/types/phaser/display/webgl/mask_manager.d.ts +0 -2
- package/types/phaser/display/webgl/mask_manager.d.ts.map +1 -1
- package/types/phaser/display/webgl/render_texture.d.ts +31 -4
- package/types/phaser/display/webgl/render_texture.d.ts.map +1 -1
- package/types/phaser/display/webgl/renderer.d.ts +42 -5
- package/types/phaser/display/webgl/renderer.d.ts.map +1 -1
- package/types/phaser/display/webgl/shader/complex.d.ts +12 -2
- package/types/phaser/display/webgl/shader/complex.d.ts.map +1 -1
- package/types/phaser/display/webgl/shader/fast.d.ts +12 -2
- package/types/phaser/display/webgl/shader/fast.d.ts.map +1 -1
- package/types/phaser/display/webgl/shader/normal.d.ts +21 -1
- package/types/phaser/display/webgl/shader/normal.d.ts.map +1 -1
- package/types/phaser/display/webgl/shader/primitive.d.ts +12 -2
- package/types/phaser/display/webgl/shader/primitive.d.ts.map +1 -1
- package/types/phaser/display/webgl/shader/strip.d.ts +12 -2
- package/types/phaser/display/webgl/shader/strip.d.ts.map +1 -1
- package/types/phaser/display/webgl/shader_manager.d.ts +20 -5
- package/types/phaser/display/webgl/shader_manager.d.ts.map +1 -1
- package/types/phaser/display/webgl/sprite_batch.d.ts +38 -1
- package/types/phaser/display/webgl/sprite_batch.d.ts.map +1 -1
- package/types/phaser/display/webgl/stencil_manager.d.ts +25 -0
- package/types/phaser/display/webgl/stencil_manager.d.ts.map +1 -1
- package/types/phaser/display/webgl/texture.d.ts +22 -1
- package/types/phaser/display/webgl/texture.d.ts.map +1 -1
- package/types/phaser/display/webgl/texture_util.d.ts +0 -2
- package/types/phaser/display/webgl/texture_util.d.ts.map +1 -1
- package/types/phaser/display/webgl/util.d.ts +0 -10
- package/types/phaser/display/webgl/util.d.ts.map +1 -1
- package/types/phaser/geom/circle.d.ts +130 -10
- package/types/phaser/geom/circle.d.ts.map +1 -1
- package/types/phaser/geom/ellipse.d.ts +42 -6
- package/types/phaser/geom/ellipse.d.ts.map +1 -1
- package/types/phaser/geom/line.d.ts +159 -14
- package/types/phaser/geom/line.d.ts.map +1 -1
- package/types/phaser/geom/matrix.d.ts +84 -12
- package/types/phaser/geom/matrix.d.ts.map +1 -1
- package/types/phaser/geom/point.d.ts +170 -19
- package/types/phaser/geom/point.d.ts.map +1 -1
- package/types/phaser/geom/polygon.d.ts +45 -5
- package/types/phaser/geom/polygon.d.ts.map +1 -1
- package/types/phaser/geom/rectangle.d.ts +253 -21
- package/types/phaser/geom/rectangle.d.ts.map +1 -1
- package/types/phaser/geom/rounded_rectangle.d.ts +11 -2
- package/types/phaser/geom/rounded_rectangle.d.ts.map +1 -1
- package/types/phaser/geom/util/circle.d.ts +3 -10
- package/types/phaser/geom/util/circle.d.ts.map +1 -1
- package/types/phaser/geom/util/ellipse.d.ts +0 -7
- package/types/phaser/geom/util/ellipse.d.ts.map +1 -1
- package/types/phaser/geom/util/line.d.ts +5 -10
- package/types/phaser/geom/util/line.d.ts.map +1 -1
- package/types/phaser/geom/util/matrix.d.ts +0 -3
- package/types/phaser/geom/util/matrix.d.ts.map +1 -1
- package/types/phaser/geom/util/point.d.ts +0 -20
- package/types/phaser/geom/util/point.d.ts.map +1 -1
- package/types/phaser/geom/util/polygon.d.ts +0 -1
- package/types/phaser/geom/util/polygon.d.ts.map +1 -1
- package/types/phaser/geom/util/rectangle.d.ts +0 -16
- package/types/phaser/geom/util/rectangle.d.ts.map +1 -1
- package/types/phaser/geom/util/rounded_rectangle.d.ts +0 -1
- package/types/phaser/geom/util/rounded_rectangle.d.ts.map +1 -1
- package/types/phaser/util/math.d.ts +0 -27
- package/types/phaser/util/math.d.ts.map +1 -1
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @copyright Copyright (c) 2018-present Richard Davey, Photon Storm Ltd., Andras Csizmadia <andras@vpmedia.hu> (www.vpmedia.hu)
|
|
3
|
-
* @author Andras Csizmadia <andras@vpmedia.hu>
|
|
4
|
-
* @author Richard Davey <rich@photonstorm.com>
|
|
5
|
-
*/
|
|
6
1
|
import { Tween } from './tween';
|
|
7
2
|
import {
|
|
8
3
|
LinearNone,
|
|
@@ -38,8 +33,13 @@ import {
|
|
|
38
33
|
BounceInOut,
|
|
39
34
|
} from './tween_easing';
|
|
40
35
|
import { GROUP } from './const';
|
|
36
|
+
import { Game } from './game';
|
|
41
37
|
|
|
42
38
|
export class TweenManager {
|
|
39
|
+
/**
|
|
40
|
+
* TBD.
|
|
41
|
+
* @param {Game} game - TBD.
|
|
42
|
+
*/
|
|
43
43
|
constructor(game) {
|
|
44
44
|
this.game = game;
|
|
45
45
|
this._tweens = [];
|
|
@@ -92,10 +92,16 @@ export class TweenManager {
|
|
|
92
92
|
this.game.onResume.add(this._resumeAll, this);
|
|
93
93
|
}
|
|
94
94
|
|
|
95
|
+
/**
|
|
96
|
+
* TBD.
|
|
97
|
+
*/
|
|
95
98
|
getAll() {
|
|
96
99
|
return this._tweens;
|
|
97
100
|
}
|
|
98
101
|
|
|
102
|
+
/**
|
|
103
|
+
* TBD.
|
|
104
|
+
*/
|
|
99
105
|
removeAll() {
|
|
100
106
|
for (let i = 0; i < this._tweens.length; i += 1) {
|
|
101
107
|
this._tweens[i].pendingDelete = true;
|
|
@@ -103,6 +109,11 @@ export class TweenManager {
|
|
|
103
109
|
this._add = [];
|
|
104
110
|
}
|
|
105
111
|
|
|
112
|
+
/**
|
|
113
|
+
* TBD.
|
|
114
|
+
* @param obj
|
|
115
|
+
* @param children
|
|
116
|
+
*/
|
|
106
117
|
removeFrom(obj, children) {
|
|
107
118
|
let i;
|
|
108
119
|
let len;
|
|
@@ -128,15 +139,27 @@ export class TweenManager {
|
|
|
128
139
|
}
|
|
129
140
|
}
|
|
130
141
|
|
|
142
|
+
/**
|
|
143
|
+
* TBD.
|
|
144
|
+
* @param tween
|
|
145
|
+
*/
|
|
131
146
|
add(tween) {
|
|
132
147
|
tween._manager = this;
|
|
133
148
|
this._add.push(tween);
|
|
134
149
|
}
|
|
135
150
|
|
|
151
|
+
/**
|
|
152
|
+
* TBD.
|
|
153
|
+
* @param object
|
|
154
|
+
*/
|
|
136
155
|
create(object) {
|
|
137
156
|
return new Tween(object, this.game, this);
|
|
138
157
|
}
|
|
139
158
|
|
|
159
|
+
/**
|
|
160
|
+
* TBD.
|
|
161
|
+
* @param tween
|
|
162
|
+
*/
|
|
140
163
|
remove(tween) {
|
|
141
164
|
let i = this._tweens.indexOf(tween);
|
|
142
165
|
if (i !== -1) {
|
|
@@ -149,6 +172,9 @@ export class TweenManager {
|
|
|
149
172
|
}
|
|
150
173
|
}
|
|
151
174
|
|
|
175
|
+
/**
|
|
176
|
+
* TBD.
|
|
177
|
+
*/
|
|
152
178
|
update() {
|
|
153
179
|
const addTweens = this._add.length;
|
|
154
180
|
let numTweens = this._tweens.length;
|
|
@@ -172,28 +198,44 @@ export class TweenManager {
|
|
|
172
198
|
return true;
|
|
173
199
|
}
|
|
174
200
|
|
|
201
|
+
/**
|
|
202
|
+
* TBD.
|
|
203
|
+
* @param object
|
|
204
|
+
*/
|
|
175
205
|
isTweening(object) {
|
|
176
206
|
return this._tweens.some((tween) => tween.target === object);
|
|
177
207
|
}
|
|
178
208
|
|
|
209
|
+
/**
|
|
210
|
+
* TBD.
|
|
211
|
+
*/
|
|
179
212
|
_pauseAll() {
|
|
180
213
|
for (let i = this._tweens.length - 1; i >= 0; i -= 1) {
|
|
181
214
|
this._tweens[i]._pause();
|
|
182
215
|
}
|
|
183
216
|
}
|
|
184
217
|
|
|
218
|
+
/**
|
|
219
|
+
* TBD.
|
|
220
|
+
*/
|
|
185
221
|
_resumeAll() {
|
|
186
222
|
for (let i = this._tweens.length - 1; i >= 0; i -= 1) {
|
|
187
223
|
this._tweens[i]._resume();
|
|
188
224
|
}
|
|
189
225
|
}
|
|
190
226
|
|
|
227
|
+
/**
|
|
228
|
+
* TBD.
|
|
229
|
+
*/
|
|
191
230
|
pauseAll() {
|
|
192
231
|
for (let i = this._tweens.length - 1; i >= 0; i -= 1) {
|
|
193
232
|
this._tweens[i].pause();
|
|
194
233
|
}
|
|
195
234
|
}
|
|
196
235
|
|
|
236
|
+
/**
|
|
237
|
+
* TBD.
|
|
238
|
+
*/
|
|
197
239
|
resumeAll() {
|
|
198
240
|
for (let i = this._tweens.length - 1; i >= 0; i -= 1) {
|
|
199
241
|
this._tweens[i].resume(true);
|
package/src/phaser/core/world.js
CHANGED
|
@@ -1,15 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
* @author Andras Csizmadia <andras@vpmedia.hu>
|
|
4
|
-
* @author Richard Davey <rich@photonstorm.com>
|
|
5
|
-
*/
|
|
6
|
-
import { Group } from '../display/group';
|
|
1
|
+
import { Group } from '../display/group';
|
|
2
|
+
import { Game } from './game';
|
|
7
3
|
|
|
8
4
|
export class World extends Group {
|
|
5
|
+
/**
|
|
6
|
+
* TBD.
|
|
7
|
+
* @param {Game} game - TBD.
|
|
8
|
+
*/
|
|
9
9
|
constructor(game) {
|
|
10
10
|
super(game, null, '__world', false);
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
+
/**
|
|
14
|
+
* TBD.
|
|
15
|
+
*/
|
|
13
16
|
boot() {
|
|
14
17
|
this.game.stage.addChild(this);
|
|
15
18
|
}
|
|
@@ -1,19 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
* @module display/bitmap_text
|
|
3
|
-
* @copyright Copyright (c) 2018-present Richard Davey, Photon Storm Ltd., Andras Csizmadia <andras@vpmedia.hu> (www.vpmedia.hu)
|
|
4
|
-
* @author Andras Csizmadia <andras@vpmedia.hu>
|
|
5
|
-
* @author Richard Davey <rich@photonstorm.com>
|
|
6
|
-
*/
|
|
7
|
-
import { DisplayObject } from './display_object';
|
|
1
|
+
import { DisplayObject } from './display_object';
|
|
8
2
|
import { Image } from './image';
|
|
3
|
+
import { Game } from '../core/game';
|
|
9
4
|
import { Point } from '../geom/point';
|
|
10
5
|
import { BITMAP_TEXT, SCALE_LINEAR, SCALE_NEAREST } from '../core/const';
|
|
11
6
|
|
|
12
7
|
export class BitmapText extends DisplayObject {
|
|
13
8
|
/**
|
|
14
9
|
* TBD.
|
|
15
|
-
*
|
|
16
|
-
* @param {object} game - TBD.
|
|
10
|
+
* @param {Game} game - TBD.
|
|
17
11
|
* @param {number} x - TBD.
|
|
18
12
|
* @param {number} y - TBD.
|
|
19
13
|
* @param {string} font - TBD.
|
|
@@ -41,6 +35,9 @@ export class BitmapText extends DisplayObject {
|
|
|
41
35
|
this.dirty = false;
|
|
42
36
|
}
|
|
43
37
|
|
|
38
|
+
/**
|
|
39
|
+
* TBD.
|
|
40
|
+
*/
|
|
44
41
|
destroy() {
|
|
45
42
|
this._prevAnchor = null;
|
|
46
43
|
this._glyphs = null;
|
|
@@ -49,6 +46,9 @@ export class BitmapText extends DisplayObject {
|
|
|
49
46
|
super.destroy();
|
|
50
47
|
}
|
|
51
48
|
|
|
49
|
+
/**
|
|
50
|
+
* TBD.
|
|
51
|
+
*/
|
|
52
52
|
preUpdate() {
|
|
53
53
|
if (this.pendingDestroy) {
|
|
54
54
|
this.destroy();
|
|
@@ -68,10 +68,21 @@ export class BitmapText extends DisplayObject {
|
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
70
|
|
|
71
|
+
/**
|
|
72
|
+
* TBD.
|
|
73
|
+
* @param text - TBD.
|
|
74
|
+
*/
|
|
71
75
|
setText(text) {
|
|
72
76
|
this.text = text;
|
|
73
77
|
}
|
|
74
78
|
|
|
79
|
+
/**
|
|
80
|
+
* TBD.
|
|
81
|
+
* @param data - TBD.
|
|
82
|
+
* @param scale - TBD.
|
|
83
|
+
* @param text - TBD.
|
|
84
|
+
* @returns {object} TBD.
|
|
85
|
+
*/
|
|
75
86
|
scanLine(data, scale, text) {
|
|
76
87
|
let x = 0;
|
|
77
88
|
let w = 0;
|
|
@@ -102,8 +113,7 @@ export class BitmapText extends DisplayObject {
|
|
|
102
113
|
charData = data.chars[charCode];
|
|
103
114
|
}
|
|
104
115
|
// Adjust for kerning from previous character to this one
|
|
105
|
-
const kerning =
|
|
106
|
-
prevCharCode && charData.kerning[prevCharCode] ? charData.kerning[prevCharCode] : 0;
|
|
116
|
+
const kerning = prevCharCode && charData.kerning[prevCharCode] ? charData.kerning[prevCharCode] : 0;
|
|
107
117
|
// Record the last space in the string and the current width
|
|
108
118
|
if (/(\s)/.test(text.charAt(i))) {
|
|
109
119
|
lastSpace = i;
|
|
@@ -134,6 +144,12 @@ export class BitmapText extends DisplayObject {
|
|
|
134
144
|
};
|
|
135
145
|
}
|
|
136
146
|
|
|
147
|
+
/**
|
|
148
|
+
* TBD.
|
|
149
|
+
* @param text - TBD.
|
|
150
|
+
* @param replace - TBD.
|
|
151
|
+
* @returns {string} TBD.
|
|
152
|
+
*/
|
|
137
153
|
cleanText(text, replace = '') {
|
|
138
154
|
const data = this._data.font;
|
|
139
155
|
if (!data) {
|
|
@@ -156,6 +172,9 @@ export class BitmapText extends DisplayObject {
|
|
|
156
172
|
return lines.join('\n');
|
|
157
173
|
}
|
|
158
174
|
|
|
175
|
+
/**
|
|
176
|
+
* TBD.
|
|
177
|
+
*/
|
|
159
178
|
updateText() {
|
|
160
179
|
const data = this._data.font;
|
|
161
180
|
if (!data) {
|
|
@@ -224,6 +243,10 @@ export class BitmapText extends DisplayObject {
|
|
|
224
243
|
}
|
|
225
244
|
}
|
|
226
245
|
|
|
246
|
+
/**
|
|
247
|
+
* TBD.
|
|
248
|
+
* @returns {number} TBD.
|
|
249
|
+
*/
|
|
227
250
|
purgeGlyphs() {
|
|
228
251
|
const len = this._glyphs.length;
|
|
229
252
|
const kept = [];
|
|
@@ -240,6 +263,9 @@ export class BitmapText extends DisplayObject {
|
|
|
240
263
|
return len - kept.length;
|
|
241
264
|
}
|
|
242
265
|
|
|
266
|
+
/**
|
|
267
|
+
* TBD.
|
|
268
|
+
*/
|
|
243
269
|
updateTransform() {
|
|
244
270
|
if (this.dirty || !this.anchor.equals(this._prevAnchor)) {
|
|
245
271
|
this.updateText();
|
|
@@ -249,10 +275,17 @@ export class BitmapText extends DisplayObject {
|
|
|
249
275
|
super.updateTransform();
|
|
250
276
|
}
|
|
251
277
|
|
|
278
|
+
/**
|
|
279
|
+
* TBD.
|
|
280
|
+
* @returns {string} TBD.
|
|
281
|
+
*/
|
|
252
282
|
get align() {
|
|
253
283
|
return this._align;
|
|
254
284
|
}
|
|
255
285
|
|
|
286
|
+
/**
|
|
287
|
+
* TBD.
|
|
288
|
+
*/
|
|
256
289
|
set align(value) {
|
|
257
290
|
if (value !== this._align && (value === 'left' || value === 'center' || value === 'right')) {
|
|
258
291
|
this._align = value;
|
|
@@ -260,10 +293,17 @@ export class BitmapText extends DisplayObject {
|
|
|
260
293
|
}
|
|
261
294
|
}
|
|
262
295
|
|
|
296
|
+
/**
|
|
297
|
+
* TBD.
|
|
298
|
+
* @returns {number} TBD.
|
|
299
|
+
*/
|
|
263
300
|
get tint() {
|
|
264
301
|
return this._tint;
|
|
265
302
|
}
|
|
266
303
|
|
|
304
|
+
/**
|
|
305
|
+
* TBD.
|
|
306
|
+
*/
|
|
267
307
|
set tint(value) {
|
|
268
308
|
if (value !== this._tint) {
|
|
269
309
|
this._tint = value;
|
|
@@ -271,6 +311,10 @@ export class BitmapText extends DisplayObject {
|
|
|
271
311
|
}
|
|
272
312
|
}
|
|
273
313
|
|
|
314
|
+
/**
|
|
315
|
+
* TBD.
|
|
316
|
+
* @returns {string} TBD.
|
|
317
|
+
*/
|
|
274
318
|
get fill() {
|
|
275
319
|
if (typeof this.tint === 'number') {
|
|
276
320
|
let colorStr = this.tint.toString(16);
|
|
@@ -282,14 +326,24 @@ export class BitmapText extends DisplayObject {
|
|
|
282
326
|
return this.tint;
|
|
283
327
|
}
|
|
284
328
|
|
|
329
|
+
/**
|
|
330
|
+
* TBD.
|
|
331
|
+
*/
|
|
285
332
|
set fill(value) {
|
|
286
333
|
this.tint = typeof value === 'string' ? parseInt(value.replace('#', ''), 16) : value;
|
|
287
334
|
}
|
|
288
335
|
|
|
336
|
+
/**
|
|
337
|
+
* TBD.
|
|
338
|
+
* @returns {string} TBD.
|
|
339
|
+
*/
|
|
289
340
|
get font() {
|
|
290
341
|
return this._font;
|
|
291
342
|
}
|
|
292
343
|
|
|
344
|
+
/**
|
|
345
|
+
* TBD.
|
|
346
|
+
*/
|
|
293
347
|
set font(value) {
|
|
294
348
|
const trimmedValue = value.trim();
|
|
295
349
|
if (trimmedValue !== this._font) {
|
|
@@ -299,10 +353,17 @@ export class BitmapText extends DisplayObject {
|
|
|
299
353
|
}
|
|
300
354
|
}
|
|
301
355
|
|
|
356
|
+
/**
|
|
357
|
+
* TBD.
|
|
358
|
+
* @returns {number} TBD.
|
|
359
|
+
*/
|
|
302
360
|
get fontSize() {
|
|
303
361
|
return this._fontSize;
|
|
304
362
|
}
|
|
305
363
|
|
|
364
|
+
/**
|
|
365
|
+
* TBD.
|
|
366
|
+
*/
|
|
306
367
|
set fontSize(value) {
|
|
307
368
|
value = parseInt(value, 10);
|
|
308
369
|
if (value !== this._fontSize && value > 0) {
|
|
@@ -311,10 +372,17 @@ export class BitmapText extends DisplayObject {
|
|
|
311
372
|
}
|
|
312
373
|
}
|
|
313
374
|
|
|
375
|
+
/**
|
|
376
|
+
* TBD.
|
|
377
|
+
* @returns {string} TBD.
|
|
378
|
+
*/
|
|
314
379
|
get text() {
|
|
315
380
|
return this._text;
|
|
316
381
|
}
|
|
317
382
|
|
|
383
|
+
/**
|
|
384
|
+
* TBD.
|
|
385
|
+
*/
|
|
318
386
|
set text(value) {
|
|
319
387
|
const typedValue = value.toString();
|
|
320
388
|
if (typedValue !== this._text) {
|
|
@@ -323,10 +391,16 @@ export class BitmapText extends DisplayObject {
|
|
|
323
391
|
}
|
|
324
392
|
}
|
|
325
393
|
|
|
394
|
+
/**
|
|
395
|
+
* TBD.
|
|
396
|
+
*/
|
|
326
397
|
get maxWidth() {
|
|
327
398
|
return this._maxWidth;
|
|
328
399
|
}
|
|
329
400
|
|
|
401
|
+
/**
|
|
402
|
+
* TBD.
|
|
403
|
+
*/
|
|
330
404
|
set maxWidth(value) {
|
|
331
405
|
if (value !== this._maxWidth) {
|
|
332
406
|
this._maxWidth = value;
|
|
@@ -334,10 +408,17 @@ export class BitmapText extends DisplayObject {
|
|
|
334
408
|
}
|
|
335
409
|
}
|
|
336
410
|
|
|
411
|
+
/**
|
|
412
|
+
* TBD.
|
|
413
|
+
* @returns {boolean} TBD.
|
|
414
|
+
*/
|
|
337
415
|
get smoothed() {
|
|
338
416
|
return !this._data.base.scaleMode;
|
|
339
417
|
}
|
|
340
418
|
|
|
419
|
+
/**
|
|
420
|
+
* TBD.
|
|
421
|
+
*/
|
|
341
422
|
set smoothed(value) {
|
|
342
423
|
if (value) {
|
|
343
424
|
this._data.base.scaleMode = SCALE_LINEAR;
|
|
@@ -1,11 +1,6 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @module display/button
|
|
3
|
-
* @copyright Copyright (c) 2018-present Richard Davey, Photon Storm Ltd., Andras Csizmadia <andras@vpmedia.hu> (www.vpmedia.hu)
|
|
4
|
-
* @author Andras Csizmadia <andras@vpmedia.hu>
|
|
5
|
-
* @author Richard Davey <rich@photonstorm.com>
|
|
6
|
-
*/
|
|
7
1
|
import { Image } from './image';
|
|
8
|
-
import { Signal } from
|
|
2
|
+
import { Signal } from '../core/signal';
|
|
3
|
+
import { Game } from '../core/game';
|
|
9
4
|
import { InputHandler } from '../core/input_handler';
|
|
10
5
|
import { BUTTON, POINTER_CONTACT } from '../core/const';
|
|
11
6
|
|
|
@@ -18,8 +13,7 @@ const STATE_DISABLED = 'Disabled';
|
|
|
18
13
|
export class Button extends Image {
|
|
19
14
|
/**
|
|
20
15
|
* TBD.
|
|
21
|
-
*
|
|
22
|
-
* @param {object} game - TBD.
|
|
16
|
+
* @param {Game} game - TBD.
|
|
23
17
|
* @param {number} x - TBD.
|
|
24
18
|
* @param {number} y - TBD.
|
|
25
19
|
* @param {string} key - TBD.
|
|
@@ -71,6 +65,9 @@ export class Button extends Image {
|
|
|
71
65
|
this.events.onInputUp.add(this.onInputUpHandler, this);
|
|
72
66
|
}
|
|
73
67
|
|
|
68
|
+
/**
|
|
69
|
+
* TBD.
|
|
70
|
+
*/
|
|
74
71
|
destroy() {
|
|
75
72
|
this._onOverFrame = null;
|
|
76
73
|
this._onOutFrame = null;
|
|
@@ -94,6 +91,11 @@ export class Button extends Image {
|
|
|
94
91
|
super.destroy();
|
|
95
92
|
}
|
|
96
93
|
|
|
94
|
+
/**
|
|
95
|
+
* TBD.
|
|
96
|
+
* @param {boolean} isEnabled - TBD.
|
|
97
|
+
* @param {boolean} isImmediate - TBD.
|
|
98
|
+
*/
|
|
97
99
|
setEnabled(isEnabled, isImmediate) {
|
|
98
100
|
this.input.enabled = isEnabled;
|
|
99
101
|
if (isImmediate) {
|
|
@@ -105,14 +107,26 @@ export class Button extends Image {
|
|
|
105
107
|
}
|
|
106
108
|
}
|
|
107
109
|
|
|
110
|
+
/**
|
|
111
|
+
* TBD.
|
|
112
|
+
*/
|
|
108
113
|
clearFrames() {
|
|
109
114
|
this.setFrames(null, null, null, null);
|
|
110
115
|
}
|
|
111
116
|
|
|
117
|
+
/**
|
|
118
|
+
* TBD.
|
|
119
|
+
*/
|
|
112
120
|
removedFromWorld() {
|
|
113
121
|
this.inputEnabled = false;
|
|
114
122
|
}
|
|
115
123
|
|
|
124
|
+
/**
|
|
125
|
+
* TBD.
|
|
126
|
+
* @param {string} state - TBD.
|
|
127
|
+
* @param {string} frame - TBD.
|
|
128
|
+
* @param {boolean} switchImmediately - TBD.
|
|
129
|
+
*/
|
|
116
130
|
setStateFrame(state, frame, switchImmediately = false) {
|
|
117
131
|
const frameKey = '_on' + state + 'Frame';
|
|
118
132
|
if (frame) {
|
|
@@ -125,6 +139,11 @@ export class Button extends Image {
|
|
|
125
139
|
}
|
|
126
140
|
}
|
|
127
141
|
|
|
142
|
+
/**
|
|
143
|
+
* TBD.
|
|
144
|
+
* @param {string} newState - TBD.
|
|
145
|
+
* @returns {boolean} TBD.
|
|
146
|
+
*/
|
|
128
147
|
changeStateFrame(newState) {
|
|
129
148
|
if (this.freezeFrames) {
|
|
130
149
|
return false;
|
|
@@ -142,6 +161,13 @@ export class Button extends Image {
|
|
|
142
161
|
return false;
|
|
143
162
|
}
|
|
144
163
|
|
|
164
|
+
/**
|
|
165
|
+
* TBD.
|
|
166
|
+
* @param {string} overFrame - TBD.
|
|
167
|
+
* @param {string} outFrame - TBD.
|
|
168
|
+
* @param {string} downFrame - TBD.
|
|
169
|
+
* @param {string} upFrame - TBD.
|
|
170
|
+
*/
|
|
145
171
|
setFrames(overFrame, outFrame, downFrame, upFrame) {
|
|
146
172
|
this.setStateFrame(STATE_OVER, overFrame, this.input.pointerOver());
|
|
147
173
|
this.setStateFrame(STATE_OUT, outFrame, !this.input.pointerOver());
|
|
@@ -149,11 +175,13 @@ export class Button extends Image {
|
|
|
149
175
|
this.setStateFrame(STATE_UP, upFrame, this.input.pointerUp());
|
|
150
176
|
}
|
|
151
177
|
|
|
178
|
+
/**
|
|
179
|
+
* TBD.
|
|
180
|
+
* @param {object} sprite - TBD.
|
|
181
|
+
* @param {object} pointer - TBD.
|
|
182
|
+
*/
|
|
152
183
|
onInputOverHandler(sprite, pointer) {
|
|
153
|
-
if (
|
|
154
|
-
pointer.justReleased() &&
|
|
155
|
-
(this.justReleasedPreventsOver & pointer.pointerMode) === pointer.pointerMode
|
|
156
|
-
) {
|
|
184
|
+
if (pointer.justReleased() && (this.justReleasedPreventsOver & pointer.pointerMode) === pointer.pointerMode) {
|
|
157
185
|
// If the Pointer was only just released then we don't fire an over event
|
|
158
186
|
return;
|
|
159
187
|
}
|
|
@@ -166,6 +194,11 @@ export class Button extends Image {
|
|
|
166
194
|
}
|
|
167
195
|
}
|
|
168
196
|
|
|
197
|
+
/**
|
|
198
|
+
* TBD.
|
|
199
|
+
* @param {object} sprite - TBD.
|
|
200
|
+
* @param {object} pointer - TBD.
|
|
201
|
+
*/
|
|
169
202
|
onInputOutHandler(sprite, pointer) {
|
|
170
203
|
this.changeStateFrame(STATE_OUT);
|
|
171
204
|
if (this.onInputOut) {
|
|
@@ -173,6 +206,11 @@ export class Button extends Image {
|
|
|
173
206
|
}
|
|
174
207
|
}
|
|
175
208
|
|
|
209
|
+
/**
|
|
210
|
+
* TBD.
|
|
211
|
+
* @param {object} sprite - TBD.
|
|
212
|
+
* @param {object} pointer - TBD.
|
|
213
|
+
*/
|
|
176
214
|
onInputDownHandler(sprite, pointer) {
|
|
177
215
|
this.changeStateFrame(STATE_DOWN);
|
|
178
216
|
if (this.onInputDown) {
|
|
@@ -180,6 +218,12 @@ export class Button extends Image {
|
|
|
180
218
|
}
|
|
181
219
|
}
|
|
182
220
|
|
|
221
|
+
/**
|
|
222
|
+
* TBD.
|
|
223
|
+
* @param {object} sprite - TBD.
|
|
224
|
+
* @param {object} pointer - TBD.
|
|
225
|
+
* @param {boolean} isOver - TBD.
|
|
226
|
+
*/
|
|
183
227
|
onInputUpHandler(sprite, pointer, isOver) {
|
|
184
228
|
if (this.onInputUp) {
|
|
185
229
|
this.onInputUp.dispatch(this, pointer, isOver);
|
|
@@ -202,10 +246,17 @@ export class Button extends Image {
|
|
|
202
246
|
}
|
|
203
247
|
}
|
|
204
248
|
|
|
249
|
+
/**
|
|
250
|
+
* TBD.
|
|
251
|
+
* @returns {boolean} TBD.
|
|
252
|
+
*/
|
|
205
253
|
get inputEnabled() {
|
|
206
254
|
return this.input && this.input.enabled;
|
|
207
255
|
}
|
|
208
256
|
|
|
257
|
+
/**
|
|
258
|
+
* TBD.
|
|
259
|
+
*/
|
|
209
260
|
set inputEnabled(value) {
|
|
210
261
|
if (value) {
|
|
211
262
|
if (this.input === null) {
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @copyright Copyright (c) 2018-present Richard Davey, Photon Storm Ltd., Andras Csizmadia <andras@vpmedia.hu> (www.vpmedia.hu)
|
|
3
|
-
* @author Andras Csizmadia <andras@vpmedia.hu>
|
|
4
|
-
* @author Richard Davey <rich@photonstorm.com>
|
|
5
|
-
* @author Mat Groves http://matgroves.com/ @Doormat23
|
|
6
|
-
*/
|
|
7
1
|
import { create, removeByCanvas } from './pool';
|
|
8
2
|
|
|
9
3
|
export class CanvasBuffer {
|
|
4
|
+
/**
|
|
5
|
+
* TBD.
|
|
6
|
+
* @param {number} width - TBD.
|
|
7
|
+
* @param {number} height - TBD.
|
|
8
|
+
*/
|
|
10
9
|
constructor(width, height) {
|
|
11
10
|
this.width = width;
|
|
12
11
|
this.height = height;
|
|
@@ -16,11 +15,19 @@ export class CanvasBuffer {
|
|
|
16
15
|
this.canvas.height = height;
|
|
17
16
|
}
|
|
18
17
|
|
|
18
|
+
/**
|
|
19
|
+
* TBD.
|
|
20
|
+
*/
|
|
19
21
|
clear() {
|
|
20
22
|
this.context.setTransform(1, 0, 0, 1, 0, 0);
|
|
21
23
|
this.context.clearRect(0, 0, this.width, this.height);
|
|
22
24
|
}
|
|
23
25
|
|
|
26
|
+
/**
|
|
27
|
+
* TBD.
|
|
28
|
+
* @param {number} width - TBD.
|
|
29
|
+
* @param {number} height - TBD.
|
|
30
|
+
*/
|
|
24
31
|
resize(width, height) {
|
|
25
32
|
this.width = width;
|
|
26
33
|
this.height = height;
|
|
@@ -28,6 +35,9 @@ export class CanvasBuffer {
|
|
|
28
35
|
this.canvas.height = height;
|
|
29
36
|
}
|
|
30
37
|
|
|
38
|
+
/**
|
|
39
|
+
* TBD.
|
|
40
|
+
*/
|
|
31
41
|
destroy() {
|
|
32
42
|
removeByCanvas(this.canvas);
|
|
33
43
|
}
|
|
@@ -1,20 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
* @copyright Copyright (c) 2018-present Richard Davey, Photon Storm Ltd., Andras Csizmadia <andras@vpmedia.hu> (www.vpmedia.hu)
|
|
3
|
-
* @author Andras Csizmadia <andras@vpmedia.hu>
|
|
4
|
-
* @author Richard Davey <rich@photonstorm.com>
|
|
5
|
-
* @author Mat Groves http://matgroves.com/ @Doormat23
|
|
6
|
-
*/
|
|
7
|
-
import {
|
|
8
|
-
GEOM_POLYGON,
|
|
9
|
-
GEOM_RECTANGLE,
|
|
10
|
-
GEOM_CIRCLE,
|
|
11
|
-
GEOM_ELLIPSE,
|
|
12
|
-
GEOM_ROUNDED_RECTANGLE,
|
|
13
|
-
} from '../../core/const';
|
|
1
|
+
import { GEOM_POLYGON, GEOM_RECTANGLE, GEOM_CIRCLE, GEOM_ELLIPSE, GEOM_ROUNDED_RECTANGLE } from '../../core/const';
|
|
14
2
|
|
|
15
3
|
/**
|
|
16
4
|
* TBD.
|
|
17
|
-
*
|
|
18
5
|
* @param {object} graphics - TBD.
|
|
19
6
|
*/
|
|
20
7
|
export function updateGraphicsTint(graphics) {
|
|
@@ -41,7 +28,6 @@ export function updateGraphicsTint(graphics) {
|
|
|
41
28
|
|
|
42
29
|
/**
|
|
43
30
|
* TBD.
|
|
44
|
-
*
|
|
45
31
|
* @param {object} graphics - TBD.
|
|
46
32
|
* @param {object} context - TBD.
|
|
47
33
|
*/
|
|
@@ -171,7 +157,6 @@ export function renderGraphics(graphics, context) {
|
|
|
171
157
|
|
|
172
158
|
/**
|
|
173
159
|
* TBD.
|
|
174
|
-
*
|
|
175
160
|
* @param {object} graphics - TBD.
|
|
176
161
|
* @param {object} context - TBD.
|
|
177
162
|
*/
|
|
@@ -1,14 +1,7 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @copyright Copyright (c) 2018-present Richard Davey, Photon Storm Ltd., Andras Csizmadia <andras@vpmedia.hu> (www.vpmedia.hu)
|
|
3
|
-
* @author Andras Csizmadia <andras@vpmedia.hu>
|
|
4
|
-
* @author Richard Davey <rich@photonstorm.com>
|
|
5
|
-
* @author Mat Groves http://matgroves.com/ @Doormat23
|
|
6
|
-
*/
|
|
7
1
|
import { renderGraphicsMask } from './graphics';
|
|
8
2
|
|
|
9
3
|
/**
|
|
10
4
|
* TBD.
|
|
11
|
-
*
|
|
12
5
|
* @param {object} maskData - TBD.
|
|
13
6
|
* @param {object} renderSession - TBD.
|
|
14
7
|
*/
|
|
@@ -33,7 +26,6 @@ export function pushMask(maskData, renderSession) {
|
|
|
33
26
|
|
|
34
27
|
/**
|
|
35
28
|
* TBD.
|
|
36
|
-
*
|
|
37
29
|
* @param {object} renderSession - TBD.
|
|
38
30
|
*/
|
|
39
31
|
export function popMask(renderSession) {
|