@galacean/effects 0.0.1-alpha.2 → 1.0.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/README.md CHANGED
@@ -1,13 +1,12 @@
1
1
  # Galacean Effects Player
2
2
 
3
- Galacean Effects Player 用于播放 Galacean Effects 的动效产物。
4
- Galacean Effects Player 的底层渲染引擎是 WebGL,能够高性能地支持粒子、3D、滤镜等特性,实时展现惊艳的视觉表现效果。
3
+ Galacean Effects Player is used to play the animations created with Galacean Effects. The underlying rendering engine of Galacean Effects Player is WebGL, which provides high-performance support for features such as particles, 3D, and filters, allowing for stunning visual effects in real-time.
5
4
 
6
- ## 使用文档
5
+ ## Documentation
7
6
 
8
- 通过阅读[Galacean Effects 开发者文档》](https://galacean.antgroup.com/effects/#/user/gasrv4ka5sacrwpg)文档,你会了解到更多的 Galacean Effects Player 开发互动项目的姿势。
7
+ By reading the [Galacean Effects Developer Documentation](https://galacean.antgroup.com/effects/#/user/gasrv4ka5sacrwpg), you will learn more about how to develop interactive projects using Galacean Effects Player.
9
8
 
10
- ## API 文档
9
+ ## API Documentation
11
10
 
12
- [Galacean Effects API 文档](https://galacean.antgroup.com/effects/#/api/modules_galacean_effects)
11
+ [Galacean Effects API Documentation](https://galacean.antgroup.com/effects/#/api/modules_galacean_effects)
13
12
 
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: v0.0.1-alpha.2
6
+ * Version: v1.0.0
7
7
  */
8
8
 
9
9
  'use strict';
@@ -15260,7 +15260,7 @@ var SpriteGroup = /** @class */ (function () {
15260
15260
  for (var i = startIndex; i <= endIndex; i++) {
15261
15261
  var item = items[i];
15262
15262
  // 不可见的元素跳过 不参与合并
15263
- if (!init && (!item.contentVisible || item.lifetime < 0)) {
15263
+ if (!init && (!item.started || item.lifetime < 0)) {
15264
15264
  continue;
15265
15265
  }
15266
15266
  if (!isSprite(item)) {
@@ -19465,6 +19465,10 @@ var CalculateVFXItem = /** @class */ (function (_super) {
19465
19465
  CalculateVFXItem.prototype.setScale = function (x, y, z) {
19466
19466
  this.content.startSize = [x, y, z];
19467
19467
  };
19468
+ CalculateVFXItem.prototype.scale = function (x, y, z) {
19469
+ var startSize = this.content.startSize.slice();
19470
+ this.content.startSize = [x * startSize[0], y * startSize[1], z * startSize[2]];
19471
+ };
19468
19472
  CalculateVFXItem.prototype.getHitTestParams = function (force) {
19469
19473
  };
19470
19474
  CalculateVFXItem.prototype.getRenderData = function () {
@@ -25205,12 +25209,6 @@ var Composition = /** @class */ (function () {
25205
25209
  enumerable: false,
25206
25210
  configurable: true
25207
25211
  });
25208
- /**
25209
- * 获取合成的时长
25210
- */
25211
- Composition.prototype.getDuration = function () {
25212
- return this.content.duration;
25213
- };
25214
25212
  Object.defineProperty(Composition.prototype, "isDestroyed", {
25215
25213
  /**
25216
25214
  * 获取销毁状态
@@ -25221,6 +25219,12 @@ var Composition = /** @class */ (function () {
25221
25219
  enumerable: false,
25222
25220
  configurable: true
25223
25221
  });
25222
+ /**
25223
+ * 获取合成的时长
25224
+ */
25225
+ Composition.prototype.getDuration = function () {
25226
+ return this.content.duration;
25227
+ };
25224
25228
  /**
25225
25229
  * 重新开始合成
25226
25230
  */
@@ -30874,25 +30878,6 @@ var Player = /** @class */ (function () {
30874
30878
  });
30875
30879
  }
30876
30880
  };
30877
- /**
30878
- * 修改播放器的配置
30879
- * @param config - 播放配置,当前仅支持修改合成播放速度
30880
- */
30881
- Player.prototype.config = function (config) {
30882
- var singleComp = typeof config.compositionName === 'string';
30883
- if ('speed' in config) {
30884
- var speed_1 = +(config.speed || 1);
30885
- if (singleComp) {
30886
- var comp = this.compositions.find(function (comp) { return comp.name === config.compositionName; });
30887
- if (comp) {
30888
- comp.speed = speed_1;
30889
- }
30890
- }
30891
- else {
30892
- this.compositions.forEach(function (comp) { return (comp.speed = speed_1); });
30893
- }
30894
- }
30895
- };
30896
30881
  /**
30897
30882
  * 清空 canvas 的画面
30898
30883
  * @param immediate - 如果立即清理,当前画面将会消失,如果 player 还有合成在渲染,可能出现闪烁
@@ -31139,9 +31124,9 @@ Renderer.create = function (canvas, framework, renderOptions) {
31139
31124
  Engine.create = function (gl) {
31140
31125
  return new GLEngine(gl);
31141
31126
  };
31142
- var version = "0.0.1-alpha.2";
31127
+ var version = "1.0.0";
31143
31128
  console.info({
31144
- content: '[Galacean Effects Player] version: ' + "0.0.1-alpha.2",
31129
+ content: '[Galacean Effects Player] version: ' + "1.0.0",
31145
31130
  type: LOG_TYPE,
31146
31131
  });
31147
31132