@galacean/effects-core 2.7.0-beta.0 → 2.7.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 core for the web
4
4
  * Author: Ant Group CO., Ltd.
5
5
  * Contributors: 燃然,飂兮,十弦,云垣,茂安,意绮
6
- * Version: v2.7.0-beta.0
6
+ * Version: v2.7.0
7
7
  */
8
8
 
9
9
  'use strict';
@@ -25321,7 +25321,7 @@ exports.VFXItem = /*#__PURE__*/ function(EffectsObject) {
25321
25321
  };
25322
25322
  _proto.fromData = function fromData(data) {
25323
25323
  EffectsObject.prototype.fromData.call(this, data);
25324
- var id = data.id, name = data.name, parentId = data.parentId, endBehavior = data.endBehavior, transform = data.transform, _data_duration = data.duration, duration = _data_duration === void 0 ? 0 : _data_duration;
25324
+ var id = data.id, name = data.name, parentId = data.parentId, endBehavior = data.endBehavior, transform = data.transform, _data_duration = data.duration, duration = _data_duration === void 0 ? 0 : _data_duration, _data_visible = data.visible, visible = _data_visible === void 0 ? true : _data_visible;
25325
25325
  this.props = data;
25326
25326
  this.type = data.type;
25327
25327
  this.id = id.toString(); // TODO 老数据 id 是 number,需要转换
@@ -25359,6 +25359,7 @@ exports.VFXItem = /*#__PURE__*/ function(EffectsObject) {
25359
25359
  if (VFXItem.isComposition(this)) {
25360
25360
  this.instantiatePreComposition();
25361
25361
  }
25362
+ this.setVisible(visible);
25362
25363
  };
25363
25364
  _proto.toData = function toData() {
25364
25365
  var _this_parent;
@@ -29233,7 +29234,8 @@ var TextComponentBase = /*#__PURE__*/ function() {
29233
29234
  _proto.getLineCount = function getLineCount(text, init) {
29234
29235
  var context = this.context;
29235
29236
  var _this_textLayout = this.textLayout, letterSpace = _this_textLayout.letterSpace, overflow = _this_textLayout.overflow;
29236
- var fontScale = init ? this.textStyle.fontSize / 10 : 1 / this.textStyle.fontScale;
29237
+ // const fontScale = init ? this.textStyle.fontSize / 10 : 1 / this.textStyle.fontScale;
29238
+ this.maxLineWidth = 0;
29237
29239
  var width = this.textLayout.width + this.textStyle.fontOffset;
29238
29240
  var lineCount = 1;
29239
29241
  var x = 0;
@@ -29245,7 +29247,7 @@ var TextComponentBase = /*#__PURE__*/ function() {
29245
29247
  var _context_measureText;
29246
29248
  var str = text[i];
29247
29249
  var _context_measureText_width;
29248
- var textMetrics = ((_context_measureText_width = context == null ? void 0 : (_context_measureText = context.measureText(str)) == null ? void 0 : _context_measureText.width) != null ? _context_measureText_width : 0) * fontScale;
29250
+ var textMetrics = (_context_measureText_width = context == null ? void 0 : (_context_measureText = context.measureText(str)) == null ? void 0 : _context_measureText.width) != null ? _context_measureText_width : 0;
29249
29251
  // 和浏览器行为保持一致
29250
29252
  x += letterSpace;
29251
29253
  // 处理文本结束行为
@@ -31612,7 +31614,7 @@ function getStandardSpriteContent(sprite, transform) {
31612
31614
  return ret;
31613
31615
  }
31614
31616
 
31615
- var version$1 = "2.7.0-beta.0";
31617
+ var version$1 = "2.7.0";
31616
31618
  var v0 = /^(\d+)\.(\d+)\.(\d+)(-(\w+)\.\d+)?$/;
31617
31619
  var standardVersion = /^(\d+)\.(\d+)$/;
31618
31620
  var reverseParticle = false;
@@ -34885,7 +34887,7 @@ registerPlugin("sprite", SpriteLoader, exports.VFXItem);
34885
34887
  registerPlugin("particle", ParticleLoader, exports.VFXItem);
34886
34888
  registerPlugin("cal", CalculateLoader, exports.VFXItem);
34887
34889
  registerPlugin("interact", InteractLoader, exports.VFXItem);
34888
- var version = "2.7.0-beta.0";
34890
+ var version = "2.7.0";
34889
34891
  logger.info("Core version: " + version + ".");
34890
34892
 
34891
34893
  exports.AbstractPlugin = AbstractPlugin;