@galacean/effects-core 2.0.0-alpha.12 → 2.0.0-alpha.13
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/binary-asset.d.ts +6 -0
- package/dist/comp-vfx-item.d.ts +23 -6
- package/dist/components/component.d.ts +2 -2
- package/dist/composition-source-manager.d.ts +3 -0
- package/dist/composition.d.ts +25 -14
- package/dist/decorators.d.ts +1 -1
- package/dist/engine.d.ts +7 -4
- package/dist/fallback/migration.d.ts +1 -1
- package/dist/gl/create-gl-context.d.ts +2 -1
- package/dist/index.d.ts +5 -4
- package/dist/index.js +9825 -9076
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +9808 -9072
- package/dist/index.mjs.map +1 -1
- package/dist/math/bezier.d.ts +15 -0
- package/dist/math/translate.d.ts +3 -2
- package/dist/math/value-getter.d.ts +18 -1
- package/dist/plugin-system.d.ts +1 -1
- package/dist/plugins/cal/animation-mixer-playable.d.ts +1 -1
- package/dist/plugins/cal/animation-playable-output.d.ts +1 -1
- package/dist/plugins/cal/animation-playable.d.ts +2 -1
- package/dist/plugins/cal/calculate-item.d.ts +7 -26
- package/dist/plugins/cal/calculate-vfx-item.d.ts +29 -23
- package/dist/plugins/cal/playable-graph.d.ts +72 -21
- package/dist/plugins/cal/timeline-asset.d.ts +28 -0
- package/dist/plugins/camera/camera-controller-node.d.ts +0 -11
- package/dist/plugins/index.d.ts +5 -1
- package/dist/plugins/interact/click-handler.d.ts +2 -2
- package/dist/plugins/interact/event-system.d.ts +0 -2
- package/dist/plugins/particle/particle-system-renderer.d.ts +1 -1
- package/dist/plugins/particle/particle-system.d.ts +1 -1
- package/dist/plugins/particle/particle-vfx-item.d.ts +7 -3
- package/dist/plugins/plugin.d.ts +6 -6
- package/dist/plugins/sprite/sprite-item.d.ts +13 -7
- package/dist/plugins/timeline/playables/activation-mixer-playable.d.ts +8 -0
- package/dist/plugins/timeline/track.d.ts +73 -0
- package/dist/plugins/timeline/tracks/activation-track.d.ts +5 -0
- package/dist/plugins/timeline/tracks/sprite-color-track.d.ts +3 -0
- package/dist/plugins/timeline/tracks/transform-track.d.ts +3 -0
- package/dist/render/framebuffer.d.ts +1 -1
- package/dist/render/geometry.d.ts +10 -5
- package/dist/render/gpu-capability.d.ts +6 -6
- package/dist/render/renderer.d.ts +2 -1
- package/dist/render/semantic-map.d.ts +1 -1
- package/dist/texture/texture.d.ts +1 -0
- package/dist/ticker.d.ts +2 -2
- package/dist/utils/device.d.ts +1 -0
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/text.d.ts +8 -0
- package/dist/vfx-item.d.ts +27 -44
- package/package.json +2 -2
- package/dist/plugins/cal/track.d.ts +0 -34
- package/dist/utils/timeline-component.d.ts +0 -6
package/dist/math/bezier.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type * as spec from '@galacean/effects-specification';
|
|
2
2
|
import { Vector2 } from '@galacean/effects-math/es/core/vector2';
|
|
3
3
|
import { Vector3 } from '@galacean/effects-math/es/core/vector3';
|
|
4
|
+
import { Quaternion } from '@galacean/effects-math/es/core/quaternion';
|
|
4
5
|
export declare class BezierLengthData {
|
|
5
6
|
points: Array<{
|
|
6
7
|
partialLength: number;
|
|
@@ -41,6 +42,20 @@ export declare class BezierPath {
|
|
|
41
42
|
*/
|
|
42
43
|
getPointInPercent(percent: number): Vector3;
|
|
43
44
|
}
|
|
45
|
+
export declare class BezierQuat {
|
|
46
|
+
p1: Quaternion;
|
|
47
|
+
p2: Quaternion;
|
|
48
|
+
p3: Quaternion;
|
|
49
|
+
p4: Quaternion;
|
|
50
|
+
private temp;
|
|
51
|
+
readonly totalLength: number;
|
|
52
|
+
constructor(p1: Quaternion, p2: Quaternion, p3: Quaternion, p4: Quaternion);
|
|
53
|
+
/**
|
|
54
|
+
* 获取路径在指定比例长度上点的坐标
|
|
55
|
+
* @param percent 路径长度的比例
|
|
56
|
+
*/
|
|
57
|
+
getPointInPercent(percent: number): Quaternion;
|
|
58
|
+
}
|
|
44
59
|
export declare class BezierEasing {
|
|
45
60
|
mX1: number;
|
|
46
61
|
mY1: number;
|
package/dist/math/translate.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import type { ValueGetter } from './value-getter';
|
|
2
1
|
import { Vector3 } from '@galacean/effects-math/es/core/index';
|
|
2
|
+
import type { ItemLinearVelOverLifetime } from '../plugins';
|
|
3
|
+
import type { ValueGetter } from './value-getter';
|
|
3
4
|
export declare function translatePoint(x: number, y: number): number[];
|
|
4
5
|
export interface TranslateTarget {
|
|
5
6
|
speedOverLifetime?: ValueGetter<number>;
|
|
6
7
|
gravityModifier?: ValueGetter<number>;
|
|
7
|
-
linearVelOverLifetime?:
|
|
8
|
+
linearVelOverLifetime?: ItemLinearVelOverLifetime;
|
|
8
9
|
orbitalVelOverLifetime?: any;
|
|
9
10
|
}
|
|
10
11
|
export declare function calculateTranslation(out: Vector3, target: TranslateTarget, acc: Vector3, time: number, duration: number, posData: Vector3, velData: Vector3): Vector3;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import type { Vector2 } from '@galacean/effects-math/es/core/vector2';
|
|
2
2
|
import { Vector3 } from '@galacean/effects-math/es/core/vector3';
|
|
3
|
+
import { Quaternion } from '@galacean/effects-math/es/core/quaternion';
|
|
3
4
|
import * as spec from '@galacean/effects-specification';
|
|
4
5
|
import type { ColorStop } from '../utils';
|
|
5
6
|
import type { BezierEasing } from './bezier';
|
|
6
|
-
import { BezierPath } from './bezier';
|
|
7
|
+
import { BezierPath, BezierQuat } from './bezier';
|
|
7
8
|
interface KeyFrameMeta {
|
|
8
9
|
curves: ValueGetter<any>[];
|
|
9
10
|
index: number;
|
|
@@ -18,6 +19,7 @@ export declare class ValueGetter<T> {
|
|
|
18
19
|
getIntegrateValue(t0: number, t1: number, timeScale?: number): T;
|
|
19
20
|
getIntegrateByTime(t0: number, time: number): T;
|
|
20
21
|
getValue(time?: number): T;
|
|
22
|
+
getMaxTime(): number;
|
|
21
23
|
toUniform(meta: KeyFrameMeta): Float32Array;
|
|
22
24
|
map(func: (n: T) => T): void;
|
|
23
25
|
scaleXCoord(scale: number): ValueGetter<T>;
|
|
@@ -103,6 +105,7 @@ export declare class BezierCurve extends ValueGetter<number> {
|
|
|
103
105
|
getCurveValue(curveKey: string, time: number): number;
|
|
104
106
|
toUniform(meta: KeyFrameMeta): Float32Array;
|
|
105
107
|
toData(): Float32Array;
|
|
108
|
+
getMaxTime(): number;
|
|
106
109
|
}
|
|
107
110
|
export declare class PathSegments extends ValueGetter<number[]> {
|
|
108
111
|
keys: number[][];
|
|
@@ -122,6 +125,20 @@ export declare class BezierCurvePath extends ValueGetter<Vector3> {
|
|
|
122
125
|
onCreate(props: spec.BezierCurvePathValue): void;
|
|
123
126
|
getValue(time: number): Vector3;
|
|
124
127
|
getPercValue(curveKey: string, time: number): number;
|
|
128
|
+
getMaxTime(): number;
|
|
129
|
+
}
|
|
130
|
+
export declare class BezierCurveQuat extends ValueGetter<Quaternion> {
|
|
131
|
+
curveSegments: Record<string, {
|
|
132
|
+
points: Vector2[];
|
|
133
|
+
easingCurve: BezierEasing;
|
|
134
|
+
timeInterval: number;
|
|
135
|
+
valueInterval: number;
|
|
136
|
+
pathCurve: BezierQuat;
|
|
137
|
+
}>;
|
|
138
|
+
onCreate(props: spec.BezierCurveQuatValue): void;
|
|
139
|
+
getValue(time: number): Quaternion;
|
|
140
|
+
getPercValue(curveKey: string, time: number): number;
|
|
141
|
+
getMaxTime(): number;
|
|
125
142
|
}
|
|
126
143
|
export declare function createValueGetter(args: any): ValueGetter<any>;
|
|
127
144
|
export declare function getKeyFrameMetaByRawValue(meta: KeyFrameMeta, value?: [type: spec.ValueType, value: any]): void;
|
package/dist/plugin-system.d.ts
CHANGED
|
@@ -25,7 +25,7 @@ export declare class PluginSystem {
|
|
|
25
25
|
initializeComposition(composition: Composition, scene: Scene): void;
|
|
26
26
|
destroyComposition(comp: Composition): void;
|
|
27
27
|
resetComposition(comp: Composition, renderFrame: RenderFrame): void;
|
|
28
|
-
createPluginItem(name: string, props: VFXItemProps, composition: Composition): VFXItem
|
|
28
|
+
createPluginItem(name: string, props: VFXItemProps, composition: Composition): VFXItem;
|
|
29
29
|
processRawJSON(json: spec.JSONScene, options: SceneLoadOptions): Promise<void[]>;
|
|
30
30
|
private callStatic;
|
|
31
31
|
precompile(compositions: spec.Composition[], renderer: Renderer, options?: PrecompileOptions): Promise<void[]>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { AnimationStream } from './animation-stream';
|
|
2
|
+
import type { PlayableGraph } from './playable-graph';
|
|
2
3
|
import { Playable } from './playable-graph';
|
|
3
4
|
export declare class AnimationPlayable extends Playable {
|
|
4
5
|
animationStream: AnimationStream;
|
|
5
|
-
constructor();
|
|
6
|
+
constructor(graph: PlayableGraph);
|
|
6
7
|
}
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import * as spec from '@galacean/effects-specification';
|
|
2
1
|
import type { Euler, Vector3 } from '@galacean/effects-math/es/core/index';
|
|
3
|
-
import
|
|
2
|
+
import * as spec from '@galacean/effects-specification';
|
|
4
3
|
import type { Engine } from '../../engine';
|
|
5
4
|
import type { ValueGetter } from '../../math';
|
|
6
|
-
import {
|
|
7
|
-
import { Track } from './track';
|
|
5
|
+
import { TrackAsset } from '../timeline/track';
|
|
8
6
|
/**
|
|
9
7
|
* 基础位移属性数据
|
|
10
8
|
*/
|
|
@@ -33,29 +31,12 @@ export interface CalculateItemOptions {
|
|
|
33
31
|
* @since 2.0.0
|
|
34
32
|
* @internal
|
|
35
33
|
*/
|
|
36
|
-
export declare class
|
|
37
|
-
id: string;
|
|
38
|
-
reusable: boolean;
|
|
39
|
-
timelineStarted: boolean;
|
|
40
|
-
playableGraph: PlayableGraph;
|
|
34
|
+
export declare class ObjectBindingTrack extends TrackAsset {
|
|
41
35
|
options: CalculateItemOptions;
|
|
42
|
-
|
|
43
|
-
* 元素动画已经播放的时间
|
|
44
|
-
*/
|
|
45
|
-
private time;
|
|
46
|
-
private tracks;
|
|
36
|
+
data: spec.EffectsObjectData;
|
|
47
37
|
private trackSeed;
|
|
48
|
-
|
|
49
|
-
start(): void;
|
|
50
|
-
update(dt: number): void;
|
|
51
|
-
setTime(time: number): void;
|
|
52
|
-
getTime(): number;
|
|
38
|
+
create(): void;
|
|
53
39
|
toLocalTime(time: number): number;
|
|
54
|
-
createTrack<T extends
|
|
55
|
-
|
|
56
|
-
findTrack(name: string): Track | undefined;
|
|
57
|
-
rebuildGraph(): void;
|
|
58
|
-
compileTracks(graph: PlayableGraph): void;
|
|
59
|
-
fromData(data: spec.NullContent): void;
|
|
60
|
-
toData(): void;
|
|
40
|
+
createTrack<T extends TrackAsset>(classConstructor: new (engine: Engine) => T, name?: string): T;
|
|
41
|
+
fromData(data: spec.EffectsObjectData): void;
|
|
61
42
|
}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { Vector3 } from '@galacean/effects-math/es/core/vector3';
|
|
2
|
-
import type
|
|
2
|
+
import type { Quaternion } from '@galacean/effects-math/es/core/quaternion';
|
|
3
|
+
import * as spec from '@galacean/effects-specification';
|
|
3
4
|
import type { ValueGetter } from '../../math';
|
|
4
5
|
import { AnimationPlayable } from './animation-playable';
|
|
5
6
|
import type { ItemBasicTransform, ItemLinearVelOverLifetime } from './calculate-item';
|
|
7
|
+
import type { FrameContext, PlayableGraph } from './playable-graph';
|
|
6
8
|
import { Playable, PlayableAsset } from './playable-graph';
|
|
7
9
|
import { EffectsObject } from '../../effects-object';
|
|
8
|
-
import type { VFXItem
|
|
10
|
+
import type { VFXItem } from '../../vfx-item';
|
|
9
11
|
/**
|
|
10
12
|
* @since 2.0.0
|
|
11
13
|
* @internal
|
|
@@ -39,20 +41,22 @@ export declare class TransformAnimationPlayable extends AnimationPlayable {
|
|
|
39
41
|
gravity: Vector3;
|
|
40
42
|
direction: Vector3;
|
|
41
43
|
startSpeed: number;
|
|
44
|
+
data: TransformPlayableAssetData;
|
|
42
45
|
private velocity;
|
|
43
|
-
|
|
46
|
+
private binding;
|
|
47
|
+
start(): void;
|
|
48
|
+
processFrame(context: FrameContext): void;
|
|
44
49
|
/**
|
|
45
50
|
* 应用时间轴K帧数据到对象
|
|
46
51
|
*/
|
|
47
52
|
private sampleAnimation;
|
|
48
|
-
fromData(data: TransformAnimationData): void;
|
|
49
53
|
}
|
|
50
|
-
export declare class
|
|
51
|
-
transformAnimationData:
|
|
52
|
-
createPlayable(): Playable;
|
|
53
|
-
fromData(data:
|
|
54
|
+
export declare class TransformPlayableAsset extends PlayableAsset {
|
|
55
|
+
transformAnimationData: TransformPlayableAssetData;
|
|
56
|
+
createPlayable(graph: PlayableGraph): Playable;
|
|
57
|
+
fromData(data: TransformPlayableAssetData): void;
|
|
54
58
|
}
|
|
55
|
-
export interface
|
|
59
|
+
export interface TransformPlayableAssetData extends spec.EffectsObjectData {
|
|
56
60
|
/**
|
|
57
61
|
* 元素大小变化属性
|
|
58
62
|
*/
|
|
@@ -71,41 +75,43 @@ export interface TransformAnimationData {
|
|
|
71
75
|
* @internal
|
|
72
76
|
*/
|
|
73
77
|
export declare class ActivationPlayable extends Playable {
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
private showRendererComponents;
|
|
78
|
+
processFrame(context: FrameContext): void;
|
|
79
|
+
}
|
|
80
|
+
export declare class ActivationPlayableAsset extends PlayableAsset {
|
|
81
|
+
createPlayable(graph: PlayableGraph): Playable;
|
|
79
82
|
}
|
|
80
83
|
export interface PositionCurve {
|
|
81
|
-
path: string
|
|
84
|
+
path: string;
|
|
82
85
|
keyFrames: ValueGetter<Vector3>;
|
|
83
86
|
}
|
|
84
87
|
export interface EulerCurve {
|
|
85
|
-
path: string
|
|
88
|
+
path: string;
|
|
86
89
|
keyFrames: ValueGetter<Vector3>;
|
|
87
90
|
}
|
|
91
|
+
export interface RotationCurve {
|
|
92
|
+
path: string;
|
|
93
|
+
keyFrames: ValueGetter<Quaternion>;
|
|
94
|
+
}
|
|
88
95
|
export interface ScaleCurve {
|
|
89
|
-
path: string
|
|
96
|
+
path: string;
|
|
90
97
|
keyFrames: ValueGetter<Vector3>;
|
|
91
98
|
}
|
|
92
99
|
export interface FloatCurve {
|
|
93
|
-
path: string
|
|
94
|
-
property: string
|
|
100
|
+
path: string;
|
|
101
|
+
property: string;
|
|
95
102
|
className: string;
|
|
96
103
|
keyFrames: ValueGetter<number>;
|
|
97
104
|
}
|
|
98
105
|
export declare class AnimationClip extends EffectsObject {
|
|
99
106
|
positionCurves: PositionCurve[];
|
|
100
|
-
|
|
107
|
+
rotationCurves: RotationCurve[];
|
|
101
108
|
scaleCurves: ScaleCurve[];
|
|
102
109
|
floatCurves: FloatCurve[];
|
|
103
|
-
sampleAnimation(vfxItem: VFXItem
|
|
110
|
+
sampleAnimation(vfxItem: VFXItem, time: number): void;
|
|
104
111
|
fromData(data: spec.AnimationClipData): void;
|
|
105
112
|
private findTarget;
|
|
106
113
|
}
|
|
107
114
|
export declare class AnimationClipPlayable extends Playable {
|
|
108
115
|
clip: AnimationClip;
|
|
109
|
-
processFrame(
|
|
110
|
-
fromData(data: any): void;
|
|
116
|
+
processFrame(context: FrameContext): void;
|
|
111
117
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { EffectsObject } from '../../effects-object';
|
|
2
|
+
import type { Disposable } from '../../utils';
|
|
2
3
|
/**
|
|
3
4
|
* 动画图,负责更新所有的动画节点
|
|
4
5
|
* @since 2.0.0
|
|
@@ -6,36 +7,70 @@ import type { VFXItem, VFXItemContent } from '../../vfx-item';
|
|
|
6
7
|
*/
|
|
7
8
|
export declare class PlayableGraph {
|
|
8
9
|
private playableOutputs;
|
|
9
|
-
|
|
10
|
+
private playables;
|
|
10
11
|
evaluate(dt: number): void;
|
|
11
|
-
connect(source: Playable, destination: Playable): void;
|
|
12
|
+
connect(source: Playable, sourceOutputPort: number, destination: Playable, destinationInputPort: number): void;
|
|
12
13
|
addOutput(output: PlayableOutput): void;
|
|
13
|
-
|
|
14
|
+
addPlayable(playable: Playable): void;
|
|
15
|
+
private processFrameWithRoot;
|
|
16
|
+
private prepareFrameWithRoot;
|
|
17
|
+
private updatePlayableTime;
|
|
14
18
|
}
|
|
15
19
|
/**
|
|
16
20
|
* 动画图可播放节点对象
|
|
17
21
|
* @since 2.0.0
|
|
18
22
|
* @internal
|
|
19
23
|
*/
|
|
20
|
-
export declare class Playable {
|
|
21
|
-
|
|
24
|
+
export declare class Playable implements Disposable {
|
|
25
|
+
onPlayablePlayFlag: boolean;
|
|
26
|
+
onPlayablePauseFlag: boolean;
|
|
27
|
+
overrideTimeNextEvaluation: boolean;
|
|
28
|
+
private destroyed;
|
|
22
29
|
private inputs;
|
|
30
|
+
private inputOuputPorts;
|
|
31
|
+
private inputWeight;
|
|
32
|
+
private outputs;
|
|
33
|
+
private playState;
|
|
34
|
+
private traversalMode;
|
|
23
35
|
/**
|
|
24
36
|
* 当前本地播放的时间
|
|
25
37
|
*/
|
|
26
38
|
protected time: number;
|
|
27
|
-
constructor();
|
|
28
|
-
|
|
39
|
+
constructor(graph: PlayableGraph, inputCount?: number);
|
|
40
|
+
play(): void;
|
|
41
|
+
pause(): void;
|
|
42
|
+
connectInput(inputPort: number, sourcePlayable: Playable, sourceOutputPort: number, weight?: number): void;
|
|
43
|
+
addInput(sourcePlayable: Playable, sourceOutputPort: number, weight?: number): void;
|
|
44
|
+
getInputCount(): number;
|
|
29
45
|
getInputs(): Playable[];
|
|
30
|
-
getInput(index: number): Playable
|
|
46
|
+
getInput(index: number): Playable;
|
|
47
|
+
getOutputCount(): number;
|
|
48
|
+
getOutputs(): Playable[];
|
|
49
|
+
getOutput(index: number): Playable;
|
|
50
|
+
getInputWeight(inputIndex: number): number;
|
|
51
|
+
setInputWeight(playable: Playable, weight: number): void;
|
|
52
|
+
setInputWeight(inputIndex: number, weight: number): void;
|
|
31
53
|
setTime(time: number): void;
|
|
32
54
|
getTime(): number;
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
55
|
+
getPlayState(): PlayState;
|
|
56
|
+
setTraversalMode(mode: PlayableTraversalMode): void;
|
|
57
|
+
getTraversalMode(): PlayableTraversalMode;
|
|
58
|
+
onPlayablePlay(context: FrameContext): void;
|
|
59
|
+
onPlayablePause(context: FrameContext): void;
|
|
60
|
+
prepareFrame(context: FrameContext): void;
|
|
61
|
+
processFrame(context: FrameContext): void;
|
|
37
62
|
onPlayableDestroy(): void;
|
|
38
|
-
|
|
63
|
+
dispose(): void;
|
|
64
|
+
/**
|
|
65
|
+
* @internal
|
|
66
|
+
*/
|
|
67
|
+
prepareFrameRecursive(context: FrameContext, passthroughPort: number): void;
|
|
68
|
+
/**
|
|
69
|
+
* @internal
|
|
70
|
+
*/
|
|
71
|
+
processFrameRecursive(context: FrameContext, passthroughPort: number): void;
|
|
72
|
+
private setOutput;
|
|
73
|
+
private setInput;
|
|
39
74
|
}
|
|
40
75
|
/**
|
|
41
76
|
* 动画图输出节点对象,将动画数据采样到绑定的元素属性上
|
|
@@ -46,21 +81,37 @@ export declare class PlayableOutput {
|
|
|
46
81
|
/**
|
|
47
82
|
* 绑定到的动画 item
|
|
48
83
|
*/
|
|
49
|
-
|
|
84
|
+
userData: object;
|
|
50
85
|
/**
|
|
51
86
|
* 源 playable 对象
|
|
52
87
|
*/
|
|
53
88
|
sourcePlayable: Playable;
|
|
89
|
+
context: FrameContext;
|
|
54
90
|
/**
|
|
55
91
|
* 当前本地播放的时间
|
|
56
92
|
*/
|
|
57
93
|
protected time: number;
|
|
94
|
+
private sourceOutputPort;
|
|
58
95
|
constructor();
|
|
59
|
-
setSourcePlayeble(playable: Playable): void;
|
|
60
|
-
|
|
61
|
-
|
|
96
|
+
setSourcePlayeble(playable: Playable, port?: number): void;
|
|
97
|
+
getSourceOutputPort(): number;
|
|
98
|
+
setUserData(value: object): void;
|
|
99
|
+
getUserData(): object;
|
|
100
|
+
prepareFrame(): void;
|
|
101
|
+
processFrame(): void;
|
|
102
|
+
}
|
|
103
|
+
export declare abstract class PlayableAsset extends EffectsObject {
|
|
104
|
+
abstract createPlayable(graph: PlayableGraph): Playable;
|
|
105
|
+
}
|
|
106
|
+
export interface FrameContext {
|
|
107
|
+
deltaTime: number;
|
|
108
|
+
output: PlayableOutput;
|
|
109
|
+
}
|
|
110
|
+
export declare enum PlayState {
|
|
111
|
+
Playing = 0,
|
|
112
|
+
Paused = 1
|
|
62
113
|
}
|
|
63
|
-
export declare
|
|
64
|
-
|
|
65
|
-
|
|
114
|
+
export declare enum PlayableTraversalMode {
|
|
115
|
+
Mix = 0,
|
|
116
|
+
Passthrough = 1
|
|
66
117
|
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { DataPath, EffectsObjectData } from '@galacean/effects-specification';
|
|
2
|
+
import type { RuntimeClip, TrackAsset } from '../timeline/track';
|
|
3
|
+
import { ObjectBindingTrack } from './calculate-item';
|
|
4
|
+
import type { FrameContext, PlayableGraph } from './playable-graph';
|
|
5
|
+
import { Playable, PlayableAsset } from './playable-graph';
|
|
6
|
+
export interface TimelineAssetData extends EffectsObjectData {
|
|
7
|
+
tracks: DataPath[];
|
|
8
|
+
}
|
|
9
|
+
export declare class TimelineAsset extends PlayableAsset {
|
|
10
|
+
tracks: TrackAsset[];
|
|
11
|
+
graph: PlayableGraph;
|
|
12
|
+
createPlayable(graph: PlayableGraph): Playable;
|
|
13
|
+
fromData(data: TimelineAssetData): void;
|
|
14
|
+
}
|
|
15
|
+
export declare class TimelinePlayable extends Playable {
|
|
16
|
+
clips: RuntimeClip[];
|
|
17
|
+
masterTracks: ObjectBindingTrack[];
|
|
18
|
+
prepareFrame(context: FrameContext): void;
|
|
19
|
+
evaluate(): void;
|
|
20
|
+
compileTracks(graph: PlayableGraph, tracks: TrackAsset[]): void;
|
|
21
|
+
private sortTracks;
|
|
22
|
+
private addSubTracksRecursive;
|
|
23
|
+
}
|
|
24
|
+
export declare class TrackSortWrapper {
|
|
25
|
+
track: TrackAsset;
|
|
26
|
+
originalIndex: number;
|
|
27
|
+
constructor(track: TrackAsset, originalIndex: number);
|
|
28
|
+
}
|
|
@@ -1,20 +1,9 @@
|
|
|
1
|
-
import { Euler, Vector3 } from '@galacean/effects-math/es/core/index';
|
|
2
1
|
import * as spec from '@galacean/effects-specification';
|
|
3
2
|
import { ItemBehaviour } from '../../components';
|
|
4
3
|
import type { Engine } from '../../engine';
|
|
5
4
|
export declare class CameraController extends ItemBehaviour {
|
|
6
|
-
near: number;
|
|
7
|
-
far: number;
|
|
8
|
-
fov: number;
|
|
9
|
-
clipMode?: spec.CameraClipMode;
|
|
10
|
-
position: Vector3;
|
|
11
|
-
rotation: Euler;
|
|
12
5
|
private options;
|
|
13
|
-
private translateOverLifetime?;
|
|
14
|
-
private rotationOverLifetime?;
|
|
15
6
|
constructor(engine: Engine, props?: spec.CameraContent);
|
|
16
|
-
start(): void;
|
|
17
7
|
update(): void;
|
|
18
8
|
fromData(data: spec.CameraContent): void;
|
|
19
|
-
private updateCamera;
|
|
20
9
|
}
|
package/dist/plugins/index.d.ts
CHANGED
|
@@ -18,6 +18,10 @@ export * from './particle/particle-system-renderer';
|
|
|
18
18
|
export * from './cal/calculate-loader';
|
|
19
19
|
export * from './cal/calculate-vfx-item';
|
|
20
20
|
export * from './cal/calculate-item';
|
|
21
|
+
export * from './timeline/track';
|
|
22
|
+
export * from './timeline/tracks/transform-track';
|
|
23
|
+
export * from './timeline/tracks/activation-track';
|
|
24
|
+
export * from './timeline/tracks/sprite-color-track';
|
|
25
|
+
export * from './cal/timeline-asset';
|
|
21
26
|
export * from './text/text-item';
|
|
22
27
|
export * from './text/text-loader';
|
|
23
|
-
export * from './cal/track';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Matrix4, Ray, TriangleLike, Vector2, Vector3 } from '@galacean/effects-math/es/core/index';
|
|
2
2
|
import type * as spec from '@galacean/effects-specification';
|
|
3
|
-
import type { VFXItem
|
|
3
|
+
import type { VFXItem } from '../../vfx-item';
|
|
4
4
|
export declare enum HitTestType {
|
|
5
5
|
triangle = 1,
|
|
6
6
|
box = 2,
|
|
@@ -46,7 +46,7 @@ export interface HitTestCustomParams {
|
|
|
46
46
|
behavior?: spec.InteractBehavior;
|
|
47
47
|
}
|
|
48
48
|
export type Region = {
|
|
49
|
-
compContent: VFXItem
|
|
49
|
+
compContent: VFXItem;
|
|
50
50
|
name: string;
|
|
51
51
|
id: string;
|
|
52
52
|
position: Vector3;
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import * as spec from '@galacean/effects-specification';
|
|
2
1
|
import type { Disposable } from '../../utils';
|
|
3
2
|
export declare const EVENT_TYPE_CLICK = "click";
|
|
4
3
|
export declare const EVENT_TYPE_TOUCH_START = "touchstart";
|
|
5
4
|
export declare const EVENT_TYPE_TOUCH_MOVE = "touchmove";
|
|
6
5
|
export declare const EVENT_TYPE_TOUCH_END = "touchend";
|
|
7
|
-
export declare const InteractBehavior: typeof spec.InteractBehavior;
|
|
8
6
|
export type TouchEventType = {
|
|
9
7
|
x: number;
|
|
10
8
|
y: number;
|
|
@@ -15,7 +15,7 @@ export declare class ParticleSystemRenderer extends RendererComponent {
|
|
|
15
15
|
meshes: Mesh[];
|
|
16
16
|
particleMesh: ParticleMesh;
|
|
17
17
|
private trailMesh?;
|
|
18
|
-
constructor(engine: Engine, particleMeshProps
|
|
18
|
+
constructor(engine: Engine, particleMeshProps?: ParticleMeshProps, trailMeshProps?: TrailMeshProps);
|
|
19
19
|
start(): void;
|
|
20
20
|
update(dt: number): void;
|
|
21
21
|
render(renderer: Renderer): void;
|
|
@@ -141,7 +141,7 @@ export declare class ParticleSystem extends Component {
|
|
|
141
141
|
textureSheetAnimation?: ParticleTextureSheetAnimation;
|
|
142
142
|
interaction?: ParticleInteraction;
|
|
143
143
|
emissionStopped: boolean;
|
|
144
|
-
|
|
144
|
+
destroyed: boolean;
|
|
145
145
|
props: ParticleSystemProps;
|
|
146
146
|
private generatedCount;
|
|
147
147
|
private lastUpdate;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { FrameContext, PlayableGraph } from '../cal/playable-graph';
|
|
2
|
+
import { Playable, PlayableAsset } from '../cal/playable-graph';
|
|
2
3
|
import { ParticleSystem } from './particle-system';
|
|
3
4
|
/**
|
|
4
5
|
* @since 2.0.0
|
|
@@ -6,7 +7,10 @@ import { ParticleSystem } from './particle-system';
|
|
|
6
7
|
*/
|
|
7
8
|
export declare class ParticleBehaviourPlayable extends Playable {
|
|
8
9
|
particleSystem: ParticleSystem;
|
|
9
|
-
|
|
10
|
-
processFrame(
|
|
10
|
+
start(context: FrameContext): void;
|
|
11
|
+
processFrame(context: FrameContext): void;
|
|
12
|
+
}
|
|
13
|
+
export declare class ParticleBehaviourPlayableAsset extends PlayableAsset {
|
|
14
|
+
createPlayable(graph: PlayableGraph): Playable;
|
|
11
15
|
}
|
|
12
16
|
export declare const particleUniformTypeMap: Record<string, string>;
|
package/dist/plugins/plugin.d.ts
CHANGED
|
@@ -21,21 +21,21 @@ export interface Plugin {
|
|
|
21
21
|
* @param composition
|
|
22
22
|
* @param item
|
|
23
23
|
*/
|
|
24
|
-
onCompositionItemLifeBegin: (composition: Composition, item: VFXItem
|
|
24
|
+
onCompositionItemLifeBegin: (composition: Composition, item: VFXItem) => void;
|
|
25
25
|
/**
|
|
26
26
|
* 合成生命周期结束时触发(无论结束行为)
|
|
27
27
|
* 合成播放阶段只触发一次此函数
|
|
28
28
|
* @param composition
|
|
29
29
|
* @param item
|
|
30
30
|
*/
|
|
31
|
-
onCompositionItemLifeEnd: (composition: Composition, item: VFXItem
|
|
31
|
+
onCompositionItemLifeEnd: (composition: Composition, item: VFXItem) => void;
|
|
32
32
|
/**
|
|
33
33
|
* 合成销毁时触发(当合成的结束行为是冻结、循环或合成配置了 reusable 时不触发)
|
|
34
34
|
* 元素销毁应该在合成销毁时调用。
|
|
35
35
|
* @param composition
|
|
36
36
|
* @param item
|
|
37
37
|
*/
|
|
38
|
-
onCompositionItemRemoved: (composition: Composition, item: VFXItem
|
|
38
|
+
onCompositionItemRemoved: (composition: Composition, item: VFXItem) => void;
|
|
39
39
|
/**
|
|
40
40
|
* 合成重播时的回调
|
|
41
41
|
* @param composition
|
|
@@ -112,9 +112,9 @@ export declare abstract class AbstractPlugin implements Plugin {
|
|
|
112
112
|
*/
|
|
113
113
|
static precompile(compositions: spec.Composition[], renderer: Renderer): Promise<void>;
|
|
114
114
|
onCompositionConstructed(composition: Composition, scene: Scene): void;
|
|
115
|
-
onCompositionItemLifeBegin(composition: Composition, item: VFXItem
|
|
116
|
-
onCompositionItemLifeEnd(composition: Composition, item: VFXItem
|
|
117
|
-
onCompositionItemRemoved(composition: Composition, item: VFXItem
|
|
115
|
+
onCompositionItemLifeBegin(composition: Composition, item: VFXItem): void;
|
|
116
|
+
onCompositionItemLifeEnd(composition: Composition, item: VFXItem): void;
|
|
117
|
+
onCompositionItemRemoved(composition: Composition, item: VFXItem): void;
|
|
118
118
|
onCompositionReset(composition: Composition, frame: RenderFrame): void;
|
|
119
119
|
onCompositionWillReset(composition: Composition, frame: RenderFrame): void;
|
|
120
120
|
onCompositionDestroyed(composition: Composition): void;
|
|
@@ -10,7 +10,8 @@ import { Geometry } from '../../render';
|
|
|
10
10
|
import type { GeometryFromShape } from '../../shape';
|
|
11
11
|
import type { Texture } from '../../texture';
|
|
12
12
|
import type { CalculateItemOptions } from '../cal/calculate-item';
|
|
13
|
-
import {
|
|
13
|
+
import type { FrameContext, PlayableGraph } from '../cal/playable-graph';
|
|
14
|
+
import { Playable, PlayableAsset } from '../cal/playable-graph';
|
|
14
15
|
import type { BoundingBoxTriangle, HitTestTriangleParams } from '../interact/click-handler';
|
|
15
16
|
/**
|
|
16
17
|
* 用于创建 spriteItem 的数据类型, 经过处理后的 spec.SpriteContent
|
|
@@ -68,12 +69,17 @@ export declare class SpriteColorPlayable extends Playable {
|
|
|
68
69
|
startColor: spec.RGBAColorValue;
|
|
69
70
|
renderColor: vec4;
|
|
70
71
|
spriteMaterial: Material;
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
72
|
+
processFrame(context: FrameContext): void;
|
|
73
|
+
create(clipData: SpriteColorPlayableAssetData): this;
|
|
74
|
+
}
|
|
75
|
+
export declare class SpriteColorPlayableAsset extends PlayableAsset {
|
|
76
|
+
data: SpriteColorPlayableAssetData;
|
|
77
|
+
createPlayable(graph: PlayableGraph): Playable;
|
|
78
|
+
fromData(data: SpriteColorPlayableAssetData): void;
|
|
79
|
+
}
|
|
80
|
+
export interface SpriteColorPlayableAssetData extends spec.EffectsObjectData {
|
|
81
|
+
colorOverLifetime?: spec.ColorOverLifetime;
|
|
82
|
+
startColor?: spec.RGBAColorValue;
|
|
77
83
|
}
|
|
78
84
|
export declare class SpriteComponent extends RendererComponent {
|
|
79
85
|
renderer: SpriteItemRenderer;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { FrameContext } from '../../cal/playable-graph';
|
|
2
|
+
import { Playable } from '../../cal/playable-graph';
|
|
3
|
+
export declare class ActivationMixerPlayable extends Playable {
|
|
4
|
+
private bindingItem;
|
|
5
|
+
processFrame(context: FrameContext): void;
|
|
6
|
+
private hideRendererComponents;
|
|
7
|
+
private showRendererComponents;
|
|
8
|
+
}
|