@galacean/effects 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/weapp.js CHANGED
@@ -24090,18 +24090,14 @@ var CompVFXItem = /** @class */ (function (_super) {
24090
24090
  // 设置预合成作为元素时的时长、结束行为和渲染延时
24091
24091
  if (exports.Item.isComposition(itemProps)) {
24092
24092
  var refId = itemProps.content.options.refId;
24093
- var props = this.composition.refCompositionProps.get(refId);
24094
- if (!props) {
24095
- throw new Error("\u5F15\u7528\u7684Id: ".concat(refId, " \u7684\u9884\u5408\u6210\u4E0D\u5B58\u5728"));
24096
- }
24097
- props.content = itemProps.content;
24098
- 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);
24093
+ item = new CompVFXItem(__assign$1({ refId: refId }, itemProps), this.composition);
24099
24094
  item.contentProps = itemProps.content;
24100
24095
  item.transform.parentTransform = this.transform;
24101
24096
  this.composition.refContent.push(item);
24102
24097
  if (item.endBehavior === END_BEHAVIOR_RESTART$1) {
24103
24098
  this.composition.autoRefTex = false;
24104
24099
  }
24100
+ item.createContent();
24105
24101
  }
24106
24102
  else {
24107
24103
  item = createVFXItem(this.itemProps[i], this.composition);
@@ -24233,6 +24229,17 @@ var CompVFXItem = /** @class */ (function (_super) {
24233
24229
  CompVFXItem.prototype.handleVisibleChanged = function (visible) {
24234
24230
  this.items.forEach(function (item) { return item.setVisible(visible); });
24235
24231
  };
24232
+ CompVFXItem.prototype.setScale = function (x, y, z) {
24233
+ if (this.content) {
24234
+ this.content.startSize = new Vector3(x, y, z);
24235
+ }
24236
+ };
24237
+ CompVFXItem.prototype.scale = function (x, y, z) {
24238
+ if (this.content) {
24239
+ var startSize = this.content.startSize.clone();
24240
+ this.content.startSize = new Vector3(x * startSize.x, y * startSize.y, z * startSize.z);
24241
+ }
24242
+ };
24236
24243
  CompVFXItem.prototype.getUpdateTime = function (t) {
24237
24244
  var startTime = this.startTimeInms;
24238
24245
  var now = this.timeInms;
@@ -30464,7 +30471,7 @@ Renderer.create = function (canvas, framework, renderOptions) {
30464
30471
  Engine.create = function (gl) {
30465
30472
  return new GLEngine(gl);
30466
30473
  };
30467
- var version = "1.3.1";
30474
+ var version = "1.3.2";
30468
30475
  logger.info('player version: ' + version);
30469
30476
 
30470
30477
  exports.AbstractPlugin = AbstractPlugin;