@galacean/effects-core 2.1.0-alpha.6 → 2.1.0-alpha.8

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.
Files changed (83) hide show
  1. package/dist/animation/color-playable.d.ts +26 -0
  2. package/dist/animation/index.d.ts +1 -0
  3. package/dist/asset-manager.d.ts +8 -1
  4. package/dist/asset.d.ts +4 -0
  5. package/dist/comp-vfx-item.d.ts +2 -5
  6. package/dist/components/base-render-component.d.ts +99 -0
  7. package/dist/components/index.d.ts +1 -0
  8. package/dist/components/post-process-volume.d.ts +2 -3
  9. package/dist/components/shape-component.d.ts +40 -6
  10. package/dist/composition/scene-ticking.d.ts +1 -1
  11. package/dist/composition-source-manager.d.ts +4 -5
  12. package/dist/composition.d.ts +7 -8
  13. package/dist/downloader.d.ts +0 -3
  14. package/dist/index.d.ts +3 -1
  15. package/dist/index.js +19192 -18276
  16. package/dist/index.js.map +1 -1
  17. package/dist/index.mjs +19187 -18275
  18. package/dist/index.mjs.map +1 -1
  19. package/dist/math/index.d.ts +1 -1
  20. package/dist/math/translate.d.ts +1 -1
  21. package/dist/math/value-getters/color-curve.d.ts +12 -0
  22. package/dist/math/value-getters/index.d.ts +4 -0
  23. package/dist/math/value-getters/value-getter-map.d.ts +2 -0
  24. package/dist/math/{value-getter.d.ts → value-getters/value-getter.d.ts} +3 -4
  25. package/dist/math/value-getters/vector4-curve.d.ts +12 -0
  26. package/dist/plugin-system.d.ts +7 -5
  27. package/dist/plugins/cal/calculate-item.d.ts +5 -3
  28. package/dist/plugins/cal/calculate-loader.d.ts +1 -1
  29. package/dist/plugins/cal/calculate-vfx-item.d.ts +1 -1
  30. package/dist/plugins/cal/playable-graph.d.ts +1 -1
  31. package/dist/plugins/camera/camera-vfx-item-loader.d.ts +1 -1
  32. package/dist/plugins/index.d.ts +1 -7
  33. package/dist/plugins/interact/interact-item.d.ts +11 -0
  34. package/dist/plugins/interact/interact-loader.d.ts +1 -1
  35. package/dist/plugins/particle/particle-system.d.ts +1 -2
  36. package/dist/plugins/plugin.d.ts +14 -3
  37. package/dist/plugins/shape/ellipse.d.ts +79 -0
  38. package/dist/plugins/shape/graphics-path.d.ts +28 -0
  39. package/dist/plugins/shape/point-like.d.ts +31 -0
  40. package/dist/plugins/shape/point.d.ts +58 -0
  41. package/dist/plugins/shape/polygon.d.ts +12 -5
  42. package/dist/plugins/shape/rectangle.d.ts +129 -0
  43. package/dist/plugins/shape/shape-path.d.ts +25 -3
  44. package/dist/plugins/shape/shape-primitive.d.ts +18 -0
  45. package/dist/plugins/shape/triangle.d.ts +89 -0
  46. package/dist/plugins/sprite/sprite-item.d.ts +17 -111
  47. package/dist/plugins/sprite/sprite-loader.d.ts +1 -1
  48. package/dist/plugins/sprite/sprite-mesh.d.ts +3 -4
  49. package/dist/plugins/text/text-item.d.ts +15 -5
  50. package/dist/plugins/timeline/index.d.ts +3 -0
  51. package/dist/plugins/timeline/playable-assets/color-property-playable-asset.d.ts +7 -0
  52. package/dist/plugins/timeline/playable-assets/float-property-playable-asset.d.ts +7 -0
  53. package/dist/plugins/timeline/playable-assets/index.d.ts +3 -0
  54. package/dist/plugins/{cal → timeline/playable-assets}/timeline-asset.d.ts +7 -4
  55. package/dist/plugins/timeline/playable-assets/vector4-property-playable-asset.d.ts +7 -0
  56. package/dist/plugins/timeline/playables/color-property-mixer-playable.d.ts +6 -0
  57. package/dist/plugins/timeline/playables/float-property-mixer-playable.d.ts +6 -0
  58. package/dist/plugins/timeline/playables/index.d.ts +7 -0
  59. package/dist/plugins/timeline/playables/property-clip-playable.d.ts +8 -0
  60. package/dist/plugins/timeline/playables/vector4-property-mixer-playable.d.ts +6 -0
  61. package/dist/plugins/timeline/track-instance.d.ts +14 -0
  62. package/dist/plugins/timeline/track.d.ts +4 -2
  63. package/dist/plugins/timeline/tracks/color-property-track.d.ts +5 -0
  64. package/dist/plugins/timeline/tracks/float-property-track.d.ts +6 -0
  65. package/dist/plugins/timeline/tracks/index.d.ts +9 -0
  66. package/dist/plugins/timeline/tracks/material-track.d.ts +5 -0
  67. package/dist/plugins/timeline/tracks/property-track.d.ts +8 -0
  68. package/dist/plugins/timeline/tracks/sub-composition-track.d.ts +1 -1
  69. package/dist/plugins/timeline/tracks/vector4-property-track.d.ts +5 -0
  70. package/dist/render/index.d.ts +0 -1
  71. package/dist/render/mesh.d.ts +1 -1
  72. package/dist/render/render-frame.d.ts +5 -1
  73. package/dist/render/renderer.d.ts +1 -1
  74. package/dist/render/semantic-map.d.ts +1 -1
  75. package/dist/serialization-helper.d.ts +3 -3
  76. package/dist/texture/texture.d.ts +9 -0
  77. package/dist/utils/color.d.ts +4 -5
  78. package/dist/utils/index.d.ts +1 -1
  79. package/dist/vfx-item.d.ts +0 -9
  80. package/package.json +2 -2
  81. package/dist/image-asset.d.ts +0 -5
  82. package/dist/render/global-volume.d.ts +0 -17
  83. /package/dist/plugins/timeline/{playables → playable-assets}/sub-composition-playable-asset.d.ts +0 -0
@@ -2,15 +2,16 @@
2
2
  * Based on:
3
3
  * https://github.com/pixijs/pixijs/blob/dev/src/scene/graphics/shared/path/ShapePath.ts
4
4
  */
5
- import type { Matrix3 } from '@galacean/effects-math/es/core/matrix3';
5
+ import type { Matrix4 } from '@galacean/effects-math/es/core/matrix4';
6
6
  import { Polygon } from './polygon';
7
7
  import type { GraphicsPath } from './graphics-path';
8
+ import type { ShapePrimitive } from './shape-primitive';
8
9
  export declare class ShapePath {
9
10
  private graphicsPath;
10
11
  currentPoly: Polygon | null;
11
12
  shapePrimitives: {
12
- shape: Polygon;
13
- transform?: Matrix3;
13
+ shape: ShapePrimitive;
14
+ transform?: Matrix4;
14
15
  }[];
15
16
  constructor(graphicsPath: GraphicsPath);
16
17
  /** Builds the path. */
@@ -30,6 +31,27 @@ export declare class ShapePath {
30
31
  */
31
32
  bezierCurveTo(cp1x: number, cp1y: number, cp2x: number, cp2y: number, x: number, y: number, smoothness?: number): ShapePath;
32
33
  moveTo(x: number, y: number): ShapePath;
34
+ /**
35
+ * Draws an ellipse at the specified location and with the given x and y radii.
36
+ * An optional transformation can be applied, allowing for rotation, scaling, and translation.
37
+ * @param x - The x-coordinate of the center of the ellipse.
38
+ * @param y - The y-coordinate of the center of the ellipse.
39
+ * @param radiusX - The horizontal radius of the ellipse.
40
+ * @param radiusY - The vertical radius of the ellipse.
41
+ * @param transform - An optional `Matrix` object to apply a transformation to the ellipse. This can include rotations.
42
+ * @returns The instance of the current object for chaining.
43
+ */
44
+ ellipse(x: number, y: number, radiusX: number, radiusY: number, transform?: Matrix4): this;
45
+ /**
46
+ * Draws a given shape on the canvas.
47
+ * This is a generic method that can draw any type of shape specified by the `ShapePrimitive` parameter.
48
+ * An optional transformation matrix can be applied to the shape, allowing for complex transformations.
49
+ * @param shape - The shape to draw, defined as a `ShapePrimitive` object.
50
+ * @param matrix - An optional `Matrix` for transforming the shape. This can include rotations,
51
+ * scaling, and translations.
52
+ * @returns The instance of the current object for chaining.
53
+ */
54
+ drawShape(shape: ShapePrimitive, matrix?: Matrix4): this;
33
55
  /**
34
56
  * Starts a new polygon path from the specified starting point.
35
57
  * This method initializes a new polygon or ends the current one if it exists.
@@ -0,0 +1,18 @@
1
+ export declare abstract class ShapePrimitive {
2
+ /** Checks whether the x and y coordinates passed to this function are contained within this ShapePrimitive. */
3
+ abstract contains(x: number, y: number): boolean;
4
+ /** Checks whether the x and y coordinates passed to this function are contained within the stroke of this shape */
5
+ /** Creates a clone of this ShapePrimitive instance. */
6
+ abstract clone(): ShapePrimitive;
7
+ /** Copies the properties from another ShapePrimitive to this ShapePrimitive. */
8
+ abstract copyFrom(source: ShapePrimitive): void;
9
+ /** Copies the properties from this ShapePrimitive to another ShapePrimitive. */
10
+ abstract copyTo(destination: ShapePrimitive): void;
11
+ /** Returns the framing rectangle of the ShapePrimitive as a Rectangle object. */
12
+ /** The X coordinate of the shape */
13
+ abstract getX(): number;
14
+ /** The Y coordinate of the shape */
15
+ abstract getY(): number;
16
+ abstract build(points: number[]): void;
17
+ abstract triangulate(points: number[], vertices: number[], verticesOffset: number, indices: number[], indicesOffset: number): void;
18
+ }
@@ -0,0 +1,89 @@
1
+ import { Rectangle } from './rectangle';
2
+ import { ShapePrimitive } from './shape-primitive';
3
+ /**
4
+ * A class to define a shape of a triangle via user defined coordinates.
5
+ *
6
+ * Create a `Triangle` object with the `x`, `y`, `x2`, `y2`, `x3`, `y3` properties.
7
+ */
8
+ export declare class Triangle extends ShapePrimitive {
9
+ /**
10
+ * The X coord of the first point.
11
+ * @default 0
12
+ */
13
+ x: number;
14
+ /**
15
+ * The Y coord of the first point.
16
+ * @default 0
17
+ */
18
+ y: number;
19
+ /**
20
+ * The X coord of the second point.
21
+ * @default 0
22
+ */
23
+ x2: number;
24
+ /**
25
+ * The Y coord of the second point.
26
+ * @default 0
27
+ */
28
+ y2: number;
29
+ /**
30
+ * The X coord of the third point.
31
+ * @default 0
32
+ */
33
+ x3: number;
34
+ /**
35
+ * The Y coord of the third point.
36
+ * @default 0
37
+ */
38
+ y3: number;
39
+ /**
40
+ * @param x - The X coord of the first point.
41
+ * @param y - The Y coord of the first point.
42
+ * @param x2 - The X coord of the second point.
43
+ * @param y2 - The Y coord of the second point.
44
+ * @param x3 - The X coord of the third point.
45
+ * @param y3 - The Y coord of the third point.
46
+ */
47
+ constructor(x?: number, y?: number, x2?: number, y2?: number, x3?: number, y3?: number);
48
+ /**
49
+ * Checks whether the x and y coordinates given are contained within this triangle
50
+ * @param x - The X coordinate of the point to test
51
+ * @param y - The Y coordinate of the point to test
52
+ * @returns Whether the x/y coordinates are within this Triangle
53
+ */
54
+ contains(x: number, y: number): boolean;
55
+ /**
56
+ * Checks whether the x and y coordinates given are contained within this triangle including the stroke.
57
+ * @param pointX - The X coordinate of the point to test
58
+ * @param pointY - The Y coordinate of the point to test
59
+ * @param strokeWidth - The width of the line to check
60
+ * @returns Whether the x/y coordinates are within this triangle
61
+ */
62
+ /**
63
+ * Creates a clone of this Triangle
64
+ * @returns a copy of the triangle
65
+ */
66
+ clone(): ShapePrimitive;
67
+ /**
68
+ * Copies another triangle to this one.
69
+ * @param triangle - The triangle to copy from.
70
+ * @returns Returns itself.
71
+ */
72
+ copyFrom(triangle: Triangle): this;
73
+ /**
74
+ * Copies this triangle to another one.
75
+ * @param triangle - The triangle to copy to.
76
+ * @returns Returns given parameter.
77
+ */
78
+ copyTo(triangle: Triangle): Triangle;
79
+ /**
80
+ * Returns the framing rectangle of the triangle as a Rectangle object
81
+ * @param out - optional rectangle to store the result
82
+ * @returns The framing rectangle
83
+ */
84
+ getBounds(out?: Rectangle): Rectangle;
85
+ getX(): number;
86
+ getY(): number;
87
+ build(points: number[]): void;
88
+ triangulate(points: number[], vertices: number[], verticesOffset: number, indices: number[], indicesOffset: number): void;
89
+ }
@@ -1,17 +1,14 @@
1
- import { Matrix4 } from '@galacean/effects-math/es/core/index';
2
- import type { vec2, vec4 } from '@galacean/effects-specification';
3
1
  import * as spec from '@galacean/effects-specification';
4
- import { RendererComponent } from '../../components/renderer-component';
5
2
  import type { Engine } from '../../engine';
6
- import { Material } from '../../material';
7
- import type { ValueGetter } from '../../math';
8
- import type { Renderer } from '../../render';
3
+ import type { GeometryDrawMode } from '../../render';
9
4
  import { Geometry } from '../../render';
10
5
  import type { GeometryFromShape } from '../../shape';
11
6
  import type { Texture } from '../../texture';
12
- import type { FrameContext, PlayableGraph } from '../cal/playable-graph';
13
- import { Playable, PlayableAsset } from '../cal/playable-graph';
14
- import type { BoundingBoxTriangle, HitTestTriangleParams } from '../interact/click-handler';
7
+ import type { PlayableGraph, Playable } from '../cal/playable-graph';
8
+ import { PlayableAsset } from '../cal/playable-graph';
9
+ import type { ColorPlayableAssetData } from '../../animation';
10
+ import type { ItemRenderer } from '../../components';
11
+ import { BaseRenderComponent } from '../../components/base-render-component';
15
12
  /**
16
13
  * 用于创建 spriteItem 的数据类型, 经过处理后的 spec.SpriteContent
17
14
  */
@@ -27,123 +24,32 @@ export interface SpriteItemProps extends Omit<spec.SpriteContent, 'renderer'> {
27
24
  * 图层元素基础属性, 经过处理后的 spec.SpriteContent.options
28
25
  */
29
26
  export type SpriteItemOptions = {
30
- startColor: vec4;
27
+ startColor: spec.vec4;
31
28
  renderLevel?: spec.RenderLevel;
32
29
  };
33
30
  /**
34
31
  * 图层元素渲染属性, 经过处理后的 spec.SpriteContent.renderer
35
32
  */
36
- export interface SpriteItemRenderer extends Required<Omit<spec.RendererOptions, 'texture' | 'shape' | 'anchor' | 'particleOrigin'>> {
37
- order: number;
38
- mask: number;
39
- texture: Texture;
33
+ export interface SpriteItemRenderer extends ItemRenderer {
40
34
  shape?: GeometryFromShape;
41
- anchor?: vec2;
42
- particleOrigin?: spec.ParticleOrigin;
43
- }
44
- /**
45
- * 图层的渲染属性,用于 Mesh 的合并判断
46
- */
47
- export interface SpriteItemRenderInfo {
48
- side: number;
49
- occlusion: boolean;
50
- blending: number;
51
- cachePrefix: string;
52
- mask: number;
53
- maskMode: number;
54
- cacheId: string;
55
- wireframe?: boolean;
56
35
  }
57
36
  export type splitsDataType = [r: number, x: number, y: number, w: number, h: number | undefined][];
58
- export declare class SpriteColorPlayable extends Playable {
59
- clipData: {
60
- colorOverLifetime?: spec.ColorOverLifetime;
61
- startColor?: spec.RGBAColorValue;
62
- };
63
- colorOverLifetime: {
64
- stop: number;
65
- color: any;
66
- }[];
67
- opacityOverLifetime: ValueGetter<number>;
68
- startColor: spec.RGBAColorValue;
69
- renderColor: vec4;
70
- spriteMaterial: Material;
71
- spriteComponent: SpriteComponent;
72
- processFrame(context: FrameContext): void;
73
- create(clipData: SpriteColorPlayableAssetData): this;
74
- }
75
37
  export declare class SpriteColorPlayableAsset extends PlayableAsset {
76
- data: SpriteColorPlayableAssetData;
38
+ data: ColorPlayableAssetData;
77
39
  createPlayable(graph: PlayableGraph): Playable;
78
- fromData(data: SpriteColorPlayableAssetData): void;
79
- }
80
- export interface SpriteColorPlayableAssetData extends spec.EffectsObjectData {
81
- colorOverLifetime?: spec.ColorOverLifetime;
40
+ fromData(data: ColorPlayableAssetData): void;
82
41
  }
83
- export declare class SpriteComponent extends RendererComponent {
84
- renderer: SpriteItemRenderer;
85
- interaction?: {
86
- behavior: spec.InteractBehavior;
87
- };
88
- cachePrefix: string;
89
- geoData: {
90
- atlasOffset: number[] | spec.TypedArray;
91
- index: number[] | spec.TypedArray;
92
- };
93
- anchor?: vec2;
42
+ export declare class SpriteComponent extends BaseRenderComponent {
94
43
  textureSheetAnimation?: spec.TextureSheetAnimation;
95
- frameAnimationLoop: boolean;
96
44
  splits: splitsDataType;
97
- emptyTexture: Texture;
98
- color: vec4;
99
- worldMatrix: Matrix4;
100
- geometry: Geometry;
101
- /***********************/
102
- private renderInfo;
103
- private readonly wireframe?;
104
- private preMultiAlpha;
105
- private visible;
106
- private isManualTimeSet;
107
- private frameAnimationTime;
45
+ frameAnimationLoop: boolean;
108
46
  constructor(engine: Engine, props?: SpriteItemProps);
109
- /**
110
- * 设置当前 Mesh 的可见性。
111
- * @param visible - true:可见,false:不可见
112
- */
113
- setVisible(visible: boolean): void;
114
- /**
115
- * 获取当前 Mesh 的可见性。
116
- */
117
- getVisible(): boolean;
118
- /**
119
- * 设置当前图层的颜色
120
- * > Tips: 透明度也属于颜色的一部分,当有透明度/颜色 K 帧变化时,该 API 会失效
121
- * @since 2.0.0
122
- * @param color - 颜色值
123
- */
124
- setColor(color: vec4): void;
125
- /**
126
- * 设置当前 Mesh 的纹理
127
- * @since 2.0.0
128
- * @param texture - 纹理对象
129
- */
130
- setTexture(texture: Texture): void;
131
- render(renderer: Renderer): void;
132
- onStart(): void;
133
47
  onUpdate(dt: number): void;
134
48
  onDestroy(): void;
135
- private getItemInitData;
136
- private setItem;
137
- private createGeometry;
138
- private createMaterial;
139
- private getItemGeometryData;
140
- getTextures(): Texture[];
141
- /**
142
- * 获取图层包围盒的类型和世界坐标
143
- * @returns
144
- */
145
- getBoundingBox(): BoundingBoxTriangle | void;
146
- getHitTestParams: (force?: boolean) => HitTestTriangleParams | void;
49
+ createGeometry(mode: GeometryDrawMode): Geometry;
50
+ getItemGeometryData(): {
51
+ index: number[];
52
+ atlasOffset: number[];
53
+ };
147
54
  fromData(data: SpriteItemProps): void;
148
- toData(): void;
149
55
  }
@@ -1,7 +1,7 @@
1
1
  import type * as spec from '@galacean/effects-specification';
2
2
  import type { PrecompileOptions } from '../../plugin-system';
3
3
  import type { Renderer } from '../../render';
4
- import { AbstractPlugin } from '../index';
4
+ import { AbstractPlugin } from '../plugin';
5
5
  export declare class SpriteLoader extends AbstractPlugin {
6
6
  name: string;
7
7
  static precompile(compositions: spec.Composition[], render: Renderer, options?: PrecompileOptions): Promise<any>;
@@ -2,7 +2,7 @@ import type { Vector3 } from '@galacean/effects-math/es/core/vector3';
2
2
  import type * as spec from '@galacean/effects-specification';
3
3
  import type { GPUCapabilityDetail, SharedShaderWithSource } from '../../render';
4
4
  import type { Transform } from '../../transform';
5
- import type { SpriteComponent, SpriteItemRenderInfo } from './sprite-item';
5
+ import type { ItemRenderInfo } from '../../components';
6
6
  export type SpriteRenderData = {
7
7
  life: number;
8
8
  transform: Transform;
@@ -21,11 +21,10 @@ export type SpriteRegionData = {
21
21
  };
22
22
  export declare let maxSpriteMeshItemCount: number;
23
23
  export declare function setSpriteMeshMaxItemCountByGPU(gpuCapability: GPUCapabilityDetail): 16 | 32 | undefined;
24
- export declare function getImageItemRenderInfo(item: SpriteComponent): SpriteItemRenderInfo;
25
24
  export declare function spriteMeshShaderFromFilter(level: number, options?: {
26
25
  wireframe?: boolean;
27
26
  env?: string;
28
27
  }): SharedShaderWithSource;
29
- export declare function spriteMeshShaderIdFromRenderInfo(renderInfo: SpriteItemRenderInfo, count: number): string;
30
- export declare function spriteMeshShaderFromRenderInfo(renderInfo: SpriteItemRenderInfo, count: number, level: number, env?: string): SharedShaderWithSource;
28
+ export declare function spriteMeshShaderIdFromRenderInfo(renderInfo: ItemRenderInfo, count: number): string;
29
+ export declare function spriteMeshShaderFromRenderInfo(renderInfo: ItemRenderInfo, count: number, level: number, env?: string): SharedShaderWithSource;
31
30
  export declare function setMaxSpriteMeshItemCount(count: number): void;
@@ -1,26 +1,36 @@
1
1
  import * as spec from '@galacean/effects-specification';
2
2
  import type { Engine } from '../../engine';
3
- import type { SpriteItemProps } from '../sprite/sprite-item';
4
- import { SpriteComponent } from '../sprite/sprite-item';
3
+ import { Texture } from '../../texture';
5
4
  import { TextLayout } from './text-layout';
6
5
  import { TextStyle } from './text-style';
7
6
  import type { Material } from '../../material';
8
7
  import type { VFXItem } from '../../vfx-item';
8
+ import { BaseRenderComponent } from '../../components';
9
+ /**
10
+ * 用于创建 textItem 的数据类型, 经过处理后的 spec.TextContentOptions
11
+ */
12
+ export interface TextItemProps extends Omit<spec.TextContent, 'renderer'> {
13
+ listIndex?: number;
14
+ renderer: {
15
+ mask: number;
16
+ texture: Texture;
17
+ } & Omit<spec.RendererOptions, 'texture'>;
18
+ }
9
19
  export declare const DEFAULT_FONTS: string[];
10
20
  export interface TextComponent extends TextComponentBase {
11
21
  }
12
22
  /**
13
23
  * @since 2.0.0
14
24
  */
15
- export declare class TextComponent extends SpriteComponent {
25
+ export declare class TextComponent extends BaseRenderComponent {
16
26
  isDirty: boolean;
17
27
  /**
18
28
  * 文本行数
19
29
  */
20
30
  lineCount: number;
21
- constructor(engine: Engine, props?: spec.TextContent);
31
+ constructor(engine: Engine, props?: TextItemProps);
22
32
  onUpdate(dt: number): void;
23
- fromData(data: SpriteItemProps): void;
33
+ fromData(data: TextItemProps): void;
24
34
  updateWithOptions(options: spec.TextContentOptions): void;
25
35
  updateTexture(flipY?: boolean): void;
26
36
  }
@@ -0,0 +1,3 @@
1
+ export * from './track';
2
+ export * from './tracks';
3
+ export * from './playable-assets';
@@ -0,0 +1,7 @@
1
+ import type { Playable, PlayableGraph } from '../../cal/playable-graph';
2
+ import { PlayableAsset } from '../../cal/playable-graph';
3
+ import * as spec from '@galacean/effects-specification';
4
+ export declare class ColorPropertyPlayableAsset extends PlayableAsset {
5
+ curveData: spec.ColorCurveData;
6
+ createPlayable(graph: PlayableGraph): Playable;
7
+ }
@@ -0,0 +1,7 @@
1
+ import type { FixedNumberExpression } from '@galacean/effects-specification';
2
+ import type { Playable, PlayableGraph } from '../../cal/playable-graph';
3
+ import { PlayableAsset } from '../../cal/playable-graph';
4
+ export declare class FloatPropertyPlayableAsset extends PlayableAsset {
5
+ curveData: FixedNumberExpression;
6
+ createPlayable(graph: PlayableGraph): Playable;
7
+ }
@@ -0,0 +1,3 @@
1
+ export * from './float-property-playable-asset';
2
+ export * from './sub-composition-playable-asset';
3
+ export * from './timeline-asset';
@@ -1,8 +1,9 @@
1
1
  import * as spec from '@galacean/effects-specification';
2
- import type { RuntimeClip, TrackAsset } from '../timeline/track';
3
- import type { FrameContext, PlayableGraph } from './playable-graph';
4
- import { Playable, PlayableAsset } from './playable-graph';
5
- import type { Constructor } from '../../utils';
2
+ import type { RuntimeClip, TrackAsset } from '../track';
3
+ import type { FrameContext, PlayableGraph } from '../../cal/playable-graph';
4
+ import { Playable, PlayableAsset } from '../../cal/playable-graph';
5
+ import type { Constructor } from '../../../utils';
6
+ import { TrackInstance } from '../track-instance';
6
7
  export declare class TimelineAsset extends PlayableAsset {
7
8
  tracks: TrackAsset[];
8
9
  createPlayable(graph: PlayableGraph): Playable;
@@ -11,9 +12,11 @@ export declare class TimelineAsset extends PlayableAsset {
11
12
  }
12
13
  export declare class TimelinePlayable extends Playable {
13
14
  clips: RuntimeClip[];
15
+ masterTrackInstances: TrackInstance[];
14
16
  prepareFrame(context: FrameContext): void;
15
17
  evaluate(): void;
16
18
  compileTracks(graph: PlayableGraph, tracks: TrackAsset[]): void;
19
+ private updateTrackAnimatedObject;
17
20
  private sortTracks;
18
21
  private addSubTracksRecursive;
19
22
  }
@@ -0,0 +1,7 @@
1
+ import type { Playable, PlayableGraph } from '../../cal/playable-graph';
2
+ import { PlayableAsset } from '../../cal/playable-graph';
3
+ import type * as spec from '@galacean/effects-specification';
4
+ export declare class Vector4PropertyPlayableAsset extends PlayableAsset {
5
+ curveData: spec.Vector4CurveData;
6
+ createPlayable(graph: PlayableGraph): Playable;
7
+ }
@@ -0,0 +1,6 @@
1
+ import type { FrameContext } from '../../cal/playable-graph';
2
+ import { Playable } from '../../cal/playable-graph';
3
+ export declare class ColorPropertyMixerPlayable extends Playable {
4
+ propertyName: string;
5
+ processFrame(context: FrameContext): void;
6
+ }
@@ -0,0 +1,6 @@
1
+ import type { FrameContext } from '../../cal/playable-graph';
2
+ import { Playable } from '../../cal/playable-graph';
3
+ export declare class FloatPropertyMixerPlayable extends Playable {
4
+ propertyName: string;
5
+ processFrame(context: FrameContext): void;
6
+ }
@@ -0,0 +1,7 @@
1
+ export * from './activation-mixer-playable';
2
+ export * from './property-clip-playable';
3
+ export * from './float-property-mixer-playable';
4
+ export * from './sub-composition-clip-playable';
5
+ export * from './sub-composition-mixer-playable';
6
+ export * from './vector4-property-mixer-playable';
7
+ export * from './color-property-mixer-playable';
@@ -0,0 +1,8 @@
1
+ import type { ValueGetter } from '../../../math';
2
+ import type { FrameContext } from '../../cal/playable-graph';
3
+ import { Playable } from '../../cal/playable-graph';
4
+ export declare class PropertyClipPlayable<T> extends Playable {
5
+ value: T;
6
+ curve: ValueGetter<T>;
7
+ processFrame(context: FrameContext): void;
8
+ }
@@ -0,0 +1,6 @@
1
+ import type { FrameContext } from '../../cal/playable-graph';
2
+ import { Playable } from '../../cal/playable-graph';
3
+ export declare class Vector4PropertyMixerPlayable extends Playable {
4
+ propertyName: string;
5
+ processFrame(context: FrameContext): void;
6
+ }
@@ -0,0 +1,14 @@
1
+ import type { Playable, PlayableOutput } from '../cal/playable-graph';
2
+ import type { TrackAsset } from './track';
3
+ /**
4
+ * A class that stores track assets and the generated mixer playables and playable outputs.
5
+ * It is used to query the corresponding playable object based on the track asset.
6
+ */
7
+ export declare class TrackInstance {
8
+ trackAsset: TrackAsset;
9
+ mixer: Playable;
10
+ output: PlayableOutput;
11
+ children: TrackInstance[];
12
+ constructor(trackAsset: TrackAsset, mixer: Playable, output: PlayableOutput);
13
+ addChild(trackInstance: TrackInstance): void;
14
+ }
@@ -21,7 +21,8 @@ export declare class TimelineClip {
21
21
  */
22
22
  export declare class TrackAsset extends PlayableAsset {
23
23
  name: string;
24
- binding: object;
24
+ boundObject: object;
25
+ parent: TrackAsset;
25
26
  trackType: TrackType;
26
27
  private clipSeed;
27
28
  private clips;
@@ -29,7 +30,7 @@ export declare class TrackAsset extends PlayableAsset {
29
30
  /**
30
31
  * 重写该方法以获取自定义对象绑定
31
32
  */
32
- resolveBinding(parentBinding: object): object;
33
+ updateAnimatedObject(): void;
33
34
  /**
34
35
  * 重写该方法以创建自定义混合器
35
36
  */
@@ -46,6 +47,7 @@ export declare class TrackAsset extends PlayableAsset {
46
47
  findClip(name: string): TimelineClip | undefined;
47
48
  addClip(clip: TimelineClip): void;
48
49
  private createClipPlayable;
50
+ fromData(data: spec.EffectsObjectData): void;
49
51
  }
50
52
  export declare enum TrackType {
51
53
  MasterTrack = 0,
@@ -0,0 +1,5 @@
1
+ import type { PlayableGraph, Playable } from '../../cal/playable-graph';
2
+ import { PropertyTrack } from './property-track';
3
+ export declare class ColorPropertyTrack extends PropertyTrack {
4
+ createTrackMixer(graph: PlayableGraph): Playable;
5
+ }
@@ -0,0 +1,6 @@
1
+ import type { PlayableGraph, Playable } from '../../cal/playable-graph';
2
+ import { PropertyTrack } from './property-track';
3
+ export declare class FloatPropertyTrack extends PropertyTrack {
4
+ createTrackMixer(graph: PlayableGraph): Playable;
5
+ updateAnimatedObject(): void;
6
+ }
@@ -0,0 +1,9 @@
1
+ export * from './activation-track';
2
+ export * from './float-property-track';
3
+ export * from './sprite-color-track';
4
+ export * from './sub-composition-track';
5
+ export * from './transform-track';
6
+ export * from './material-track';
7
+ export * from './property-track';
8
+ export * from './vector4-property-track';
9
+ export * from './color-property-track';
@@ -0,0 +1,5 @@
1
+ import { TrackAsset } from '../track';
2
+ export declare class MaterialTrack extends TrackAsset {
3
+ index: number;
4
+ updateAnimatedObject(): void;
5
+ }
@@ -0,0 +1,8 @@
1
+ import type { EffectsObjectData } from '@galacean/effects-specification';
2
+ import { TrackAsset } from '../track';
3
+ export declare class PropertyTrack extends TrackAsset {
4
+ protected propertyNames: string[];
5
+ private path;
6
+ updateAnimatedObject(): void;
7
+ fromData(data: EffectsObjectData): void;
8
+ }
@@ -1,6 +1,6 @@
1
1
  import { TrackAsset } from '../track';
2
2
  import type { PlayableGraph, Playable } from '../../cal/playable-graph';
3
3
  export declare class SubCompositionTrack extends TrackAsset {
4
- resolveBinding(parentBinding: object): object;
4
+ updateAnimatedObject(): void;
5
5
  createTrackMixer(graph: PlayableGraph): Playable;
6
6
  }
@@ -0,0 +1,5 @@
1
+ import type { PlayableGraph, Playable } from '../../cal/playable-graph';
2
+ import { PropertyTrack } from './property-track';
3
+ export declare class Vector4PropertyTrack extends PropertyTrack {
4
+ createTrackMixer(graph: PlayableGraph): Playable;
5
+ }
@@ -9,5 +9,4 @@ export * from './types';
9
9
  export * from './geometry';
10
10
  export * from './framebuffer';
11
11
  export * from './renderer';
12
- export * from './global-volume';
13
12
  export * from './semantic-map';
@@ -4,7 +4,7 @@ import type { Material, MaterialDestroyOptions } from '../material';
4
4
  import type { Geometry, Renderer } from '../render';
5
5
  import type { Disposable } from '../utils';
6
6
  import { DestroyOptions } from '../utils';
7
- import { RendererComponent } from '../components/renderer-component';
7
+ import { RendererComponent } from '../components';
8
8
  export interface MeshOptionsBase {
9
9
  material: Material;
10
10
  name?: string;
@@ -128,6 +128,10 @@ export interface RenderFrameOptions {
128
128
  * 后处理渲染配置
129
129
  */
130
130
  globalVolume?: PostProcessVolume;
131
+ /**
132
+ * 后处理是否开启
133
+ */
134
+ postProcessingEnabled?: boolean;
131
135
  /**
132
136
  * 名称
133
137
  */
@@ -165,7 +169,7 @@ export declare class RenderFrame implements Disposable {
165
169
  /**
166
170
  * 存放后处理的属性设置
167
171
  */
168
- globalVolume: PostProcessVolume;
172
+ globalVolume?: PostProcessVolume;
169
173
  renderer: Renderer;
170
174
  resource: RenderFrameResource;
171
175
  keepColorBuffer?: boolean;
@@ -1,5 +1,5 @@
1
1
  import type { Matrix4, Vector4 } from '@galacean/effects-math/es/core/index';
2
- import type { RendererComponent } from '../components/renderer-component';
2
+ import type { RendererComponent } from '../components';
3
3
  import type { Engine } from '../engine';
4
4
  import type { Material } from '../material';
5
5
  import type { LostHandler, RestoreHandler } from '../utils';