@galacean/engine 1.1.0-beta.37 → 1.1.0-beta.39

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/browser.js CHANGED
@@ -6797,6 +6797,9 @@
6797
6797
  var baseline = Math.ceil(context.measureText(TextUtils._measureBaseline).width);
6798
6798
  var height = baseline * TextUtils._heightMultiplier;
6799
6799
  baseline = TextUtils._baselineMultiplier * baseline | 0;
6800
+ var _extendHeight = TextUtils._extendHeight;
6801
+ height += _extendHeight;
6802
+ baseline += _extendHeight * 0.5;
6800
6803
  canvas.width = width;
6801
6804
  canvas.height = height;
6802
6805
  context.font = fontString;
@@ -6831,6 +6834,7 @@
6831
6834
  }
6832
6835
  if (top !== -1 && bottom !== -1) {
6833
6836
  ascent = baseline - top;
6837
+ // Baseline belong to descent
6834
6838
  descent = bottom - baseline + 1;
6835
6839
  size = ascent + descent;
6836
6840
  }
@@ -6907,9 +6911,8 @@
6907
6911
  ];
6908
6912
  })();
6909
6913
  (function() {
6910
- // _heightMultiplier used to measure the height of text, but in miniprogram performance is different from h5.
6911
- // so can set _heightMultiplier to adapt miniprogram, the larger the value, the worse the performance.
6912
- /** @internal */ TextUtils._heightMultiplier = 2;
6914
+ // _extendHeight used to extend the height of canvas, because in miniprogram performance is different from h5.
6915
+ /** @internal */ TextUtils._extendHeight = 0;
6913
6916
  })();
6914
6917
  (function() {
6915
6918
  /** These characters are all tall to help calculate the height required for text. */ TextUtils._measureString = "|\xc9q\xc5";
@@ -6917,6 +6920,9 @@
6917
6920
  (function() {
6918
6921
  TextUtils._measureBaseline = "M";
6919
6922
  })();
6923
+ (function() {
6924
+ TextUtils._heightMultiplier = 2;
6925
+ })();
6920
6926
  (function() {
6921
6927
  TextUtils._baselineMultiplier = 1.4;
6922
6928
  })();
@@ -13130,7 +13136,7 @@
13130
13136
  _this._byteLength = byteLength;
13131
13137
  _this._platformBuffer = engine._hardwareRenderer.createPlatformBuffer(type, byteLength, bufferUsage, data);
13132
13138
  if (readable) {
13133
- var buffer = (data.constructor === ArrayBuffer ? data : data.buffer).slice(0, byteLength);
13139
+ var buffer = data.constructor === ArrayBuffer ? data.slice(0) : data.buffer.slice(data.byteOffset, data.byteOffset + byteLength);
13134
13140
  _this._data = new Uint8Array(buffer);
13135
13141
  }
13136
13142
  }
@@ -21013,6 +21019,7 @@
21013
21019
  this._pointers.length = 0;
21014
21020
  this._downList.length = 0;
21015
21021
  this._upList.length = 0;
21022
+ this._nativeEvents.length = 0;
21016
21023
  }
21017
21024
  };
21018
21025
  /**
@@ -44038,7 +44045,7 @@
44038
44045
  ], GALACEAN_animation_event);
44039
44046
 
44040
44047
  //@ts-ignore
44041
- var version = "1.1.0-beta.37";
44048
+ var version = "1.1.0-beta.39";
44042
44049
  console.log("Galacean engine version: " + version);
44043
44050
  for(var key in CoreObjects){
44044
44051
  Loader.registerClass(key, CoreObjects[key]);