@galacean/effects-threejs 1.1.0-alpha.3 → 1.1.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.mjs 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.1.0-alpha.3
6
+ * Version: v1.1.1
7
7
  */
8
8
 
9
9
  import * as THREE from 'three';
@@ -14933,6 +14933,11 @@ var VFXItem = /** @class */ (function () {
14933
14933
  }
14934
14934
  else if (this.endBehavior === END_BEHAVIOR_DESTROY$1) {
14935
14935
  this._contentVisible = false;
14936
+ // 预合成配置 reusable 且销毁时, 需要隐藏其中的元素
14937
+ if (this.type === ItemType$1.composition) {
14938
+ this.handleVisibleChanged(false);
14939
+ this.onItemUpdate(0, lifetime);
14940
+ }
14936
14941
  }
14937
14942
  lifetime = Math.min(lifetime, 1);
14938
14943
  }
@@ -15178,6 +15183,7 @@ var VFXItem = /** @class */ (function () {
15178
15183
  this.reset();
15179
15184
  this.onUpdate = function () { return -1; };
15180
15185
  this.composition = null;
15186
+ this._contentVisible = false;
15181
15187
  this.transform.setValid(false);
15182
15188
  }
15183
15189
  };
@@ -24148,13 +24154,6 @@ var ParticleVFXItem = /** @class */ (function (_super) {
24148
24154
  enumerable: false,
24149
24155
  configurable: true
24150
24156
  });
24151
- Object.defineProperty(ParticleVFXItem.prototype, "contentVisible", {
24152
- get: function () {
24153
- return !this.destroyed;
24154
- },
24155
- enumerable: false,
24156
- configurable: true
24157
- });
24158
24157
  ParticleVFXItem.prototype.onConstructed = function (props) {
24159
24158
  this.particle = props.content;
24160
24159
  };
@@ -24172,7 +24171,7 @@ var ParticleVFXItem = /** @class */ (function (_super) {
24172
24171
  ParticleVFXItem.prototype.onItemUpdate = function (dt, lifetime) {
24173
24172
  var _a;
24174
24173
  if (this.content) {
24175
- var hide = !this.visible;
24174
+ var hide = !this.contentVisible;
24176
24175
  var parentItem = this.parentId && ((_a = this.composition) === null || _a === void 0 ? void 0 : _a.getItemByID(this.parentId));
24177
24176
  if (!hide && parentItem) {
24178
24177
  var parentData = parentItem.getRenderData();
@@ -26234,9 +26233,9 @@ var TextVFXItem = /** @class */ (function (_super) {
26234
26233
  this.textContext = props.content;
26235
26234
  };
26236
26235
  TextVFXItem.prototype.onLifetimeBegin = function (composition, content) {
26237
- var _a;
26236
+ var _a, _b;
26238
26237
  content.active = true;
26239
- (_a = this.content) === null || _a === void 0 ? void 0 : _a.mesh.setItems([this.content]);
26238
+ (_b = (_a = this.content) === null || _a === void 0 ? void 0 : _a.mesh) === null || _b === void 0 ? void 0 : _b.setItems([this.content]);
26240
26239
  this.content.updateTexture();
26241
26240
  };
26242
26241
  TextVFXItem.prototype.onItemRemoved = function (composition, content) {
@@ -29945,7 +29944,7 @@ var CompVFXItem = /** @class */ (function (_super) {
29945
29944
  throw new Error("\u5F15\u7528\u7684Id: ".concat(refId, " \u7684\u9884\u5408\u6210\u4E0D\u5B58\u5728"));
29946
29945
  }
29947
29946
  props.content = itemProps.content;
29948
- item = new CompVFXItem(__assign$1(__assign$1({}, props), { refId: refId, id: itemProps.id, name: itemProps.name, duration: itemProps.duration, endBehavior: itemProps.endBehavior, parentId: itemProps.parentId, transform: itemProps.transform }), this.composition);
29947
+ 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);
29949
29948
  item.contentProps = itemProps.content;
29950
29949
  item.transform.parentTransform = this.transform;
29951
29950
  this.composition.refContent.push(item);
@@ -32753,9 +32752,9 @@ Geometry.create = function (engine, options) {
32753
32752
  Mesh.create = function (engine, props) {
32754
32753
  return new ThreeMesh(engine, props);
32755
32754
  };
32756
- var version = "1.1.0-alpha.3";
32755
+ var version = "1.1.1";
32757
32756
  console.info({
32758
- content: '[Galacean Effects THREEJS] version: ' + "1.1.0-alpha.3",
32757
+ content: '[Galacean Effects THREEJS] version: ' + "1.1.1",
32759
32758
  type: LOG_TYPE,
32760
32759
  });
32761
32760