@galacean/effects 1.2.1 → 1.2.2

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 player for the web
4
4
  * Author: Ant Group CO., Ltd.
5
5
  * Contributors: 燃然,飂兮,十弦,云垣,茂安,意绮
6
- * Version: v1.2.1
6
+ * Version: v1.2.2
7
7
  */
8
8
 
9
9
  'use strict';
@@ -19972,9 +19972,10 @@ var TextItem = /** @class */ (function (_super) {
19972
19972
  if (this.textStyle.fontSize === value) {
19973
19973
  return;
19974
19974
  }
19975
+ // 保证字号变化后位置正常
19976
+ var diff = this.textStyle.fontSize - value;
19977
+ this.textLayout.lineHeight += diff;
19975
19978
  this.textStyle.fontSize = value;
19976
- // 1.5175 = 31.43 / 20
19977
- this.textLayout.lineHeight = this.textStyle.fontSize * 1.5175;
19978
19979
  this.isDirty = true;
19979
19980
  };
19980
19981
  /**
@@ -30293,7 +30294,7 @@ var Player = /** @class */ (function () {
30293
30294
  }());
30294
30295
  function isSceneWithOptions(scene) {
30295
30296
  // TODO: 判断不太优雅,后期试情况优化
30296
- return isObject(scene) && 'scene' in scene;
30297
+ return isObject(scene) && 'scene' in scene && 'options' in scene;
30297
30298
  }
30298
30299
  /**
30299
30300
  * 禁止/允许创建新的播放器,已创建的不受影响
@@ -30423,7 +30424,7 @@ Renderer.create = function (canvas, framework, renderOptions) {
30423
30424
  Engine.create = function (gl) {
30424
30425
  return new GLEngine(gl);
30425
30426
  };
30426
- var version = "1.2.1";
30427
+ var version = "1.2.2";
30427
30428
  logger.info('player version: ' + version);
30428
30429
 
30429
30430
  exports.AbstractPlugin = AbstractPlugin;