@galacean/effects-core 2.1.5 → 2.2.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/index.js +457 -505
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +457 -506
- package/dist/index.mjs.map +1 -1
- package/dist/math/value-getters/value-getter.d.ts +4 -0
- package/dist/plugins/cal/animation-stream.d.ts +1 -2
- package/dist/plugins/cal/playable-graph.d.ts +1 -30
- package/dist/plugins/text/text-layout.d.ts +1 -1
- package/dist/plugins/timeline/playables/activation-mixer-playable.d.ts +3 -3
- package/dist/plugins/timeline/playables/color-property-mixer-playable.d.ts +3 -3
- package/dist/plugins/timeline/playables/float-property-mixer-playable.d.ts +3 -3
- package/dist/plugins/timeline/playables/index.d.ts +6 -2
- package/dist/plugins/timeline/playables/particle-mixer-playable.d.ts +5 -0
- package/dist/plugins/timeline/playables/sprite-color-mixer-playable.d.ts +5 -0
- package/dist/plugins/timeline/playables/sub-composition-mixer-playable.d.ts +3 -3
- package/dist/plugins/timeline/playables/track-mixer-playable.d.ts +12 -0
- package/dist/plugins/timeline/playables/transform-mixer-playable.d.ts +5 -0
- package/dist/plugins/timeline/playables/vector4-property-mixer-playable.d.ts +3 -3
- package/dist/plugins/timeline/track.d.ts +7 -6
- package/dist/plugins/timeline/tracks/activation-track.d.ts +3 -2
- package/dist/plugins/timeline/tracks/color-property-track.d.ts +3 -2
- package/dist/plugins/timeline/tracks/float-property-track.d.ts +3 -2
- package/dist/plugins/timeline/tracks/index.d.ts +1 -0
- package/dist/plugins/timeline/tracks/particle-track.d.ts +6 -0
- package/dist/plugins/timeline/tracks/property-track.d.ts +1 -1
- package/dist/plugins/timeline/tracks/sprite-color-track.d.ts +3 -0
- package/dist/plugins/timeline/tracks/sub-composition-track.d.ts +3 -2
- package/dist/plugins/timeline/tracks/transform-track.d.ts +3 -0
- package/dist/plugins/timeline/tracks/vector4-property-track.d.ts +3 -2
- package/dist/scene.d.ts +12 -0
- package/dist/vfx-item.d.ts +1 -2
- package/package.json +1 -1
|
@@ -126,7 +126,11 @@ export declare class BezierCurvePath extends ValueGetter<Vector3> {
|
|
|
126
126
|
timeInterval: number;
|
|
127
127
|
valueInterval: number;
|
|
128
128
|
pathCurve: BezierPath;
|
|
129
|
+
timeStart: number;
|
|
130
|
+
timeEnd: number;
|
|
129
131
|
}>;
|
|
132
|
+
keys: number[][];
|
|
133
|
+
keyTimeData: string[];
|
|
130
134
|
onCreate(props: spec.BezierCurvePathValue): void;
|
|
131
135
|
getValue(time: number): Vector3;
|
|
132
136
|
getPercValue(curveKey: string, time: number): number;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { AnimationPlayable } from './animation-playable';
|
|
1
|
+
import type { AnimationPlayable } from './animation-playable';
|
|
2
2
|
export declare class AnimationStream {
|
|
3
3
|
private playable;
|
|
4
4
|
private curveValues;
|
|
5
5
|
constructor(playable: AnimationPlayable);
|
|
6
6
|
setCurveValue(componentType: string, propertyName: string, value: number): AnimationCurveValue;
|
|
7
7
|
findCurveValue(componentType: string, propertyName: string): AnimationCurveValue;
|
|
8
|
-
getInputStream(index: number): AnimationStream | undefined;
|
|
9
8
|
}
|
|
10
9
|
export interface AnimationCurveValue {
|
|
11
10
|
componentType: string;
|
|
@@ -8,7 +8,6 @@ export declare class PlayableGraph {
|
|
|
8
8
|
private playableOutputs;
|
|
9
9
|
private playables;
|
|
10
10
|
evaluate(dt: number): void;
|
|
11
|
-
connect(source: Playable, sourceOutputPort: number, destination: Playable, destinationInputPort: number): void;
|
|
12
11
|
addOutput(output: PlayableOutput): void;
|
|
13
12
|
addPlayable(playable: Playable): void;
|
|
14
13
|
private processFrameWithRoot;
|
|
@@ -24,12 +23,7 @@ export declare class Playable implements Disposable {
|
|
|
24
23
|
onPlayablePauseFlag: boolean;
|
|
25
24
|
private duration;
|
|
26
25
|
private destroyed;
|
|
27
|
-
private inputs;
|
|
28
|
-
private inputOuputPorts;
|
|
29
|
-
private inputWeight;
|
|
30
|
-
private outputs;
|
|
31
26
|
private playState;
|
|
32
|
-
private traversalMode;
|
|
33
27
|
/**
|
|
34
28
|
* 当前本地播放的时间
|
|
35
29
|
*/
|
|
@@ -37,32 +31,15 @@ export declare class Playable implements Disposable {
|
|
|
37
31
|
constructor(graph: PlayableGraph, inputCount?: number);
|
|
38
32
|
play(): void;
|
|
39
33
|
pause(): void;
|
|
40
|
-
connectInput(inputPort: number, sourcePlayable: Playable, sourceOutputPort: number, weight?: number): void;
|
|
41
|
-
addInput(sourcePlayable: Playable, sourceOutputPort: number, weight?: number): void;
|
|
42
|
-
getInputCount(): number;
|
|
43
|
-
getInputs(): Playable[];
|
|
44
|
-
getInput(index: number): Playable;
|
|
45
|
-
getOutputCount(): number;
|
|
46
|
-
getOutputs(): Playable[];
|
|
47
|
-
getOutput(index: number): Playable;
|
|
48
|
-
getInputWeight(inputIndex: number): number;
|
|
49
|
-
setInputWeight(playable: Playable, weight: number): void;
|
|
50
|
-
setInputWeight(inputIndex: number, weight: number): void;
|
|
51
34
|
setTime(time: number): void;
|
|
52
35
|
getTime(): number;
|
|
53
36
|
setDuration(duration: number): void;
|
|
54
37
|
getDuration(): number;
|
|
55
38
|
getPlayState(): PlayState;
|
|
56
|
-
setTraversalMode(mode: PlayableTraversalMode): void;
|
|
57
|
-
getTraversalMode(): PlayableTraversalMode;
|
|
58
|
-
onPlayablePlay(context: FrameContext): void;
|
|
59
|
-
onPlayablePause(context: FrameContext): void;
|
|
60
39
|
prepareFrame(context: FrameContext): void;
|
|
61
40
|
processFrame(context: FrameContext): void;
|
|
62
41
|
onPlayableDestroy(): void;
|
|
63
42
|
dispose(): void;
|
|
64
|
-
private setOutput;
|
|
65
|
-
private setInput;
|
|
66
43
|
}
|
|
67
44
|
/**
|
|
68
45
|
* 动画图输出节点对象,将动画数据采样到绑定的元素属性上
|
|
@@ -82,10 +59,8 @@ export declare class PlayableOutput {
|
|
|
82
59
|
* 当前本地播放的时间
|
|
83
60
|
*/
|
|
84
61
|
protected time: number;
|
|
85
|
-
private sourceOutputPort;
|
|
86
62
|
constructor();
|
|
87
|
-
setSourcePlayable(playable: Playable
|
|
88
|
-
getSourceOutputPort(): number;
|
|
63
|
+
setSourcePlayable(playable: Playable): void;
|
|
89
64
|
setUserData(value: object): void;
|
|
90
65
|
getUserData(): object;
|
|
91
66
|
prepareFrame(): void;
|
|
@@ -102,7 +77,3 @@ export declare enum PlayState {
|
|
|
102
77
|
Playing = 0,
|
|
103
78
|
Paused = 1
|
|
104
79
|
}
|
|
105
|
-
export declare enum PlayableTraversalMode {
|
|
106
|
-
Mix = 0,
|
|
107
|
-
Passthrough = 1
|
|
108
|
-
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { FrameContext } from '../../cal/playable-graph';
|
|
2
|
-
import {
|
|
3
|
-
export declare class ActivationMixerPlayable extends
|
|
4
|
-
|
|
2
|
+
import { TrackMixerPlayable } from './track-mixer-playable';
|
|
3
|
+
export declare class ActivationMixerPlayable extends TrackMixerPlayable {
|
|
4
|
+
evaluate(context: FrameContext): void;
|
|
5
5
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { FrameContext } from '../../cal/playable-graph';
|
|
2
|
-
import {
|
|
3
|
-
export declare class ColorPropertyMixerPlayable extends
|
|
2
|
+
import { TrackMixerPlayable } from './track-mixer-playable';
|
|
3
|
+
export declare class ColorPropertyMixerPlayable extends TrackMixerPlayable {
|
|
4
4
|
propertyName: string;
|
|
5
|
-
|
|
5
|
+
evaluate(context: FrameContext): void;
|
|
6
6
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { FrameContext } from '../../cal/playable-graph';
|
|
2
|
-
import {
|
|
3
|
-
export declare class FloatPropertyMixerPlayable extends
|
|
2
|
+
import { TrackMixerPlayable } from './track-mixer-playable';
|
|
3
|
+
export declare class FloatPropertyMixerPlayable extends TrackMixerPlayable {
|
|
4
4
|
propertyName: string;
|
|
5
|
-
|
|
5
|
+
evaluate(context: FrameContext): void;
|
|
6
6
|
}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
export * from './activation-mixer-playable';
|
|
2
|
-
export * from './property-
|
|
2
|
+
export * from './color-property-mixer-playable';
|
|
3
3
|
export * from './float-property-mixer-playable';
|
|
4
|
+
export * from './particle-mixer-playable';
|
|
5
|
+
export * from './property-clip-playable';
|
|
6
|
+
export * from './sprite-color-mixer-playable';
|
|
4
7
|
export * from './sub-composition-clip-playable';
|
|
5
8
|
export * from './sub-composition-mixer-playable';
|
|
9
|
+
export * from './track-mixer-playable';
|
|
10
|
+
export * from './transform-mixer-playable';
|
|
6
11
|
export * from './vector4-property-mixer-playable';
|
|
7
|
-
export * from './color-property-mixer-playable';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { FrameContext } from '../../cal/playable-graph';
|
|
2
|
-
import {
|
|
3
|
-
export declare class SubCompositionMixerPlayable extends
|
|
4
|
-
|
|
2
|
+
import { TrackMixerPlayable } from './track-mixer-playable';
|
|
3
|
+
export declare class SubCompositionMixerPlayable extends TrackMixerPlayable {
|
|
4
|
+
evaluate(context: FrameContext): void;
|
|
5
5
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { FrameContext } from '../../cal/playable-graph';
|
|
2
|
+
import { Playable } from '../../cal/playable-graph';
|
|
3
|
+
export declare class TrackMixerPlayable extends Playable {
|
|
4
|
+
clipPlayables: Playable[];
|
|
5
|
+
clipWeights: number[];
|
|
6
|
+
processFrame(context: FrameContext): void;
|
|
7
|
+
setClipWeight(playable: Playable, weight: number): void;
|
|
8
|
+
setClipWeight(inputIndex: number, weight: number): void;
|
|
9
|
+
getClipWeight(inputIndex: number): number;
|
|
10
|
+
getClipPlayable(index: number): Playable;
|
|
11
|
+
evaluate(context: FrameContext): void;
|
|
12
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { FrameContext } from '../../cal/playable-graph';
|
|
2
|
-
import {
|
|
3
|
-
export declare class Vector4PropertyMixerPlayable extends
|
|
2
|
+
import { TrackMixerPlayable } from './track-mixer-playable';
|
|
3
|
+
export declare class Vector4PropertyMixerPlayable extends TrackMixerPlayable {
|
|
4
4
|
propertyName: string;
|
|
5
|
-
|
|
5
|
+
evaluate(context: FrameContext): void;
|
|
6
6
|
}
|
|
@@ -3,6 +3,7 @@ import type { PlayableGraph } from '../cal/playable-graph';
|
|
|
3
3
|
import { Playable, PlayableAsset, PlayableOutput } from '../cal/playable-graph';
|
|
4
4
|
import { ParticleSystem } from '../particle/particle-system';
|
|
5
5
|
import type { Constructor } from '../../utils';
|
|
6
|
+
import { TrackMixerPlayable } from './playables';
|
|
6
7
|
/**
|
|
7
8
|
* @since 2.0.0
|
|
8
9
|
*/
|
|
@@ -34,11 +35,11 @@ export declare class TrackAsset extends PlayableAsset {
|
|
|
34
35
|
/**
|
|
35
36
|
* 重写该方法以创建自定义混合器
|
|
36
37
|
*/
|
|
37
|
-
createTrackMixer(graph: PlayableGraph):
|
|
38
|
+
createTrackMixer(graph: PlayableGraph): TrackMixerPlayable;
|
|
38
39
|
createOutput(): PlayableOutput;
|
|
39
|
-
createPlayableGraph(graph: PlayableGraph, runtimeClips: RuntimeClip[]):
|
|
40
|
-
createMixerPlayableGraph(graph: PlayableGraph, runtimeClips: RuntimeClip[]):
|
|
41
|
-
compileClips(graph: PlayableGraph, timelineClips: TimelineClip[], runtimeClips: RuntimeClip[]):
|
|
40
|
+
createPlayableGraph(graph: PlayableGraph, runtimeClips: RuntimeClip[]): TrackMixerPlayable;
|
|
41
|
+
createMixerPlayableGraph(graph: PlayableGraph, runtimeClips: RuntimeClip[]): TrackMixerPlayable;
|
|
42
|
+
compileClips(graph: PlayableGraph, timelineClips: TimelineClip[], runtimeClips: RuntimeClip[]): TrackMixerPlayable;
|
|
42
43
|
createPlayable(graph: PlayableGraph): Playable;
|
|
43
44
|
getChildTracks(): TrackAsset[];
|
|
44
45
|
addChild(child: TrackAsset): void;
|
|
@@ -56,10 +57,10 @@ export declare enum TrackType {
|
|
|
56
57
|
export declare class RuntimeClip {
|
|
57
58
|
clip: TimelineClip;
|
|
58
59
|
playable: Playable;
|
|
59
|
-
parentMixer:
|
|
60
|
+
parentMixer: TrackMixerPlayable;
|
|
60
61
|
track: TrackAsset;
|
|
61
62
|
particleSystem: ParticleSystem;
|
|
62
|
-
constructor(clip: TimelineClip, clipPlayable: Playable, parentMixer:
|
|
63
|
+
constructor(clip: TimelineClip, clipPlayable: Playable, parentMixer: TrackMixerPlayable, track: TrackAsset);
|
|
63
64
|
set enable(value: boolean);
|
|
64
65
|
evaluateAt(localTime: number): void;
|
|
65
66
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import type { PlayableGraph
|
|
1
|
+
import type { PlayableGraph } from '../../cal/playable-graph';
|
|
2
2
|
import { TrackAsset } from '../track';
|
|
3
|
+
import type { TrackMixerPlayable } from '../playables/track-mixer-playable';
|
|
3
4
|
export declare class ActivationTrack extends TrackAsset {
|
|
4
|
-
createTrackMixer(graph: PlayableGraph):
|
|
5
|
+
createTrackMixer(graph: PlayableGraph): TrackMixerPlayable;
|
|
5
6
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import type { PlayableGraph
|
|
1
|
+
import type { PlayableGraph } from '../../cal/playable-graph';
|
|
2
|
+
import type { TrackMixerPlayable } from '../playables';
|
|
2
3
|
import { PropertyTrack } from './property-track';
|
|
3
4
|
export declare class ColorPropertyTrack extends PropertyTrack {
|
|
4
|
-
createTrackMixer(graph: PlayableGraph):
|
|
5
|
+
createTrackMixer(graph: PlayableGraph): TrackMixerPlayable;
|
|
5
6
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import type { PlayableGraph
|
|
1
|
+
import type { PlayableGraph } from '../../cal/playable-graph';
|
|
2
|
+
import type { TrackMixerPlayable } from '../playables';
|
|
2
3
|
import { PropertyTrack } from './property-track';
|
|
3
4
|
export declare class FloatPropertyTrack extends PropertyTrack {
|
|
4
|
-
createTrackMixer(graph: PlayableGraph):
|
|
5
|
+
createTrackMixer(graph: PlayableGraph): TrackMixerPlayable;
|
|
5
6
|
updateAnimatedObject(): void;
|
|
6
7
|
}
|
|
@@ -4,6 +4,7 @@ export * from './sprite-color-track';
|
|
|
4
4
|
export * from './sub-composition-track';
|
|
5
5
|
export * from './transform-track';
|
|
6
6
|
export * from './material-track';
|
|
7
|
+
export * from './particle-track';
|
|
7
8
|
export * from './property-track';
|
|
8
9
|
export * from './vector4-property-track';
|
|
9
10
|
export * from './color-property-track';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { PlayableGraph } from '../../cal/playable-graph';
|
|
2
|
+
import type { TrackMixerPlayable } from '../playables';
|
|
3
|
+
import { TrackAsset } from '../track';
|
|
4
|
+
export declare class ParticleTrack extends TrackAsset {
|
|
5
|
+
createTrackMixer(graph: PlayableGraph): TrackMixerPlayable;
|
|
6
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { EffectsObjectData } from '@galacean/effects-specification';
|
|
2
2
|
import { TrackAsset } from '../track';
|
|
3
|
-
export declare class PropertyTrack extends TrackAsset {
|
|
3
|
+
export declare abstract class PropertyTrack extends TrackAsset {
|
|
4
4
|
protected propertyNames: string[];
|
|
5
5
|
private path;
|
|
6
6
|
updateAnimatedObject(): void;
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import type { PlayableGraph } from '../../cal/playable-graph';
|
|
2
|
+
import type { TrackMixerPlayable } from '../playables';
|
|
1
3
|
import { TrackAsset } from '../track';
|
|
2
4
|
export declare class SpriteColorTrack extends TrackAsset {
|
|
5
|
+
createTrackMixer(graph: PlayableGraph): TrackMixerPlayable;
|
|
3
6
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import type { PlayableGraph } from '../../cal/playable-graph';
|
|
2
|
+
import type { TrackMixerPlayable } from '../playables';
|
|
1
3
|
import { TrackAsset } from '../track';
|
|
2
|
-
import type { PlayableGraph, Playable } from '../../cal/playable-graph';
|
|
3
4
|
export declare class SubCompositionTrack extends TrackAsset {
|
|
4
5
|
updateAnimatedObject(): void;
|
|
5
|
-
createTrackMixer(graph: PlayableGraph):
|
|
6
|
+
createTrackMixer(graph: PlayableGraph): TrackMixerPlayable;
|
|
6
7
|
}
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import type { PlayableGraph } from '../../cal/playable-graph';
|
|
2
|
+
import type { TrackMixerPlayable } from '../playables';
|
|
1
3
|
import { TrackAsset } from '../track';
|
|
2
4
|
export declare class TransformTrack extends TrackAsset {
|
|
5
|
+
createTrackMixer(graph: PlayableGraph): TrackMixerPlayable;
|
|
3
6
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import type { PlayableGraph
|
|
1
|
+
import type { PlayableGraph } from '../../cal/playable-graph';
|
|
2
|
+
import type { TrackMixerPlayable } from '../playables';
|
|
2
3
|
import { PropertyTrack } from './property-track';
|
|
3
4
|
export declare class Vector4PropertyTrack extends PropertyTrack {
|
|
4
|
-
createTrackMixer(graph: PlayableGraph):
|
|
5
|
+
createTrackMixer(graph: PlayableGraph): TrackMixerPlayable;
|
|
5
6
|
}
|
package/dist/scene.d.ts
CHANGED
|
@@ -70,6 +70,7 @@ export interface SceneLoadOptions {
|
|
|
70
70
|
variables?: spec.TemplateVariables;
|
|
71
71
|
/**
|
|
72
72
|
* 是否使用压缩纹理
|
|
73
|
+
* @default undefined
|
|
73
74
|
*/
|
|
74
75
|
useCompressedTexture?: boolean;
|
|
75
76
|
/**
|
|
@@ -106,6 +107,17 @@ export interface SceneLoadOptions {
|
|
|
106
107
|
reusable?: boolean;
|
|
107
108
|
/**
|
|
108
109
|
* 播放速度,当速度为负数时,合成倒播
|
|
110
|
+
* @default 1
|
|
109
111
|
*/
|
|
110
112
|
speed?: number;
|
|
113
|
+
/**
|
|
114
|
+
* 是否禁用 AVIF 图片
|
|
115
|
+
* @default undefined
|
|
116
|
+
*/
|
|
117
|
+
disableAVIF?: boolean;
|
|
118
|
+
/**
|
|
119
|
+
* 是否禁用 WebP 图片
|
|
120
|
+
* @default undefined
|
|
121
|
+
*/
|
|
122
|
+
disableWebP?: boolean;
|
|
111
123
|
}
|
package/dist/vfx-item.d.ts
CHANGED
|
@@ -17,7 +17,6 @@ export type VFXItemProps = spec.Item & {
|
|
|
17
17
|
items: VFXItemProps[];
|
|
18
18
|
startTime: number;
|
|
19
19
|
relative?: boolean;
|
|
20
|
-
listIndex?: number;
|
|
21
20
|
refId?: string;
|
|
22
21
|
};
|
|
23
22
|
/**
|
|
@@ -198,7 +197,7 @@ export declare class VFXItem extends EffectsObject implements Disposable {
|
|
|
198
197
|
getSpeed(): number;
|
|
199
198
|
/**
|
|
200
199
|
* 添加组件
|
|
201
|
-
* @param classConstructor -
|
|
200
|
+
* @param classConstructor - 要添加的组件
|
|
202
201
|
*/
|
|
203
202
|
addComponent<T extends Component>(classConstructor: Constructor<T>): T;
|
|
204
203
|
/**
|