@galacean/effects-core 2.6.5 → 2.7.0-alpha.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/animation/animation-clip.d.ts +44 -0
- package/dist/animation/color-playable.d.ts +5 -5
- package/dist/animation/index.d.ts +1 -0
- package/dist/asset-manager.d.ts +8 -0
- package/dist/comp-vfx-item.d.ts +2 -6
- package/dist/components/animator.d.ts +30 -0
- package/dist/components/base-render-component.d.ts +4 -10
- package/dist/components/component.d.ts +4 -0
- package/dist/components/shape-component.d.ts +95 -16
- package/dist/composition.d.ts +0 -4
- package/dist/downloader.d.ts +6 -0
- package/dist/fallback/migration.d.ts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +16919 -16634
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +16893 -16608
- package/dist/index.mjs.map +1 -1
- package/dist/material/material.d.ts +2 -8
- package/dist/math/translate.d.ts +7 -1
- package/dist/math/value-getters/bezier-curve.d.ts +1 -1
- package/dist/math/value-getters/value-getter.d.ts +1 -1
- package/dist/plugins/animation-graph/graph-data-set.d.ts +1 -1
- package/dist/plugins/animation-graph/graph-instance.d.ts +2 -0
- package/dist/plugins/animation-graph/nodes/animation-clip-node.d.ts +1 -1
- package/dist/plugins/animation-graph/nodes/state-machine-node.d.ts +11 -2
- package/dist/plugins/animation-graph/nodes/state-node.d.ts +1 -0
- package/dist/plugins/animation-graph/skeleton.d.ts +4 -2
- package/dist/plugins/index.d.ts +0 -2
- package/dist/plugins/particle/particle-vfx-item.d.ts +3 -3
- package/dist/plugins/shape/build-line.d.ts +0 -3
- package/dist/plugins/sprite/sprite-item.d.ts +24 -7
- package/dist/plugins/text/text-item.d.ts +2 -2
- package/dist/plugins/text/text-layout.d.ts +1 -0
- package/dist/plugins/timeline/index.d.ts +2 -0
- package/dist/plugins/timeline/playable-assets/activation-playable-asset.d.ts +5 -0
- package/dist/plugins/timeline/playable-assets/color-property-playable-asset.d.ts +3 -3
- package/dist/plugins/timeline/playable-assets/float-property-playable-asset.d.ts +3 -3
- package/dist/plugins/timeline/playable-assets/index.d.ts +1 -1
- package/dist/plugins/timeline/playable-assets/sub-composition-playable-asset.d.ts +3 -3
- package/dist/plugins/timeline/playable-assets/vector-property-playable-assets.d.ts +4 -4
- package/dist/plugins/{cal/playable-graph.d.ts → timeline/playable.d.ts} +2 -21
- package/dist/plugins/timeline/playables/activation-mixer-playable.d.ts +1 -1
- package/dist/plugins/timeline/playables/activation-playable.d.ts +8 -0
- package/dist/plugins/timeline/playables/index.d.ts +2 -0
- package/dist/plugins/timeline/playables/particle-mixer-playable.d.ts +1 -1
- package/dist/plugins/timeline/playables/property-clip-playable.d.ts +2 -2
- package/dist/plugins/timeline/playables/property-mixer-playable.d.ts +6 -3
- package/dist/plugins/timeline/playables/sprite-color-mixer-playable.d.ts +1 -1
- package/dist/plugins/timeline/playables/sub-composition-clip-playable.d.ts +2 -2
- package/dist/plugins/timeline/playables/sub-composition-mixer-playable.d.ts +1 -1
- package/dist/plugins/timeline/playables/track-mixer-playable.d.ts +4 -2
- package/dist/plugins/timeline/playables/transform-mixer-playable.d.ts +1 -1
- package/dist/plugins/timeline/playables/transform-playable.d.ts +76 -0
- package/dist/plugins/timeline/timeline-asset.d.ts +27 -0
- package/dist/plugins/timeline/track-instance.d.ts +5 -3
- package/dist/plugins/timeline/track.d.ts +10 -12
- package/dist/plugins/timeline/tracks/activation-track.d.ts +1 -2
- package/dist/plugins/timeline/tracks/color-property-track.d.ts +1 -2
- package/dist/plugins/timeline/tracks/float-property-track.d.ts +1 -3
- package/dist/plugins/timeline/tracks/index.d.ts +1 -0
- package/dist/plugins/timeline/tracks/material-track.d.ts +1 -1
- package/dist/plugins/timeline/tracks/object-binding-track.d.ts +9 -0
- package/dist/plugins/timeline/tracks/particle-track.d.ts +1 -2
- package/dist/plugins/timeline/tracks/property-track.d.ts +1 -2
- package/dist/plugins/timeline/tracks/sprite-color-track.d.ts +1 -2
- package/dist/plugins/timeline/tracks/sub-composition-track.d.ts +2 -3
- package/dist/plugins/timeline/tracks/transform-track.d.ts +1 -2
- package/dist/plugins/timeline/tracks/vector-property-track.d.ts +2 -3
- package/dist/render/renderer.d.ts +1 -1
- package/dist/shader/index.d.ts +0 -3
- package/dist/utils/color.d.ts +3 -2
- package/package.json +2 -2
- package/dist/plugins/cal/animation-playable.d.ts +0 -7
- package/dist/plugins/cal/animation-stream.d.ts +0 -13
- package/dist/plugins/cal/calculate-item.d.ts +0 -28
- package/dist/plugins/cal/calculate-vfx-item.d.ts +0 -119
- package/dist/plugins/timeline/playable-assets/timeline-asset.d.ts +0 -32
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { TrackAsset } from './track';
|
|
2
|
+
import type { Constructor } from '../../utils';
|
|
3
|
+
import type { SceneBinding } from '../../comp-vfx-item';
|
|
4
|
+
import { EffectsObject } from '../../effects-object';
|
|
5
|
+
export declare class TimelineAsset extends EffectsObject {
|
|
6
|
+
tracks: TrackAsset[];
|
|
7
|
+
private cacheFlattenedTracks;
|
|
8
|
+
get flattenedTracks(): TrackAsset[];
|
|
9
|
+
createTrack<T extends TrackAsset>(classConstructor: Constructor<T>, parent: TrackAsset, name?: string): T;
|
|
10
|
+
/**
|
|
11
|
+
* Invalidates the asset, called when tracks data changed
|
|
12
|
+
*/
|
|
13
|
+
private invalidate;
|
|
14
|
+
private addSubTracksRecursive;
|
|
15
|
+
}
|
|
16
|
+
export declare class TimelineInstance {
|
|
17
|
+
private time;
|
|
18
|
+
private clips;
|
|
19
|
+
private masterTrackInstances;
|
|
20
|
+
constructor(timelineAsset: TimelineAsset, sceneBindings: SceneBinding[]);
|
|
21
|
+
setTime(time: number): void;
|
|
22
|
+
getTime(): number;
|
|
23
|
+
evaluate(deltaTime: number): void;
|
|
24
|
+
compileTracks(tracks: TrackAsset[], sceneBindings: SceneBinding[]): void;
|
|
25
|
+
private tickTrack;
|
|
26
|
+
private updateTrackAnimatedObject;
|
|
27
|
+
}
|
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { PlayableOutput } from './playable';
|
|
2
|
+
import type { TrackMixerPlayable } from './playables';
|
|
2
3
|
import type { TrackAsset } from './track';
|
|
3
4
|
/**
|
|
4
5
|
* A class that stores track assets and the generated mixer playables and playable outputs.
|
|
5
6
|
* It is used to query the corresponding playable object based on the track asset.
|
|
6
7
|
*/
|
|
7
8
|
export declare class TrackInstance {
|
|
9
|
+
boundObject: object;
|
|
8
10
|
trackAsset: TrackAsset;
|
|
9
|
-
mixer:
|
|
11
|
+
mixer: TrackMixerPlayable;
|
|
10
12
|
output: PlayableOutput;
|
|
11
13
|
children: TrackInstance[];
|
|
12
|
-
constructor(trackAsset: TrackAsset, mixer:
|
|
14
|
+
constructor(trackAsset: TrackAsset, mixer: TrackMixerPlayable, output: PlayableOutput);
|
|
13
15
|
addChild(trackInstance: TrackInstance): void;
|
|
14
16
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import * as spec from '@galacean/effects-specification';
|
|
2
|
-
import
|
|
3
|
-
import { Playable, PlayableAsset, PlayableOutput } from '../cal/playable-graph';
|
|
2
|
+
import { Playable, PlayableAsset, PlayableOutput } from './playable';
|
|
4
3
|
import { ParticleSystem } from '../particle/particle-system';
|
|
5
4
|
import type { Constructor } from '../../utils';
|
|
6
5
|
import { TrackMixerPlayable } from './playables';
|
|
@@ -22,7 +21,6 @@ export declare class TimelineClip {
|
|
|
22
21
|
*/
|
|
23
22
|
export declare class TrackAsset extends PlayableAsset {
|
|
24
23
|
name: string;
|
|
25
|
-
boundObject: object;
|
|
26
24
|
parent: TrackAsset;
|
|
27
25
|
trackType: TrackType;
|
|
28
26
|
private clipSeed;
|
|
@@ -31,16 +29,16 @@ export declare class TrackAsset extends PlayableAsset {
|
|
|
31
29
|
/**
|
|
32
30
|
* 重写该方法以获取自定义对象绑定
|
|
33
31
|
*/
|
|
34
|
-
updateAnimatedObject():
|
|
32
|
+
updateAnimatedObject(boundObject: object): object;
|
|
35
33
|
/**
|
|
36
34
|
* 重写该方法以创建自定义混合器
|
|
37
35
|
*/
|
|
38
|
-
createTrackMixer(
|
|
36
|
+
createTrackMixer(): TrackMixerPlayable;
|
|
39
37
|
createOutput(): PlayableOutput;
|
|
40
|
-
createPlayableGraph(
|
|
41
|
-
createMixerPlayableGraph(
|
|
42
|
-
compileClips(
|
|
43
|
-
createPlayable(
|
|
38
|
+
createPlayableGraph(runtimeClips: RuntimeClip[]): TrackMixerPlayable;
|
|
39
|
+
createMixerPlayableGraph(runtimeClips: RuntimeClip[]): TrackMixerPlayable;
|
|
40
|
+
compileClips(timelineClips: TimelineClip[], runtimeClips: RuntimeClip[]): TrackMixerPlayable;
|
|
41
|
+
createPlayable(): Playable;
|
|
44
42
|
getChildTracks(): TrackAsset[];
|
|
45
43
|
addChild(child: TrackAsset): void;
|
|
46
44
|
createClip<T extends PlayableAsset>(classConstructor: Constructor<T>, name?: string): TimelineClip;
|
|
@@ -58,10 +56,10 @@ export declare class RuntimeClip {
|
|
|
58
56
|
clip: TimelineClip;
|
|
59
57
|
playable: Playable;
|
|
60
58
|
parentMixer: TrackMixerPlayable;
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
constructor(clip: TimelineClip, clipPlayable: Playable, parentMixer: TrackMixerPlayable, track: TrackAsset);
|
|
59
|
+
private particleSystem;
|
|
60
|
+
constructor(clip: TimelineClip, clipPlayable: Playable, parentMixer: TrackMixerPlayable);
|
|
64
61
|
set enable(value: boolean);
|
|
62
|
+
getParticleSystem(): ParticleSystem;
|
|
65
63
|
evaluateAt(localTime: number): void;
|
|
66
64
|
}
|
|
67
65
|
/**
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import type { PlayableGraph } from '../../cal/playable-graph';
|
|
2
1
|
import { TrackAsset } from '../track';
|
|
3
2
|
import type { TrackMixerPlayable } from '../playables/track-mixer-playable';
|
|
4
3
|
export declare class ActivationTrack extends TrackAsset {
|
|
5
|
-
createTrackMixer(
|
|
4
|
+
createTrackMixer(): TrackMixerPlayable;
|
|
6
5
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import type { PlayableGraph } from '../../cal/playable-graph';
|
|
2
1
|
import type { TrackMixerPlayable } from '../playables';
|
|
3
2
|
import { PropertyTrack } from './property-track';
|
|
4
3
|
export declare class ColorPropertyTrack extends PropertyTrack {
|
|
5
|
-
createTrackMixer(
|
|
4
|
+
createTrackMixer(): TrackMixerPlayable;
|
|
6
5
|
}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import type { PlayableGraph } from '../../cal/playable-graph';
|
|
2
1
|
import type { TrackMixerPlayable } from '../playables';
|
|
3
2
|
import { PropertyTrack } from './property-track';
|
|
4
3
|
export declare class FloatPropertyTrack extends PropertyTrack {
|
|
5
|
-
createTrackMixer(
|
|
6
|
-
updateAnimatedObject(): void;
|
|
4
|
+
createTrackMixer(): TrackMixerPlayable;
|
|
7
5
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { VFXItem } from '../../../vfx-item';
|
|
2
|
+
import { TrackAsset } from '../track';
|
|
3
|
+
import type { TimelineAsset } from '../timeline-asset';
|
|
4
|
+
/**
|
|
5
|
+
* @since 2.0.0
|
|
6
|
+
*/
|
|
7
|
+
export declare class ObjectBindingTrack extends TrackAsset {
|
|
8
|
+
create(timelineAsset: TimelineAsset, sceneBindingMap: Record<string, VFXItem>): void;
|
|
9
|
+
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import type { PlayableGraph } from '../../cal/playable-graph';
|
|
2
1
|
import type { TrackMixerPlayable } from '../playables';
|
|
3
2
|
import { TrackAsset } from '../track';
|
|
4
3
|
export declare class ParticleTrack extends TrackAsset {
|
|
5
|
-
createTrackMixer(
|
|
4
|
+
createTrackMixer(): TrackMixerPlayable;
|
|
6
5
|
}
|
|
@@ -2,7 +2,6 @@ import type { EffectsObjectData } from '@galacean/effects-specification';
|
|
|
2
2
|
import { TrackAsset } from '../track';
|
|
3
3
|
export declare abstract class PropertyTrack extends TrackAsset {
|
|
4
4
|
protected propertyNames: string[];
|
|
5
|
-
|
|
6
|
-
updateAnimatedObject(): void;
|
|
5
|
+
protected path: string;
|
|
7
6
|
fromData(data: EffectsObjectData): void;
|
|
8
7
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import type { PlayableGraph } from '../../cal/playable-graph';
|
|
2
1
|
import type { TrackMixerPlayable } from '../playables';
|
|
3
2
|
import { TrackAsset } from '../track';
|
|
4
3
|
export declare class SpriteColorTrack extends TrackAsset {
|
|
5
|
-
createTrackMixer(
|
|
4
|
+
createTrackMixer(): TrackMixerPlayable;
|
|
6
5
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import type { PlayableGraph } from '../../cal/playable-graph';
|
|
2
1
|
import type { TrackMixerPlayable } from '../playables';
|
|
3
2
|
import { TrackAsset } from '../track';
|
|
4
3
|
export declare class SubCompositionTrack extends TrackAsset {
|
|
5
|
-
updateAnimatedObject():
|
|
6
|
-
createTrackMixer(
|
|
4
|
+
updateAnimatedObject(boundObject: object): object;
|
|
5
|
+
createTrackMixer(): TrackMixerPlayable;
|
|
7
6
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import type { PlayableGraph } from '../../cal/playable-graph';
|
|
2
1
|
import type { TrackMixerPlayable } from '../playables';
|
|
3
2
|
import { TrackAsset } from '../track';
|
|
4
3
|
export declare class TransformTrack extends TrackAsset {
|
|
5
|
-
createTrackMixer(
|
|
4
|
+
createTrackMixer(): TrackMixerPlayable;
|
|
6
5
|
}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import type { PlayableGraph } from '../../cal/playable-graph';
|
|
2
1
|
import type { TrackMixerPlayable } from '../playables';
|
|
3
2
|
import { PropertyTrack } from './property-track';
|
|
4
3
|
export declare class Vector4PropertyTrack extends PropertyTrack {
|
|
5
|
-
createTrackMixer(
|
|
4
|
+
createTrackMixer(): TrackMixerPlayable;
|
|
6
5
|
}
|
|
7
6
|
export declare class Vector2PropertyTrack extends PropertyTrack {
|
|
8
|
-
createTrackMixer(
|
|
7
|
+
createTrackMixer(): TrackMixerPlayable;
|
|
9
8
|
}
|
|
@@ -59,7 +59,7 @@ export declare class Renderer implements LostHandler, RestoreHandler {
|
|
|
59
59
|
getShaderLibrary(): ShaderLibrary | undefined;
|
|
60
60
|
renderRenderFrame(renderFrame: RenderFrame): void;
|
|
61
61
|
renderMeshes(meshes: RendererComponent[]): void;
|
|
62
|
-
drawGeometry(geometry: Geometry, material: Material, subMeshIndex?: number): void;
|
|
62
|
+
drawGeometry(geometry: Geometry, matrix: Matrix4, material: Material, subMeshIndex?: number): void;
|
|
63
63
|
getTemporaryRT(name: string, width: number, height: number, depthBuffer: number, filter: FilterMode, format: RenderTextureFormat): Framebuffer | null;
|
|
64
64
|
dispose(haltGL?: boolean): void;
|
|
65
65
|
}
|
package/dist/shader/index.d.ts
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
export { default as blend } from './blend.glsl';
|
|
2
|
-
export { default as itemFrameFrag } from './item-frame.frag.glsl';
|
|
3
1
|
export { default as integrate } from './integrate.glsl';
|
|
4
2
|
export { default as itemVert } from './item.vert.glsl';
|
|
5
3
|
export { default as itemFrag } from './item.frag.glsl';
|
|
@@ -10,7 +8,6 @@ export { default as value } from './value.glsl';
|
|
|
10
8
|
export { default as valueDefine } from './value-define.glsl';
|
|
11
9
|
export { default as screenMeshVert } from './post-processing/screen-mesh.vert.glsl';
|
|
12
10
|
export { default as colorGradingFrag } from './post-processing/color-grading.frag.glsl';
|
|
13
|
-
export { default as gaussianDownFrag } from './post-processing/gaussian-down.frag.glsl';
|
|
14
11
|
export { default as gaussianDownHFrag } from './post-processing/gaussian-down-h.frag.glsl';
|
|
15
12
|
export { default as gaussianDownVFrag } from './post-processing/gaussian-down-v.frag.glsl';
|
|
16
13
|
export { default as gaussianUpFrag } from './post-processing/gaussian-up.frag.glsl';
|
package/dist/utils/color.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { Color } from '@galacean/effects-math/es/core/color';
|
|
1
2
|
export interface ColorStop {
|
|
2
|
-
|
|
3
|
-
color:
|
|
3
|
+
time: number;
|
|
4
|
+
color: Color;
|
|
4
5
|
}
|
|
5
6
|
export declare function colorToArr(hex: string | number[], normalized?: boolean): number[];
|
|
6
7
|
export declare function getColorFromGradientStops(stops: ColorStop[], key: number, normalize?: boolean): number[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@galacean/effects-core",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.7.0-alpha.0",
|
|
4
4
|
"description": "Galacean Effects runtime core for the web",
|
|
5
5
|
"module": "./dist/index.mjs",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"registry": "https://registry.npmjs.org"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@galacean/effects-specification": "2.
|
|
45
|
+
"@galacean/effects-specification": "2.6.0-alpha.0",
|
|
46
46
|
"@galacean/effects-math": "1.1.0",
|
|
47
47
|
"flatbuffers": "24.3.25",
|
|
48
48
|
"uuid": "9.0.1",
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { AnimationStream } from './animation-stream';
|
|
2
|
-
import type { PlayableGraph } from './playable-graph';
|
|
3
|
-
import { Playable } from './playable-graph';
|
|
4
|
-
export declare class AnimationPlayable extends Playable {
|
|
5
|
-
animationStream: AnimationStream;
|
|
6
|
-
constructor(graph: PlayableGraph);
|
|
7
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { AnimationPlayable } from './animation-playable';
|
|
2
|
-
export declare class AnimationStream {
|
|
3
|
-
private playable;
|
|
4
|
-
private curveValues;
|
|
5
|
-
constructor(playable: AnimationPlayable);
|
|
6
|
-
setCurveValue(componentType: string, propertyName: string, value: number): AnimationCurveValue;
|
|
7
|
-
findCurveValue(componentType: string, propertyName: string): AnimationCurveValue;
|
|
8
|
-
}
|
|
9
|
-
export interface AnimationCurveValue {
|
|
10
|
-
componentType: string;
|
|
11
|
-
propertyName: string;
|
|
12
|
-
value: number;
|
|
13
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import type { Euler } from '@galacean/effects-math/es/core/euler';
|
|
2
|
-
import type { Vector3 } from '@galacean/effects-math/es/core/vector3';
|
|
3
|
-
import type { ValueGetter } from '../../math';
|
|
4
|
-
import { TrackAsset } from '../timeline';
|
|
5
|
-
import type { TimelineAsset } from '../timeline';
|
|
6
|
-
/**
|
|
7
|
-
* 基础位移属性数据
|
|
8
|
-
*/
|
|
9
|
-
export type ItemBasicTransform = {
|
|
10
|
-
position: Vector3;
|
|
11
|
-
rotation: Euler;
|
|
12
|
-
scale: Vector3;
|
|
13
|
-
path?: ValueGetter<Vector3>;
|
|
14
|
-
};
|
|
15
|
-
export type ItemLinearVelOverLifetime = {
|
|
16
|
-
asMovement?: boolean;
|
|
17
|
-
x?: ValueGetter<number>;
|
|
18
|
-
y?: ValueGetter<number>;
|
|
19
|
-
z?: ValueGetter<number>;
|
|
20
|
-
enabled?: boolean;
|
|
21
|
-
};
|
|
22
|
-
/**
|
|
23
|
-
* @since 2.0.0
|
|
24
|
-
*/
|
|
25
|
-
export declare class ObjectBindingTrack extends TrackAsset {
|
|
26
|
-
updateAnimatedObject(): void;
|
|
27
|
-
create(timelineAsset: TimelineAsset): void;
|
|
28
|
-
}
|
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
import { Euler } from '@galacean/effects-math/es/core/euler';
|
|
2
|
-
import { Vector3 } from '@galacean/effects-math/es/core/vector3';
|
|
3
|
-
import type { Quaternion } from '@galacean/effects-math/es/core/quaternion';
|
|
4
|
-
import * as spec from '@galacean/effects-specification';
|
|
5
|
-
import type { BezierCurve, ColorCurve, ValueGetter, Vector3Curve } from '../../math';
|
|
6
|
-
import { AnimationPlayable } from './animation-playable';
|
|
7
|
-
import type { ItemBasicTransform, ItemLinearVelOverLifetime } from './calculate-item';
|
|
8
|
-
import type { FrameContext, PlayableGraph } from './playable-graph';
|
|
9
|
-
import { Playable, PlayableAsset } from './playable-graph';
|
|
10
|
-
import { EffectsObject } from '../../effects-object';
|
|
11
|
-
import { VFXItem } from '../../vfx-item';
|
|
12
|
-
/**
|
|
13
|
-
* @since 2.0.0
|
|
14
|
-
*/
|
|
15
|
-
export declare class TransformAnimationPlayable extends AnimationPlayable {
|
|
16
|
-
originalTransform: ItemBasicTransform;
|
|
17
|
-
protected sizeSeparateAxes: boolean;
|
|
18
|
-
protected sizeXOverLifetime: ValueGetter<number>;
|
|
19
|
-
protected sizeYOverLifetime: ValueGetter<number>;
|
|
20
|
-
protected sizeZOverLifetime: ValueGetter<number>;
|
|
21
|
-
protected rotationOverLifetime: {
|
|
22
|
-
asRotation?: boolean;
|
|
23
|
-
separateAxes?: boolean;
|
|
24
|
-
enabled?: boolean;
|
|
25
|
-
x?: ValueGetter<number>;
|
|
26
|
-
y?: ValueGetter<number>;
|
|
27
|
-
z?: ValueGetter<number>;
|
|
28
|
-
};
|
|
29
|
-
gravityModifier: ValueGetter<number>;
|
|
30
|
-
orbitalVelOverLifetime: {
|
|
31
|
-
x?: ValueGetter<number>;
|
|
32
|
-
y?: ValueGetter<number>;
|
|
33
|
-
z?: ValueGetter<number>;
|
|
34
|
-
center: [x: number, y: number, z: number];
|
|
35
|
-
asRotation?: boolean;
|
|
36
|
-
enabled?: boolean;
|
|
37
|
-
};
|
|
38
|
-
speedOverLifetime?: ValueGetter<number>;
|
|
39
|
-
linearVelOverLifetime: ItemLinearVelOverLifetime;
|
|
40
|
-
positionOverLifetime: spec.PositionOverLifetime;
|
|
41
|
-
gravity: Vector3;
|
|
42
|
-
direction: Vector3;
|
|
43
|
-
startSpeed: number;
|
|
44
|
-
data: TransformPlayableAssetData;
|
|
45
|
-
private velocity;
|
|
46
|
-
private boundObject;
|
|
47
|
-
start(): void;
|
|
48
|
-
processFrame(context: FrameContext): void;
|
|
49
|
-
/**
|
|
50
|
-
* 应用时间轴K帧数据到对象
|
|
51
|
-
*/
|
|
52
|
-
private sampleAnimation;
|
|
53
|
-
}
|
|
54
|
-
export declare class TransformPlayableAsset extends PlayableAsset {
|
|
55
|
-
transformAnimationData: TransformPlayableAssetData;
|
|
56
|
-
createPlayable(graph: PlayableGraph): Playable;
|
|
57
|
-
fromData(data: TransformPlayableAssetData): void;
|
|
58
|
-
}
|
|
59
|
-
export interface TransformPlayableAssetData extends spec.EffectsObjectData {
|
|
60
|
-
/**
|
|
61
|
-
* 元素大小变化属性
|
|
62
|
-
*/
|
|
63
|
-
sizeOverLifetime?: spec.SizeOverLifetime;
|
|
64
|
-
/**
|
|
65
|
-
* 元素旋转变化属性
|
|
66
|
-
*/
|
|
67
|
-
rotationOverLifetime?: spec.RotationOverLifetime;
|
|
68
|
-
/**
|
|
69
|
-
* 元素位置变化属性
|
|
70
|
-
*/
|
|
71
|
-
positionOverLifetime?: spec.PositionOverLifetime;
|
|
72
|
-
}
|
|
73
|
-
/**
|
|
74
|
-
* @since 2.0.0
|
|
75
|
-
*/
|
|
76
|
-
export declare class ActivationPlayable extends Playable {
|
|
77
|
-
processFrame(context: FrameContext): void;
|
|
78
|
-
}
|
|
79
|
-
export declare class ActivationPlayableAsset extends PlayableAsset {
|
|
80
|
-
createPlayable(graph: PlayableGraph): Playable;
|
|
81
|
-
}
|
|
82
|
-
export interface AnimationCurve {
|
|
83
|
-
path: string;
|
|
84
|
-
keyFrames: ValueGetter<any>;
|
|
85
|
-
}
|
|
86
|
-
export interface PositionAnimationCurve extends AnimationCurve {
|
|
87
|
-
keyFrames: Vector3Curve;
|
|
88
|
-
}
|
|
89
|
-
export interface EulerAnimationCurve extends AnimationCurve {
|
|
90
|
-
keyFrames: ValueGetter<Euler>;
|
|
91
|
-
}
|
|
92
|
-
export interface RotationAnimationCurve extends AnimationCurve {
|
|
93
|
-
keyFrames: ValueGetter<Quaternion>;
|
|
94
|
-
}
|
|
95
|
-
export interface ScaleAnimationCurve extends AnimationCurve {
|
|
96
|
-
keyFrames: Vector3Curve;
|
|
97
|
-
}
|
|
98
|
-
export interface FloatAnimationCurve extends AnimationCurve {
|
|
99
|
-
property: string;
|
|
100
|
-
className: string;
|
|
101
|
-
keyFrames: BezierCurve;
|
|
102
|
-
}
|
|
103
|
-
export interface ColorAnimationCurve extends AnimationCurve {
|
|
104
|
-
property: string;
|
|
105
|
-
className: string;
|
|
106
|
-
keyFrames: ColorCurve;
|
|
107
|
-
}
|
|
108
|
-
export declare class AnimationClip extends EffectsObject {
|
|
109
|
-
duration: number;
|
|
110
|
-
positionCurves: PositionAnimationCurve[];
|
|
111
|
-
rotationCurves: RotationAnimationCurve[];
|
|
112
|
-
eulerCurves: EulerAnimationCurve[];
|
|
113
|
-
scaleCurves: ScaleAnimationCurve[];
|
|
114
|
-
floatCurves: FloatAnimationCurve[];
|
|
115
|
-
colorCurves: ColorAnimationCurve[];
|
|
116
|
-
sampleAnimation(vfxItem: VFXItem, time: number): void;
|
|
117
|
-
fromData(data: spec.AnimationClipData): void;
|
|
118
|
-
private findTarget;
|
|
119
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import * as spec from '@galacean/effects-specification';
|
|
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';
|
|
7
|
-
export declare class TimelineAsset extends PlayableAsset {
|
|
8
|
-
tracks: TrackAsset[];
|
|
9
|
-
private cacheFlattenedTracks;
|
|
10
|
-
get flattenedTracks(): TrackAsset[];
|
|
11
|
-
createPlayable(graph: PlayableGraph): Playable;
|
|
12
|
-
createTrack<T extends TrackAsset>(classConstructor: Constructor<T>, parent: TrackAsset, name?: string): T;
|
|
13
|
-
/**
|
|
14
|
-
* Invalidates the asset, called when tracks data changed
|
|
15
|
-
*/
|
|
16
|
-
private invalidate;
|
|
17
|
-
private addSubTracksRecursive;
|
|
18
|
-
private sortTracks;
|
|
19
|
-
fromData(data: spec.TimelineAssetData): void;
|
|
20
|
-
}
|
|
21
|
-
export declare class TimelinePlayable extends Playable {
|
|
22
|
-
clips: RuntimeClip[];
|
|
23
|
-
masterTrackInstances: TrackInstance[];
|
|
24
|
-
prepareFrame(context: FrameContext): void;
|
|
25
|
-
evaluate(): void;
|
|
26
|
-
compileTracks(graph: PlayableGraph, tracks: TrackAsset[]): void;
|
|
27
|
-
}
|
|
28
|
-
export declare class TrackSortWrapper {
|
|
29
|
-
track: TrackAsset;
|
|
30
|
-
originalIndex: number;
|
|
31
|
-
constructor(track: TrackAsset, originalIndex: number);
|
|
32
|
-
}
|