@galacean/effects-threejs 1.3.1 → 1.3.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 +15 -8
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +2 -2
- package/dist/index.min.js.map +1 -1
- package/dist/index.mjs +15 -8
- 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.3.
|
|
6
|
+
* Version: v1.3.2
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
'use strict';
|
|
@@ -24118,18 +24118,14 @@ var CompVFXItem = /** @class */ (function (_super) {
|
|
|
24118
24118
|
// 设置预合成作为元素时的时长、结束行为和渲染延时
|
|
24119
24119
|
if (exports.Item.isComposition(itemProps)) {
|
|
24120
24120
|
var refId = itemProps.content.options.refId;
|
|
24121
|
-
|
|
24122
|
-
if (!props) {
|
|
24123
|
-
throw new Error("\u5F15\u7528\u7684Id: ".concat(refId, " \u7684\u9884\u5408\u6210\u4E0D\u5B58\u5728"));
|
|
24124
|
-
}
|
|
24125
|
-
props.content = itemProps.content;
|
|
24126
|
-
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);
|
|
24121
|
+
item = new CompVFXItem(__assign$1({ refId: refId }, itemProps), this.composition);
|
|
24127
24122
|
item.contentProps = itemProps.content;
|
|
24128
24123
|
item.transform.parentTransform = this.transform;
|
|
24129
24124
|
this.composition.refContent.push(item);
|
|
24130
24125
|
if (item.endBehavior === END_BEHAVIOR_RESTART$1) {
|
|
24131
24126
|
this.composition.autoRefTex = false;
|
|
24132
24127
|
}
|
|
24128
|
+
item.createContent();
|
|
24133
24129
|
}
|
|
24134
24130
|
else {
|
|
24135
24131
|
item = createVFXItem(this.itemProps[i], this.composition);
|
|
@@ -24261,6 +24257,17 @@ var CompVFXItem = /** @class */ (function (_super) {
|
|
|
24261
24257
|
CompVFXItem.prototype.handleVisibleChanged = function (visible) {
|
|
24262
24258
|
this.items.forEach(function (item) { return item.setVisible(visible); });
|
|
24263
24259
|
};
|
|
24260
|
+
CompVFXItem.prototype.setScale = function (x, y, z) {
|
|
24261
|
+
if (this.content) {
|
|
24262
|
+
this.content.startSize = new Vector3(x, y, z);
|
|
24263
|
+
}
|
|
24264
|
+
};
|
|
24265
|
+
CompVFXItem.prototype.scale = function (x, y, z) {
|
|
24266
|
+
if (this.content) {
|
|
24267
|
+
var startSize = this.content.startSize.clone();
|
|
24268
|
+
this.content.startSize = new Vector3(x * startSize.x, y * startSize.y, z * startSize.z);
|
|
24269
|
+
}
|
|
24270
|
+
};
|
|
24264
24271
|
CompVFXItem.prototype.getUpdateTime = function (t) {
|
|
24265
24272
|
var startTime = this.startTimeInms;
|
|
24266
24273
|
var now = this.timeInms;
|
|
@@ -26962,7 +26969,7 @@ Geometry.create = function (engine, options) {
|
|
|
26962
26969
|
Mesh.create = function (engine, props) {
|
|
26963
26970
|
return new ThreeMesh(engine, props);
|
|
26964
26971
|
};
|
|
26965
|
-
var version = "1.3.
|
|
26972
|
+
var version = "1.3.2";
|
|
26966
26973
|
logger.info('THREEJS plugin version: ' + version);
|
|
26967
26974
|
|
|
26968
26975
|
exports.AbstractPlugin = AbstractPlugin;
|