melonjs 10.10.0 → 10.11.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 (91) hide show
  1. package/README.md +4 -3
  2. package/dist/melonjs.js +817 -1922
  3. package/dist/melonjs.min.js +4 -4
  4. package/dist/melonjs.module.d.ts +339 -1183
  5. package/dist/melonjs.module.js +745 -1846
  6. package/package.json +12 -15
  7. package/src/audio/audio.js +0 -1
  8. package/src/camera/camera2d.js +1 -16
  9. package/src/entity/entity.js +1 -4
  10. package/src/geometries/ellipse.js +2 -11
  11. package/src/geometries/line.js +1 -4
  12. package/src/geometries/path2d.js +0 -10
  13. package/src/geometries/poly.js +5 -22
  14. package/src/geometries/rectangle.js +2 -14
  15. package/src/geometries/roundrect.js +2 -6
  16. package/src/index.js +0 -1
  17. package/src/input/gamepad.js +3 -14
  18. package/src/input/keyboard.js +1 -9
  19. package/src/input/pointer.js +0 -1
  20. package/src/input/pointerevent.js +14 -23
  21. package/src/lang/deprecated.js +4 -3
  22. package/src/level/level.js +0 -9
  23. package/src/level/tiled/TMXGroup.js +0 -4
  24. package/src/level/tiled/TMXLayer.js +0 -8
  25. package/src/level/tiled/TMXObject.js +0 -3
  26. package/src/level/tiled/TMXTile.js +4 -5
  27. package/src/level/tiled/TMXTileMap.js +1 -7
  28. package/src/level/tiled/TMXTileset.js +0 -5
  29. package/src/level/tiled/TMXTilesetGroup.js +1 -4
  30. package/src/level/tiled/TMXUtils.js +0 -3
  31. package/src/level/tiled/renderer/TMXHexagonalRenderer.js +2 -3
  32. package/src/level/tiled/renderer/TMXIsometricRenderer.js +0 -1
  33. package/src/level/tiled/renderer/TMXRenderer.js +1 -7
  34. package/src/loader/loader.js +0 -11
  35. package/src/loader/loadingscreen.js +1 -1
  36. package/src/math/color.js +5 -26
  37. package/src/math/math.js +0 -10
  38. package/src/math/matrix2.js +12 -27
  39. package/src/math/matrix3.js +1 -22
  40. package/src/math/observable_vector2.js +0 -29
  41. package/src/math/observable_vector3.js +0 -29
  42. package/src/math/vector2.js +3 -40
  43. package/src/math/vector3.js +4 -41
  44. package/src/particles/emitter.js +1 -1
  45. package/src/physics/body.js +1 -1
  46. package/src/physics/bounds.js +5 -19
  47. package/src/physics/collision.js +0 -1
  48. package/src/physics/detector.js +0 -4
  49. package/src/physics/quadtree.js +0 -7
  50. package/src/physics/sat.js +3 -3
  51. package/src/physics/world.js +0 -4
  52. package/src/plugin/plugin.js +0 -2
  53. package/src/polyfill/roundrect.js +4 -2
  54. package/src/renderable/GUI.js +0 -5
  55. package/src/renderable/collectable.js +1 -0
  56. package/src/renderable/container.js +0 -28
  57. package/src/renderable/dragndrop.js +0 -9
  58. package/src/renderable/imagelayer.js +1 -5
  59. package/src/renderable/light2d.js +1 -2
  60. package/src/renderable/renderable.js +0 -22
  61. package/src/renderable/sprite.js +0 -12
  62. package/src/renderable/trigger.js +1 -1
  63. package/src/state/stage.js +0 -4
  64. package/src/state/state.js +3 -20
  65. package/src/system/device.js +14 -53
  66. package/src/system/event.js +11 -0
  67. package/src/system/pooling.js +19 -8
  68. package/src/system/save.js +9 -11
  69. package/src/system/timer.js +239 -218
  70. package/src/text/bitmaptextdata.js +1 -4
  71. package/src/text/glyph.js +2 -2
  72. package/src/text/text.js +7 -5
  73. package/src/text/textmetrics.js +0 -2
  74. package/src/tweens/easing.js +1 -1
  75. package/src/tweens/interpolation.js +2 -2
  76. package/src/tweens/tween.js +1 -13
  77. package/src/utils/agent.js +1 -3
  78. package/src/utils/array.js +0 -3
  79. package/src/utils/file.js +0 -2
  80. package/src/utils/function.js +0 -2
  81. package/src/utils/string.js +0 -6
  82. package/src/utils/utils.js +0 -3
  83. package/src/video/canvas/canvas_renderer.js +4 -39
  84. package/src/video/renderer.js +1 -23
  85. package/src/video/texture/cache.js +0 -1
  86. package/src/video/texture/canvas_texture.js +16 -4
  87. package/src/video/video.js +3 -3
  88. package/src/video/webgl/glshader.js +0 -5
  89. package/src/video/webgl/utils/uniforms.js +3 -6
  90. package/src/video/webgl/webgl_compositor.js +0 -14
  91. package/src/video/webgl/webgl_renderer.js +0 -42
@@ -4,7 +4,7 @@ import { world, lastUpdate } from "./../game.js";
4
4
  import { Easing } from "./easing.js";
5
5
  import { Interpolation } from "./interpolation.js";
6
6
 
7
- /**
7
+ /*
8
8
  * Tween.js - Licensed under the MIT license
9
9
  * https://github.com/tweenjs/tween.js
10
10
  */
@@ -121,7 +121,6 @@ class Tween {
121
121
  * @name to
122
122
  * @memberof Tween
123
123
  * @public
124
- * @function
125
124
  * @param {object} properties hash of properties
126
125
  * @param {object|number} [options] object of tween properties, or a duration if a numeric value is passed
127
126
  * @param {number} [options.duration] tween duration
@@ -163,7 +162,6 @@ class Tween {
163
162
  * @name start
164
163
  * @memberof Tween
165
164
  * @public
166
- * @function
167
165
  * @param {number} [time] the current time when the tween was started
168
166
  * @returns {Tween} this instance for object chaining
169
167
  */
@@ -210,7 +208,6 @@ class Tween {
210
208
  * @name stop
211
209
  * @memberof Tween
212
210
  * @public
213
- * @function
214
211
  * @returns {Tween} this instance for object chaining
215
212
  */
216
213
  stop() {
@@ -224,7 +221,6 @@ class Tween {
224
221
  * @name delay
225
222
  * @memberof Tween
226
223
  * @public
227
- * @function
228
224
  * @param {number} amount delay amount expressed in milliseconds
229
225
  * @returns {Tween} this instance for object chaining
230
226
  */
@@ -240,7 +236,6 @@ class Tween {
240
236
  * @name repeat
241
237
  * @memberof Tween
242
238
  * @public
243
- * @function
244
239
  * @param {number} times amount of times the tween should be repeated
245
240
  * @returns {Tween} this instance for object chaining
246
241
  */
@@ -257,7 +252,6 @@ class Tween {
257
252
  * @name yoyo
258
253
  * @memberof Tween
259
254
  * @public
260
- * @function
261
255
  * @see Tween#repeat
262
256
  * @param {boolean} yoyo
263
257
  * @returns {Tween} this instance for object chaining
@@ -274,7 +268,6 @@ class Tween {
274
268
  * @name easing
275
269
  * @memberof Tween
276
270
  * @public
277
- * @function
278
271
  * @param {Tween.Easing} easing easing function
279
272
  * @returns {Tween} this instance for object chaining
280
273
  */
@@ -291,7 +284,6 @@ class Tween {
291
284
  * @name interpolation
292
285
  * @memberof Tween
293
286
  * @public
294
- * @function
295
287
  * @param {Tween.Interpolation} interpolation interpolation function
296
288
  * @returns {Tween} this instance for object chaining
297
289
  */
@@ -305,7 +297,6 @@ class Tween {
305
297
  * @name chain
306
298
  * @memberof Tween
307
299
  * @public
308
- * @function
309
300
  * @param {...Tween} chainedTween Tween(s) to be chained
310
301
  * @returns {Tween} this instance for object chaining
311
302
  */
@@ -319,7 +310,6 @@ class Tween {
319
310
  * @name onStart
320
311
  * @memberof Tween
321
312
  * @public
322
- * @function
323
313
  * @param {Function} onStartCallback callback
324
314
  * @returns {Tween} this instance for object chaining
325
315
  */
@@ -333,7 +323,6 @@ class Tween {
333
323
  * @name onUpdate
334
324
  * @memberof Tween
335
325
  * @public
336
- * @function
337
326
  * @param {Function} onUpdateCallback callback
338
327
  * @returns {Tween} this instance for object chaining
339
328
  */
@@ -347,7 +336,6 @@ class Tween {
347
336
  * @name onComplete
348
337
  * @memberof Tween
349
338
  * @public
350
- * @function
351
339
  * @param {Function} onCompleteCallback callback
352
340
  * @returns {Tween} this instance for object chaining
353
341
  */
@@ -9,13 +9,12 @@ import { capitalize } from "./string.js";
9
9
  * Known agent vendors
10
10
  * @ignore
11
11
  */
12
- var vendors = [ "ms", "MS", "moz", "webkit", "o" ];
12
+ const vendors = [ "ms", "MS", "moz", "webkit", "o" ];
13
13
 
14
14
  /**
15
15
  * Get a vendor-prefixed property
16
16
  * @public
17
17
  * @name prefixed
18
- * @function
19
18
  * @param {string} name Property name
20
19
  * @param {object} [obj=globalThis] Object or element reference to access
21
20
  * @returns {string} Value of property
@@ -41,7 +40,6 @@ export function prefixed(name, obj) {
41
40
  * Set a vendor-prefixed property
42
41
  * @public
43
42
  * @name setPrefixed
44
- * @function
45
43
  * @param {string} name Property name
46
44
  * @param {string} value Property value
47
45
  * @param {object} [obj=globalThis] Object or element reference to access
@@ -8,7 +8,6 @@ import {random as mathRandom, weightedRandom as mathWeightedRandom} from "./../m
8
8
  /**
9
9
  * Remove the specified object from the given Array
10
10
  * @public
11
- * @function
12
11
  * @memberof utils.array
13
12
  * @name remove
14
13
  * @param {Array} arr array from which to remove an object
@@ -29,7 +28,6 @@ export function remove(arr, obj) {
29
28
  /**
30
29
  * return a random array element
31
30
  * @public
32
- * @function
33
31
  * @memberof utils.array
34
32
  * @name random
35
33
  * @param {Array} arr array to pick a element
@@ -46,7 +44,6 @@ export function random(arr) {
46
44
  /**
47
45
  * return a weighted random array element, favoring the earlier entries
48
46
  * @public
49
- * @function
50
47
  * @memberof utils.array
51
48
  * @name weightedRandom
52
49
  * @param {Array} arr array to pick a element
package/src/utils/file.js CHANGED
@@ -12,7 +12,6 @@ const REMOVE_EXT = /\.[^\.]*$/;
12
12
  /**
13
13
  * return the base name of the file without path info
14
14
  * @public
15
- * @function
16
15
  * @memberof utils.file
17
16
  * @name getBasename
18
17
  * @param {string} path path containing the filename
@@ -25,7 +24,6 @@ export function getBasename(path) {
25
24
  /**
26
25
  * return the extension of the file in the given path
27
26
  * @public
28
- * @function
29
27
  * @memberof utils.file
30
28
  * @name getExtension
31
29
  * @param {string} path path containing the filename
@@ -6,7 +6,6 @@
6
6
  /**
7
7
  * Executes a function as soon as the interpreter is idle (stack empty).
8
8
  * @public
9
- * @function
10
9
  * @memberof utils.function
11
10
  * @name defer
12
11
  * @param {Function} func The function to be deferred.
@@ -27,7 +26,6 @@ export function defer(func, thisArg, ...args) {
27
26
  * returns a function that, when invoked will only be triggered at most
28
27
  * once during a given window of time
29
28
  * @public
30
- * @function
31
29
  * @memberof utils.function
32
30
  * @name throttle
33
31
  * @param {Function} fn the function to be throttled.
@@ -6,7 +6,6 @@
6
6
  /**
7
7
  * converts the first character of the given string to uppercase
8
8
  * @public
9
- * @function
10
9
  * @memberof utils.string
11
10
  * @name capitalize
12
11
  * @param {string} str the string to be capitalized
@@ -19,7 +18,6 @@ export function capitalize(str) {
19
18
  /**
20
19
  * returns the string stripped of whitespace from the left.
21
20
  * @public
22
- * @function
23
21
  * @memberof utils.string
24
22
  * @name trimLeft
25
23
  * @param {string} str the string to be trimmed
@@ -32,7 +30,6 @@ export function trimLeft(str) {
32
30
  /**
33
31
  * returns the string stripped of whitespace from the right.
34
32
  * @public
35
- * @function
36
33
  * @memberof utils.string
37
34
  * @name trimRight
38
35
  * @param {string} str the string to be trimmed
@@ -45,7 +42,6 @@ export function trimRight(str) {
45
42
  /**
46
43
  * returns true if the given string contains a numeric integer or float value
47
44
  * @public
48
- * @function
49
45
  * @memberof utils.string
50
46
  * @name isNumeric
51
47
  * @param {string} str the string to be tested
@@ -61,7 +57,6 @@ export function isNumeric(str) {
61
57
  /**
62
58
  * returns true if the given string contains a true or false
63
59
  * @public
64
- * @function
65
60
  * @memberof utils.string
66
61
  * @name isBoolean
67
62
  * @param {string} str the string to be tested
@@ -75,7 +70,6 @@ export function isBoolean(str) {
75
70
  /**
76
71
  * convert a string to the corresponding hexadecimal value
77
72
  * @public
78
- * @function
79
73
  * @memberof utils.string
80
74
  * @name toHex
81
75
  * @param {string} str the string to be converted
@@ -27,7 +27,6 @@ var utils = {
27
27
  /**
28
28
  * Get image pixels
29
29
  * @public
30
- * @function
31
30
  * @memberof utils
32
31
  * @name getPixels
33
32
  * @param {HTMLImageElement|HTMLCanvasElement} image Image to read
@@ -50,7 +49,6 @@ var utils = {
50
49
  /**
51
50
  * Compare two version strings
52
51
  * @public
53
- * @function
54
52
  * @memberof utils
55
53
  * @name checkVersion
56
54
  * @param {string} first First version string to compare
@@ -83,7 +81,6 @@ var utils = {
83
81
  /**
84
82
  * parse the fragment (hash) from a URL and returns them into
85
83
  * @public
86
- * @function
87
84
  * @memberof utils
88
85
  * @name getUriFragment
89
86
  * @param {string} [url=document.location] an optional params string or URL containing fragment (hash) params to be parsed
@@ -3,10 +3,10 @@ import Renderer from "./../renderer.js";
3
3
  import TextureCache from "./../texture/cache.js";
4
4
  import Ellipse from "./../../geometries/ellipse.js";
5
5
  import RoundRect from "./../../geometries/roundrect.js";
6
+ import Rect from "./../../geometries/rectangle.js";
6
7
  import Bounds from "./../../physics/bounds.js";
7
8
  import { createCanvas } from "./../video.js";
8
-
9
-
9
+ import * as event from "./../../system/event.js";
10
10
 
11
11
  /**
12
12
  * @classdesc
@@ -74,7 +74,6 @@ class CanvasRenderer extends Renderer {
74
74
  * Reset context state
75
75
  * @name reset
76
76
  * @memberof CanvasRenderer
77
- * @function
78
77
  */
79
78
  reset() {
80
79
  super.reset();
@@ -85,7 +84,6 @@ class CanvasRenderer extends Renderer {
85
84
  * Reset the canvas transform to identity
86
85
  * @name resetTransform
87
86
  * @memberof CanvasRenderer
88
- * @function
89
87
  */
90
88
  resetTransform() {
91
89
  this.backBufferContext2D.setTransform(1, 0, 0, 1, 0, 0);
@@ -105,7 +103,6 @@ class CanvasRenderer extends Renderer {
105
103
  * @name setBlendMode
106
104
  * @see https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/globalCompositeOperation
107
105
  * @memberof CanvasRenderer
108
- * @function
109
106
  * @param {string} [mode="normal"] blend mode : "normal", "multiply", "lighter, "additive", "screen"
110
107
  * @param {CanvasRenderingContext2D} [context]
111
108
  */
@@ -143,7 +140,6 @@ class CanvasRenderer extends Renderer {
143
140
  * prepare the framebuffer for drawing a new frame
144
141
  * @name clear
145
142
  * @memberof CanvasRenderer
146
- * @function
147
143
  */
148
144
  clear() {
149
145
  if (this.settings.transparent) {
@@ -155,7 +151,6 @@ class CanvasRenderer extends Renderer {
155
151
  * render the main framebuffer on screen
156
152
  * @name flush
157
153
  * @memberof CanvasRenderer
158
- * @function
159
154
  */
160
155
  flush() {
161
156
  if (this.settings.doubleBuffering) {
@@ -167,7 +162,6 @@ class CanvasRenderer extends Renderer {
167
162
  * Clears the main framebuffer with the given color
168
163
  * @name clearColor
169
164
  * @memberof CanvasRenderer
170
- * @function
171
165
  * @param {Color|string} [color="#000000"] CSS color.
172
166
  * @param {boolean} [opaque=false] Allow transparency [default] or clear the surface completely [true]
173
167
  */
@@ -184,7 +178,6 @@ class CanvasRenderer extends Renderer {
184
178
  * Erase the pixels in the given rectangular area by setting them to transparent black (rgba(0,0,0,0)).
185
179
  * @name clearRect
186
180
  * @memberof CanvasRenderer
187
- * @function
188
181
  * @param {number} x x axis of the coordinate for the rectangle starting point.
189
182
  * @param {number} y y axis of the coordinate for the rectangle starting point.
190
183
  * @param {number} width The rectangle's width.
@@ -198,7 +191,6 @@ class CanvasRenderer extends Renderer {
198
191
  * Create a pattern with the specified repetition
199
192
  * @name createPattern
200
193
  * @memberof CanvasRenderer
201
- * @function
202
194
  * @param {Image} image Source image
203
195
  * @param {string} repeat Define how the pattern should be repeated
204
196
  * @returns {CanvasPattern}
@@ -217,7 +209,6 @@ class CanvasRenderer extends Renderer {
217
209
  * Draw an image onto the main using the canvas api
218
210
  * @name drawImage
219
211
  * @memberof CanvasRenderer
220
- * @function
221
212
  * @param {Image} image An element to draw into the context. The specification permits any canvas image source (CanvasImageSource), specifically, a CSSImageValue, an HTMLImageElement, an SVGImageElement, an HTMLVideoElement, an HTMLCanvasElement, an ImageBitmap, or an OffscreenCanvas.
222
213
  * @param {number} sx The X coordinate of the top left corner of the sub-rectangle of the source image to draw into the destination context.
223
214
  * @param {number} sy The Y coordinate of the top left corner of the sub-rectangle of the source image to draw into the destination context.
@@ -281,7 +272,6 @@ class CanvasRenderer extends Renderer {
281
272
  * Draw a pattern within the given rectangle.
282
273
  * @name drawPattern
283
274
  * @memberof CanvasRenderer
284
- * @function
285
275
  * @param {CanvasPattern} pattern Pattern object
286
276
  * @param {number} x
287
277
  * @param {number} y
@@ -305,7 +295,6 @@ class CanvasRenderer extends Renderer {
305
295
  * Stroke an arc at the specified coordinates with given radius, start and end points
306
296
  * @name strokeArc
307
297
  * @memberof CanvasRenderer
308
- * @function
309
298
  * @param {number} x arc center point x-axis
310
299
  * @param {number} y arc center point y-axis
311
300
  * @param {number} radius
@@ -332,7 +321,6 @@ class CanvasRenderer extends Renderer {
332
321
  * Fill an arc at the specified coordinates with given radius, start and end points
333
322
  * @name fillArc
334
323
  * @memberof CanvasRenderer
335
- * @function
336
324
  * @param {number} x arc center point x-axis
337
325
  * @param {number} y arc center point y-axis
338
326
  * @param {number} radius
@@ -348,7 +336,6 @@ class CanvasRenderer extends Renderer {
348
336
  * Stroke an ellipse at the specified coordinates with given radius
349
337
  * @name strokeEllipse
350
338
  * @memberof CanvasRenderer
351
- * @function
352
339
  * @param {number} x ellipse center point x-axis
353
340
  * @param {number} y ellipse center point y-axis
354
341
  * @param {number} w horizontal radius of the ellipse
@@ -390,7 +377,6 @@ class CanvasRenderer extends Renderer {
390
377
  * Fill an ellipse at the specified coordinates with given radius
391
378
  * @name fillEllipse
392
379
  * @memberof CanvasRenderer
393
- * @function
394
380
  * @param {number} x ellipse center point x-axis
395
381
  * @param {number} y ellipse center point y-axis
396
382
  * @param {number} w horizontal radius of the ellipse
@@ -404,7 +390,6 @@ class CanvasRenderer extends Renderer {
404
390
  * Stroke a line of the given two points
405
391
  * @name strokeLine
406
392
  * @memberof CanvasRenderer
407
- * @function
408
393
  * @param {number} startX the start x coordinate
409
394
  * @param {number} startY the start y coordinate
410
395
  * @param {number} endX the end x coordinate
@@ -416,6 +401,8 @@ class CanvasRenderer extends Renderer {
416
401
  return;
417
402
  }
418
403
 
404
+ var context = this.getContext();
405
+
419
406
  context.beginPath();
420
407
  context.moveTo(startX, startY);
421
408
  context.lineTo(endX, endY);
@@ -426,7 +413,6 @@ class CanvasRenderer extends Renderer {
426
413
  * Fill a line of the given two points
427
414
  * @name fillLine
428
415
  * @memberof CanvasRenderer
429
- * @function
430
416
  * @param {number} startX the start x coordinate
431
417
  * @param {number} startY the start y coordinate
432
418
  * @param {number} endX the end x coordinate
@@ -440,7 +426,6 @@ class CanvasRenderer extends Renderer {
440
426
  * Stroke the given me.Polygon on the screen
441
427
  * @name strokePolygon
442
428
  * @memberof CanvasRenderer
443
- * @function
444
429
  * @param {Polygon} poly the shape to draw
445
430
  * @param {boolean} [fill=false] also fill the shape with the current color if true
446
431
  */
@@ -469,7 +454,6 @@ class CanvasRenderer extends Renderer {
469
454
  * Fill the given me.Polygon on the screen
470
455
  * @name fillPolygon
471
456
  * @memberof CanvasRenderer
472
- * @function
473
457
  * @param {Polygon} poly the shape to draw
474
458
  */
475
459
  fillPolygon(poly) {
@@ -480,7 +464,6 @@ class CanvasRenderer extends Renderer {
480
464
  * Stroke a rectangle at the specified coordinates
481
465
  * @name strokeRect
482
466
  * @memberof CanvasRenderer
483
- * @function
484
467
  * @param {number} x
485
468
  * @param {number} y
486
469
  * @param {number} width
@@ -501,7 +484,6 @@ class CanvasRenderer extends Renderer {
501
484
  * Draw a filled rectangle at the specified coordinates
502
485
  * @name fillRect
503
486
  * @memberof CanvasRenderer
504
- * @function
505
487
  * @param {number} x
506
488
  * @param {number} y
507
489
  * @param {number} width
@@ -515,7 +497,6 @@ class CanvasRenderer extends Renderer {
515
497
  * Stroke a rounded rectangle at the specified coordinates
516
498
  * @name strokeRoundRect
517
499
  * @memberof CanvasRenderer
518
- * @function
519
500
  * @param {number} x
520
501
  * @param {number} y
521
502
  * @param {number} width
@@ -539,7 +520,6 @@ class CanvasRenderer extends Renderer {
539
520
  * Draw a rounded filled rectangle at the specified coordinates
540
521
  * @name fillRoundRect
541
522
  * @memberof CanvasRenderer
542
- * @function
543
523
  * @param {number} x
544
524
  * @param {number} y
545
525
  * @param {number} width
@@ -555,7 +535,6 @@ class CanvasRenderer extends Renderer {
555
535
  * return a reference to the system 2d Context
556
536
  * @name getContext
557
537
  * @memberof CanvasRenderer
558
- * @function
559
538
  * @returns {CanvasRenderingContext2D}
560
539
  */
561
540
  getContext() {
@@ -575,7 +554,6 @@ class CanvasRenderer extends Renderer {
575
554
  * save the canvas context
576
555
  * @name save
577
556
  * @memberof CanvasRenderer
578
- * @function
579
557
  */
580
558
  save() {
581
559
  this.backBufferContext2D.save();
@@ -585,7 +563,6 @@ class CanvasRenderer extends Renderer {
585
563
  * restores the canvas context
586
564
  * @name restore
587
565
  * @memberof CanvasRenderer
588
- * @function
589
566
  */
590
567
  restore() {
591
568
  this.backBufferContext2D.restore();
@@ -600,7 +577,6 @@ class CanvasRenderer extends Renderer {
600
577
  * rotates the canvas context
601
578
  * @name rotate
602
579
  * @memberof CanvasRenderer
603
- * @function
604
580
  * @param {number} angle in radians
605
581
  */
606
582
  rotate(angle) {
@@ -611,7 +587,6 @@ class CanvasRenderer extends Renderer {
611
587
  * scales the canvas context
612
588
  * @name scale
613
589
  * @memberof CanvasRenderer
614
- * @function
615
590
  * @param {number} x
616
591
  * @param {number} y
617
592
  */
@@ -624,7 +599,6 @@ class CanvasRenderer extends Renderer {
624
599
  * By default, or upon reset, the value is set to #000000.
625
600
  * @name setColor
626
601
  * @memberof CanvasRenderer
627
- * @function
628
602
  * @param {Color|string} color css color value
629
603
  */
630
604
  setColor(color) {
@@ -640,7 +614,6 @@ class CanvasRenderer extends Renderer {
640
614
  * Set the global alpha
641
615
  * @name setGlobalAlpha
642
616
  * @memberof CanvasRenderer
643
- * @function
644
617
  * @param {number} alpha 0.0 to 1.0 values accepted.
645
618
  */
646
619
  setGlobalAlpha(alpha) {
@@ -651,7 +624,6 @@ class CanvasRenderer extends Renderer {
651
624
  * Return the global alpha
652
625
  * @name getGlobalAlpha
653
626
  * @memberof CanvasRenderer
654
- * @function
655
627
  * @returns {number} global alpha value
656
628
  */
657
629
  getGlobalAlpha() {
@@ -662,7 +634,6 @@ class CanvasRenderer extends Renderer {
662
634
  * Set the line width on the context
663
635
  * @name setLineWidth
664
636
  * @memberof CanvasRenderer
665
- * @function
666
637
  * @param {number} width Line width
667
638
  */
668
639
  setLineWidth(width) {
@@ -674,7 +645,6 @@ class CanvasRenderer extends Renderer {
674
645
  * identity one, and then apply the given transformation matrix.
675
646
  * @name setTransform
676
647
  * @memberof CanvasRenderer
677
- * @function
678
648
  * @param {Matrix2d} mat2d Matrix to transform by
679
649
  */
680
650
  setTransform(mat2d) {
@@ -686,7 +656,6 @@ class CanvasRenderer extends Renderer {
686
656
  * Multiply given matrix into the renderer tranformation matrix
687
657
  * @name transform
688
658
  * @memberof CanvasRenderer
689
- * @function
690
659
  * @param {Matrix2d} mat2d Matrix to transform by
691
660
  */
692
661
  transform(mat2d) {
@@ -710,7 +679,6 @@ class CanvasRenderer extends Renderer {
710
679
  * Translates the context to the given position
711
680
  * @name translate
712
681
  * @memberof CanvasRenderer
713
- * @function
714
682
  * @param {number} x
715
683
  * @param {number} y
716
684
  */
@@ -730,7 +698,6 @@ class CanvasRenderer extends Renderer {
730
698
  * (<u>this is an experimental feature !</u>)
731
699
  * @name clipRect
732
700
  * @memberof CanvasRenderer
733
- * @function
734
701
  * @param {number} x
735
702
  * @param {number} y
736
703
  * @param {number} width
@@ -763,7 +730,6 @@ class CanvasRenderer extends Renderer {
763
730
  * Mask are not preserved through renderer context save and restore.
764
731
  * @name setMask
765
732
  * @memberof CanvasRenderer
766
- * @function
767
733
  * @param {Rect|RoundRect|Polygon|Line|Ellipse} [mask] the shape defining the mask to be applied
768
734
  * @param {boolean} [invert=false] either the given shape should define what is visible (default) or the opposite
769
735
  */
@@ -829,7 +795,6 @@ class CanvasRenderer extends Renderer {
829
795
  * @name clearMask
830
796
  * @see CanvasRenderer#setMask
831
797
  * @memberof CanvasRenderer
832
- * @function
833
798
  */
834
799
  clearMask() {
835
800
  if (this.maskLevel > 0) {