@galacean/effects-core 2.6.5 → 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 +14 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +14 -3
- package/dist/index.mjs.map +1 -1
- package/dist/plugins/text/text-item.d.ts +2 -0
- package/package.json +1 -1
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: v2.6.
|
|
6
|
+
* Version: v2.6.7
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
'use strict';
|
|
@@ -28906,6 +28906,10 @@ exports.TextComponent = /*#__PURE__*/ function(BaseRenderComponent) {
|
|
|
28906
28906
|
BaseRenderComponent.prototype.onUpdate.call(this, dt);
|
|
28907
28907
|
this.updateTexture();
|
|
28908
28908
|
};
|
|
28909
|
+
_proto.onDestroy = function onDestroy() {
|
|
28910
|
+
BaseRenderComponent.prototype.onDestroy.call(this);
|
|
28911
|
+
this.disposeTextTexture();
|
|
28912
|
+
};
|
|
28909
28913
|
_proto.fromData = function fromData(data) {
|
|
28910
28914
|
BaseRenderComponent.prototype.fromData.call(this, data);
|
|
28911
28915
|
var interaction = data.interaction, options = data.options;
|
|
@@ -29279,10 +29283,17 @@ var TextComponentBase = /*#__PURE__*/ function() {
|
|
|
29279
29283
|
wrapS: glContext.CLAMP_TO_EDGE,
|
|
29280
29284
|
wrapT: glContext.CLAMP_TO_EDGE
|
|
29281
29285
|
});
|
|
29286
|
+
this.disposeTextTexture();
|
|
29282
29287
|
this.renderer.texture = texture;
|
|
29283
29288
|
this.material.setTexture("_MainTex", texture);
|
|
29284
29289
|
this.isDirty = false;
|
|
29285
29290
|
};
|
|
29291
|
+
_proto.disposeTextTexture = function disposeTextTexture() {
|
|
29292
|
+
var texture = this.renderer.texture;
|
|
29293
|
+
if (texture && texture !== this.engine.emptyTexture) {
|
|
29294
|
+
texture.dispose();
|
|
29295
|
+
}
|
|
29296
|
+
};
|
|
29286
29297
|
_proto.getFontDesc = function getFontDesc(size) {
|
|
29287
29298
|
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;
|
|
29288
29299
|
var fontDesc = "" + (size || fontSize * fontScale).toString() + "px ";
|
|
@@ -31136,7 +31147,7 @@ function getStandardSpriteContent(sprite, transform) {
|
|
|
31136
31147
|
return ret;
|
|
31137
31148
|
}
|
|
31138
31149
|
|
|
31139
|
-
var version$1 = "2.6.
|
|
31150
|
+
var version$1 = "2.6.7";
|
|
31140
31151
|
var v0 = /^(\d+)\.(\d+)\.(\d+)(-(\w+)\.\d+)?$/;
|
|
31141
31152
|
var standardVersion = /^(\d+)\.(\d+)$/;
|
|
31142
31153
|
var reverseParticle = false;
|
|
@@ -34390,7 +34401,7 @@ registerPlugin("sprite", SpriteLoader, exports.VFXItem);
|
|
|
34390
34401
|
registerPlugin("particle", ParticleLoader, exports.VFXItem);
|
|
34391
34402
|
registerPlugin("cal", CalculateLoader, exports.VFXItem);
|
|
34392
34403
|
registerPlugin("interact", InteractLoader, exports.VFXItem);
|
|
34393
|
-
var version = "2.6.
|
|
34404
|
+
var version = "2.6.7";
|
|
34394
34405
|
logger.info("Core version: " + version + ".");
|
|
34395
34406
|
|
|
34396
34407
|
exports.AbstractPlugin = AbstractPlugin;
|