@galacean/effects-threejs 1.4.0-beta.1 → 1.4.1

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 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.0-beta.1
6
+ * Version: v1.4.1
7
7
  */
8
8
 
9
9
  'use strict';
@@ -708,7 +708,7 @@ function asserts(condition, msg) {
708
708
  * Name: @galacean/effects-specification
709
709
  * Description: Galacean Effects JSON Specification
710
710
  * Author: Ant Group CO., Ltd.
711
- * Version: v1.2.0-beta.0
711
+ * Version: v1.2.0
712
712
  */
713
713
 
714
714
  /*********************************************/
@@ -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(props[0][0][1][1], props[1][0][1][1], props[2][0][1][1]));
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.x += val[0];
9966
- position.y += val[1];
9967
- position.z += val[2];
9965
+ position.add(val);
9968
9966
  }
9969
9967
  }
9970
9968
  if (rotationOverLifetime) {
@@ -21890,7 +21888,7 @@ var filters = {
21890
21888
  * Name: @galacean/effects-specification
21891
21889
  * Description: Galacean Effects JSON Specification
21892
21890
  * Author: Ant Group CO., Ltd.
21893
- * Version: v1.2.0-beta.0
21891
+ * Version: v1.2.0
21894
21892
  */
21895
21893
 
21896
21894
  /*********************************************/
@@ -23379,6 +23377,9 @@ function version24Migration(json) {
23379
23377
  }
23380
23378
  function convertParam(content) {
23381
23379
  var e_2, _a;
23380
+ if (!content) {
23381
+ return;
23382
+ }
23382
23383
  try {
23383
23384
  for (var _b = __values(Object.keys(content)), _c = _b.next(); !_c.done; _c = _b.next()) {
23384
23385
  var key = _c.value;
@@ -24549,18 +24550,14 @@ var CompVFXItem = /** @class */ (function (_super) {
24549
24550
  // 设置预合成作为元素时的时长、结束行为和渲染延时
24550
24551
  if (exports.Item.isComposition(itemProps)) {
24551
24552
  var refId = itemProps.content.options.refId;
24552
- var props = this.composition.refCompositionProps.get(refId);
24553
- if (!props) {
24554
- throw new Error("\u5F15\u7528\u7684Id: ".concat(refId, " \u7684\u9884\u5408\u6210\u4E0D\u5B58\u5728"));
24555
- }
24556
- props.content = itemProps.content;
24557
- item = new CompVFXItem(__assign$1(__assign$1({}, props), { refId: refId, delay: itemProps.delay, id: itemProps.id, name: itemProps.name, duration: itemProps.duration, endBehavior: itemProps.endBehavior, parentId: itemProps.parentId, transform: itemProps.transform }), this.composition);
24553
+ item = new CompVFXItem(__assign$1({ refId: refId }, itemProps), this.composition);
24558
24554
  item.contentProps = itemProps.content;
24559
24555
  item.transform.parentTransform = this.transform;
24560
24556
  this.composition.refContent.push(item);
24561
24557
  if (item.endBehavior === END_BEHAVIOR_RESTART$1) {
24562
24558
  this.composition.autoRefTex = false;
24563
24559
  }
24560
+ item.createContent();
24564
24561
  }
24565
24562
  else {
24566
24563
  item = createVFXItem(this.itemProps[i], this.composition);
@@ -24692,6 +24689,17 @@ var CompVFXItem = /** @class */ (function (_super) {
24692
24689
  CompVFXItem.prototype.handleVisibleChanged = function (visible) {
24693
24690
  this.items.forEach(function (item) { return item.setVisible(visible); });
24694
24691
  };
24692
+ CompVFXItem.prototype.setScale = function (x, y, z) {
24693
+ if (this.content) {
24694
+ this.content.startSize = new Vector3(x, y, z);
24695
+ }
24696
+ };
24697
+ CompVFXItem.prototype.scale = function (x, y, z) {
24698
+ if (this.content) {
24699
+ var startSize = this.content.startSize.clone();
24700
+ this.content.startSize = new Vector3(x * startSize.x, y * startSize.y, z * startSize.z);
24701
+ }
24702
+ };
24695
24703
  CompVFXItem.prototype.getUpdateTime = function (t) {
24696
24704
  var startTime = this.startTimeInms;
24697
24705
  var now = this.timeInms;
@@ -27393,7 +27401,7 @@ Geometry.create = function (engine, options) {
27393
27401
  Mesh.create = function (engine, props) {
27394
27402
  return new ThreeMesh(engine, props);
27395
27403
  };
27396
- var version = "1.4.0-beta.1";
27404
+ var version = "1.4.1";
27397
27405
  logger.info('THREEJS plugin version: ' + version);
27398
27406
 
27399
27407
  exports.AbstractPlugin = AbstractPlugin;