@galacean/effects-threejs 1.4.0 → 1.4.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 +8 -10
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +4 -4
- package/dist/index.min.js.map +1 -1
- package/dist/index.mjs +8 -10
- 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.4.
|
|
6
|
+
* Version: v1.4.2
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
'use strict';
|
|
@@ -8219,19 +8219,19 @@ var BezierCurvePath = /** @class */ (function (_super) {
|
|
|
8219
8219
|
var perc = 0, point = new Vector3();
|
|
8220
8220
|
var keyTimeData = Object.keys(this.curveSegments);
|
|
8221
8221
|
if (!keyTimeData.length) {
|
|
8222
|
-
return point
|
|
8222
|
+
return point;
|
|
8223
8223
|
}
|
|
8224
8224
|
var keyTimeStart = Number(keyTimeData[0].split('&')[0]);
|
|
8225
8225
|
var keyTimeEnd = Number(keyTimeData[keyTimeData.length - 1].split('&')[1]);
|
|
8226
8226
|
if (t <= keyTimeStart) {
|
|
8227
8227
|
var pathCurve = this.curveSegments[keyTimeData[0]].pathCurve;
|
|
8228
8228
|
point = pathCurve.getPointInPercent(0);
|
|
8229
|
-
return point
|
|
8229
|
+
return point;
|
|
8230
8230
|
}
|
|
8231
8231
|
if (t >= keyTimeEnd) {
|
|
8232
8232
|
var pathCurve = this.curveSegments[keyTimeData[keyTimeData.length - 1]].pathCurve;
|
|
8233
8233
|
point = pathCurve.getPointInPercent(1);
|
|
8234
|
-
return point
|
|
8234
|
+
return point;
|
|
8235
8235
|
}
|
|
8236
8236
|
for (var i = 0; i < keyTimeData.length; i++) {
|
|
8237
8237
|
var _a = __read$3(keyTimeData[i].split('&'), 2), xMin = _a[0], xMax = _a[1];
|
|
@@ -8241,7 +8241,7 @@ var BezierCurvePath = /** @class */ (function (_super) {
|
|
|
8241
8241
|
point = bezierPath.getPointInPercent(perc);
|
|
8242
8242
|
}
|
|
8243
8243
|
}
|
|
8244
|
-
return point
|
|
8244
|
+
return point;
|
|
8245
8245
|
};
|
|
8246
8246
|
BezierCurvePath.prototype.getPercValue = function (curveKey, time) {
|
|
8247
8247
|
var curveInfo = this.curveSegments[curveKey];
|
|
@@ -8299,7 +8299,7 @@ var map$1 = (_a$5 = {},
|
|
|
8299
8299
|
},
|
|
8300
8300
|
_a$5[ValueType$1.BEZIER_CURVE_PATH] = function (props) {
|
|
8301
8301
|
if (props[0].length === 1) {
|
|
8302
|
-
return new StaticValue(new Vector3(
|
|
8302
|
+
return new StaticValue(new (Vector3.bind.apply(Vector3, __spreadArray$2([void 0], __read$3(props[1][0]), false)))());
|
|
8303
8303
|
}
|
|
8304
8304
|
return new BezierCurvePath(props);
|
|
8305
8305
|
},
|
|
@@ -9962,9 +9962,7 @@ var CameraController = /** @class */ (function () {
|
|
|
9962
9962
|
position.z += translateOverLifetime.z.getValue(lifetime);
|
|
9963
9963
|
if (translateOverLifetime.path) {
|
|
9964
9964
|
var val = translateOverLifetime.path.getValue(lifetime);
|
|
9965
|
-
position.
|
|
9966
|
-
position.y += val[1];
|
|
9967
|
-
position.z += val[2];
|
|
9965
|
+
position.add(val);
|
|
9968
9966
|
}
|
|
9969
9967
|
}
|
|
9970
9968
|
if (rotationOverLifetime) {
|
|
@@ -27403,7 +27401,7 @@ Geometry.create = function (engine, options) {
|
|
|
27403
27401
|
Mesh.create = function (engine, props) {
|
|
27404
27402
|
return new ThreeMesh(engine, props);
|
|
27405
27403
|
};
|
|
27406
|
-
var version = "1.4.
|
|
27404
|
+
var version = "1.4.2";
|
|
27407
27405
|
logger.info('THREEJS plugin version: ' + version);
|
|
27408
27406
|
|
|
27409
27407
|
exports.AbstractPlugin = AbstractPlugin;
|