@galacean/effects-threejs 1.6.5 → 1.6.6-alpha.0

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 threejs plugin for the web
4
4
  * Author: Ant Group CO., Ltd.
5
5
  * Contributors: 燃然,飂兮,十弦,云垣,茂安,意绮
6
- * Version: v1.6.5
6
+ * Version: v1.6.6-alpha.0
7
7
  */
8
8
 
9
9
  'use strict';
@@ -20842,18 +20842,20 @@ var TextLoader = /** @class */ (function (_super) {
20842
20842
  };
20843
20843
  TextLoader.prototype.onCompositionUpdate = function (composition, dt) {
20844
20844
  this.addItems.forEach(function (item) {
20845
- var _a, _b, _c;
20845
+ var textMesh = item.content.mesh;
20846
20846
  if (!item.contentVisible) {
20847
- (_a = item.content.mesh) === null || _a === void 0 ? void 0 : _a.mesh.setVisible(false);
20847
+ textMesh === null || textMesh === void 0 ? void 0 : textMesh.mesh.setVisible(false);
20848
20848
  return;
20849
20849
  }
20850
20850
  else {
20851
- (_b = item.content.mesh) === null || _b === void 0 ? void 0 : _b.mesh.setVisible(true);
20851
+ textMesh === null || textMesh === void 0 ? void 0 : textMesh.mesh.setVisible(true);
20852
20852
  }
20853
20853
  item.content.updateTexture();
20854
- if (!item.content.ended && item.content.mesh) {
20855
- item.content.mesh.updateItem(item.content);
20856
- (_c = item.content.mesh) === null || _c === void 0 ? void 0 : _c.applyChange();
20854
+ if (!item.content.ended &&
20855
+ textMesh &&
20856
+ !textMesh.mesh.isDestroyed) {
20857
+ textMesh.updateItem(item.content);
20858
+ textMesh.applyChange();
20857
20859
  }
20858
20860
  });
20859
20861
  };
@@ -27520,7 +27522,7 @@ Geometry.create = function (engine, options) {
27520
27522
  Mesh.create = function (engine, props) {
27521
27523
  return new ThreeMesh(engine, props);
27522
27524
  };
27523
- var version = "1.6.5";
27525
+ var version = "1.6.6-alpha.0";
27524
27526
  logger.info('THREEJS plugin version: ' + version);
27525
27527
 
27526
27528
  exports.AbstractPlugin = AbstractPlugin;