@galacean/effects-threejs 2.5.4 → 2.5.5

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.5.4
6
+ * Version: v2.5.5
7
7
  */
8
8
 
9
9
  'use strict';
@@ -26404,10 +26404,14 @@ var TextComponentBase = /*#__PURE__*/ function() {
26404
26404
  _proto.getLineCount = function getLineCount(text, init) {
26405
26405
  var context = this.context;
26406
26406
  var _this_textLayout = this.textLayout, letterSpace = _this_textLayout.letterSpace, overflow = _this_textLayout.overflow;
26407
- var fontScale = init ? this.textStyle.fontSize / 10 * this.textStyle.fontScale : this.textStyle.fontScale;
26408
- var width = (this.textLayout.width + this.textStyle.fontOffset) * this.textStyle.fontScale;
26407
+ var fontScale = init ? this.textStyle.fontSize / 10 : 1 / this.textStyle.fontScale;
26408
+ var width = this.textLayout.width + this.textStyle.fontOffset;
26409
26409
  var lineCount = 1;
26410
26410
  var x = 0;
26411
+ //设置context.font的字号
26412
+ // if (context) {
26413
+ // context.font = this.getFontDesc(this.textStyle.fontSize);
26414
+ // }
26411
26415
  for(var i = 0; i < text.length; i++){
26412
26416
  var _context_measureText;
26413
26417
  var str = text[i];
@@ -28596,7 +28600,7 @@ function getStandardSpriteContent(sprite, transform) {
28596
28600
  return ret;
28597
28601
  }
28598
28602
 
28599
- var version$2 = "2.5.4";
28603
+ var version$2 = "2.5.5";
28600
28604
  var v0 = /^(\d+)\.(\d+)\.(\d+)(-(\w+)\.\d+)?$/;
28601
28605
  var standardVersion = /^(\d+)\.(\d+)$/;
28602
28606
  var reverseParticle = false;
@@ -31846,7 +31850,7 @@ registerPlugin("sprite", SpriteLoader, exports.VFXItem);
31846
31850
  registerPlugin("particle", ParticleLoader, exports.VFXItem);
31847
31851
  registerPlugin("cal", CalculateLoader, exports.VFXItem);
31848
31852
  registerPlugin("interact", InteractLoader, exports.VFXItem);
31849
- var version$1 = "2.5.4";
31853
+ var version$1 = "2.5.5";
31850
31854
  logger.info("Core version: " + version$1 + ".");
31851
31855
 
31852
31856
  var _obj;
@@ -33448,7 +33452,7 @@ setMaxSpriteMeshItemCount(8);
33448
33452
  */ Mesh.create = function(engine, props) {
33449
33453
  return new ThreeMesh(engine, props);
33450
33454
  };
33451
- var version = "2.5.4";
33455
+ var version = "2.5.5";
33452
33456
  logger.info("THREEJS plugin version: " + version + ".");
33453
33457
 
33454
33458
  exports.AbstractPlugin = AbstractPlugin;