@galacean/effects 1.6.1 → 1.6.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.
package/dist/alipay.js CHANGED
@@ -20350,7 +20350,7 @@ var TextItem = /** @class */ (function (_super) {
20350
20350
  _this.engine = vfxItem.composition.getEngine();
20351
20351
  _this.textStyle = new TextStyle(options);
20352
20352
  _this.textLayout = new TextLayout(options);
20353
- _this.text = options.text;
20353
+ _this.text = options.text.toString();
20354
20354
  _this.lineCount = _this.getLineCount(options.text, true);
20355
20355
  // Text
20356
20356
  _this.mesh = new TextMesh(_this.engine, _this.renderInfo, vfxItem.composition);
@@ -20427,7 +20427,7 @@ var TextItem = /** @class */ (function (_super) {
20427
20427
  if (this.text === value) {
20428
20428
  return;
20429
20429
  }
20430
- this.text = value;
20430
+ this.text = value.toString();
20431
20431
  this.lineCount = this.getLineCount(value, false);
20432
20432
  this.isDirty = true;
20433
20433
  };
@@ -21770,11 +21770,13 @@ var Camera = /** @class */ (function () {
21770
21770
  * @param z - 当前的位置 z
21771
21771
  */
21772
21772
  Camera.prototype.getInverseVPRatio = function (z) {
21773
- var pos = new Vector3(0, 0, z);
21773
+ var pos = new Vector3(this.position.x, this.position.y, z);
21774
21774
  var mat = this.getViewProjectionMatrix();
21775
21775
  var inverseVP = this.getInverseViewProjectionMatrix();
21776
21776
  var nz = mat.projectPoint(pos).z;
21777
- return inverseVP.projectPoint(new Vector3(1, 1, nz));
21777
+ var _a = inverseVP.projectPoint(new Vector3(1, 1, nz)), xMax = _a.x, yMax = _a.y;
21778
+ var _b = inverseVP.projectPoint(new Vector3(-1, -1, nz)), xMin = _b.x, yMin = _b.y;
21779
+ return new Vector3((xMax - xMin) / 2, (yMax - yMin) / 2, 0);
21778
21780
  };
21779
21781
  /**
21780
21782
  * 设置相机的旋转四元数
@@ -31032,7 +31034,7 @@ Renderer.create = function (canvas, framework, renderOptions) {
31032
31034
  Engine.create = function (gl) {
31033
31035
  return new GLEngine(gl);
31034
31036
  };
31035
- var version = "1.6.1";
31037
+ var version = "1.6.2";
31036
31038
  logger.info('player version: ' + version);
31037
31039
 
31038
31040
  exports.AbstractPlugin = AbstractPlugin;