@galacean/effects-core 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/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.js
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
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
'use strict';
|
|
@@ -20356,7 +20356,7 @@ var TextItem = /** @class */ (function (_super) {
|
|
|
20356
20356
|
_this.engine = vfxItem.composition.getEngine();
|
|
20357
20357
|
_this.textStyle = new TextStyle(options);
|
|
20358
20358
|
_this.textLayout = new TextLayout(options);
|
|
20359
|
-
_this.text = options.text;
|
|
20359
|
+
_this.text = options.text.toString();
|
|
20360
20360
|
_this.lineCount = _this.getLineCount(options.text, true);
|
|
20361
20361
|
// Text
|
|
20362
20362
|
_this.mesh = new TextMesh(_this.engine, _this.renderInfo, vfxItem.composition);
|
|
@@ -20433,7 +20433,7 @@ var TextItem = /** @class */ (function (_super) {
|
|
|
20433
20433
|
if (this.text === value) {
|
|
20434
20434
|
return;
|
|
20435
20435
|
}
|
|
20436
|
-
this.text = value;
|
|
20436
|
+
this.text = value.toString();
|
|
20437
20437
|
this.lineCount = this.getLineCount(value, false);
|
|
20438
20438
|
this.isDirty = true;
|
|
20439
20439
|
};
|
|
@@ -21776,11 +21776,13 @@ var Camera = /** @class */ (function () {
|
|
|
21776
21776
|
* @param z - 当前的位置 z
|
|
21777
21777
|
*/
|
|
21778
21778
|
Camera.prototype.getInverseVPRatio = function (z) {
|
|
21779
|
-
var pos = new Vector3(
|
|
21779
|
+
var pos = new Vector3(this.position.x, this.position.y, z);
|
|
21780
21780
|
var mat = this.getViewProjectionMatrix();
|
|
21781
21781
|
var inverseVP = this.getInverseViewProjectionMatrix();
|
|
21782
21782
|
var nz = mat.projectPoint(pos).z;
|
|
21783
|
-
|
|
21783
|
+
var _a = inverseVP.projectPoint(new Vector3(1, 1, nz)), xMax = _a.x, yMax = _a.y;
|
|
21784
|
+
var _b = inverseVP.projectPoint(new Vector3(-1, -1, nz)), xMin = _b.x, yMin = _b.y;
|
|
21785
|
+
return new Vector3((xMax - xMin) / 2, (yMax - yMin) / 2, 0);
|
|
21784
21786
|
};
|
|
21785
21787
|
/**
|
|
21786
21788
|
* 设置相机的旋转四元数
|