@galacean/effects-core 1.6.1 → 1.6.2-beta.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.
- package/dist/index.js +7 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Description: Galacean Effects runtime core for the web
|
|
4
4
|
* Author: Ant Group CO., Ltd.
|
|
5
5
|
* Contributors: 燃然,飂兮,十弦,云垣,茂安,意绮
|
|
6
|
-
* Version: v1.6.
|
|
6
|
+
* Version: v1.6.2-beta.0
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
/******************************************************************************
|
|
@@ -20352,7 +20352,7 @@ var TextItem = /** @class */ (function (_super) {
|
|
|
20352
20352
|
_this.engine = vfxItem.composition.getEngine();
|
|
20353
20353
|
_this.textStyle = new TextStyle(options);
|
|
20354
20354
|
_this.textLayout = new TextLayout(options);
|
|
20355
|
-
_this.text = options.text;
|
|
20355
|
+
_this.text = options.text.toString();
|
|
20356
20356
|
_this.lineCount = _this.getLineCount(options.text, true);
|
|
20357
20357
|
// Text
|
|
20358
20358
|
_this.mesh = new TextMesh(_this.engine, _this.renderInfo, vfxItem.composition);
|
|
@@ -20429,7 +20429,7 @@ var TextItem = /** @class */ (function (_super) {
|
|
|
20429
20429
|
if (this.text === value) {
|
|
20430
20430
|
return;
|
|
20431
20431
|
}
|
|
20432
|
-
this.text = value;
|
|
20432
|
+
this.text = value.toString();
|
|
20433
20433
|
this.lineCount = this.getLineCount(value, false);
|
|
20434
20434
|
this.isDirty = true;
|
|
20435
20435
|
};
|
|
@@ -21772,11 +21772,13 @@ var Camera = /** @class */ (function () {
|
|
|
21772
21772
|
* @param z - 当前的位置 z
|
|
21773
21773
|
*/
|
|
21774
21774
|
Camera.prototype.getInverseVPRatio = function (z) {
|
|
21775
|
-
var pos = new Vector3(
|
|
21775
|
+
var pos = new Vector3(this.position.x, this.position.y, z);
|
|
21776
21776
|
var mat = this.getViewProjectionMatrix();
|
|
21777
21777
|
var inverseVP = this.getInverseViewProjectionMatrix();
|
|
21778
21778
|
var nz = mat.projectPoint(pos).z;
|
|
21779
|
-
|
|
21779
|
+
var _a = inverseVP.projectPoint(new Vector3(1, 1, nz)), xMax = _a.x, yMax = _a.y;
|
|
21780
|
+
var _b = inverseVP.projectPoint(new Vector3(-1, -1, nz)), xMin = _b.x, yMin = _b.y;
|
|
21781
|
+
return new Vector3((xMax - xMin) / 2, (yMax - yMin) / 2, 0);
|
|
21780
21782
|
};
|
|
21781
21783
|
/**
|
|
21782
21784
|
* 设置相机的旋转四元数
|