@vpmedia/phaser 1.0.2 → 1.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/README.md +20 -3
  2. package/dist/phaser.cjs +1 -1
  3. package/dist/phaser.cjs.LICENSE.txt +1 -1
  4. package/dist/phaser.cjs.map +1 -1
  5. package/dist/phaser.js +1 -1
  6. package/dist/phaser.js.LICENSE.txt +1 -1
  7. package/dist/phaser.js.map +1 -1
  8. package/package.json +27 -20
  9. package/src/index.js +58 -15
  10. package/src/phaser/core/animation_parser.js +14 -11
  11. package/src/phaser/core/array_set.js +0 -1
  12. package/src/phaser/core/const.js +2 -2
  13. package/src/phaser/core/device_util.js +21 -19
  14. package/src/phaser/core/frame_util.js +6 -4
  15. package/src/phaser/core/game.js +8 -0
  16. package/src/phaser/core/loader.js +125 -14
  17. package/src/phaser/core/loader_parser.js +18 -14
  18. package/src/phaser/core/scene.js +0 -1
  19. package/src/phaser/core/scene_manager.js +0 -1
  20. package/src/phaser/core/sound_manager.js +2 -3
  21. package/src/phaser/core/tween_easing.js +62 -37
  22. package/src/phaser/display/canvas/graphics.js +5 -5
  23. package/src/phaser/display/canvas/masker.js +3 -3
  24. package/src/phaser/display/canvas/pool.js +10 -5
  25. package/src/phaser/display/canvas/tinter.js +12 -9
  26. package/src/phaser/display/canvas/util.js +33 -25
  27. package/src/phaser/display/graphics_data_util.js +2 -1
  28. package/src/phaser/display/sprite_util.js +14 -12
  29. package/src/phaser/display/webgl/earcut.js +106 -91
  30. package/src/phaser/display/webgl/graphics.js +31 -25
  31. package/src/phaser/display/webgl/mask_manager.js +4 -4
  32. package/src/phaser/display/webgl/texture_util.js +6 -4
  33. package/src/phaser/display/webgl/util.js +14 -10
  34. package/src/phaser/geom/polygon.js +0 -1
  35. package/src/phaser/geom/util/circle.js +26 -19
  36. package/src/phaser/geom/util/ellipse.js +7 -3
  37. package/src/phaser/geom/util/line.js +21 -16
  38. package/src/phaser/geom/util/matrix.js +7 -2
  39. package/src/phaser/geom/util/point.js +76 -56
  40. package/src/phaser/geom/util/polygon.js +6 -2
  41. package/src/phaser/geom/util/rectangle.js +59 -42
  42. package/src/phaser/geom/util/rounded_rectangle.js +6 -2
  43. package/src/phaser/util/math.js +61 -43
  44. package/src/phaser/util/string.js +6 -0
@@ -40,16 +40,15 @@ export default class {
40
40
  } else if (window.AudioContext) {
41
41
  try {
42
42
  this.context = new window.AudioContext();
43
- } catch (error) {
43
+ } catch (e) {
44
44
  this.context = null;
45
45
  this.usingWebAudio = false;
46
46
  this.touchLocked = false;
47
47
  }
48
48
  } else if (window.webkitAudioContext) {
49
49
  try {
50
- /* eslint-disable new-cap */
51
50
  this.context = new window.webkitAudioContext();
52
- } catch (error) {
51
+ } catch (e) {
53
52
  this.context = null;
54
53
  this.usingWebAudio = false;
55
54
  this.touchLocked = false;
@@ -3,16 +3,11 @@
3
3
  * @author Richard Davey <rich@photonstorm.com>
4
4
  * @copyright Copyright (c) 2018-present Richard Davey, Photon Storm Ltd., Andras Csizmadia <andras@vpmedia.hu> (www.vpmedia.hu)
5
5
  */
6
- /* eslint-disable no-cond-assign */
7
- /* eslint-disable no-return-assign */
8
- /* eslint-disable no-restricted-properties */
9
- /* eslint-disable no-plusplus */
10
-
11
- // TODO fix eslint
12
6
 
13
7
  /**
14
8
  *
15
- * @param k
9
+ * @param {number} k TBD
10
+ * @returns {number} TBD
16
11
  */
17
12
  export function LinearNone(k) {
18
13
  return k;
@@ -20,7 +15,8 @@ export function LinearNone(k) {
20
15
 
21
16
  /**
22
17
  *
23
- * @param k
18
+ * @param {number} k TBD
19
+ * @returns {number} TBD
24
20
  */
25
21
  export function QuadraticIn(k) {
26
22
  return k * k;
@@ -28,7 +24,8 @@ export function QuadraticIn(k) {
28
24
 
29
25
  /**
30
26
  *
31
- * @param k
27
+ * @param {number} k TBD
28
+ * @returns {number} TBD
32
29
  */
33
30
  export function QuadraticOut(k) {
34
31
  return k * (2 - k);
@@ -36,7 +33,8 @@ export function QuadraticOut(k) {
36
33
 
37
34
  /**
38
35
  *
39
- * @param k
36
+ * @param {number} k TBD
37
+ * @returns {number} TBD
40
38
  */
41
39
  export function QuadraticInOut(k) {
42
40
  if ((k *= 2) < 1) return 0.5 * k * k;
@@ -45,7 +43,8 @@ export function QuadraticInOut(k) {
45
43
 
46
44
  /**
47
45
  *
48
- * @param k
46
+ * @param {number} k TBD
47
+ * @returns {number} TBD
49
48
  */
50
49
  export function CubicIn(k) {
51
50
  return k * k * k;
@@ -53,7 +52,8 @@ export function CubicIn(k) {
53
52
 
54
53
  /**
55
54
  *
56
- * @param k
55
+ * @param {number} k TBD
56
+ * @returns {number} TBD
57
57
  */
58
58
  export function CubicOut(k) {
59
59
  return --k * k * k + 1;
@@ -61,7 +61,8 @@ export function CubicOut(k) {
61
61
 
62
62
  /**
63
63
  *
64
- * @param k
64
+ * @param {number} k TBD
65
+ * @returns {number} TBD
65
66
  */
66
67
  export function CubicInOut(k) {
67
68
  if ((k *= 2) < 1) return 0.5 * k * k * k;
@@ -70,7 +71,8 @@ export function CubicInOut(k) {
70
71
 
71
72
  /**
72
73
  *
73
- * @param k
74
+ * @param {number} k TBD
75
+ * @returns {number} TBD
74
76
  */
75
77
  export function QuarticIn(k) {
76
78
  return k * k * k * k;
@@ -78,7 +80,8 @@ export function QuarticIn(k) {
78
80
 
79
81
  /**
80
82
  *
81
- * @param k
83
+ * @param {number} k TBD
84
+ * @returns {number} TBD
82
85
  */
83
86
  export function QuarticOut(k) {
84
87
  return 1 - (--k * k * k * k);
@@ -86,7 +89,8 @@ export function QuarticOut(k) {
86
89
 
87
90
  /**
88
91
  *
89
- * @param k
92
+ * @param {number} k TBD
93
+ * @returns {number} TBD
90
94
  */
91
95
  export function QuarticInOut(k) {
92
96
  if ((k *= 2) < 1) return 0.5 * k * k * k * k;
@@ -95,7 +99,8 @@ export function QuarticInOut(k) {
95
99
 
96
100
  /**
97
101
  *
98
- * @param k
102
+ * @param {number} k TBD
103
+ * @returns {number} TBD
99
104
  */
100
105
  export function QuinticIn(k) {
101
106
  return k * k * k * k * k;
@@ -103,7 +108,8 @@ export function QuinticIn(k) {
103
108
 
104
109
  /**
105
110
  *
106
- * @param k
111
+ * @param {number} k TBD
112
+ * @returns {number} TBD
107
113
  */
108
114
  export function QuinticOut(k) {
109
115
  return --k * k * k * k * k + 1;
@@ -111,7 +117,8 @@ export function QuinticOut(k) {
111
117
 
112
118
  /**
113
119
  *
114
- * @param k
120
+ * @param {number} k TBD
121
+ * @returns {number} TBD
115
122
  */
116
123
  export function QuinticInOut(k) {
117
124
  if ((k *= 2) < 1) return 0.5 * k * k * k * k * k;
@@ -120,7 +127,8 @@ export function QuinticInOut(k) {
120
127
 
121
128
  /**
122
129
  *
123
- * @param k
130
+ * @param {number} k TBD
131
+ * @returns {number} TBD
124
132
  */
125
133
  export function SinusoidalIn(k) {
126
134
  if (k === 0) return 0;
@@ -130,7 +138,8 @@ export function SinusoidalIn(k) {
130
138
 
131
139
  /**
132
140
  *
133
- * @param k
141
+ * @param {number} k TBD
142
+ * @returns {number} TBD
134
143
  */
135
144
  export function SinusoidalOut(k) {
136
145
  if (k === 0) return 0;
@@ -140,7 +149,8 @@ export function SinusoidalOut(k) {
140
149
 
141
150
  /**
142
151
  *
143
- * @param k
152
+ * @param {number} k TBD
153
+ * @returns {number} TBD
144
154
  */
145
155
  export function SinusoidalInOut(k) {
146
156
  if (k === 0) return 0;
@@ -150,7 +160,8 @@ export function SinusoidalInOut(k) {
150
160
 
151
161
  /**
152
162
  *
153
- * @param k
163
+ * @param {number} k TBD
164
+ * @returns {number} TBD
154
165
  */
155
166
  export function ExponentialIn(k) {
156
167
  return k === 0 ? 0 : Math.pow(1024, k - 1);
@@ -158,7 +169,8 @@ export function ExponentialIn(k) {
158
169
 
159
170
  /**
160
171
  *
161
- * @param k
172
+ * @param {number} k TBD
173
+ * @returns {number} TBD
162
174
  */
163
175
  export function ExponentialOut(k) {
164
176
  return k === 1 ? 1 : 1 - Math.pow(2, -10 * k);
@@ -166,7 +178,8 @@ export function ExponentialOut(k) {
166
178
 
167
179
  /**
168
180
  *
169
- * @param k
181
+ * @param {number} k TBD
182
+ * @returns {number} TBD
170
183
  */
171
184
  export function ExponentialInOut(k) {
172
185
  if (k === 0) return 0;
@@ -177,7 +190,8 @@ export function ExponentialInOut(k) {
177
190
 
178
191
  /**
179
192
  *
180
- * @param k
193
+ * @param {number} k TBD
194
+ * @returns {number} TBD
181
195
  */
182
196
  export function CircularIn(k) {
183
197
  return 1 - Math.sqrt(1 - k * k);
@@ -185,7 +199,8 @@ export function CircularIn(k) {
185
199
 
186
200
  /**
187
201
  *
188
- * @param k
202
+ * @param {number} k TBD
203
+ * @returns {number} TBD
189
204
  */
190
205
  export function CircularOut(k) {
191
206
  return Math.sqrt(1 - (--k * k));
@@ -193,7 +208,8 @@ export function CircularOut(k) {
193
208
 
194
209
  /**
195
210
  *
196
- * @param k
211
+ * @param {number} k TBD
212
+ * @returns {number} TBD
197
213
  */
198
214
  export function CircularInOut(k) {
199
215
  if ((k *= 2) < 1) return -0.5 * (Math.sqrt(1 - k * k) - 1);
@@ -202,7 +218,8 @@ export function CircularInOut(k) {
202
218
 
203
219
  /**
204
220
  *
205
- * @param k
221
+ * @param {number} k TBD
222
+ * @returns {number} TBD
206
223
  */
207
224
  export function ElasticIn(k) {
208
225
  let s;
@@ -220,7 +237,8 @@ export function ElasticIn(k) {
220
237
 
221
238
  /**
222
239
  *
223
- * @param k
240
+ * @param {number} k TBD
241
+ * @returns {number} TBD
224
242
  */
225
243
  export function ElasticOut(k) {
226
244
  let s;
@@ -238,7 +256,8 @@ export function ElasticOut(k) {
238
256
 
239
257
  /**
240
258
  *
241
- * @param k
259
+ * @param {number} k TBD
260
+ * @returns {number} TBD
242
261
  */
243
262
  export function ElasticInOut(k) {
244
263
  let s;
@@ -257,7 +276,8 @@ export function ElasticInOut(k) {
257
276
 
258
277
  /**
259
278
  *
260
- * @param k
279
+ * @param {number} k TBD
280
+ * @returns {number} TBD
261
281
  */
262
282
  export function BackIn(k) {
263
283
  const s = 1.70158;
@@ -266,7 +286,8 @@ export function BackIn(k) {
266
286
 
267
287
  /**
268
288
  *
269
- * @param k
289
+ * @param {number} k TBD
290
+ * @returns {number} TBD
270
291
  */
271
292
  export function BackOut(k) {
272
293
  const s = 1.70158;
@@ -275,7 +296,8 @@ export function BackOut(k) {
275
296
 
276
297
  /**
277
298
  *
278
- * @param k
299
+ * @param {number} k TBD
300
+ * @returns {number} TBD
279
301
  */
280
302
  export function BackInOut(k) {
281
303
  const s = 1.70158 * 1.525;
@@ -285,7 +307,8 @@ export function BackInOut(k) {
285
307
 
286
308
  /**
287
309
  *
288
- * @param k
310
+ * @param {number} k TBD
311
+ * @returns {number} TBD
289
312
  */
290
313
  export function BounceOut(k) {
291
314
  if (k < (1 / 2.75)) {
@@ -300,7 +323,8 @@ export function BounceOut(k) {
300
323
 
301
324
  /**
302
325
  *
303
- * @param k
326
+ * @param {number} k TBD
327
+ * @returns {number} TBD
304
328
  */
305
329
  export function BounceIn(k) {
306
330
  return 1 - BounceOut(1 - k);
@@ -308,7 +332,8 @@ export function BounceIn(k) {
308
332
 
309
333
  /**
310
334
  *
311
- * @param k
335
+ * @param {number} k TBD
336
+ * @returns {number} TBD
312
337
  */
313
338
  export function BounceInOut(k) {
314
339
  if (k < 0.5) return BounceIn(k * 2) * 0.5;
@@ -8,7 +8,7 @@ import { GEOM_POLYGON, GEOM_RECTANGLE, GEOM_CIRCLE, GEOM_ELLIPSE, GEOM_ROUNDED_R
8
8
 
9
9
  /**
10
10
  *
11
- * @param graphics
11
+ * @param {object} graphics TBD
12
12
  */
13
13
  export function updateGraphicsTint(graphics) {
14
14
  if (graphics.tint === 0xFFFFFF) {
@@ -28,8 +28,8 @@ export function updateGraphicsTint(graphics) {
28
28
 
29
29
  /**
30
30
  *
31
- * @param graphics
32
- * @param context
31
+ * @param {object} graphics TBD
32
+ * @param {object} context TBD
33
33
  */
34
34
  export function renderGraphics(graphics, context) {
35
35
  const worldAlpha = graphics.worldAlpha;
@@ -157,8 +157,8 @@ export function renderGraphics(graphics, context) {
157
157
 
158
158
  /**
159
159
  *
160
- * @param graphics
161
- * @param context
160
+ * @param {object} graphics TBD
161
+ * @param {object} context TBD
162
162
  */
163
163
  export function renderGraphicsMask(graphics, context) {
164
164
  const len = graphics.graphicsData.length;
@@ -8,8 +8,8 @@ import { renderGraphicsMask } from './graphics';
8
8
 
9
9
  /**
10
10
  *
11
- * @param maskData
12
- * @param renderSession
11
+ * @param {object} maskData TBD
12
+ * @param {object} renderSession TBD
13
13
  */
14
14
  export function pushMask(maskData, renderSession) {
15
15
  const context = renderSession.context;
@@ -32,7 +32,7 @@ export function pushMask(maskData, renderSession) {
32
32
 
33
33
  /**
34
34
  *
35
- * @param renderSession
35
+ * @param {object} renderSession TBD
36
36
  */
37
37
  export function popMask(renderSession) {
38
38
  renderSession.context.restore();
@@ -7,6 +7,7 @@
7
7
 
8
8
  /**
9
9
  *
10
+ * @returns {object} TBD
10
11
  */
11
12
  export function getPool() {
12
13
  if (!window.PhaserRegistry) {
@@ -20,6 +21,7 @@ export function getPool() {
20
21
 
21
22
  /**
22
23
  *
24
+ * @returns {object} TBD
23
25
  */
24
26
  export function getFirst() {
25
27
  const pool = getPool();
@@ -33,7 +35,7 @@ export function getFirst() {
33
35
 
34
36
  /**
35
37
  *
36
- * @param parent
38
+ * @param {object} parent TBD
37
39
  */
38
40
  export function remove(parent) {
39
41
  const pool = getPool();
@@ -48,7 +50,7 @@ export function remove(parent) {
48
50
 
49
51
  /**
50
52
  *
51
- * @param canvas
53
+ * @param {object} canvas TBD
52
54
  */
53
55
  export function removeByCanvas(canvas) {
54
56
  const pool = getPool();
@@ -63,6 +65,7 @@ export function removeByCanvas(canvas) {
63
65
 
64
66
  /**
65
67
  *
68
+ * @returns {number} TBD
66
69
  */
67
70
  export function getTotal() {
68
71
  const pool = getPool();
@@ -77,6 +80,7 @@ export function getTotal() {
77
80
 
78
81
  /**
79
82
  *
83
+ * @returns {number} TBD
80
84
  */
81
85
  export function getFree() {
82
86
  const pool = getPool();
@@ -91,9 +95,10 @@ export function getFree() {
91
95
 
92
96
  /**
93
97
  *
94
- * @param parent
95
- * @param width
96
- * @param height
98
+ * @param {object} parent TBD
99
+ * @param {number} width TBD
100
+ * @param {number} height TBD
101
+ * @returns {object} TBD
97
102
  */
98
103
  export function create(parent, width, height) {
99
104
  if (parent === undefined) {
@@ -10,8 +10,9 @@ import { hex2rgb } from '../../util/math';
10
10
 
11
11
  /**
12
12
  *
13
- * @param sprite
14
- * @param color
13
+ * @param {object} sprite TBD
14
+ * @param {object} color TBD
15
+ * @returns {object} TBD
15
16
  */
16
17
  export function getTintedTexture(sprite, color) {
17
18
  const canvas = sprite.tintedTexture || create('CanvasTinter');
@@ -21,9 +22,9 @@ export function getTintedTexture(sprite, color) {
21
22
 
22
23
  /**
23
24
  *
24
- * @param texture
25
- * @param color
26
- * @param canvas
25
+ * @param {object} texture TBD
26
+ * @param {object} color TBD
27
+ * @param {object} canvas TBD
27
28
  */
28
29
  export function tintWithMultiply(texture, color, canvas) {
29
30
  const context = canvas.getContext('2d');
@@ -43,9 +44,9 @@ export function tintWithMultiply(texture, color, canvas) {
43
44
 
44
45
  /**
45
46
  *
46
- * @param texture
47
- * @param color
48
- * @param canvas
47
+ * @param {object} texture TBD
48
+ * @param {object} color TBD
49
+ * @param {object} canvas TBD
49
50
  */
50
51
  export function tintWithPerPixel(texture, color, canvas) {
51
52
  const context = canvas.getContext('2d');
@@ -77,6 +78,7 @@ export function tintWithPerPixel(texture, color, canvas) {
77
78
 
78
79
  /**
79
80
  *
81
+ * @returns {boolean} TBD
80
82
  */
81
83
  export function checkInverseAlpha() {
82
84
  const canvas = new CanvasBuffer(2, 1);
@@ -98,6 +100,7 @@ export function checkInverseAlpha() {
98
100
 
99
101
  /**
100
102
  *
103
+ * @returns {boolean} TBD
101
104
  */
102
105
  export function canUseNewCanvasBlendModes() {
103
106
  if (document === undefined) {
@@ -123,7 +126,7 @@ export function canUseNewCanvasBlendModes() {
123
126
  }
124
127
 
125
128
  /**
126
- *
129
+ * TBD
127
130
  */
128
131
  export function detectCapabilities() {
129
132
  if (!window.PhaserRegistry) {
@@ -8,11 +8,12 @@ import { create as createCanvas } from './pool';
8
8
 
9
9
  /**
10
10
  *
11
- * @param parent
12
- * @param width
13
- * @param height
14
- * @param id
15
- * @param skipPool
11
+ * @param {object} parent TBD
12
+ * @param {number} width TBD
13
+ * @param {number} height TBD
14
+ * @param {string} id TBD
15
+ * @param {boolean} skipPool TBD
16
+ * @returns {object} TBD
16
17
  */
17
18
  export function create(parent, width, height, id, skipPool) {
18
19
  width = width || 256;
@@ -29,8 +30,9 @@ export function create(parent, width, height, id, skipPool) {
29
30
 
30
31
  /**
31
32
  *
32
- * @param canvas
33
- * @param color
33
+ * @param {object} canvas TBD
34
+ * @param {string} color TBD
35
+ * @returns {object} TBD
34
36
  */
35
37
  export function setBackgroundColor(canvas, color) {
36
38
  color = color || 'rgb(0,0,0)';
@@ -40,8 +42,9 @@ export function setBackgroundColor(canvas, color) {
40
42
 
41
43
  /**
42
44
  *
43
- * @param canvas
44
- * @param value
45
+ * @param {object} canvas TBD
46
+ * @param {string} value TBD
47
+ * @returns {object} TBD
45
48
  */
46
49
  export function setTouchAction(canvas, value) {
47
50
  value = value || 'none';
@@ -53,8 +56,9 @@ export function setTouchAction(canvas, value) {
53
56
 
54
57
  /**
55
58
  *
56
- * @param canvas
57
- * @param value
59
+ * @param {object} canvas TBD
60
+ * @param {string} value TBD
61
+ * @returns {object} TBD
58
62
  */
59
63
  export function setUserSelect(canvas, value) {
60
64
  value = value || 'none';
@@ -70,9 +74,10 @@ export function setUserSelect(canvas, value) {
70
74
 
71
75
  /**
72
76
  *
73
- * @param canvas
74
- * @param parent
75
- * @param overflowHidden
77
+ * @param {object} canvas TBD
78
+ * @param {object} parent TBD
79
+ * @param {boolean} overflowHidden TBD
80
+ * @returns {object} TBD
76
81
  */
77
82
  export function addToDOM(canvas, parent, overflowHidden = true) {
78
83
  let target;
@@ -98,7 +103,7 @@ export function addToDOM(canvas, parent, overflowHidden = true) {
98
103
 
99
104
  /**
100
105
  *
101
- * @param canvas
106
+ * @param {object} canvas TBD
102
107
  */
103
108
  export function removeFromDOM(canvas) {
104
109
  if (canvas.parentNode) {
@@ -108,13 +113,14 @@ export function removeFromDOM(canvas) {
108
113
 
109
114
  /**
110
115
  *
111
- * @param context
112
- * @param translateX
113
- * @param translateY
114
- * @param scaleX
115
- * @param scaleY
116
- * @param skewX
117
- * @param skewY
116
+ * @param {object} context TBD
117
+ * @param {number} translateX TBD
118
+ * @param {number} translateY TBD
119
+ * @param {number} scaleX TBD
120
+ * @param {number} scaleY TBD
121
+ * @param {number} skewX TBD
122
+ * @param {number} skewY TBD
123
+ * @returns {object} TBD
118
124
  */
119
125
  export function setTransform(context, translateX, translateY, scaleX, scaleY, skewX, skewY) {
120
126
  context.setTransform(scaleX, skewX, skewY, scaleY, translateX, translateY);
@@ -123,7 +129,8 @@ export function setTransform(context, translateX, translateY, scaleX, scaleY, sk
123
129
 
124
130
  /**
125
131
  *
126
- * @param context
132
+ * @param {object} context TBD
133
+ * @returns {object} TBD
127
134
  */
128
135
  export function getSmoothingPrefix(context) {
129
136
  const VENDORS = ['i', 'webkitI', 'msI', 'mozI', 'oI'];
@@ -139,8 +146,9 @@ export function getSmoothingPrefix(context) {
139
146
 
140
147
  /**
141
148
  *
142
- * @param context
143
- * @param value
149
+ * @param {object} context TBD
150
+ * @param {number} value TBD
151
+ * @returns {object} TBD
144
152
  */
145
153
  export function setSmoothingEnabled(context, value) {
146
154
  const s = getSmoothingPrefix(context);
@@ -7,7 +7,8 @@ import GraphicsData from './graphics_data';
7
7
 
8
8
  /**
9
9
  *
10
- * @param source
10
+ * @param {object} source TBD
11
+ * @returns {object} TBD
11
12
  */
12
13
  export function clone(source) {
13
14
  return new GraphicsData(source.lineWidth, source.lineColor, source.lineAlpha, source.fillColor, source.fillAlpha, source.fill, source.shape);
@@ -9,9 +9,9 @@ import { SCALE_LINEAR } from '../core/const';
9
9
 
10
10
  /**
11
11
  *
12
- * @param target
13
- * @param texture
14
- * @param destroyBase
12
+ * @param {object} target TBD
13
+ * @param {object} texture TBD
14
+ * @param {boolean} destroyBase TBD
15
15
  */
16
16
  export function setTexture(target, texture, destroyBase = false) {
17
17
  if (destroyBase) {
@@ -25,8 +25,9 @@ export function setTexture(target, texture, destroyBase = false) {
25
25
 
26
26
  /**
27
27
  *
28
- * @param target
29
- * @param matrix
28
+ * @param {object} target TBD
29
+ * @param {object} matrix TBD
30
+ * @returns {object} TBD
30
31
  */
31
32
  export function getBounds(target, matrix = null) {
32
33
  // TODO verify
@@ -107,7 +108,8 @@ export function getBounds(target, matrix = null) {
107
108
 
108
109
  /**
109
110
  *
110
- * @param target
111
+ * @param {object} target TBD
112
+ * @returns {object} TBD
111
113
  */
112
114
  export function getLocalBounds(target) {
113
115
  const matrixCache = target.worldTransform;
@@ -126,9 +128,9 @@ export function getLocalBounds(target) {
126
128
 
127
129
  /**
128
130
  *
129
- * @param target
130
- * @param renderSession
131
- * @param matrix
131
+ * @param {object} target TBD
132
+ * @param {object} renderSession TBD
133
+ * @param {object} matrix TBD
132
134
  */
133
135
  export function renderWebGL(target, renderSession, matrix) {
134
136
  // if the sprite is not visible or the alpha is 0 then no need to render this element
@@ -175,9 +177,9 @@ export function renderWebGL(target, renderSession, matrix) {
175
177
 
176
178
  /**
177
179
  *
178
- * @param target
179
- * @param renderSession
180
- * @param matrix
180
+ * @param {object} target TBD
181
+ * @param {object} renderSession TBD
182
+ * @param {object} matrix TBD
181
183
  */
182
184
  export function renderCanvas(target, renderSession, matrix) {
183
185
  // If the sprite is not visible or the alpha is 0 then no need to render this element