@galacean/effects-threejs 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 +8 -6
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +3 -3
- package/dist/index.min.js.map +1 -1
- package/dist/index.mjs +8 -6
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Description: Galacean Effects runtime threejs plugin 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
|
'use strict';
|
|
@@ -20378,7 +20378,7 @@ var TextItem = /** @class */ (function (_super) {
|
|
|
20378
20378
|
_this.engine = vfxItem.composition.getEngine();
|
|
20379
20379
|
_this.textStyle = new TextStyle(options);
|
|
20380
20380
|
_this.textLayout = new TextLayout(options);
|
|
20381
|
-
_this.text = options.text;
|
|
20381
|
+
_this.text = options.text.toString();
|
|
20382
20382
|
_this.lineCount = _this.getLineCount(options.text, true);
|
|
20383
20383
|
// Text
|
|
20384
20384
|
_this.mesh = new TextMesh(_this.engine, _this.renderInfo, vfxItem.composition);
|
|
@@ -20455,7 +20455,7 @@ var TextItem = /** @class */ (function (_super) {
|
|
|
20455
20455
|
if (this.text === value) {
|
|
20456
20456
|
return;
|
|
20457
20457
|
}
|
|
20458
|
-
this.text = value;
|
|
20458
|
+
this.text = value.toString();
|
|
20459
20459
|
this.lineCount = this.getLineCount(value, false);
|
|
20460
20460
|
this.isDirty = true;
|
|
20461
20461
|
};
|
|
@@ -21798,11 +21798,13 @@ var Camera = /** @class */ (function () {
|
|
|
21798
21798
|
* @param z - 当前的位置 z
|
|
21799
21799
|
*/
|
|
21800
21800
|
Camera.prototype.getInverseVPRatio = function (z) {
|
|
21801
|
-
var pos = new Vector3(
|
|
21801
|
+
var pos = new Vector3(this.position.x, this.position.y, z);
|
|
21802
21802
|
var mat = this.getViewProjectionMatrix();
|
|
21803
21803
|
var inverseVP = this.getInverseViewProjectionMatrix();
|
|
21804
21804
|
var nz = mat.projectPoint(pos).z;
|
|
21805
|
-
|
|
21805
|
+
var _a = inverseVP.projectPoint(new Vector3(1, 1, nz)), xMax = _a.x, yMax = _a.y;
|
|
21806
|
+
var _b = inverseVP.projectPoint(new Vector3(-1, -1, nz)), xMin = _b.x, yMin = _b.y;
|
|
21807
|
+
return new Vector3((xMax - xMin) / 2, (yMax - yMin) / 2, 0);
|
|
21806
21808
|
};
|
|
21807
21809
|
/**
|
|
21808
21810
|
* 设置相机的旋转四元数
|
|
@@ -27518,7 +27520,7 @@ Geometry.create = function (engine, options) {
|
|
|
27518
27520
|
Mesh.create = function (engine, props) {
|
|
27519
27521
|
return new ThreeMesh(engine, props);
|
|
27520
27522
|
};
|
|
27521
|
-
var version = "1.6.
|
|
27523
|
+
var version = "1.6.2-beta.0";
|
|
27522
27524
|
logger.info('THREEJS plugin version: ' + version);
|
|
27523
27525
|
|
|
27524
27526
|
exports.AbstractPlugin = AbstractPlugin;
|