@galacean/effects-threejs 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 +13 -14
- 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 +13 -14
- 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.1.
|
|
6
|
+
* Version: v1.1.1
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
'use strict';
|
|
@@ -14957,6 +14957,11 @@ var VFXItem = /** @class */ (function () {
|
|
|
14957
14957
|
}
|
|
14958
14958
|
else if (this.endBehavior === END_BEHAVIOR_DESTROY$1) {
|
|
14959
14959
|
this._contentVisible = false;
|
|
14960
|
+
// 预合成配置 reusable 且销毁时, 需要隐藏其中的元素
|
|
14961
|
+
if (this.type === ItemType$1.composition) {
|
|
14962
|
+
this.handleVisibleChanged(false);
|
|
14963
|
+
this.onItemUpdate(0, lifetime);
|
|
14964
|
+
}
|
|
14960
14965
|
}
|
|
14961
14966
|
lifetime = Math.min(lifetime, 1);
|
|
14962
14967
|
}
|
|
@@ -15202,6 +15207,7 @@ var VFXItem = /** @class */ (function () {
|
|
|
15202
15207
|
this.reset();
|
|
15203
15208
|
this.onUpdate = function () { return -1; };
|
|
15204
15209
|
this.composition = null;
|
|
15210
|
+
this._contentVisible = false;
|
|
15205
15211
|
this.transform.setValid(false);
|
|
15206
15212
|
}
|
|
15207
15213
|
};
|
|
@@ -24172,13 +24178,6 @@ var ParticleVFXItem = /** @class */ (function (_super) {
|
|
|
24172
24178
|
enumerable: false,
|
|
24173
24179
|
configurable: true
|
|
24174
24180
|
});
|
|
24175
|
-
Object.defineProperty(ParticleVFXItem.prototype, "contentVisible", {
|
|
24176
|
-
get: function () {
|
|
24177
|
-
return !this.destroyed;
|
|
24178
|
-
},
|
|
24179
|
-
enumerable: false,
|
|
24180
|
-
configurable: true
|
|
24181
|
-
});
|
|
24182
24181
|
ParticleVFXItem.prototype.onConstructed = function (props) {
|
|
24183
24182
|
this.particle = props.content;
|
|
24184
24183
|
};
|
|
@@ -24196,7 +24195,7 @@ var ParticleVFXItem = /** @class */ (function (_super) {
|
|
|
24196
24195
|
ParticleVFXItem.prototype.onItemUpdate = function (dt, lifetime) {
|
|
24197
24196
|
var _a;
|
|
24198
24197
|
if (this.content) {
|
|
24199
|
-
var hide = !this.
|
|
24198
|
+
var hide = !this.contentVisible;
|
|
24200
24199
|
var parentItem = this.parentId && ((_a = this.composition) === null || _a === void 0 ? void 0 : _a.getItemByID(this.parentId));
|
|
24201
24200
|
if (!hide && parentItem) {
|
|
24202
24201
|
var parentData = parentItem.getRenderData();
|
|
@@ -26258,9 +26257,9 @@ var TextVFXItem = /** @class */ (function (_super) {
|
|
|
26258
26257
|
this.textContext = props.content;
|
|
26259
26258
|
};
|
|
26260
26259
|
TextVFXItem.prototype.onLifetimeBegin = function (composition, content) {
|
|
26261
|
-
var _a;
|
|
26260
|
+
var _a, _b;
|
|
26262
26261
|
content.active = true;
|
|
26263
|
-
(_a = this.content) === null || _a === void 0 ? void 0 : _a.mesh.setItems([this.content]);
|
|
26262
|
+
(_b = (_a = this.content) === null || _a === void 0 ? void 0 : _a.mesh) === null || _b === void 0 ? void 0 : _b.setItems([this.content]);
|
|
26264
26263
|
this.content.updateTexture();
|
|
26265
26264
|
};
|
|
26266
26265
|
TextVFXItem.prototype.onItemRemoved = function (composition, content) {
|
|
@@ -29969,7 +29968,7 @@ var CompVFXItem = /** @class */ (function (_super) {
|
|
|
29969
29968
|
throw new Error("\u5F15\u7528\u7684Id: ".concat(refId, " \u7684\u9884\u5408\u6210\u4E0D\u5B58\u5728"));
|
|
29970
29969
|
}
|
|
29971
29970
|
props.content = itemProps.content;
|
|
29972
|
-
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);
|
|
29971
|
+
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);
|
|
29973
29972
|
item.contentProps = itemProps.content;
|
|
29974
29973
|
item.transform.parentTransform = this.transform;
|
|
29975
29974
|
this.composition.refContent.push(item);
|
|
@@ -32777,9 +32776,9 @@ Geometry.create = function (engine, options) {
|
|
|
32777
32776
|
Mesh.create = function (engine, props) {
|
|
32778
32777
|
return new ThreeMesh(engine, props);
|
|
32779
32778
|
};
|
|
32780
|
-
var version = "1.1.
|
|
32779
|
+
var version = "1.1.1";
|
|
32781
32780
|
console.info({
|
|
32782
|
-
content: '[Galacean Effects THREEJS] version: ' + "1.1.
|
|
32781
|
+
content: '[Galacean Effects THREEJS] version: ' + "1.1.1",
|
|
32783
32782
|
type: LOG_TYPE,
|
|
32784
32783
|
});
|
|
32785
32784
|
|