melonjs 10.2.2 → 10.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/melonjs.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * melonJS Game Engine - v10.2.2
2
+ * melonJS Game Engine - v10.2.3
3
3
  * http://www.melonjs.org
4
4
  * melonjs is licensed under the MIT License.
5
5
  * http://www.opensource.org/licenses/mit-license
@@ -16883,7 +16883,7 @@
16883
16883
  if (item.isFloating === true) {
16884
16884
  pos = viewport.localToWorld(bounds.left, bounds.top, QT_VECTOR);
16885
16885
  } else {
16886
- pos = QT_VECTOR.set(bounds.left, bounds.top);
16886
+ pos = QT_VECTOR.set(item.left, item.top);
16887
16887
  }
16888
16888
 
16889
16889
  var index = -1,
@@ -18595,9 +18595,10 @@
18595
18595
  Renderable.call(this, x, y, 100, 85);
18596
18596
 
18597
18597
  this.iconCanvas = createCanvas(
18598
- nextPowerOfTwo(this.width),
18599
- nextPowerOfTwo(this.height),
18600
- false);
18598
+ renderer.WebGLVersion > 1 ? this.width : nextPowerOfTwo(this.width),
18599
+ renderer.WebGLVersion > 1 ? this.height : nextPowerOfTwo(this.height),
18600
+ false
18601
+ );
18601
18602
 
18602
18603
  var context = renderer.getContext2d(this.iconCanvas);
18603
18604
 
@@ -18689,7 +18690,7 @@
18689
18690
  textAlign: "left",
18690
18691
  textBaseline : "top",
18691
18692
  text: "melon",
18692
- offScreenCanvas: true
18693
+ offScreenCanvas: renderer.WebGLVersion >= 1
18693
18694
  }
18694
18695
  );
18695
18696
  logo1.anchorPoint.set(0, 0);
@@ -18704,7 +18705,7 @@
18704
18705
  textBaseline : "top",
18705
18706
  bold: true,
18706
18707
  text: "JS",
18707
- offScreenCanvas: true
18708
+ offScreenCanvas: renderer.WebGLVersion >= 1
18708
18709
  }
18709
18710
  );
18710
18711
  logo2.anchorPoint.set(0, 0);
@@ -29243,15 +29244,6 @@
29243
29244
  // local reference
29244
29245
  var gl = renderer.gl;
29245
29246
 
29246
- /**
29247
- * The number of quads held in the batch
29248
- * @name length
29249
- * @memberOf me.WebGLCompositor
29250
- * @type {number}
29251
- * @readonly
29252
- */
29253
- //this.length = 0;
29254
-
29255
29247
  // list of active texture units
29256
29248
  this.currentTextureUnit = -1;
29257
29249
  this.boundTextures = [];
@@ -29349,9 +29341,9 @@
29349
29341
  for (var i = 0; i < this.renderer.maxTextures; i++) {
29350
29342
  var texture = this.boundTextures[i];
29351
29343
  if (texture !== null) {
29344
+ this.boundTextures[i] = null;
29352
29345
  this.gl.deleteTexture(texture);
29353
29346
  }
29354
- this.boundTextures[i] = null;
29355
29347
  }
29356
29348
  this.currentTextureUnit = -1;
29357
29349
 
@@ -31203,6 +31195,8 @@
31203
31195
  * @returns {HTMLCanvasElement|OffscreenCanvas}
31204
31196
  */
31205
31197
  function createCanvas(width, height, offscreen) {
31198
+ if ( offscreen === void 0 ) offscreen = false;
31199
+
31206
31200
  var _canvas;
31207
31201
 
31208
31202
  if (width === 0 || height === 0) {
@@ -31770,10 +31764,10 @@
31770
31764
  * this can be overridden by the plugin
31771
31765
  * @public
31772
31766
  * @type {string}
31773
- * @default "10.2.2"
31767
+ * @default "10.2.3"
31774
31768
  * @name me.plugin.Base#version
31775
31769
  */
31776
- this.version = "10.2.2";
31770
+ this.version = "10.2.3";
31777
31771
  };
31778
31772
 
31779
31773
  /**
@@ -36309,7 +36303,7 @@
36309
36303
  * @name version
36310
36304
  * @type {string}
36311
36305
  */
36312
- var version = "10.2.2";
36306
+ var version = "10.2.3";
36313
36307
 
36314
36308
 
36315
36309
  /**