@galacean/effects-core 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 core 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';
@@ -26382,10 +26382,14 @@ var TextComponentBase = /*#__PURE__*/ function() {
26382
26382
  _proto.getLineCount = function getLineCount(text, init) {
26383
26383
  var context = this.context;
26384
26384
  var _this_textLayout = this.textLayout, letterSpace = _this_textLayout.letterSpace, overflow = _this_textLayout.overflow;
26385
- var fontScale = init ? this.textStyle.fontSize / 10 * this.textStyle.fontScale : this.textStyle.fontScale;
26386
- var width = (this.textLayout.width + this.textStyle.fontOffset) * this.textStyle.fontScale;
26385
+ var fontScale = init ? this.textStyle.fontSize / 10 : 1 / this.textStyle.fontScale;
26386
+ var width = this.textLayout.width + this.textStyle.fontOffset;
26387
26387
  var lineCount = 1;
26388
26388
  var x = 0;
26389
+ //设置context.font的字号
26390
+ // if (context) {
26391
+ // context.font = this.getFontDesc(this.textStyle.fontSize);
26392
+ // }
26389
26393
  for(var i = 0; i < text.length; i++){
26390
26394
  var _context_measureText;
26391
26395
  var str = text[i];
@@ -28574,7 +28578,7 @@ function getStandardSpriteContent(sprite, transform) {
28574
28578
  return ret;
28575
28579
  }
28576
28580
 
28577
- var version$1 = "2.5.4";
28581
+ var version$1 = "2.5.5";
28578
28582
  var v0 = /^(\d+)\.(\d+)\.(\d+)(-(\w+)\.\d+)?$/;
28579
28583
  var standardVersion = /^(\d+)\.(\d+)$/;
28580
28584
  var reverseParticle = false;
@@ -31824,7 +31828,7 @@ registerPlugin("sprite", SpriteLoader, exports.VFXItem);
31824
31828
  registerPlugin("particle", ParticleLoader, exports.VFXItem);
31825
31829
  registerPlugin("cal", CalculateLoader, exports.VFXItem);
31826
31830
  registerPlugin("interact", InteractLoader, exports.VFXItem);
31827
- var version = "2.5.4";
31831
+ var version = "2.5.5";
31828
31832
  logger.info("Core version: " + version + ".");
31829
31833
 
31830
31834
  exports.AbstractPlugin = AbstractPlugin;