@galacean/effects-threejs 2.6.6 → 2.6.7

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: v2.6.6
6
+ * Version: v2.6.7
7
7
  */
8
8
 
9
9
  'use strict';
@@ -28928,6 +28928,10 @@ exports.TextComponent = /*#__PURE__*/ function(BaseRenderComponent) {
28928
28928
  BaseRenderComponent.prototype.onUpdate.call(this, dt);
28929
28929
  this.updateTexture();
28930
28930
  };
28931
+ _proto.onDestroy = function onDestroy() {
28932
+ BaseRenderComponent.prototype.onDestroy.call(this);
28933
+ this.disposeTextTexture();
28934
+ };
28931
28935
  _proto.fromData = function fromData(data) {
28932
28936
  BaseRenderComponent.prototype.fromData.call(this, data);
28933
28937
  var interaction = data.interaction, options = data.options;
@@ -29301,10 +29305,17 @@ var TextComponentBase = /*#__PURE__*/ function() {
29301
29305
  wrapS: glContext.CLAMP_TO_EDGE,
29302
29306
  wrapT: glContext.CLAMP_TO_EDGE
29303
29307
  });
29308
+ this.disposeTextTexture();
29304
29309
  this.renderer.texture = texture;
29305
29310
  this.material.setTexture("_MainTex", texture);
29306
29311
  this.isDirty = false;
29307
29312
  };
29313
+ _proto.disposeTextTexture = function disposeTextTexture() {
29314
+ var texture = this.renderer.texture;
29315
+ if (texture && texture !== this.engine.emptyTexture) {
29316
+ texture.dispose();
29317
+ }
29318
+ };
29308
29319
  _proto.getFontDesc = function getFontDesc(size) {
29309
29320
  var _this_textStyle = this.textStyle, fontSize = _this_textStyle.fontSize, fontScale = _this_textStyle.fontScale, fontFamily = _this_textStyle.fontFamily, textWeight = _this_textStyle.textWeight, fontStyle = _this_textStyle.fontStyle;
29310
29321
  var fontDesc = "" + (size || fontSize * fontScale).toString() + "px ";
@@ -31158,7 +31169,7 @@ function getStandardSpriteContent(sprite, transform) {
31158
31169
  return ret;
31159
31170
  }
31160
31171
 
31161
- var version$2 = "2.6.6";
31172
+ var version$2 = "2.6.7";
31162
31173
  var v0 = /^(\d+)\.(\d+)\.(\d+)(-(\w+)\.\d+)?$/;
31163
31174
  var standardVersion = /^(\d+)\.(\d+)$/;
31164
31175
  var reverseParticle = false;
@@ -34412,7 +34423,7 @@ registerPlugin("sprite", SpriteLoader, exports.VFXItem);
34412
34423
  registerPlugin("particle", ParticleLoader, exports.VFXItem);
34413
34424
  registerPlugin("cal", CalculateLoader, exports.VFXItem);
34414
34425
  registerPlugin("interact", InteractLoader, exports.VFXItem);
34415
- var version$1 = "2.6.6";
34426
+ var version$1 = "2.6.7";
34416
34427
  logger.info("Core version: " + version$1 + ".");
34417
34428
 
34418
34429
  var _obj;
@@ -36017,7 +36028,7 @@ setMaxSpriteMeshItemCount(8);
36017
36028
  */ Mesh.create = function(engine, props) {
36018
36029
  return new ThreeMesh(engine, props);
36019
36030
  };
36020
- var version = "2.6.6";
36031
+ var version = "2.6.7";
36021
36032
  logger.info("THREEJS plugin version: " + version + ".");
36022
36033
 
36023
36034
  exports.AbstractPlugin = AbstractPlugin;