@galacean/effects-core 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 +130 -140
- package/dist/composition.d.ts +4 -4
- package/dist/index.js +12 -8
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +12 -8
- package/dist/index.mjs.map +1 -1
- package/dist/plugins/cal/calculate-vfx-item.d.ts +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,162 +1,152 @@
|
|
|
1
1
|
# Galacean Effects Core
|
|
2
2
|
|
|
3
|
-
##
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
`
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
mesh
|
|
45
|
-
1. `
|
|
46
|
-
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
2. `setEditorTransformUniform`:用于设置元素在模型变换后的位移/缩放变换,引擎可以不理解这个概念,把值设置到 `semantics[EDITOR_TRANSFORM]` 上即可。
|
|
50
|
-
- [RenderPass](./src/render/render-pass.ts):添加到场景中的 mesh 可以通过 `renderPass.meshes` 获取,渲染通道 `renderPass` 包含当前通道的 mesh、渲染前后清除缓冲区的操作类型和附件,用到颜色、深度和模板附件。`delegate` 属性用于指定 `renderPass` 在渲染前后的回调,在 [filters](./src/filters) 中定义,引擎需要在真正渲染 mesh 前执行这些回调确保滤镜的正确运行。
|
|
51
|
-
- [Mesh](./src/render/mesh.ts):
|
|
52
|
-
每个 `VFXItem` 在初始化时会调用 `Mesh.create()` 函数, 传入 geometry、material 等参数,并通过 `priority` 设置/获取当前 mesh 对应的渲染顺序。
|
|
53
|
-
1. 静态 `create` 方法 用于创建一个新的引擎能够渲染的 `Mesh` 对象。引擎需要在这里把 geometry、material 等对象添加到 mesh 上。
|
|
54
|
-
- 要渲染的图元类型可以通过传入的 `geometry.mode` 获取
|
|
55
|
-
2. `priority` 的 `setter` 和 `getter` 函数用于设置当前 mesh 的渲染顺序,`priority` 值小的 mesh 应该比值大的先绘制。
|
|
56
|
-
3. `setVisible/getVisible` 设置 mesh 的可见性
|
|
3
|
+
## Basic Concepts
|
|
4
|
+
In Galacean Effects, a Composition is the unit of animation playback. It is managed by the abstract class `Composition`, which is responsible for parsing data (JSON -> VFXItem / Texture -> mesh), creating and updating render frames (`renderFrame`) and render passes (renderPass).
|
|
5
|
+
|
|
6
|
+
Each composition uses animation data for different types of elements (`VFXItems`), including camera properties, multiple layers, particles, and interactive elements. When a composition is created, it completes the creation of elements (`VFXItems`), loading and creation of animation texture maps (`Textures`), and initialization of render frames (`renderFrame`) and render passes (`renderPass`).
|
|
7
|
+
At the beginning of the composition's lifecycle, the corresponding mesh is added to the default render pass (`renderPass`).
|
|
8
|
+
During the lifecycle, the `Geometry` and `Material` data contained in the mesh is updated.
|
|
9
|
+
When post-processing is required, the mesh is split into the appropriate `renderPass`.At the end of the lifecycle, the corresponding mesh is removed from the `renderFrame`.
|
|
10
|
+
|
|
11
|
+
To play the animation, the engine retrieves the mesh from the `renderFrame` and adds it to the scene, continuously calls the update function of the `Composition` during the rendering loop to `update` the data.
|
|
12
|
+
|
|
13
|
+
## Process
|
|
14
|
+
### 1. Resource Loading and Creation
|
|
15
|
+
- Asset Download [AssetManager](./src/asset-manager.ts): Before playing the animation, JSON data along with binary resources (`processBins`) and image resources (`processImages`) are downloaded. Upon completion of image downloads, parameters for creating textures (`Texture`) are returned. In addition to basic resource downloading functionality, the following features are supported:
|
|
16
|
+
1. Selective downloading of resources based on rendering levels.
|
|
17
|
+
2. After loading the image, image/text replacement is performed according to the configuration, and the modified image is saved as an `imageData` object by drawing on a Canvas.
|
|
18
|
+
3. Enable the gl extension `KHR_parallel_shader_compile` to compile shaders after resource loading is completed.
|
|
19
|
+
- Texture Creation [Texture](./src/texture/texture.ts): `Textures` are created based on the parameters obtained from the resource download process. The current texture object may be based on one of the creation types defined in the `TextureSourceType` enumeration.
|
|
20
|
+
|
|
21
|
+
### 2. Animation Playback
|
|
22
|
+
- [Composition](./src/composition.ts): The composition manages the data processing and rendering setup for animation playback. The `initialize` function is called to initialize the `VFXItemManager` for JSON -> VFXItem processing. Additionally, the engine needs to retrieve the mesh when appropriate through `composition.renderFrame` and add the retrieved mesh to the scene.
|
|
23
|
+
1. Static `initialize` method:
|
|
24
|
+
- The engine needs to implement the creation of `VFXItemManager`, `Composition` instances, and converting texture parameters to `Texture` usable by the engine.
|
|
25
|
+
2. In the constructor, the following functions need to be called:
|
|
26
|
+
- Plugin system `pluginSystem.initializeComposition()`.
|
|
27
|
+
- `composition.resetRenderFrame()`: Create and initialize the `renderFrame`.
|
|
28
|
+
- `composition.reset()`: Parse the animation data and initialize the state of the render instance.
|
|
29
|
+
- `composition.play()`: Start playing the composition animation.
|
|
30
|
+
3. `update` method: Used to call the `renderFrame`'s methods to add/modify/delete meshes and drive the update and vertex data, uniform variable values, etc., of `VFXItems`. The following functions need to be implemented:
|
|
31
|
+
- `updateVideo`: Update video frames for video playback.
|
|
32
|
+
- `getRendererOptions`: Return a blank `Texture` created using the data.
|
|
33
|
+
- `reloadTexture/offloadTexture`: Reload/unload textures.
|
|
34
|
+
4. The mesh or rendering objects added to the scene can be retrieved through the `renderFrame`, and the interface can be freely designed in the `Composition` according to the engine's needs.
|
|
35
|
+
5. `dispose` method: When the composition's lifecycle comes to an end, this method is called based on the termination behavior. It executes the composition's disposal callback for `VFXItem` and also destroys associated objects such as meshes and textures.
|
|
36
|
+
|
|
37
|
+
- [RenderFrame](./src/render/render-frame.ts): The `RenderFrame` can be understood as the rendering data object corresponding to each frame of the composition. In addition to managing the `renderPass`, it also stores the camera properties and common uniform variable table (semantics) associated with the composition. The meshes corresponding to different types of elements are added and removed using `addMeshToDefaultRenderPass` and `removeMeshFromDefaultRenderPass` methods of `renderFrame`. The mesh is added to the appropriate position in the `renderPass` based on its `priority` property.
|
|
38
|
+
1. `addMeshToDefaultRenderPass/removeMeshFromDefaultRenderPass`:
|
|
39
|
+
- For compositions without filter elements, the engine can manage all meshes through the `defRenderPass`, or it can directly place the passed-in mesh into its own scene. The engine can also organize and manage the meshes as required.
|
|
40
|
+
- For compositions with filter elements involving post-processing, the effects-core will call the `splitDefaultRenderPassByMesh` function to split the `renderPass` using the splitting parameters. In this case, the engine needs to iterate over `renderFrame._renderPasses` to retrieve meshes and add them to the scene.
|
|
41
|
+
- When adding a mesh, the common uniforms used by the material can be obtained through `mesh.material.uniformSemantics`, including matrices related to MVP transformations and the attachments used.
|
|
42
|
+
2. `setEditorTransformUniform`: This method is used to set the translation/scaling transformation of an element after model transformation. The engine may not necessarily understand this concept but can set the value to `semantics[EDITOR_TRANSFORM]`.
|
|
43
|
+
- [RenderPass](./src/render/render-pass.ts): The meshes added to the scene can be obtained through `renderPass.meshes`. The render pass `renderPass` contains the meshes for the current pass, the operations for clearing the buffer before and after rendering, and attachments related to color, depth, and stencil. The `delegate` property is used to specify the callbacks before and after rendering for the `renderPass`, as defined in [filters](./src/filters). The engine needs to execute these callbacks before actually rendering the meshes to ensure the correct operation of the filters.
|
|
44
|
+
- [Mesh](./src/render/mesh.ts): Each `VFXItem` calls the `Mesh.create()` function during initialization, passing in parameters such as geometry and material, and sets/retrieves the rendering order for the current mesh using `priority`.
|
|
45
|
+
1. The static `create` method is used to create a new `Mesh` object that the engine can render. The engine needs to add geometry, material, and other objects to the mesh here.
|
|
46
|
+
- The primitive type to be rendered can be obtained from `geometry.mode`.
|
|
47
|
+
2. The `setter` and `getter` functions for `priority` are used to set the rendering order of the current mesh. Meshes with lower `priority` values should be drawn before those with higher values.
|
|
48
|
+
3. `setVisible/getVisible` sets the visibility of the mesh.
|
|
57
49
|
|
|
58
50
|
> Tips
|
|
59
51
|
>
|
|
60
|
-
> -
|
|
61
|
-
> -
|
|
62
|
-
|
|
63
|
-
### 3
|
|
64
|
-
|
|
65
|
-
1.
|
|
66
|
-
|
|
67
|
-
2. `setAttributeData/getAttributeData
|
|
68
|
-
3. `setAttributeSubData
|
|
69
|
-
4. `getIndexData/setIndexData
|
|
70
|
-
5. `setDrawCount/getDrawCount
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
####
|
|
52
|
+
> - Each `spriteVFXItem` does not necessarily correspond to a single mesh. Layer elements are compared using a diff algorithm during frame updates to determine whether adjacent meshes have the same material properties, and then the meshes are split or merged accordingly.
|
|
53
|
+
> - To obtain the mesh corresponding to the current `VFXItem`, you can use `VFXItem.content.mesh` to retrieve it.
|
|
54
|
+
|
|
55
|
+
### 3. [Geometry](./src/render/geometry.ts)
|
|
56
|
+
Each `VFXItem` calls the `Geometry.create()` function during initialization, passing in the drawing type, vertex data, and index data of the element. During each frame update, new vertex data is passed to the attribute data.
|
|
57
|
+
1. The static create method: It processes the passed attribute data. If the data contains the dataSource property, it indicates that the attribute shares a buffer with the data source.
|
|
58
|
+
- `size`, `offset`, and `stride` are also passed in. If the data length is 0 and the engine does not allow dynamic modification of the GPU cache length, an initialization array should be created using the `maxVertex` parameter.
|
|
59
|
+
2. `setAttributeData/getAttributeData`: Sets/retrieves attribute data for the specified attribute name.
|
|
60
|
+
3. `setAttributeSubData`: Sets partial attribute updates.
|
|
61
|
+
4. `getIndexData/setIndexData`: Sets/retrieves index data.
|
|
62
|
+
5. `setDrawCount/getDrawCount`: Sets/retrieves the draw count.
|
|
63
|
+
|
|
64
|
+
Attributes involved:
|
|
65
|
+
#### Sprite
|
|
74
66
|
```
|
|
75
|
-
1. aPoint
|
|
76
|
-
2. aIndex Float32Array
|
|
77
|
-
3.
|
|
67
|
+
1. aPoint: Float32Array - Vertex data
|
|
68
|
+
2. aIndex: Float32Array - Shared buffer with aPoint
|
|
69
|
+
3. Index data: Uint16Array
|
|
78
70
|
```
|
|
79
71
|
|
|
80
|
-
####
|
|
72
|
+
#### Particle
|
|
81
73
|
```
|
|
82
|
-
1. aPos Float32Array
|
|
83
|
-
2. aVel Float32Array
|
|
84
|
-
3. aDirX Float32Array
|
|
85
|
-
4. aDirY Float32Array
|
|
86
|
-
5. aRot Float32Array
|
|
87
|
-
6. aSeed Float32Array
|
|
88
|
-
7. aColor Float32Array
|
|
89
|
-
8. aOffset Float32Array
|
|
90
|
-
9. aSprite Float32Array
|
|
91
|
-
10.
|
|
74
|
+
1. aPos: Float32Array
|
|
75
|
+
2. aVel: Float32Array - Shared buffer with aPos
|
|
76
|
+
3. aDirX: Float32Array - Shared buffer with aPos
|
|
77
|
+
4. aDirY: Float32Array - Shared buffer with aPos
|
|
78
|
+
5. aRot: Float32Array - Shared buffer with aPos
|
|
79
|
+
6. aSeed: Float32Array - Shared buffer with aRot
|
|
80
|
+
7. aColor: Float32Array - Shared buffer with aRot
|
|
81
|
+
8. aOffset: Float32Array
|
|
82
|
+
9. aSprite: Float32Array
|
|
83
|
+
10. Index data: Uint16Array
|
|
92
84
|
```
|
|
93
85
|
|
|
94
|
-
####
|
|
86
|
+
#### Particle-trail
|
|
95
87
|
```
|
|
96
|
-
1. aColor Float32Array
|
|
97
|
-
2. aSeed
|
|
98
|
-
3. aInfo
|
|
99
|
-
4. aPos
|
|
100
|
-
5. aTime
|
|
101
|
-
6. aDir
|
|
102
|
-
7. aTrailStart Float32Array
|
|
103
|
-
8. aTrailStartIndex Float32Array
|
|
88
|
+
1. aColor: Float32Array
|
|
89
|
+
2. aSeed: Float32Array - Shared buffer with aColor
|
|
90
|
+
3. aInfo: Float32Array - Shared buffer with aColor
|
|
91
|
+
4. aPos: Float32Array - Shared buffer with aColor
|
|
92
|
+
5. aTime: Float32Array
|
|
93
|
+
6. aDir: Float32Array
|
|
94
|
+
7. aTrailStart: Float32Array
|
|
95
|
+
8. aTrailStartIndex: Float32Array
|
|
104
96
|
```
|
|
105
97
|
|
|
106
|
-
### 4
|
|
107
|
-
|
|
108
|
-
1.
|
|
109
|
-
2.
|
|
110
|
-
3.
|
|
98
|
+
### 4. [Material](./src/material/material.ts)
|
|
99
|
+
Each `VFXItem` calls the `Material.create()` function during initialization, passing the shader and uniform semantics. The states and uniform data of the material are not passed in the constructor parameters but are set through functions after material creation.
|
|
100
|
+
1. Static `create` method: It needs to handle the provided shader text and set the `uniformSemantics`.
|
|
101
|
+
2. Implementation of `setter/getter` methods for states: The constant type passed is `glContext`, which may need to be converted to constants defined by the engine.
|
|
102
|
+
3. `set[dataType]/get[dataType]` methods for uniforms: effects-core will invoke the corresponding methods based on the type of the uniform to set data.
|
|
111
103
|
|
|
112
|
-
>
|
|
113
|
-
>
|
|
104
|
+
> ⚠️ Note:
|
|
105
|
+
> **The related UBO calls are deprecated, and `material-data-block` does not need to be implemented.**
|
|
114
106
|
|
|
115
|
-
|
|
116
|
-
####
|
|
107
|
+
Uniforms involved and their types:
|
|
108
|
+
#### Sprite
|
|
117
109
|
```
|
|
118
|
-
1. uMainData mat4
|
|
119
|
-
2. uTexParams vec4
|
|
120
|
-
3. uTexOffset vec4
|
|
121
|
-
4. uSampler\[i] sampler2D
|
|
122
|
-
5. uSamplerPre sampler2D
|
|
123
|
-
6. uFeatherSampler sampler2D
|
|
110
|
+
1. uMainData: mat4
|
|
111
|
+
2. uTexParams: vec4
|
|
112
|
+
3. uTexOffset: vec4
|
|
113
|
+
4. uSampler\[i]: sampler2D
|
|
114
|
+
5. uSamplerPre: sampler2D
|
|
115
|
+
6. uFeatherSampler: sampler2D
|
|
124
116
|
```
|
|
125
117
|
|
|
126
|
-
####
|
|
118
|
+
#### Particle
|
|
127
119
|
```
|
|
128
|
-
1. uSprite vec4
|
|
129
|
-
2. uParams vec4
|
|
130
|
-
3. uAcceleration vec4
|
|
131
|
-
4. uGravityModifierValue vec4
|
|
132
|
-
5. uOpacityOverLifetimeValue vec4
|
|
133
|
-
6. uRXByLifeTimeValue vec4
|
|
134
|
-
7. uRYByLifeTimeValue vec4
|
|
135
|
-
8. uRZByLifeTimeValue vec4
|
|
136
|
-
9. uLinearXByLifetimeValue vec4
|
|
137
|
-
10. uLinearYByLifetimeValue vec4
|
|
138
|
-
11. uLinearZByLifetimeValue vec4
|
|
139
|
-
12. uSpeedLifetimeValue vec4
|
|
140
|
-
13. uOrbXByLifetimeValue vec4
|
|
141
|
-
14. uOrbYByLifetimeValue vec4
|
|
142
|
-
15. uOrbZByLifetimeValue vec4
|
|
143
|
-
16. uSizeByLifetimeValue vec4
|
|
144
|
-
17. uSizeYByLifetimeValue
|
|
145
|
-
18. uColorParams vec4
|
|
146
|
-
19. uFSprite vec4
|
|
147
|
-
20. uPreviewColor vec4
|
|
148
|
-
21. uVCurveValues vec4Array
|
|
149
|
-
22. uFCurveValues vec4
|
|
150
|
-
23. uFinalTarget vec3
|
|
151
|
-
24. uForceCurve vec4
|
|
152
|
-
25. uOrbCenter vec3
|
|
153
|
-
26. uTexOffset vec2
|
|
154
|
-
27. uPeriodValue vec4
|
|
155
|
-
28. uMovementValue vec4
|
|
156
|
-
29. uStrengthValue vec4
|
|
157
|
-
30. uWaveParams vec4
|
|
120
|
+
1. uSprite: vec4
|
|
121
|
+
2. uParams: vec4
|
|
122
|
+
3. uAcceleration: vec4
|
|
123
|
+
4. uGravityModifierValue: vec4
|
|
124
|
+
5. uOpacityOverLifetimeValue: vec4
|
|
125
|
+
6. uRXByLifeTimeValue: vec4
|
|
126
|
+
7. uRYByLifeTimeValue: vec4
|
|
127
|
+
8. uRZByLifeTimeValue: vec4
|
|
128
|
+
9. uLinearXByLifetimeValue: vec4
|
|
129
|
+
10. uLinearYByLifetimeValue: vec4
|
|
130
|
+
11. uLinearZByLifetimeValue: vec4
|
|
131
|
+
12. uSpeedLifetimeValue: vec4
|
|
132
|
+
13. uOrbXByLifetimeValue: vec4
|
|
133
|
+
14. uOrbYByLifetimeValue: vec4
|
|
134
|
+
15. uOrbZByLifetimeValue: vec4
|
|
135
|
+
16. uSizeByLifetimeValue: vec4
|
|
136
|
+
17. uSizeYByLifetimeValue:vec4
|
|
137
|
+
18. uColorParams: vec4
|
|
138
|
+
19. uFSprite: vec4
|
|
139
|
+
20. uPreviewColor: vec4
|
|
140
|
+
21. uVCurveValues: vec4Array
|
|
141
|
+
22. uFCurveValues: vec4
|
|
142
|
+
23. uFinalTarget: vec3
|
|
143
|
+
24. uForceCurve: vec4
|
|
144
|
+
25. uOrbCenter: vec3
|
|
145
|
+
26. uTexOffset: vec2
|
|
146
|
+
27. uPeriodValue: vec4
|
|
147
|
+
28. uMovementValue: vec4
|
|
148
|
+
29. uStrengthValue: vec4
|
|
149
|
+
30. uWaveParams: vec4
|
|
158
150
|
```
|
|
159
151
|
|
|
160
|
-
## API
|
|
161
|
-
|
|
162
|
-
[Galacean Effects Core API 文档](https://galacean.antgroup.com/effects/#/api/modules_galacean_effects_core)
|
|
152
|
+
## [API Documentation](https://galacean.antgroup.com/effects/#/api/modules_galacean_effects_core)
|
package/dist/composition.d.ts
CHANGED
|
@@ -181,14 +181,14 @@ export declare class Composition implements Disposable, LostHandler {
|
|
|
181
181
|
* 获取合成当前时间
|
|
182
182
|
*/
|
|
183
183
|
get time(): number;
|
|
184
|
-
/**
|
|
185
|
-
* 获取合成的时长
|
|
186
|
-
*/
|
|
187
|
-
getDuration(): number;
|
|
188
184
|
/**
|
|
189
185
|
* 获取销毁状态
|
|
190
186
|
*/
|
|
191
187
|
get isDestroyed(): boolean;
|
|
188
|
+
/**
|
|
189
|
+
* 获取合成的时长
|
|
190
|
+
*/
|
|
191
|
+
getDuration(): number;
|
|
192
192
|
/**
|
|
193
193
|
* 重新开始合成
|
|
194
194
|
*/
|
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:
|
|
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.
|
|
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
|
*/
|