melonjs 10.2.1 → 10.2.2

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 (90) hide show
  1. package/README.md +1 -1
  2. package/dist/melonjs.js +2735 -2760
  3. package/dist/melonjs.min.js +3 -3
  4. package/dist/melonjs.module.d.ts +2186 -2162
  5. package/dist/melonjs.module.js +2323 -2362
  6. package/package.json +8 -9
  7. package/src/audio/audio.js +43 -43
  8. package/src/camera/camera2d.js +52 -74
  9. package/src/entity/draggable.js +18 -17
  10. package/src/entity/droptarget.js +19 -18
  11. package/src/entity/entity.js +22 -26
  12. package/src/game.js +2 -2
  13. package/src/index.js +11 -11
  14. package/src/input/gamepad.js +13 -13
  15. package/src/input/input.js +1 -1
  16. package/src/input/keyboard.js +14 -16
  17. package/src/input/pointer.js +42 -35
  18. package/src/input/pointerevent.js +18 -26
  19. package/src/lang/deprecated.js +3 -3
  20. package/src/level/level.js +24 -16
  21. package/src/level/tiled/TMXGroup.js +6 -6
  22. package/src/level/tiled/TMXLayer.js +31 -31
  23. package/src/level/tiled/TMXObject.js +19 -19
  24. package/src/level/tiled/TMXTile.js +11 -12
  25. package/src/level/tiled/TMXTileMap.js +23 -21
  26. package/src/level/tiled/TMXTileset.js +13 -13
  27. package/src/level/tiled/TMXTilesetGroup.js +4 -4
  28. package/src/level/tiled/TMXUtils.js +13 -11
  29. package/src/level/tiled/renderer/TMXHexagonalRenderer.js +1 -1
  30. package/src/level/tiled/renderer/TMXIsometricRenderer.js +1 -1
  31. package/src/level/tiled/renderer/TMXRenderer.js +17 -17
  32. package/src/loader/loader.js +29 -25
  33. package/src/math/color.js +45 -64
  34. package/src/math/math.js +17 -17
  35. package/src/math/matrix2.js +46 -46
  36. package/src/math/matrix3.js +64 -64
  37. package/src/math/observable_vector2.js +45 -57
  38. package/src/math/observable_vector3.js +56 -70
  39. package/src/math/vector2.js +60 -59
  40. package/src/math/vector3.js +65 -64
  41. package/src/particles/emitter.js +53 -55
  42. package/src/particles/particle.js +1 -1
  43. package/src/physics/body.js +44 -44
  44. package/src/physics/bounds.js +34 -34
  45. package/src/physics/collision.js +15 -16
  46. package/src/physics/detector.js +10 -10
  47. package/src/physics/quadtree.js +19 -17
  48. package/src/physics/sat.js +17 -17
  49. package/src/physics/world.js +12 -10
  50. package/src/plugin/plugin.js +6 -6
  51. package/src/renderable/GUI.js +13 -18
  52. package/src/renderable/collectable.js +3 -3
  53. package/src/renderable/colorlayer.js +4 -4
  54. package/src/renderable/container.js +64 -46
  55. package/src/renderable/imagelayer.js +30 -31
  56. package/src/renderable/nineslicesprite.js +13 -13
  57. package/src/renderable/renderable.js +68 -66
  58. package/src/renderable/sprite.js +57 -43
  59. package/src/renderable/trigger.js +14 -15
  60. package/src/shapes/ellipse.js +27 -26
  61. package/src/shapes/line.js +8 -7
  62. package/src/shapes/poly.js +33 -31
  63. package/src/shapes/rectangle.js +50 -96
  64. package/src/state/stage.js +6 -6
  65. package/src/state/state.js +54 -54
  66. package/src/system/device.js +97 -84
  67. package/src/system/event.js +72 -72
  68. package/src/system/pooling.js +14 -14
  69. package/src/system/save.js +6 -3
  70. package/src/system/timer.js +20 -20
  71. package/src/text/bitmaptext.js +27 -33
  72. package/src/text/bitmaptextdata.js +9 -9
  73. package/src/text/text.js +39 -41
  74. package/src/tweens/easing.js +4 -4
  75. package/src/tweens/interpolation.js +4 -4
  76. package/src/tweens/tween.js +37 -27
  77. package/src/utils/agent.js +9 -8
  78. package/src/utils/array.js +4 -4
  79. package/src/utils/file.js +4 -4
  80. package/src/utils/function.js +5 -5
  81. package/src/utils/string.js +12 -12
  82. package/src/utils/utils.js +19 -19
  83. package/src/video/canvas/canvas_renderer.js +90 -90
  84. package/src/video/renderer.js +40 -39
  85. package/src/video/texture.js +74 -75
  86. package/src/video/video.js +30 -30
  87. package/src/video/webgl/buffer/vertex.js +9 -1
  88. package/src/video/webgl/glshader.js +20 -20
  89. package/src/video/webgl/webgl_compositor.js +33 -34
  90. package/src/video/webgl/webgl_renderer.js +104 -104
@@ -18,19 +18,19 @@ import { isPowerOfTwo, nextPowerOfTwo, TAU } from "./../../math/math.js";
18
18
  * @extends me.Renderer
19
19
  * @memberOf me
20
20
  * @constructor
21
- * @param {Object} options The renderer parameters
22
- * @param {Number} options.width The width of the canvas without scaling
23
- * @param {Number} options.height The height of the canvas without scaling
21
+ * @param {object} options The renderer parameters
22
+ * @param {number} options.width The width of the canvas without scaling
23
+ * @param {number} options.height The height of the canvas without scaling
24
24
  * @param {HTMLCanvasElement} [options.canvas] The html canvas to draw to on screen
25
- * @param {Boolean} [options.doubleBuffering=false] Whether to enable double buffering
26
- * @param {Boolean} [options.antiAlias=false] Whether to enable anti-aliasing
27
- * @param {Boolean} [options.failIfMajorPerformanceCaveat=true] If true, the renderer will switch to CANVAS mode if the performances of a WebGL context would be dramatically lower than that of a native application making equivalent OpenGL calls.
28
- * @param {Boolean} [options.transparent=false] Whether to enable transparency on the canvas (performance hit when enabled)
29
- * @param {Boolean} [options.subPixel=false] Whether to enable subpixel renderering (performance hit when enabled)
30
- * @param {Boolean} [options.preferWebGL1=false] if true the renderer will only use WebGL 1
31
- * @param {String} [options.powerPreference="default"] a hint to the user agent indicating what configuration of GPU is suitable for the WebGL context ("default", "high-performance", "low-power"). To be noted that Safari and Chrome (since version 80) both default to "low-power" to save battery life and improve the user experience on these dual-GPU machines.
32
- * @param {Number} [options.zoomX=width] The actual width of the canvas with scaling applied
33
- * @param {Number} [options.zoomY=height] The actual height of the canvas with scaling applied
25
+ * @param {boolean} [options.doubleBuffering=false] Whether to enable double buffering
26
+ * @param {boolean} [options.antiAlias=false] Whether to enable anti-aliasing
27
+ * @param {boolean} [options.failIfMajorPerformanceCaveat=true] If true, the renderer will switch to CANVAS mode if the performances of a WebGL context would be dramatically lower than that of a native application making equivalent OpenGL calls.
28
+ * @param {boolean} [options.transparent=false] Whether to enable transparency on the canvas (performance hit when enabled)
29
+ * @param {boolean} [options.subPixel=false] Whether to enable subpixel renderering (performance hit when enabled)
30
+ * @param {boolean} [options.preferWebGL1=false] if true the renderer will only use WebGL 1
31
+ * @param {string} [options.powerPreference="default"] a hint to the user agent indicating what configuration of GPU is suitable for the WebGL context ("default", "high-performance", "low-power"). To be noted that Safari and Chrome (since version 80) both default to "low-power" to save battery life and improve the user experience on these dual-GPU machines.
32
+ * @param {number} [options.zoomX=width] The actual width of the canvas with scaling applied
33
+ * @param {number} [options.zoomY=height] The actual height of the canvas with scaling applied
34
34
  * @param {me.WebGLCompositor} [options.compositor] A class that implements the compositor API
35
35
  */
36
36
  class WebGLRenderer extends Renderer {
@@ -44,7 +44,7 @@ class WebGLRenderer extends Renderer {
44
44
  * The WebGL version used by this renderer (1 or 2)
45
45
  * @name WebGLVersion
46
46
  * @memberOf me.WebGLRenderer
47
- * @type {Number}
47
+ * @type {number}
48
48
  * @default 1
49
49
  * @readonly
50
50
  */
@@ -54,7 +54,7 @@ class WebGLRenderer extends Renderer {
54
54
  * The vendor string of the underlying graphics driver.
55
55
  * @name GPUVendor
56
56
  * @memberOf me.WebGLRenderer
57
- * @type {String}
57
+ * @type {string}
58
58
  * @default null
59
59
  * @readonly
60
60
  */
@@ -64,7 +64,7 @@ class WebGLRenderer extends Renderer {
64
64
  * The renderer string of the underlying graphics driver.
65
65
  * @name GPURenderer
66
66
  * @memberOf me.WebGLRenderer
67
- * @type {String}
67
+ * @type {string}
68
68
  * @default null
69
69
  * @readonly
70
70
  */
@@ -82,7 +82,7 @@ class WebGLRenderer extends Renderer {
82
82
  * Maximum number of texture unit supported under the current context
83
83
  * @name maxTextures
84
84
  * @memberOf me.WebGLRenderer
85
- * @type {Number}
85
+ * @type {number}
86
86
  * @readonly
87
87
  */
88
88
  this.maxTextures = this.gl.getParameter(this.gl.MAX_TEXTURE_IMAGE_UNITS);
@@ -115,7 +115,7 @@ class WebGLRenderer extends Renderer {
115
115
  /**
116
116
  * The current transformation matrix used for transformations on the overall scene
117
117
  * @name currentTransform
118
- * @type me.Matrix2d
118
+ * @type {me.Matrix2d}
119
119
  * @memberOf me.WebGLRenderer#
120
120
  */
121
121
  this.currentTransform = new Matrix2d();
@@ -123,7 +123,7 @@ class WebGLRenderer extends Renderer {
123
123
  /**
124
124
  * The current compositor used by the renderer
125
125
  * @name currentCompositor
126
- * @type me.WebGLCompositor
126
+ * @type {me.WebGLCompositor}
127
127
  * @memberOf me.WebGLRenderer#
128
128
  */
129
129
  this.currentCompositor = null;
@@ -258,9 +258,9 @@ class WebGLRenderer extends Renderer {
258
258
  * @name createPattern
259
259
  * @memberOf me.WebGLRenderer.prototype
260
260
  * @function
261
- * @param {image} image Source image
262
- * @param {String} repeat Define how the pattern should be repeated
263
- * @return {me.Renderer.Texture}
261
+ * @param {Image} image Source image
262
+ * @param {string} repeat Define how the pattern should be repeated
263
+ * @returns {me.Renderer.Texture}
264
264
  * @see me.ImageLayer#repeat
265
265
  * @example
266
266
  * var tileable = renderer.createPattern(image, "repeat");
@@ -301,19 +301,19 @@ class WebGLRenderer extends Renderer {
301
301
  * @name clearColor
302
302
  * @memberOf me.WebGLRenderer.prototype
303
303
  * @function
304
- * @param {me.Color|String} [color] CSS color.
305
- * @param {Boolean} [opaque=false] Allow transparency [default] or clear the surface completely [true]
304
+ * @param {me.Color|string} color CSS color.
305
+ * @param {boolean} [opaque=false] Allow transparency [default] or clear the surface completely [true]
306
306
  */
307
- clearColor(col, opaque) {
307
+ clearColor(color, opaque) {
308
308
  var glArray;
309
309
 
310
310
  this.save();
311
311
 
312
- if (col instanceof Color) {
313
- glArray = col.toArray();
312
+ if (color instanceof Color) {
313
+ glArray = color.toArray();
314
314
  } else {
315
315
  // reuse temporary the renderer default color object
316
- glArray = this.getColor().parseCSS(col).toArray();
316
+ glArray = this.getColor().parseCSS(color).toArray();
317
317
  }
318
318
 
319
319
  // clear gl context with the specified color
@@ -331,10 +331,10 @@ class WebGLRenderer extends Renderer {
331
331
  * @name clearRect
332
332
  * @memberOf me.WebGLRenderer.prototype
333
333
  * @function
334
- * @param {Number} x x axis of the coordinate for the rectangle starting point.
335
- * @param {Number} y y axis of the coordinate for the rectangle starting point.
336
- * @param {Number} width The rectangle's width.
337
- * @param {Number} height The rectangle's height.
334
+ * @param {number} x x axis of the coordinate for the rectangle starting point.
335
+ * @param {number} y y axis of the coordinate for the rectangle starting point.
336
+ * @param {number} width The rectangle's width.
337
+ * @param {number} height The rectangle's height.
338
338
  */
339
339
  clearRect(x, y, width, height) {
340
340
  var color = this.currentColor.clone();
@@ -383,14 +383,14 @@ class WebGLRenderer extends Renderer {
383
383
  * @memberOf me.WebGLRenderer.prototype
384
384
  * @function
385
385
  * @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.
386
- * @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.
387
- * @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.
388
- * @param {Number} sw The width of the sub-rectangle of the source image to draw into the destination context. If not specified, the entire rectangle from the coordinates specified by sx and sy to the bottom-right corner of the image is used.
389
- * @param {Number} sh The height of the sub-rectangle of the source image to draw into the destination context.
390
- * @param {Number} dx The X coordinate in the destination canvas at which to place the top-left corner of the source image.
391
- * @param {Number} dy The Y coordinate in the destination canvas at which to place the top-left corner of the source image.
392
- * @param {Number} dWidth The width to draw the image in the destination canvas. This allows scaling of the drawn image. If not specified, the image is not scaled in width when drawn.
393
- * @param {Number} dHeight The height to draw the image in the destination canvas. This allows scaling of the drawn image. If not specified, the image is not scaled in height when drawn.
386
+ * @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.
387
+ * @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.
388
+ * @param {number} sw The width of the sub-rectangle of the source image to draw into the destination context. If not specified, the entire rectangle from the coordinates specified by sx and sy to the bottom-right corner of the image is used.
389
+ * @param {number} sh The height of the sub-rectangle of the source image to draw into the destination context.
390
+ * @param {number} dx The X coordinate in the destination canvas at which to place the top-left corner of the source image.
391
+ * @param {number} dy The Y coordinate in the destination canvas at which to place the top-left corner of the source image.
392
+ * @param {number} dw The width to draw the image in the destination canvas. This allows scaling of the drawn image. If not specified, the image is not scaled in width when drawn.
393
+ * @param {number} dh The height to draw the image in the destination canvas. This allows scaling of the drawn image. If not specified, the image is not scaled in height when drawn.
394
394
  * @example
395
395
  * // Position the image on the canvas:
396
396
  * renderer.drawImage(image, dx, dy);
@@ -436,10 +436,10 @@ class WebGLRenderer extends Renderer {
436
436
  * @memberOf me.WebGLRenderer.prototype
437
437
  * @function
438
438
  * @param {me.Renderer.Texture} pattern Pattern object
439
- * @param {Number} x
440
- * @param {Number} y
441
- * @param {Number} width
442
- * @param {Number} height
439
+ * @param {number} x
440
+ * @param {number} y
441
+ * @param {number} width
442
+ * @param {number} height
443
443
  * @see me.WebGLRenderer#createPattern
444
444
  */
445
445
  drawPattern(pattern, x, y, width, height) {
@@ -453,7 +453,7 @@ class WebGLRenderer extends Renderer {
453
453
  * @name getScreenContext
454
454
  * @memberOf me.WebGLRenderer.prototype
455
455
  * @function
456
- * @return {WebGLRenderingContext}
456
+ * @returns {WebGLRenderingContext}
457
457
  */
458
458
  getScreenContext() {
459
459
  return this.gl;
@@ -464,9 +464,9 @@ class WebGLRenderer extends Renderer {
464
464
  * @name getContextGL
465
465
  * @memberOf me.WebGLRenderer.prototype
466
466
  * @function
467
- * @param {Canvas} canvas
468
- * @param {Boolean} [transparent=true] use false to disable transparency
469
- * @return {WebGLRenderingContext}
467
+ * @param {HTMLCanvasElement} canvas
468
+ * @param {boolean} [transparent=true] use false to disable transparency
469
+ * @returns {WebGLRenderingContext}
470
470
  */
471
471
  getContextGL(canvas, transparent) {
472
472
  if (typeof canvas === "undefined" || canvas === null) {
@@ -522,7 +522,7 @@ class WebGLRenderer extends Renderer {
522
522
  * @name getContext
523
523
  * @memberOf me.WebGLRenderer.prototype
524
524
  * @function
525
- * @return {WebGLRenderingContext}
525
+ * @returns {WebGLRenderingContext}
526
526
  */
527
527
  getContext() {
528
528
  return this.gl;
@@ -533,7 +533,7 @@ class WebGLRenderer extends Renderer {
533
533
  * @name setBlendMode
534
534
  * @memberOf me.WebGLRenderer.prototype
535
535
  * @function
536
- * @param {String} [mode="normal"] blend mode : "normal", "multiply"
536
+ * @param {string} [mode="normal"] blend mode : "normal", "multiply"
537
537
  * @param {WebGLRenderingContext} [gl]
538
538
  */
539
539
  setBlendMode(mode, gl) {
@@ -623,7 +623,7 @@ class WebGLRenderer extends Renderer {
623
623
  * @name rotate
624
624
  * @memberOf me.WebGLRenderer.prototype
625
625
  * @function
626
- * @param {Number} angle in radians
626
+ * @param {number} angle in radians
627
627
  */
628
628
  rotate(angle) {
629
629
  this.currentTransform.rotate(angle);
@@ -634,8 +634,8 @@ class WebGLRenderer extends Renderer {
634
634
  * @name scale
635
635
  * @memberOf me.WebGLRenderer.prototype
636
636
  * @function
637
- * @param {Number} x
638
- * @param {Number} y
637
+ * @param {number} x
638
+ * @param {number} y
639
639
  */
640
640
  scale(x, y) {
641
641
  this.currentTransform.scale(x, y);
@@ -655,10 +655,10 @@ class WebGLRenderer extends Renderer {
655
655
  * @name setGlobalAlpha
656
656
  * @memberOf me.WebGLRenderer.prototype
657
657
  * @function
658
- * @param {Number} alpha 0.0 to 1.0 values accepted.
658
+ * @param {number} alpha 0.0 to 1.0 values accepted.
659
659
  */
660
- setGlobalAlpha(a) {
661
- this.currentColor.alpha = a;
660
+ setGlobalAlpha(alpha) {
661
+ this.currentColor.alpha = alpha;
662
662
  }
663
663
 
664
664
  /**
@@ -667,7 +667,7 @@ class WebGLRenderer extends Renderer {
667
667
  * @name setColor
668
668
  * @memberOf me.WebGLRenderer.prototype
669
669
  * @function
670
- * @param {me.Color|String} color css color string.
670
+ * @param {me.Color|string} color css color string.
671
671
  */
672
672
  setColor(color) {
673
673
  var alpha = this.currentColor.alpha;
@@ -680,7 +680,7 @@ class WebGLRenderer extends Renderer {
680
680
  * @name setLineWidth
681
681
  * @memberOf me.WebGLRenderer.prototype
682
682
  * @function
683
- * @param {Number} width Line width
683
+ * @param {number} width Line width
684
684
  */
685
685
  setLineWidth(width) {
686
686
  this.getScreenContext().lineWidth(width);
@@ -691,13 +691,13 @@ class WebGLRenderer extends Renderer {
691
691
  * @name strokeArc
692
692
  * @memberOf me.WebGLRenderer.prototype
693
693
  * @function
694
- * @param {Number} x arc center point x-axis
695
- * @param {Number} y arc center point y-axis
696
- * @param {Number} radius
697
- * @param {Number} start start angle in radians
698
- * @param {Number} end end angle in radians
699
- * @param {Boolean} [antiClockwise=false] draw arc anti-clockwise
700
- * @param {Boolean} [fill=false]
694
+ * @param {number} x arc center point x-axis
695
+ * @param {number} y arc center point y-axis
696
+ * @param {number} radius
697
+ * @param {number} start start angle in radians
698
+ * @param {number} end end angle in radians
699
+ * @param {boolean} [antiClockwise=false] draw arc anti-clockwise
700
+ * @param {boolean} [fill=false]
701
701
  */
702
702
  strokeArc(x, y, radius, start, end, antiClockwise = false, fill) {
703
703
  if (fill === true ) {
@@ -735,12 +735,12 @@ class WebGLRenderer extends Renderer {
735
735
  * @name fillArc
736
736
  * @memberOf me.WebGLRenderer.prototype
737
737
  * @function
738
- * @param {Number} x arc center point x-axis
739
- * @param {Number} y arc center point y-axis
740
- * @param {Number} radius
741
- * @param {Number} start start angle in radians
742
- * @param {Number} end end angle in radians
743
- * @param {Boolean} [antiClockwise=false] draw arc anti-clockwise
738
+ * @param {number} x arc center point x-axis
739
+ * @param {number} y arc center point y-axis
740
+ * @param {number} radius
741
+ * @param {number} start start angle in radians
742
+ * @param {number} end end angle in radians
743
+ * @param {boolean} [antiClockwise=false] draw arc anti-clockwise
744
744
  */
745
745
  fillArc(x, y, radius, start, end /*, antiClockwise = false*/) {
746
746
  // XXX to be optimzed using a specific shader
@@ -778,11 +778,11 @@ class WebGLRenderer extends Renderer {
778
778
  * @name strokeEllipse
779
779
  * @memberOf me.WebGLRenderer.prototype
780
780
  * @function
781
- * @param {Number} x ellipse center point x-axis
782
- * @param {Number} y ellipse center point y-axis
783
- * @param {Number} w horizontal radius of the ellipse
784
- * @param {Number} h vertical radius of the ellipse
785
- * @param {Boolean} [fill=false] also fill the shape with the current color if true
781
+ * @param {number} x ellipse center point x-axis
782
+ * @param {number} y ellipse center point y-axis
783
+ * @param {number} w horizontal radius of the ellipse
784
+ * @param {number} h vertical radius of the ellipse
785
+ * @param {boolean} [fill=false] also fill the shape with the current color if true
786
786
  */
787
787
  strokeEllipse(x, y, w, h, fill = false) {
788
788
  if (fill === true ) {
@@ -815,10 +815,10 @@ class WebGLRenderer extends Renderer {
815
815
  * @name fillEllipse
816
816
  * @memberOf me.WebGLRenderer.prototype
817
817
  * @function
818
- * @param {Number} x ellipse center point x-axis
819
- * @param {Number} y ellipse center point y-axis
820
- * @param {Number} w horizontal radius of the ellipse
821
- * @param {Number} h vertical radius of the ellipse
818
+ * @param {number} x ellipse center point x-axis
819
+ * @param {number} y ellipse center point y-axis
820
+ * @param {number} w horizontal radius of the ellipse
821
+ * @param {number} h vertical radius of the ellipse
822
822
  */
823
823
  fillEllipse(x, y, w, h) {
824
824
  // XXX to be optimzed using a specific shader
@@ -850,10 +850,10 @@ class WebGLRenderer extends Renderer {
850
850
  * @name strokeLine
851
851
  * @memberOf me.WebGLRenderer.prototype
852
852
  * @function
853
- * @param {Number} startX the start x coordinate
854
- * @param {Number} startY the start y coordinate
855
- * @param {Number} endX the end x coordinate
856
- * @param {Number} endY the end y coordinate
853
+ * @param {number} startX the start x coordinate
854
+ * @param {number} startY the start y coordinate
855
+ * @param {number} endX the end x coordinate
856
+ * @param {number} endY the end y coordinate
857
857
  */
858
858
  strokeLine(startX, startY, endX, endY) {
859
859
  var points = this._glPoints;
@@ -870,10 +870,10 @@ class WebGLRenderer extends Renderer {
870
870
  * @name fillLine
871
871
  * @memberOf me.WebGLRenderer.prototype
872
872
  * @function
873
- * @param {Number} startX the start x coordinate
874
- * @param {Number} startY the start y coordinate
875
- * @param {Number} endX the end x coordinate
876
- * @param {Number} endY the end y coordinate
873
+ * @param {number} startX the start x coordinate
874
+ * @param {number} startY the start y coordinate
875
+ * @param {number} endX the end x coordinate
876
+ * @param {number} endY the end y coordinate
877
877
  */
878
878
  fillLine(startX, startY, endX, endY) {
879
879
  this.strokeLine(startX, startY, endX, endY);
@@ -885,7 +885,7 @@ class WebGLRenderer extends Renderer {
885
885
  * @memberOf me.WebGLRenderer.prototype
886
886
  * @function
887
887
  * @param {me.Polygon} poly the shape to draw
888
- * @param {Boolean} [fill=false] also fill the shape with the current color if true
888
+ * @param {boolean} [fill=false] also fill the shape with the current color if true
889
889
  */
890
890
  strokePolygon(poly, fill = false) {
891
891
  if (fill === true ) {
@@ -915,7 +915,7 @@ class WebGLRenderer extends Renderer {
915
915
  * @memberOf me.WebGLRenderer.prototype
916
916
  * @function
917
917
  * @param {me.Polygon} poly the shape to draw
918
- */
918
+ */
919
919
  fillPolygon(poly) {
920
920
  var points = poly.points;
921
921
  var glPoints = this._glPoints;
@@ -942,11 +942,11 @@ class WebGLRenderer extends Renderer {
942
942
  * @name strokeRect
943
943
  * @memberOf me.WebGLRenderer.prototype
944
944
  * @function
945
- * @param {Number} x
946
- * @param {Number} y
947
- * @param {Number} width
948
- * @param {Number} height
949
- * @param {Boolean} [fill=false] also fill the shape with the current color if true
945
+ * @param {number} x
946
+ * @param {number} y
947
+ * @param {number} width
948
+ * @param {number} height
949
+ * @param {boolean} [fill=false] also fill the shape with the current color if true
950
950
  */
951
951
  strokeRect(x, y, width, height, fill = false) {
952
952
  if (fill === true ) {
@@ -970,10 +970,10 @@ class WebGLRenderer extends Renderer {
970
970
  * @name fillRect
971
971
  * @memberOf me.WebGLRenderer.prototype
972
972
  * @function
973
- * @param {Number} x
974
- * @param {Number} y
975
- * @param {Number} width
976
- * @param {Number} height
973
+ * @param {number} x
974
+ * @param {number} y
975
+ * @param {number} width
976
+ * @param {number} height
977
977
  */
978
978
  fillRect(x, y, width, height) {
979
979
  var glPoints = this._glPoints;
@@ -1024,8 +1024,8 @@ class WebGLRenderer extends Renderer {
1024
1024
  * @name translate
1025
1025
  * @memberOf me.WebGLRenderer.prototype
1026
1026
  * @function
1027
- * @param {Number} x
1028
- * @param {Number} y
1027
+ * @param {number} x
1028
+ * @param {number} y
1029
1029
  */
1030
1030
  translate(x, y) {
1031
1031
  var currentTransform = this.currentTransform;
@@ -1047,10 +1047,10 @@ class WebGLRenderer extends Renderer {
1047
1047
  * @name clipRect
1048
1048
  * @memberOf me.WebGLRenderer.prototype
1049
1049
  * @function
1050
- * @param {Number} x
1051
- * @param {Number} y
1052
- * @param {Number} width
1053
- * @param {Number} height
1050
+ * @param {number} x
1051
+ * @param {number} y
1052
+ * @param {number} width
1053
+ * @param {number} height
1054
1054
  */
1055
1055
  clipRect(x, y, width, height) {
1056
1056
  var canvas = this.backBufferCanvas;