@galacean/engine-core 0.0.0-experimental-0.9-plus.4 → 0.0.0-experimental-0.9-plus.6

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/main.js CHANGED
@@ -10131,6 +10131,14 @@ exports.Renderer = (_Renderer = /*#__PURE__*/ function(Component) {
10131
10131
  };
10132
10132
  /**
10133
10133
  * @internal
10134
+ */ _proto._cloneTo = function _cloneTo(target) {
10135
+ var materials = this._materials;
10136
+ for(var i = 0, n = materials.length; i < n; i++){
10137
+ target._setMaterial(i, materials[i]);
10138
+ }
10139
+ };
10140
+ /**
10141
+ * @internal
10134
10142
  */ _proto._onDestroy = function _onDestroy() {
10135
10143
  this.entity.transform._updateFlagManager.removeListener(this._onTransformChanged);
10136
10144
  this.shaderData._addRefCount(-1);
@@ -10309,7 +10317,7 @@ __decorate([
10309
10317
  ignoreClone
10310
10318
  ], exports.Renderer.prototype, "_overrideUpdate", void 0);
10311
10319
  __decorate([
10312
- shallowClone
10320
+ ignoreClone
10313
10321
  ], exports.Renderer.prototype, "_materials", void 0);
10314
10322
  __decorate([
10315
10323
  ignoreClone
@@ -10531,6 +10539,7 @@ SimpleSpriteAssembler = __decorate([
10531
10539
  /**
10532
10540
  * @internal
10533
10541
  */ _proto._cloneTo = function _cloneTo(target) {
10542
+ Renderer.prototype._cloneTo.call(this, target);
10534
10543
  target.sprite = this._sprite;
10535
10544
  };
10536
10545
  /**
@@ -12967,12 +12976,14 @@ var VertexChangedFlags;
12967
12976
  var mesh = this._mesh;
12968
12977
  if (mesh && !mesh.destroyed) {
12969
12978
  mesh._addRefCount(-1);
12979
+ mesh._updateFlagManager.removeListener(this._onMeshChanged);
12970
12980
  this._mesh = null;
12971
12981
  }
12972
12982
  };
12973
12983
  /**
12974
12984
  * @internal
12975
12985
  */ _proto._cloneTo = function _cloneTo(target) {
12986
+ Renderer.prototype._cloneTo.call(this, target);
12976
12987
  target.mesh = this._mesh;
12977
12988
  };
12978
12989
  /**
@@ -13265,6 +13276,7 @@ var rePropName = RegExp(// Match anything that isn't a dot or bracket.
13265
13276
  (_this__jointTexture = this._jointTexture) == null ? void 0 : _this__jointTexture.destroy();
13266
13277
  this._jointTexture = new Texture2D(engine, 4, jointCount, exports.TextureFormat.R32G32B32A32, false);
13267
13278
  this._jointTexture.filterMode = exports.TextureFilterMode.Point;
13279
+ this._jointTexture.isGCIgnored = true;
13268
13280
  }
13269
13281
  shaderData.disableMacro("O3_JOINTS_NUM");
13270
13282
  shaderData.enableMacro("O3_USE_JOINT_TEXTURE");
@@ -13298,6 +13310,15 @@ var rePropName = RegExp(// Match anything that isn't a dot or bracket.
13298
13310
  };
13299
13311
  /**
13300
13312
  * @internal
13313
+ * @override
13314
+ */ _proto._onDestroy = function _onDestroy() {
13315
+ var _this_rootBone, _this__jointTexture;
13316
+ MeshRenderer.prototype._onDestroy.call(this);
13317
+ (_this_rootBone = this.rootBone) == null ? void 0 : _this_rootBone.transform._updateFlagManager.removeListener(this._onTransformChanged);
13318
+ (_this__jointTexture = this._jointTexture) == null ? void 0 : _this__jointTexture.destroy();
13319
+ };
13320
+ /**
13321
+ * @internal
13301
13322
  */ _proto._cloneTo = function _cloneTo(target) {
13302
13323
  MeshRenderer.prototype._cloneTo.call(this, target);
13303
13324
  this._blendShapeWeights && (target._blendShapeWeights = this._blendShapeWeights.slice());
@@ -19924,6 +19945,7 @@ SlicedSpriteAssembler = __decorate([
19924
19945
  /**
19925
19946
  * @internal
19926
19947
  */ _proto._cloneTo = function _cloneTo(target) {
19948
+ Renderer.prototype._cloneTo.call(this, target);
19927
19949
  target.sprite = this._sprite;
19928
19950
  target.drawMode = this._drawMode;
19929
19951
  };
@@ -20677,6 +20699,7 @@ var /**
20677
20699
  /**
20678
20700
  * @internal
20679
20701
  */ _proto._cloneTo = function _cloneTo(target) {
20702
+ Renderer.prototype._cloneTo.call(this, target);
20680
20703
  target.font = this._font;
20681
20704
  target._subFont = this._subFont;
20682
20705
  };