@galacean/effects-core 1.1.0 → 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.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.1.0
6
+ * Version: v1.1.1
7
7
  */
8
8
 
9
9
  'use strict';
@@ -14935,6 +14935,11 @@ var VFXItem = /** @class */ (function () {
14935
14935
  }
14936
14936
  else if (this.endBehavior === END_BEHAVIOR_DESTROY$1) {
14937
14937
  this._contentVisible = false;
14938
+ // 预合成配置 reusable 且销毁时, 需要隐藏其中的元素
14939
+ if (this.type === ItemType$1.composition) {
14940
+ this.handleVisibleChanged(false);
14941
+ this.onItemUpdate(0, lifetime);
14942
+ }
14938
14943
  }
14939
14944
  lifetime = Math.min(lifetime, 1);
14940
14945
  }
@@ -15180,6 +15185,7 @@ var VFXItem = /** @class */ (function () {
15180
15185
  this.reset();
15181
15186
  this.onUpdate = function () { return -1; };
15182
15187
  this.composition = null;
15188
+ this._contentVisible = false;
15183
15189
  this.transform.setValid(false);
15184
15190
  }
15185
15191
  };
@@ -24150,13 +24156,6 @@ var ParticleVFXItem = /** @class */ (function (_super) {
24150
24156
  enumerable: false,
24151
24157
  configurable: true
24152
24158
  });
24153
- Object.defineProperty(ParticleVFXItem.prototype, "contentVisible", {
24154
- get: function () {
24155
- return !this.destroyed;
24156
- },
24157
- enumerable: false,
24158
- configurable: true
24159
- });
24160
24159
  ParticleVFXItem.prototype.onConstructed = function (props) {
24161
24160
  this.particle = props.content;
24162
24161
  };
@@ -24174,7 +24173,7 @@ var ParticleVFXItem = /** @class */ (function (_super) {
24174
24173
  ParticleVFXItem.prototype.onItemUpdate = function (dt, lifetime) {
24175
24174
  var _a;
24176
24175
  if (this.content) {
24177
- var hide = !this.visible;
24176
+ var hide = !this.contentVisible;
24178
24177
  var parentItem = this.parentId && ((_a = this.composition) === null || _a === void 0 ? void 0 : _a.getItemByID(this.parentId));
24179
24178
  if (!hide && parentItem) {
24180
24179
  var parentData = parentItem.getRenderData();
@@ -26236,9 +26235,9 @@ var TextVFXItem = /** @class */ (function (_super) {
26236
26235
  this.textContext = props.content;
26237
26236
  };
26238
26237
  TextVFXItem.prototype.onLifetimeBegin = function (composition, content) {
26239
- var _a;
26238
+ var _a, _b;
26240
26239
  content.active = true;
26241
- (_a = this.content) === null || _a === void 0 ? void 0 : _a.mesh.setItems([this.content]);
26240
+ (_b = (_a = this.content) === null || _a === void 0 ? void 0 : _a.mesh) === null || _b === void 0 ? void 0 : _b.setItems([this.content]);
26242
26241
  this.content.updateTexture();
26243
26242
  };
26244
26243
  TextVFXItem.prototype.onItemRemoved = function (composition, content) {
@@ -29947,7 +29946,7 @@ var CompVFXItem = /** @class */ (function (_super) {
29947
29946
  throw new Error("\u5F15\u7528\u7684Id: ".concat(refId, " \u7684\u9884\u5408\u6210\u4E0D\u5B58\u5728"));
29948
29947
  }
29949
29948
  props.content = itemProps.content;
29950
- 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);
29949
+ 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);
29951
29950
  item.contentProps = itemProps.content;
29952
29951
  item.transform.parentTransform = this.transform;
29953
29952
  this.composition.refContent.push(item);