@galacean/engine-core 0.9.10 → 0.9.11

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.
@@ -10118,6 +10118,14 @@ exports.Renderer = (_Renderer = /*#__PURE__*/ function(Component) {
10118
10118
  };
10119
10119
  /**
10120
10120
  * @internal
10121
+ */ _proto._cloneTo = function _cloneTo(target) {
10122
+ var materials = this._materials;
10123
+ for(var i = 0, n = materials.length; i < n; i++){
10124
+ target._setMaterial(i, materials[i]);
10125
+ }
10126
+ };
10127
+ /**
10128
+ * @internal
10121
10129
  */ _proto._onDestroy = function _onDestroy() {
10122
10130
  this.entity.transform._updateFlagManager.removeListener(this._onTransformChanged);
10123
10131
  this.shaderData._addRefCount(-1);
@@ -10296,7 +10304,7 @@ __decorate([
10296
10304
  ignoreClone
10297
10305
  ], exports.Renderer.prototype, "_overrideUpdate", void 0);
10298
10306
  __decorate([
10299
- shallowClone
10307
+ ignoreClone
10300
10308
  ], exports.Renderer.prototype, "_materials", void 0);
10301
10309
  __decorate([
10302
10310
  ignoreClone
@@ -10518,6 +10526,7 @@ SimpleSpriteAssembler = __decorate([
10518
10526
  /**
10519
10527
  * @internal
10520
10528
  */ _proto._cloneTo = function _cloneTo(target) {
10529
+ Renderer.prototype._cloneTo.call(this, target);
10521
10530
  target.sprite = this._sprite;
10522
10531
  };
10523
10532
  /**
@@ -12954,12 +12963,14 @@ var VertexChangedFlags;
12954
12963
  var mesh = this._mesh;
12955
12964
  if (mesh && !mesh.destroyed) {
12956
12965
  mesh._addRefCount(-1);
12966
+ mesh._updateFlagManager.removeListener(this._onMeshChanged);
12957
12967
  this._mesh = null;
12958
12968
  }
12959
12969
  };
12960
12970
  /**
12961
12971
  * @internal
12962
12972
  */ _proto._cloneTo = function _cloneTo(target) {
12973
+ Renderer.prototype._cloneTo.call(this, target);
12963
12974
  target.mesh = this._mesh;
12964
12975
  };
12965
12976
  /**
@@ -13252,6 +13263,7 @@ var rePropName = RegExp(// Match anything that isn't a dot or bracket.
13252
13263
  (_this__jointTexture = this._jointTexture) == null ? void 0 : _this__jointTexture.destroy();
13253
13264
  this._jointTexture = new Texture2D(engine, 4, jointCount, exports.TextureFormat.R32G32B32A32, false);
13254
13265
  this._jointTexture.filterMode = exports.TextureFilterMode.Point;
13266
+ this._jointTexture.isGCIgnored = true;
13255
13267
  }
13256
13268
  shaderData.disableMacro("O3_JOINTS_NUM");
13257
13269
  shaderData.enableMacro("O3_USE_JOINT_TEXTURE");
@@ -13285,6 +13297,15 @@ var rePropName = RegExp(// Match anything that isn't a dot or bracket.
13285
13297
  };
13286
13298
  /**
13287
13299
  * @internal
13300
+ * @override
13301
+ */ _proto._onDestroy = function _onDestroy() {
13302
+ var _this_rootBone, _this__jointTexture;
13303
+ MeshRenderer.prototype._onDestroy.call(this);
13304
+ (_this_rootBone = this.rootBone) == null ? void 0 : _this_rootBone.transform._updateFlagManager.removeListener(this._onTransformChanged);
13305
+ (_this__jointTexture = this._jointTexture) == null ? void 0 : _this__jointTexture.destroy();
13306
+ };
13307
+ /**
13308
+ * @internal
13288
13309
  */ _proto._cloneTo = function _cloneTo(target) {
13289
13310
  MeshRenderer.prototype._cloneTo.call(this, target);
13290
13311
  this._blendShapeWeights && (target._blendShapeWeights = this._blendShapeWeights.slice());
@@ -19896,6 +19917,7 @@ SlicedSpriteAssembler = __decorate([
19896
19917
  /**
19897
19918
  * @internal
19898
19919
  */ _proto._cloneTo = function _cloneTo(target) {
19920
+ Renderer.prototype._cloneTo.call(this, target);
19899
19921
  target.sprite = this._sprite;
19900
19922
  target.drawMode = this._drawMode;
19901
19923
  };
@@ -20649,6 +20671,7 @@ var /**
20649
20671
  /**
20650
20672
  * @internal
20651
20673
  */ _proto._cloneTo = function _cloneTo(target) {
20674
+ Renderer.prototype._cloneTo.call(this, target);
20652
20675
  target.font = this._font;
20653
20676
  target._subFont = this._subFont;
20654
20677
  };
package/dist/module.js CHANGED
@@ -10113,6 +10113,14 @@ var Renderer = (_Renderer = /*#__PURE__*/ function(Component) {
10113
10113
  };
10114
10114
  /**
10115
10115
  * @internal
10116
+ */ _proto._cloneTo = function _cloneTo(target) {
10117
+ var materials = this._materials;
10118
+ for(var i = 0, n = materials.length; i < n; i++){
10119
+ target._setMaterial(i, materials[i]);
10120
+ }
10121
+ };
10122
+ /**
10123
+ * @internal
10116
10124
  */ _proto._onDestroy = function _onDestroy() {
10117
10125
  this.entity.transform._updateFlagManager.removeListener(this._onTransformChanged);
10118
10126
  this.shaderData._addRefCount(-1);
@@ -10291,7 +10299,7 @@ __decorate([
10291
10299
  ignoreClone
10292
10300
  ], Renderer.prototype, "_overrideUpdate", void 0);
10293
10301
  __decorate([
10294
- shallowClone
10302
+ ignoreClone
10295
10303
  ], Renderer.prototype, "_materials", void 0);
10296
10304
  __decorate([
10297
10305
  ignoreClone
@@ -10513,6 +10521,7 @@ SimpleSpriteAssembler = __decorate([
10513
10521
  /**
10514
10522
  * @internal
10515
10523
  */ _proto._cloneTo = function _cloneTo(target) {
10524
+ Renderer.prototype._cloneTo.call(this, target);
10516
10525
  target.sprite = this._sprite;
10517
10526
  };
10518
10527
  /**
@@ -12949,12 +12958,14 @@ var VertexChangedFlags;
12949
12958
  var mesh = this._mesh;
12950
12959
  if (mesh && !mesh.destroyed) {
12951
12960
  mesh._addRefCount(-1);
12961
+ mesh._updateFlagManager.removeListener(this._onMeshChanged);
12952
12962
  this._mesh = null;
12953
12963
  }
12954
12964
  };
12955
12965
  /**
12956
12966
  * @internal
12957
12967
  */ _proto._cloneTo = function _cloneTo(target) {
12968
+ Renderer.prototype._cloneTo.call(this, target);
12958
12969
  target.mesh = this._mesh;
12959
12970
  };
12960
12971
  /**
@@ -13247,6 +13258,7 @@ var rePropName = RegExp(// Match anything that isn't a dot or bracket.
13247
13258
  (_this__jointTexture = this._jointTexture) == null ? void 0 : _this__jointTexture.destroy();
13248
13259
  this._jointTexture = new Texture2D(engine, 4, jointCount, TextureFormat.R32G32B32A32, false);
13249
13260
  this._jointTexture.filterMode = TextureFilterMode.Point;
13261
+ this._jointTexture.isGCIgnored = true;
13250
13262
  }
13251
13263
  shaderData.disableMacro("O3_JOINTS_NUM");
13252
13264
  shaderData.enableMacro("O3_USE_JOINT_TEXTURE");
@@ -13280,6 +13292,15 @@ var rePropName = RegExp(// Match anything that isn't a dot or bracket.
13280
13292
  };
13281
13293
  /**
13282
13294
  * @internal
13295
+ * @override
13296
+ */ _proto._onDestroy = function _onDestroy() {
13297
+ var _this_rootBone, _this__jointTexture;
13298
+ MeshRenderer.prototype._onDestroy.call(this);
13299
+ (_this_rootBone = this.rootBone) == null ? void 0 : _this_rootBone.transform._updateFlagManager.removeListener(this._onTransformChanged);
13300
+ (_this__jointTexture = this._jointTexture) == null ? void 0 : _this__jointTexture.destroy();
13301
+ };
13302
+ /**
13303
+ * @internal
13283
13304
  */ _proto._cloneTo = function _cloneTo(target) {
13284
13305
  MeshRenderer.prototype._cloneTo.call(this, target);
13285
13306
  this._blendShapeWeights && (target._blendShapeWeights = this._blendShapeWeights.slice());
@@ -19891,6 +19912,7 @@ SlicedSpriteAssembler = __decorate([
19891
19912
  /**
19892
19913
  * @internal
19893
19914
  */ _proto._cloneTo = function _cloneTo(target) {
19915
+ Renderer.prototype._cloneTo.call(this, target);
19894
19916
  target.sprite = this._sprite;
19895
19917
  target.drawMode = this._drawMode;
19896
19918
  };
@@ -20644,6 +20666,7 @@ var /**
20644
20666
  /**
20645
20667
  * @internal
20646
20668
  */ _proto._cloneTo = function _cloneTo(target) {
20669
+ Renderer.prototype._cloneTo.call(this, target);
20647
20670
  target.font = this._font;
20648
20671
  target._subFont = this._subFont;
20649
20672
  };