@vpmedia/phaser 1.12.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.
Files changed (258) hide show
  1. package/README.md +1 -1
  2. package/package.json +2 -2
  3. package/src/index.js +19 -19
  4. package/src/phaser/core/animation.js +3 -3
  5. package/src/phaser/core/animation_manager.js +2 -2
  6. package/src/phaser/core/animation_parser.js +16 -14
  7. package/src/phaser/core/array_set.js +2 -2
  8. package/src/phaser/core/cache.js +6 -6
  9. package/src/phaser/core/const.js +1 -1
  10. package/src/phaser/core/device.js +2 -2
  11. package/src/phaser/core/device_util.js +29 -11
  12. package/src/phaser/core/dom.js +2 -2
  13. package/src/phaser/core/event_manager.js +2 -2
  14. package/src/phaser/core/factory.js +8 -8
  15. package/src/phaser/core/frame.js +3 -3
  16. package/src/phaser/core/frame_data.js +2 -2
  17. package/src/phaser/core/frame_util.js +11 -9
  18. package/src/phaser/core/game.js +14 -13
  19. package/src/phaser/core/input.js +7 -7
  20. package/src/phaser/core/input_handler.js +2 -2
  21. package/src/phaser/core/input_mouse.js +2 -2
  22. package/src/phaser/core/input_mspointer.js +1 -1
  23. package/src/phaser/core/input_pointer.js +3 -3
  24. package/src/phaser/core/input_touch.js +1 -1
  25. package/src/phaser/core/loader.js +3 -3
  26. package/src/phaser/core/loader_parser.js +25 -21
  27. package/src/phaser/core/raf.js +2 -2
  28. package/src/phaser/core/scale_manager.js +5 -5
  29. package/src/phaser/core/scene.js +2 -2
  30. package/src/phaser/core/scene_manager.js +3 -3
  31. package/src/phaser/core/signal.js +4 -3
  32. package/src/phaser/core/signal_binding.js +2 -2
  33. package/src/phaser/core/sound.js +3 -3
  34. package/src/phaser/core/sound_manager.js +6 -6
  35. package/src/phaser/core/sound_sprite.js +2 -2
  36. package/src/phaser/core/stage.js +4 -4
  37. package/src/phaser/core/time.js +3 -3
  38. package/src/phaser/core/timer.js +3 -3
  39. package/src/phaser/core/timer_event.js +1 -1
  40. package/src/phaser/core/tween.js +4 -4
  41. package/src/phaser/core/tween_data.js +2 -2
  42. package/src/phaser/core/tween_easing.js +63 -63
  43. package/src/phaser/core/tween_manager.js +3 -3
  44. package/src/phaser/core/world.js +3 -3
  45. package/src/phaser/display/bitmap_text.js +17 -5
  46. package/src/phaser/display/button.js +19 -4
  47. package/src/phaser/display/canvas/buffer.js +1 -1
  48. package/src/phaser/display/canvas/graphics.js +9 -6
  49. package/src/phaser/display/canvas/masker.js +6 -4
  50. package/src/phaser/display/canvas/pool.js +18 -11
  51. package/src/phaser/display/canvas/renderer.js +1 -1
  52. package/src/phaser/display/canvas/tinter.js +18 -13
  53. package/src/phaser/display/canvas/util.js +43 -34
  54. package/src/phaser/display/display_object.js +9 -5
  55. package/src/phaser/display/graphics.js +19 -11
  56. package/src/phaser/display/graphics_data.js +3 -2
  57. package/src/phaser/display/graphics_data_util.js +6 -4
  58. package/src/phaser/display/group.js +14 -5
  59. package/src/phaser/display/image.js +15 -5
  60. package/src/phaser/display/sprite_batch.js +8 -2
  61. package/src/phaser/display/sprite_util.js +21 -15
  62. package/src/phaser/display/text.js +15 -5
  63. package/src/phaser/display/webgl/abstract_filter.js +1 -1
  64. package/src/phaser/display/webgl/base_texture.js +3 -2
  65. package/src/phaser/display/webgl/blend_manager.js +1 -1
  66. package/src/phaser/display/webgl/earcut.js +107 -107
  67. package/src/phaser/display/webgl/earcut_node.js +1 -1
  68. package/src/phaser/display/webgl/fast_sprite_batch.js +1 -1
  69. package/src/phaser/display/webgl/filter_manager.js +1 -1
  70. package/src/phaser/display/webgl/filter_texture.js +1 -1
  71. package/src/phaser/display/webgl/graphics.js +34 -34
  72. package/src/phaser/display/webgl/graphics_data.js +2 -2
  73. package/src/phaser/display/webgl/mask_manager.js +7 -5
  74. package/src/phaser/display/webgl/render_texture.js +5 -5
  75. package/src/phaser/display/webgl/renderer.js +2 -2
  76. package/src/phaser/display/webgl/shader/complex.js +1 -1
  77. package/src/phaser/display/webgl/shader/fast.js +1 -1
  78. package/src/phaser/display/webgl/shader/normal.js +1 -1
  79. package/src/phaser/display/webgl/shader/primitive.js +1 -1
  80. package/src/phaser/display/webgl/shader/strip.js +1 -1
  81. package/src/phaser/display/webgl/shader_manager.js +1 -1
  82. package/src/phaser/display/webgl/sprite_batch.js +1 -1
  83. package/src/phaser/display/webgl/stencil_manager.js +1 -1
  84. package/src/phaser/display/webgl/texture.js +4 -3
  85. package/src/phaser/display/webgl/texture_util.js +11 -9
  86. package/src/phaser/display/webgl/util.js +20 -16
  87. package/src/phaser/geom/circle.js +12 -4
  88. package/src/phaser/geom/ellipse.js +13 -4
  89. package/src/phaser/geom/line.js +12 -3
  90. package/src/phaser/geom/matrix.js +14 -3
  91. package/src/phaser/geom/point.js +9 -2
  92. package/src/phaser/geom/polygon.js +4 -3
  93. package/src/phaser/geom/rectangle.js +12 -3
  94. package/src/phaser/geom/rounded_rectangle.js +12 -2
  95. package/src/phaser/geom/util/circle.js +37 -29
  96. package/src/phaser/geom/util/ellipse.js +7 -15
  97. package/src/phaser/geom/util/line.js +30 -24
  98. package/src/phaser/geom/util/matrix.js +11 -9
  99. package/src/phaser/geom/util/point.js +100 -78
  100. package/src/phaser/geom/util/polygon.js +7 -15
  101. package/src/phaser/geom/util/rectangle.js +78 -62
  102. package/src/phaser/geom/util/rounded_rectangle.js +7 -15
  103. package/src/phaser/util/math.js +86 -66
  104. package/types/global.d.ts +7 -0
  105. package/types/index.d.ts +18 -18
  106. package/types/index.d.ts.map +1 -1
  107. package/types/phaser/core/animation.d.ts +5 -5
  108. package/types/phaser/core/animation.d.ts.map +1 -1
  109. package/types/phaser/core/animation_parser.d.ts +13 -11
  110. package/types/phaser/core/animation_parser.d.ts.map +1 -1
  111. package/types/phaser/core/array_set.d.ts +2 -2
  112. package/types/phaser/core/cache.d.ts +4 -4
  113. package/types/phaser/core/cache.d.ts.map +1 -1
  114. package/types/phaser/core/const.d.ts +1 -1
  115. package/types/phaser/core/device.d.ts +2 -2
  116. package/types/phaser/core/device_util.d.ts +31 -21
  117. package/types/phaser/core/device_util.d.ts.map +1 -1
  118. package/types/phaser/core/event_manager.d.ts +1 -1
  119. package/types/phaser/core/event_manager.d.ts.map +1 -1
  120. package/types/phaser/core/factory.d.ts +2 -2
  121. package/types/phaser/core/factory.d.ts.map +1 -1
  122. package/types/phaser/core/frame.d.ts +2 -2
  123. package/types/phaser/core/frame.d.ts.map +1 -1
  124. package/types/phaser/core/frame_data.d.ts +1 -1
  125. package/types/phaser/core/frame_util.d.ts +8 -6
  126. package/types/phaser/core/frame_util.d.ts.map +1 -1
  127. package/types/phaser/core/game.d.ts +12 -12
  128. package/types/phaser/core/game.d.ts.map +1 -1
  129. package/types/phaser/core/input.d.ts +4 -4
  130. package/types/phaser/core/input.d.ts.map +1 -1
  131. package/types/phaser/core/input_handler.d.ts +1 -1
  132. package/types/phaser/core/input_handler.d.ts.map +1 -1
  133. package/types/phaser/core/input_mspointer.d.ts +1 -1
  134. package/types/phaser/core/input_pointer.d.ts +2 -2
  135. package/types/phaser/core/input_pointer.d.ts.map +1 -1
  136. package/types/phaser/core/input_touch.d.ts +1 -1
  137. package/types/phaser/core/loader.d.ts +1 -1
  138. package/types/phaser/core/loader.d.ts.map +1 -1
  139. package/types/phaser/core/loader_parser.d.ts +22 -18
  140. package/types/phaser/core/loader_parser.d.ts.map +1 -1
  141. package/types/phaser/core/raf.d.ts +2 -2
  142. package/types/phaser/core/scale_manager.d.ts +4 -4
  143. package/types/phaser/core/scale_manager.d.ts.map +1 -1
  144. package/types/phaser/core/scene.d.ts +2 -2
  145. package/types/phaser/core/scene_manager.d.ts +1 -1
  146. package/types/phaser/core/signal.d.ts +1 -1
  147. package/types/phaser/core/signal.d.ts.map +1 -1
  148. package/types/phaser/core/signal_binding.d.ts +2 -2
  149. package/types/phaser/core/sound.d.ts +4 -4
  150. package/types/phaser/core/sound.d.ts.map +1 -1
  151. package/types/phaser/core/sound_manager.d.ts +5 -5
  152. package/types/phaser/core/sound_manager.d.ts.map +1 -1
  153. package/types/phaser/core/sound_sprite.d.ts +2 -2
  154. package/types/phaser/core/stage.d.ts +2 -2
  155. package/types/phaser/core/stage.d.ts.map +1 -1
  156. package/types/phaser/core/time.d.ts +2 -2
  157. package/types/phaser/core/time.d.ts.map +1 -1
  158. package/types/phaser/core/timer.d.ts +2 -2
  159. package/types/phaser/core/timer.d.ts.map +1 -1
  160. package/types/phaser/core/timer_event.d.ts +1 -1
  161. package/types/phaser/core/tween.d.ts +18 -18
  162. package/types/phaser/core/tween.d.ts.map +1 -1
  163. package/types/phaser/core/tween_data.d.ts +5 -5
  164. package/types/phaser/core/tween_data.d.ts.map +1 -1
  165. package/types/phaser/core/tween_easing.d.ts +63 -63
  166. package/types/phaser/core/tween_manager.d.ts +2 -2
  167. package/types/phaser/core/tween_manager.d.ts.map +1 -1
  168. package/types/phaser/core/world.d.ts +2 -2
  169. package/types/phaser/core/world.d.ts.map +1 -1
  170. package/types/phaser/display/bitmap_text.d.ts +16 -5
  171. package/types/phaser/display/bitmap_text.d.ts.map +1 -1
  172. package/types/phaser/display/button.d.ts +18 -4
  173. package/types/phaser/display/button.d.ts.map +1 -1
  174. package/types/phaser/display/canvas/graphics.d.ts +8 -5
  175. package/types/phaser/display/canvas/graphics.d.ts.map +1 -1
  176. package/types/phaser/display/canvas/masker.d.ts +5 -3
  177. package/types/phaser/display/canvas/masker.d.ts.map +1 -1
  178. package/types/phaser/display/canvas/pool.d.ts +20 -13
  179. package/types/phaser/display/canvas/pool.d.ts.map +1 -1
  180. package/types/phaser/display/canvas/tinter.d.ts +19 -14
  181. package/types/phaser/display/canvas/tinter.d.ts.map +1 -1
  182. package/types/phaser/display/canvas/util.d.ts +47 -38
  183. package/types/phaser/display/canvas/util.d.ts.map +1 -1
  184. package/types/phaser/display/display_object.d.ts +5 -5
  185. package/types/phaser/display/display_object.d.ts.map +1 -1
  186. package/types/phaser/display/graphics.d.ts +28 -21
  187. package/types/phaser/display/graphics.d.ts.map +1 -1
  188. package/types/phaser/display/graphics_data.d.ts +1 -1
  189. package/types/phaser/display/graphics_data.d.ts.map +1 -1
  190. package/types/phaser/display/graphics_data_util.d.ts +3 -2
  191. package/types/phaser/display/graphics_data_util.d.ts.map +1 -1
  192. package/types/phaser/display/group.d.ts +14 -6
  193. package/types/phaser/display/group.d.ts.map +1 -1
  194. package/types/phaser/display/image.d.ts +14 -5
  195. package/types/phaser/display/image.d.ts.map +1 -1
  196. package/types/phaser/display/sprite_batch.d.ts +8 -3
  197. package/types/phaser/display/sprite_batch.d.ts.map +1 -1
  198. package/types/phaser/display/sprite_util.d.ts +19 -14
  199. package/types/phaser/display/sprite_util.d.ts.map +1 -1
  200. package/types/phaser/display/text.d.ts +25 -16
  201. package/types/phaser/display/text.d.ts.map +1 -1
  202. package/types/phaser/display/webgl/abstract_filter.d.ts +1 -1
  203. package/types/phaser/display/webgl/base_texture.d.ts +1 -1
  204. package/types/phaser/display/webgl/base_texture.d.ts.map +1 -1
  205. package/types/phaser/display/webgl/blend_manager.d.ts +1 -1
  206. package/types/phaser/display/webgl/earcut.d.ts +106 -106
  207. package/types/phaser/display/webgl/earcut_node.d.ts +1 -1
  208. package/types/phaser/display/webgl/fast_sprite_batch.d.ts +1 -1
  209. package/types/phaser/display/webgl/filter_manager.d.ts +1 -1
  210. package/types/phaser/display/webgl/graphics.d.ts +31 -31
  211. package/types/phaser/display/webgl/graphics_data.d.ts +2 -2
  212. package/types/phaser/display/webgl/mask_manager.d.ts +6 -4
  213. package/types/phaser/display/webgl/mask_manager.d.ts.map +1 -1
  214. package/types/phaser/display/webgl/render_texture.d.ts +3 -3
  215. package/types/phaser/display/webgl/render_texture.d.ts.map +1 -1
  216. package/types/phaser/display/webgl/renderer.d.ts +1 -1
  217. package/types/phaser/display/webgl/renderer.d.ts.map +1 -1
  218. package/types/phaser/display/webgl/texture.d.ts +1 -1
  219. package/types/phaser/display/webgl/texture.d.ts.map +1 -1
  220. package/types/phaser/display/webgl/texture_util.d.ts +10 -8
  221. package/types/phaser/display/webgl/texture_util.d.ts.map +1 -1
  222. package/types/phaser/display/webgl/util.d.ts +20 -16
  223. package/types/phaser/display/webgl/util.d.ts.map +1 -1
  224. package/types/phaser/geom/circle.d.ts +16 -9
  225. package/types/phaser/geom/circle.d.ts.map +1 -1
  226. package/types/phaser/geom/ellipse.d.ts +13 -5
  227. package/types/phaser/geom/ellipse.d.ts.map +1 -1
  228. package/types/phaser/geom/line.d.ts +16 -8
  229. package/types/phaser/geom/line.d.ts.map +1 -1
  230. package/types/phaser/geom/matrix.d.ts +21 -11
  231. package/types/phaser/geom/matrix.d.ts.map +1 -1
  232. package/types/phaser/geom/point.d.ts +26 -20
  233. package/types/phaser/geom/point.d.ts.map +1 -1
  234. package/types/phaser/geom/polygon.d.ts +4 -4
  235. package/types/phaser/geom/polygon.d.ts.map +1 -1
  236. package/types/phaser/geom/rectangle.d.ts +22 -14
  237. package/types/phaser/geom/rectangle.d.ts.map +1 -1
  238. package/types/phaser/geom/rounded_rectangle.d.ts +11 -2
  239. package/types/phaser/geom/rounded_rectangle.d.ts.map +1 -1
  240. package/types/phaser/geom/util/circle.d.ts +42 -33
  241. package/types/phaser/geom/util/circle.d.ts.map +1 -1
  242. package/types/phaser/geom/util/ellipse.d.ts +7 -12
  243. package/types/phaser/geom/util/ellipse.d.ts.map +1 -1
  244. package/types/phaser/geom/util/line.d.ts +30 -23
  245. package/types/phaser/geom/util/line.d.ts.map +1 -1
  246. package/types/phaser/geom/util/matrix.d.ts +12 -10
  247. package/types/phaser/geom/util/matrix.d.ts.map +1 -1
  248. package/types/phaser/geom/util/point.d.ts +118 -96
  249. package/types/phaser/geom/util/point.d.ts.map +1 -1
  250. package/types/phaser/geom/util/polygon.d.ts +6 -11
  251. package/types/phaser/geom/util/polygon.d.ts.map +1 -1
  252. package/types/phaser/geom/util/rectangle.d.ts +91 -74
  253. package/types/phaser/geom/util/rectangle.d.ts.map +1 -1
  254. package/types/phaser/geom/util/rounded_rectangle.d.ts +6 -11
  255. package/types/phaser/geom/util/rounded_rectangle.d.ts.map +1 -1
  256. package/types/phaser/util/math.d.ts +89 -69
  257. package/types/phaser/util/math.d.ts.map +1 -1
  258. package/tsconfig.json +0 -110
@@ -1,11 +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
5
  * @author Mat Groves http://matgroves.com/ @Doormat23
5
- * @copyright Copyright (c) 2018-present Richard Davey, Photon Storm Ltd., Andras Csizmadia <andras@vpmedia.hu> (www.vpmedia.hu)
6
6
  */
7
- import GraphicsData from './graphics_data';
8
- import Point from '../../geom/point';
7
+ import { GraphicsData } from './graphics_data';
8
+ import { Point } from '../../geom/point';
9
9
  import {
10
10
  GEOM_CIRCLE,
11
11
  GEOM_ELLIPSE,
@@ -17,9 +17,9 @@ import { hex2rgb } from '../../util/math';
17
17
  import { triangulate } from './earcut';
18
18
 
19
19
  /**
20
- * TBD
20
+ * TBD.
21
21
  *
22
- * @returns {number} TBD
22
+ * @returns {number} TBD.
23
23
  */
24
24
  export function getStencilBufferLimit() {
25
25
  if (!window.PhaserRegistry.stencilBufferLimit) {
@@ -29,9 +29,9 @@ export function getStencilBufferLimit() {
29
29
  }
30
30
 
31
31
  /**
32
- * TBD
32
+ * TBD.
33
33
  *
34
- * @returns {object[]} TBD
34
+ * @returns {object[]} TBD.
35
35
  */
36
36
  export function getGraphicsDataPool() {
37
37
  if (!window.PhaserRegistry.graphicsDataPool) {
@@ -42,9 +42,9 @@ export function getGraphicsDataPool() {
42
42
 
43
43
  /**
44
44
  *
45
- * @param {object} webGL TBD
46
- * @param {number} type TBD
47
- * @returns {object} TBD
45
+ * @param {object} webGL - TBD.
46
+ * @param {number} type - TBD.
47
+ * @returns {object} TBD.
48
48
  */
49
49
  export function switchMode(webGL, type) {
50
50
  let webGLData;
@@ -66,8 +66,8 @@ export function switchMode(webGL, type) {
66
66
 
67
67
  /**
68
68
  *
69
- * @param {object} graphicsData TBD
70
- * @param {object} webGLData TBD
69
+ * @param {object} graphicsData - TBD.
70
+ * @param {object} webGLData - TBD.
71
71
  */
72
72
  export function buildLine(graphicsData, webGLData) {
73
73
  // TODO OPTIMISE!
@@ -231,8 +231,8 @@ export function buildLine(graphicsData, webGLData) {
231
231
 
232
232
  /**
233
233
  *
234
- * @param {object} graphicsData TBD
235
- * @param {object} webGLData TBD
234
+ * @param {object} graphicsData - TBD.
235
+ * @param {object} webGLData - TBD.
236
236
  */
237
237
  export function buildRectangle(graphicsData, webGLData) {
238
238
  //
@@ -275,13 +275,13 @@ export function buildRectangle(graphicsData, webGLData) {
275
275
 
276
276
  /**
277
277
  *
278
- * @param {number} fromX TBD
279
- * @param {number} fromY TBD
280
- * @param {number} cpX TBD
281
- * @param {number} cpY TBD
282
- * @param {number} toX TBD
283
- * @param {number} toY TBD
284
- * @returns {number[]} TBD
278
+ * @param {number} fromX - TBD.
279
+ * @param {number} fromY - TBD.
280
+ * @param {number} cpX - TBD.
281
+ * @param {number} cpY - TBD.
282
+ * @param {number} toX - TBD.
283
+ * @param {number} toY - TBD.
284
+ * @returns {number[]} TBD.
285
285
  */
286
286
  export function quadraticBezierCurve(fromX, fromY, cpX, cpY, toX, toY) {
287
287
  let xa;
@@ -314,8 +314,8 @@ export function quadraticBezierCurve(fromX, fromY, cpX, cpY, toX, toY) {
314
314
 
315
315
  /**
316
316
  *
317
- * @param {object} graphicsData TBD
318
- * @param {object} webGLData TBD
317
+ * @param {object} graphicsData - TBD.
318
+ * @param {object} webGLData - TBD.
319
319
  */
320
320
  export function buildRoundedRectangle(graphicsData, webGLData) {
321
321
  const rrectData = graphicsData.shape;
@@ -375,8 +375,8 @@ export function buildRoundedRectangle(graphicsData, webGLData) {
375
375
 
376
376
  /**
377
377
  *
378
- * @param {object} graphicsData TBD
379
- * @param {object} webGLData TBD
378
+ * @param {object} graphicsData - TBD.
379
+ * @param {object} webGLData - TBD.
380
380
  */
381
381
  export function buildCircle(graphicsData, webGLData) {
382
382
  // need to convert points to a nice regular data
@@ -426,8 +426,8 @@ export function buildCircle(graphicsData, webGLData) {
426
426
 
427
427
  /**
428
428
  *
429
- * @param {object} graphicsData TBD
430
- * @param {object} webGLData TBD
429
+ * @param {object} graphicsData - TBD.
430
+ * @param {object} webGLData - TBD.
431
431
  */
432
432
  export function buildComplexPoly(graphicsData, webGLData) {
433
433
  // TODO - no need to copy this as it gets turned into a Float32Array anyways..
@@ -470,9 +470,9 @@ export function buildComplexPoly(graphicsData, webGLData) {
470
470
 
471
471
  /**
472
472
  *
473
- * @param {object} graphicsData TBD
474
- * @param {object} webGLData TBD
475
- * @returns {boolean} TBD
473
+ * @param {object} graphicsData - TBD.
474
+ * @param {object} webGLData - TBD.
475
+ * @returns {boolean} TBD.
476
476
  */
477
477
  export function buildPoly(graphicsData, webGLData) {
478
478
  const points = graphicsData.points;
@@ -509,8 +509,8 @@ export function buildPoly(graphicsData, webGLData) {
509
509
 
510
510
  /**
511
511
  *
512
- * @param {object} graphics TBD
513
- * @param {object} gl TBD
512
+ * @param {object} graphics - TBD.
513
+ * @param {object} gl - TBD.
514
514
  */
515
515
  export function updateGraphics(graphics, gl) {
516
516
  const stencilBufferLimit = getStencilBufferLimit();
@@ -598,8 +598,8 @@ export function updateGraphics(graphics, gl) {
598
598
 
599
599
  /**
600
600
  *
601
- * @param {object} graphics TBD
602
- * @param {object} renderSession TBD
601
+ * @param {object} graphics - TBD.
602
+ * @param {object} renderSession - TBD.
603
603
  */
604
604
  export function renderGraphics(graphics, renderSession) {
605
605
  const gl = renderSession.gl;
@@ -1,11 +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
5
  * @author Mat Groves http://matgroves.com/ @Doormat23
5
- * @copyright Copyright (c) 2018-present Richard Davey, Photon Storm Ltd., Andras Csizmadia <andras@vpmedia.hu> (www.vpmedia.hu)
6
6
  */
7
7
 
8
- export default class {
8
+ export class GraphicsData {
9
9
  constructor(gl) {
10
10
  this.gl = gl;
11
11
  // TODO does this need to be split before uploading??
@@ -1,15 +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
5
  * @author Mat Groves http://matgroves.com/ @Doormat23
5
- * @copyright Copyright (c) 2018-present Richard Davey, Photon Storm Ltd., Andras Csizmadia <andras@vpmedia.hu> (www.vpmedia.hu)
6
6
  */
7
7
  import { updateGraphics } from './graphics';
8
8
 
9
9
  /**
10
+ * TBD.
10
11
  *
11
- * @param {object} maskData TBD
12
- * @param {object} renderSession TBD
12
+ * @param {object} maskData - TBD.
13
+ * @param {object} renderSession - TBD.
13
14
  */
14
15
  export function pushMask(maskData, renderSession) {
15
16
  const gl = renderSession.gl;
@@ -27,9 +28,10 @@ export function pushMask(maskData, renderSession) {
27
28
  }
28
29
 
29
30
  /**
31
+ * TBD.
30
32
  *
31
- * @param {object} maskData TBD
32
- * @param {object} renderSession TBD
33
+ * @param {object} maskData - TBD.
34
+ * @param {object} renderSession - TBD.
33
35
  */
34
36
  export function popMask(maskData, renderSession) {
35
37
  const gl = renderSession.gl;
@@ -1,13 +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
5
  * @author Mat Groves http://matgroves.com/ @Doormat23
5
- * @copyright Copyright (c) 2018-present Richard Davey, Photon Storm Ltd., Andras Csizmadia <andras@vpmedia.hu> (www.vpmedia.hu)
6
6
  */
7
- import Rectangle from '../../geom/rectangle';
8
- import Point from '../../geom/point';
9
- import Texture from './texture';
10
- import BaseTexture from './base_texture';
7
+ import { Rectangle } from '../../geom/rectangle';
8
+ import { Point } from '../../geom/point';
9
+ import { Texture } from './texture';
10
+ import { BaseTexture } from './base_texture';
11
11
  import FilterTexture from './filter_texture';
12
12
  import CanvasBuffer from '../canvas/buffer';
13
13
  import { RENDER_WEBGL } from '../../core/const';
@@ -1,8 +1,8 @@
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
5
  * @author Mat Groves http://matgroves.com/ @Doormat23
5
- * @copyright Copyright (c) 2018-present Richard Davey, Photon Storm Ltd., Andras Csizmadia <andras@vpmedia.hu> (www.vpmedia.hu)
6
6
  */
7
7
  import {
8
8
  RENDER_WEBGL,
@@ -27,7 +27,7 @@ import {
27
27
  } from '../../core/const';
28
28
  import { remove } from '../canvas/pool';
29
29
  import { isPowerOfTwo } from '../../util/math';
30
- import Point from '../../geom/point';
30
+ import { Point } from '../../geom/point';
31
31
  import WebGLShaderManager from './shader_manager';
32
32
  import WebGLSpriteBatch from './sprite_batch';
33
33
  import * as WebGLMaskManager from './mask_manager';
@@ -1,8 +1,8 @@
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
5
  * @author Mat Groves http://matgroves.com/ @Doormat23
5
- * @copyright Copyright (c) 2018-present Richard Davey, Photon Storm Ltd., Andras Csizmadia <andras@vpmedia.hu> (www.vpmedia.hu)
6
6
  */
7
7
  import { generateShaderID } from '../../../util/math';
8
8
  import { compileProgram } from '../util';
@@ -1,8 +1,8 @@
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
5
  * @author Mat Groves http://matgroves.com/ @Doormat23
5
- * @copyright Copyright (c) 2018-present Richard Davey, Photon Storm Ltd., Andras Csizmadia <andras@vpmedia.hu> (www.vpmedia.hu)
6
6
  */
7
7
  import { generateShaderID } from '../../../util/math';
8
8
  import { compileProgram } from '../util';
@@ -1,8 +1,8 @@
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
5
  * @author Mat Groves http://matgroves.com/ @Doormat23
5
- * @copyright Copyright (c) 2018-present Richard Davey, Photon Storm Ltd., Andras Csizmadia <andras@vpmedia.hu> (www.vpmedia.hu)
6
6
  */
7
7
  import { generateShaderID } from '../../../util/math';
8
8
  import { compileProgram } from '../util';
@@ -1,8 +1,8 @@
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
5
  * @author Mat Groves http://matgroves.com/ @Doormat23
5
- * @copyright Copyright (c) 2018-present Richard Davey, Photon Storm Ltd., Andras Csizmadia <andras@vpmedia.hu> (www.vpmedia.hu)
6
6
  */
7
7
  import { generateShaderID } from '../../../util/math';
8
8
  import { compileProgram } from '../util';
@@ -1,8 +1,8 @@
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
5
  * @author Mat Groves http://matgroves.com/ @Doormat23
5
- * @copyright Copyright (c) 2018-present Richard Davey, Photon Storm Ltd., Andras Csizmadia <andras@vpmedia.hu> (www.vpmedia.hu)
6
6
  */
7
7
  import { generateShaderID } from '../../../util/math';
8
8
  import { compileProgram } from '../util';
@@ -1,8 +1,8 @@
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
5
  * @author Mat Groves http://matgroves.com/ @Doormat23
5
- * @copyright Copyright (c) 2018-present Richard Davey, Photon Storm Ltd., Andras Csizmadia <andras@vpmedia.hu> (www.vpmedia.hu)
6
6
  */
7
7
  import PrimitiveShader from './shader/primitive';
8
8
  import ComplexPrimitiveShader from './shader/complex';
@@ -1,8 +1,8 @@
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
5
  * @author Mat Groves http://matgroves.com/ @Doormat23
5
- * @copyright Copyright (c) 2018-present Richard Davey, Photon Storm Ltd., Andras Csizmadia <andras@vpmedia.hu> (www.vpmedia.hu)
6
6
  */
7
7
  import AbstractFilter from './abstract_filter';
8
8
  import NormalShader from './shader/normal';
@@ -1,8 +1,8 @@
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
5
  * @author Mat Groves http://matgroves.com/ @Doormat23
5
- * @copyright Copyright (c) 2018-present Richard Davey, Photon Storm Ltd., Andras Csizmadia <andras@vpmedia.hu> (www.vpmedia.hu)
6
6
  */
7
7
  import { hex2rgb } from '../../util/math';
8
8
 
@@ -1,10 +1,11 @@
1
1
  /**
2
+ * @module display/webgl/texture
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
6
  * @author Mat Groves http://matgroves.com/ @Doormat23
5
- * @copyright Copyright (c) 2018-present Richard Davey, Photon Storm Ltd., Andras Csizmadia <andras@vpmedia.hu> (www.vpmedia.hu)
6
7
  */
7
- import Rectangle from '../../geom/rectangle';
8
+ import { Rectangle } from '../../geom/rectangle';
8
9
 
9
10
  export class TextureUvs {
10
11
  constructor() {
@@ -19,7 +20,7 @@ export class TextureUvs {
19
20
  }
20
21
  }
21
22
 
22
- export default class {
23
+ export class Texture {
23
24
  constructor(baseTexture, frame, crop, trim) {
24
25
  this.noFrame = false;
25
26
  if (!frame) {
@@ -1,17 +1,18 @@
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
5
  * @author Mat Groves http://matgroves.com/ @Doormat23
5
- * @copyright Copyright (c) 2018-present Richard Davey, Photon Storm Ltd., Andras Csizmadia <andras@vpmedia.hu> (www.vpmedia.hu)
6
6
  */
7
- import BaseTexture from './base_texture';
8
- import Texture from './texture';
7
+ import { BaseTexture } from './base_texture';
8
+ import { Texture } from './texture';
9
9
 
10
10
  /**
11
+ * TBD.
11
12
  *
12
- * @param {object} canvas TBD
13
- * @param {number} scaleMode TBD
14
- * @returns {object} TBD
13
+ * @param {HTMLCanvasElement} canvas - TBD.
14
+ * @param {number} scaleMode - TBD.
15
+ * @returns {object} TBD.
15
16
  */
16
17
  export function baseTextureFromCanvas(canvas, scaleMode) {
17
18
  if (canvas.width === 0) {
@@ -24,10 +25,11 @@ export function baseTextureFromCanvas(canvas, scaleMode) {
24
25
  }
25
26
 
26
27
  /**
28
+ * TBD.
27
29
  *
28
- * @param {object} canvas TBD
29
- * @param {number} scaleMode TBD
30
- * @returns {object} TBD
30
+ * @param {HTMLCanvasElement} canvas - TBD.
31
+ * @param {number} scaleMode - TBD.
32
+ * @returns {object} TBD.
31
33
  */
32
34
  export function textureFromCanvas(canvas, scaleMode) {
33
35
  return new Texture(baseTextureFromCanvas(canvas, scaleMode));
@@ -1,21 +1,22 @@
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
5
  * @author Mat Groves http://matgroves.com/ @Doormat23
5
- * @copyright Copyright (c) 2018-present Richard Davey, Photon Storm Ltd., Andras Csizmadia <andras@vpmedia.hu> (www.vpmedia.hu)
6
6
  */
7
7
 
8
8
  /**
9
- *
9
+ * TBD.
10
10
  */
11
11
  export function initDefaultShaders() {}
12
12
 
13
13
  /**
14
+ * TBD.
14
15
  *
15
- * @param {object} gl TBD
16
- * @param {string[]|string} shaderSrc TBD
17
- * @param {object} shaderType TBD
18
- * @returns {object} TBD
16
+ * @param {object} gl - TBD.
17
+ * @param {string[]|string} shaderSrc - TBD.
18
+ * @param {object} shaderType - TBD.
19
+ * @returns {object} TBD.
19
20
  */
20
21
  export function compileShader(gl, shaderSrc, shaderType) {
21
22
  let src = shaderSrc;
@@ -35,31 +36,34 @@ export function compileShader(gl, shaderSrc, shaderType) {
35
36
  }
36
37
 
37
38
  /**
39
+ * TBD.
38
40
  *
39
- * @param {object} gl TBD
40
- * @param {string[]|string} shaderSrc TBD
41
- * @returns {object} TBD
41
+ * @param {object} gl - TBD.
42
+ * @param {string[]|string} shaderSrc - TBD.
43
+ * @returns {object} TBD.
42
44
  */
43
45
  export function compileVertexShader(gl, shaderSrc) {
44
46
  return compileShader(gl, shaderSrc, gl.VERTEX_SHADER);
45
47
  }
46
48
 
47
49
  /**
50
+ * TBD.
48
51
  *
49
- * @param {object} gl TBD
50
- * @param {string[]|string} shaderSrc TBD
51
- * @returns {object} TBD
52
+ * @param {object} gl - TBD.
53
+ * @param {string[]|string} shaderSrc - TBD.
54
+ * @returns {object} TBD.
52
55
  */
53
56
  export function compileFragmentShader(gl, shaderSrc) {
54
57
  return compileShader(gl, shaderSrc, gl.FRAGMENT_SHADER);
55
58
  }
56
59
 
57
60
  /**
61
+ * TBD.
58
62
  *
59
- * @param {object} gl TBD
60
- * @param {string[]|string} vertexSrc TBD
61
- * @param {string[]|string} fragmentSrc TBD
62
- * @returns {object} TBD
63
+ * @param {object} gl - TBD.
64
+ * @param {string[]|string} vertexSrc - TBD.
65
+ * @param {string[]|string} fragmentSrc - TBD.
66
+ * @returns {object} TBD.
63
67
  */
64
68
  export function compileProgram(gl, vertexSrc, fragmentSrc) {
65
69
  const fragmentShader = compileFragmentShader(gl, fragmentSrc);
@@ -1,15 +1,23 @@
1
1
  /**
2
+ * @module geom/circle
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
- import Point from './point';
7
- import Rectangle from './rectangle';
7
+ import { Point } from './point';
8
+ import { Rectangle } from './rectangle';
8
9
  import { distance } from '../util/math';
9
10
  import { clone, contains, circumferencePoint } from './util/circle';
10
11
  import { GEOM_CIRCLE } from '../core/const';
11
12
 
12
- export default class {
13
+ export class Circle {
14
+ /**
15
+ * TBD.
16
+ *
17
+ * @param {number} x - TBD.
18
+ * @param {number} y - TBD.
19
+ * @param {number} diameter - TBD.
20
+ */
13
21
  constructor(x = 0, y = 0, diameter = 0) {
14
22
  this.x = x;
15
23
  this.y = y;
@@ -1,14 +1,23 @@
1
1
  /**
2
+ * @module geom/ellipse
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
- import Point from './point';
7
- import Rectangle from './rectangle';
7
+ import { Point } from './point';
8
+ import { Rectangle } from './rectangle';
8
9
  import { contains } from './util/ellipse';
9
10
  import { GEOM_ELLIPSE } from '../core/const';
10
11
 
11
- export default class {
12
+ export class Ellipse {
13
+ /**
14
+ * TBD.
15
+ *
16
+ * @param {number} x - TBD.
17
+ * @param {number} y - TBD.
18
+ * @param {number} width - TBD.
19
+ * @param {number} height - TBD.
20
+ */
12
21
  constructor(x = 0, y = 0, width = 0, height = 0) {
13
22
  this.x = x;
14
23
  this.y = y;
@@ -1,14 +1,23 @@
1
1
  /**
2
+ * @module geom/line
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
- import Point from './point';
7
+ import { Point } from './point';
7
8
  import { clone, intersectsPoints, reflect } from './util/line';
8
9
  import { wrap } from '../util/math';
9
10
  import { GEOM_LINE } from '../core/const';
10
11
 
11
- export default class {
12
+ export class Line {
13
+ /**
14
+ * TBD.
15
+ *
16
+ * @param {number} x1 - TBD.
17
+ * @param {number} y1 - TBD.
18
+ * @param {number} x2 - TBD.
19
+ * @param {number} y2 - TBD.
20
+ */
12
21
  constructor(x1 = 0, y1 = 0, x2 = 0, y2 = 0) {
13
22
  this.start = new Point(x1, y1);
14
23
  this.end = new Point(x2, y2);
@@ -1,13 +1,24 @@
1
1
  /**
2
+ * @module geom/matrix
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
- import Point from './point';
7
+ import { Point } from './point';
7
8
  import { clone } from './util/matrix';
8
9
  import { GEOM_MATRIX } from '../core/const';
9
10
 
10
- export default class {
11
+ export class Matrix {
12
+ /**
13
+ * TBD.
14
+ *
15
+ * @param {number} a - TBD.
16
+ * @param {number} b - TBD.
17
+ * @param {number} c - TBD.
18
+ * @param {number} d - TBD.
19
+ * @param {number} tx - TBD.
20
+ * @param {number} ty - TBD.
21
+ */
11
22
  constructor(a = 1, b = 0, c = 0, d = 1, tx = 0, ty = 0) {
12
23
  this.a = a;
13
24
  this.b = b;
@@ -1,12 +1,19 @@
1
1
  /**
2
+ * @module geom/point
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 { distance, rotate, clone } from './util/point';
7
8
  import { GEOM_POINT } from '../core/const';
8
9
 
9
- export default class {
10
+ export class Point {
11
+ /**
12
+ * TBD.
13
+ *
14
+ * @param {number} x - TBD.
15
+ * @param {number} y - TBD.
16
+ */
10
17
  constructor(x = 0, y = 0) {
11
18
  this.x = x;
12
19
  this.y = y;
@@ -1,13 +1,14 @@
1
1
  /**
2
+ * @module geom/polygon
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
- import Point from './point';
7
+ import { Point } from './point';
7
8
  import { clone } from './util/polygon';
8
9
  import { GEOM_POLYGON } from '../core/const';
9
10
 
10
- export default class {
11
+ export class Polygon {
11
12
  constructor(points = null) {
12
13
  this.area = 0;
13
14
  this._points = [];
@@ -1,9 +1,10 @@
1
1
  /**
2
+ * @module geom/rectangle
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
- import Point from './point';
7
+ import { Point } from './point';
7
8
  import {
8
9
  inflate,
9
10
  size,
@@ -29,7 +30,15 @@ import {
29
30
  BOTTOM_RIGHT,
30
31
  } from '../core/const';
31
32
 
32
- export default class {
33
+ export class Rectangle {
34
+ /**
35
+ * TBD.
36
+ *
37
+ * @param {number} x - TBD.
38
+ * @param {number} y - TBD.
39
+ * @param {number} width - TBD.
40
+ * @param {number} height - TBD.
41
+ */
33
42
  constructor(x = 0, y = 0, width = 0, height = 0) {
34
43
  this.x = x;
35
44
  this.y = y;