@galacean/effects-core 1.6.5 → 1.6.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/index.js CHANGED
@@ -3,7 +3,7 @@
3
3
  * Description: Galacean Effects runtime core for the web
4
4
  * Author: Ant Group CO., Ltd.
5
5
  * Contributors: 燃然,飂兮,十弦,云垣,茂安,意绮
6
- * Version: v1.6.5
6
+ * Version: v1.6.6
7
7
  */
8
8
 
9
9
  'use strict';
@@ -20820,18 +20820,20 @@ var TextLoader = /** @class */ (function (_super) {
20820
20820
  };
20821
20821
  TextLoader.prototype.onCompositionUpdate = function (composition, dt) {
20822
20822
  this.addItems.forEach(function (item) {
20823
- var _a, _b, _c;
20823
+ var textMesh = item.content.mesh;
20824
20824
  if (!item.contentVisible) {
20825
- (_a = item.content.mesh) === null || _a === void 0 ? void 0 : _a.mesh.setVisible(false);
20825
+ textMesh === null || textMesh === void 0 ? void 0 : textMesh.mesh.setVisible(false);
20826
20826
  return;
20827
20827
  }
20828
20828
  else {
20829
- (_b = item.content.mesh) === null || _b === void 0 ? void 0 : _b.mesh.setVisible(true);
20829
+ textMesh === null || textMesh === void 0 ? void 0 : textMesh.mesh.setVisible(true);
20830
20830
  }
20831
20831
  item.content.updateTexture();
20832
- if (!item.content.ended && item.content.mesh) {
20833
- item.content.mesh.updateItem(item.content);
20834
- (_c = item.content.mesh) === null || _c === void 0 ? void 0 : _c.applyChange();
20832
+ if (!item.content.ended &&
20833
+ textMesh &&
20834
+ !textMesh.mesh.isDestroyed) {
20835
+ textMesh.updateItem(item.content);
20836
+ textMesh.applyChange();
20835
20837
  }
20836
20838
  });
20837
20839
  };