@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
|
@@ -2,7 +2,7 @@ import type { Matrix3, Matrix4, Quaternion, Vector2, Vector3, Vector4, Color } f
|
|
|
2
2
|
import type { GlobalUniforms, Renderer, Shader, ShaderVariant, ShaderWithSource } from '../render';
|
|
3
3
|
import type { Texture } from '../texture';
|
|
4
4
|
import type { DestroyOptions, Disposable } from '../utils';
|
|
5
|
-
import type {
|
|
5
|
+
import type { UniformValue } from './types';
|
|
6
6
|
import type { Engine } from '../engine';
|
|
7
7
|
import { EffectsObject } from '../effects-object';
|
|
8
8
|
/**
|
|
@@ -34,10 +34,6 @@ export interface MaterialProps {
|
|
|
34
34
|
* 材质的名称,未传入会自动设置为 `Material[seed]`
|
|
35
35
|
*/
|
|
36
36
|
name?: string;
|
|
37
|
-
/**
|
|
38
|
-
* 传递的变换矩阵
|
|
39
|
-
*/
|
|
40
|
-
uniformSemantics?: Record<string, UniformSemantic>;
|
|
41
37
|
/**
|
|
42
38
|
* 渲染类型
|
|
43
39
|
*/
|
|
@@ -54,7 +50,6 @@ export declare abstract class Material extends EffectsObject implements Disposab
|
|
|
54
50
|
shaderVariant: ShaderVariant;
|
|
55
51
|
shaderSource: ShaderWithSource;
|
|
56
52
|
stringTags: Record<string, string>;
|
|
57
|
-
readonly uniformSemantics: Record<string, UniformSemantic>;
|
|
58
53
|
readonly enabledMacros: Record<string, number | boolean>;
|
|
59
54
|
readonly renderType: MaterialRenderType;
|
|
60
55
|
readonly name: string;
|
|
@@ -361,9 +356,8 @@ export declare abstract class Material extends EffectsObject implements Disposab
|
|
|
361
356
|
abstract cloneUniforms(sourceMaterial: Material): void;
|
|
362
357
|
/**
|
|
363
358
|
* 销毁当前 Material
|
|
364
|
-
* @param destroy - 包含纹理的销毁选项
|
|
365
359
|
*/
|
|
366
|
-
abstract dispose(
|
|
360
|
+
abstract dispose(): void;
|
|
367
361
|
/**
|
|
368
362
|
* 创建 Material
|
|
369
363
|
*/
|
package/dist/math/translate.d.ts
CHANGED
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
import { Vector3 } from '@galacean/effects-math/es/core/vector3';
|
|
2
|
-
import type { ItemLinearVelOverLifetime } from '../plugins';
|
|
3
2
|
import type { ValueGetter } from './value-getters';
|
|
4
3
|
export declare function translatePoint(x: number, y: number): number[];
|
|
4
|
+
export type ItemLinearVelOverLifetime = {
|
|
5
|
+
asMovement?: boolean;
|
|
6
|
+
x?: ValueGetter<number>;
|
|
7
|
+
y?: ValueGetter<number>;
|
|
8
|
+
z?: ValueGetter<number>;
|
|
9
|
+
enabled?: boolean;
|
|
10
|
+
};
|
|
5
11
|
export interface TranslateTarget {
|
|
6
12
|
speedOverLifetime?: ValueGetter<number>;
|
|
7
13
|
gravityModifier?: ValueGetter<number>;
|
|
@@ -37,7 +37,7 @@ export declare class BezierCurve extends ValueGetter<number> {
|
|
|
37
37
|
keys: number[][];
|
|
38
38
|
private keyFrames;
|
|
39
39
|
private curveInfos;
|
|
40
|
-
onCreate(props:
|
|
40
|
+
onCreate(props: spec.BezierKeyframeValue[]): void;
|
|
41
41
|
getValue(time: number): number;
|
|
42
42
|
getIntegrateValue(t0: number, t1: number, ts?: number): number;
|
|
43
43
|
getIntegrateByTime(t0: number, t1: number): number;
|
|
@@ -71,7 +71,7 @@ export declare class LinearValue extends ValueGetter<number> {
|
|
|
71
71
|
}
|
|
72
72
|
export declare class GradientValue extends ValueGetter<number[]> {
|
|
73
73
|
stops: ColorStop[];
|
|
74
|
-
onCreate(props:
|
|
74
|
+
onCreate(props: spec.GradientStop[] | Record<string, string>): void;
|
|
75
75
|
getStops(): ColorStop[];
|
|
76
76
|
getValue(time: number): number[];
|
|
77
77
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { VFXItem } from '../../vfx-item';
|
|
2
2
|
import type { AnimationGraphAsset } from './animation-graph-asset';
|
|
3
3
|
import type { GraphNode, PoseNodeDebugInfo } from './graph-node';
|
|
4
|
+
import { StateMachineNode } from './nodes';
|
|
4
5
|
import { PoseResult } from './pose-result';
|
|
5
6
|
import { Skeleton } from './skeleton';
|
|
6
7
|
export declare class GraphInstance {
|
|
@@ -14,6 +15,7 @@ export declare class GraphInstance {
|
|
|
14
15
|
evaluateGraph(deltaTime: number): PoseResult;
|
|
15
16
|
isInitialized(): boolean;
|
|
16
17
|
isNodeActive(nodeIdx: number): boolean;
|
|
18
|
+
getStateMachineNode(machineName: string): StateMachineNode | null;
|
|
17
19
|
resetGraphState(): void;
|
|
18
20
|
getNumControlParameters(): number;
|
|
19
21
|
getControlParameterIndex(parameterID: string): number;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as spec from '@galacean/effects-specification';
|
|
2
|
-
import type { AnimationClip, AnimationCurve, ColorAnimationCurve, FloatAnimationCurve } from '../../cal/calculate-vfx-item';
|
|
3
2
|
import type { GraphContext, InstantiationContext } from '../graph-context';
|
|
4
3
|
import { GraphNodeData, PoseNode } from '../graph-node';
|
|
5
4
|
import type { PoseResult } from '../pose-result';
|
|
6
5
|
import type { Skeleton } from '../skeleton';
|
|
7
6
|
import type { Pose } from '../pose';
|
|
7
|
+
import type { AnimationClip, AnimationCurve, FloatAnimationCurve, ColorAnimationCurve } from '../../../animation';
|
|
8
8
|
export declare class AnimationClipNodeData extends GraphNodeData {
|
|
9
9
|
playRate: number;
|
|
10
10
|
loopAnimation: boolean;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import * as spec from '@galacean/effects-specification';
|
|
2
|
-
import {
|
|
2
|
+
import type { GraphContext, InstantiationContext } from '../graph-context';
|
|
3
3
|
import type { PoseResult } from '../pose-result';
|
|
4
4
|
import type { BoolValueNode } from '../graph-node';
|
|
5
5
|
import { GraphNodeData, PoseNode } from '../graph-node';
|
|
6
6
|
import type { StateNode } from './state-node';
|
|
7
7
|
import type { TransitionNode } from './transition-node';
|
|
8
8
|
export declare class StateMachineNodeData extends GraphNodeData {
|
|
9
|
+
machineName: string;
|
|
9
10
|
stateDatas: spec.StateData[];
|
|
10
11
|
defaultStateIndex: number;
|
|
11
12
|
instantiate(context: InstantiationContext): void;
|
|
@@ -20,11 +21,19 @@ export interface StateInfo {
|
|
|
20
21
|
stateNode: StateNode;
|
|
21
22
|
transitions: TransitionInfo[];
|
|
22
23
|
}
|
|
24
|
+
/**
|
|
25
|
+
* 状态机节点
|
|
26
|
+
*/
|
|
23
27
|
export declare class StateMachineNode extends PoseNode {
|
|
24
28
|
states: StateInfo[];
|
|
25
|
-
defaultStateIndex: number;
|
|
26
29
|
private activeTransition;
|
|
27
30
|
private activeStateIndex;
|
|
31
|
+
/**
|
|
32
|
+
* 获取当前激活状态的名称
|
|
33
|
+
* @since 2.7.0
|
|
34
|
+
* @returns 当前状态名
|
|
35
|
+
*/
|
|
36
|
+
getCurrentStateName(): string;
|
|
28
37
|
evaluate(context: GraphContext, result: PoseResult): PoseResult;
|
|
29
38
|
private evaluateTransitions;
|
|
30
39
|
private selectDefaultState;
|
|
@@ -8,6 +8,7 @@ export declare enum TransitionState {
|
|
|
8
8
|
TransitioningOut = 2
|
|
9
9
|
}
|
|
10
10
|
export declare class StateNodeData extends GraphNodeData {
|
|
11
|
+
stateName: string;
|
|
11
12
|
childNodeIndex: number;
|
|
12
13
|
instantiate(context: InstantiationContext): void;
|
|
13
14
|
load(data: spec.StateNodeData): void;
|
|
@@ -2,7 +2,7 @@ import type { Color } from '@galacean/effects-math/es/core/color';
|
|
|
2
2
|
import type { VFXItem } from '../../vfx-item';
|
|
3
3
|
import type { Transform } from '../../transform';
|
|
4
4
|
import { NodeTransform } from './pose';
|
|
5
|
-
import type { ColorAnimationCurve, FloatAnimationCurve } from '
|
|
5
|
+
import type { ColorAnimationCurve, FloatAnimationCurve } from '../../animation/animation-clip';
|
|
6
6
|
export interface AnimationRecordData {
|
|
7
7
|
position: string[];
|
|
8
8
|
scale: string[];
|
|
@@ -16,8 +16,10 @@ export declare enum AnimatedPropertyType {
|
|
|
16
16
|
Color = 1
|
|
17
17
|
}
|
|
18
18
|
export interface AnimatedObject {
|
|
19
|
-
|
|
19
|
+
propertyPath: string;
|
|
20
|
+
propertyName: string;
|
|
20
21
|
target: Record<string, any>;
|
|
22
|
+
directTarget: Record<string, any>;
|
|
21
23
|
}
|
|
22
24
|
export declare const VFXItemType = "VFXItem";
|
|
23
25
|
export declare class Skeleton {
|
package/dist/plugins/index.d.ts
CHANGED
|
@@ -17,8 +17,6 @@ export * from './particle/particle-vfx-item';
|
|
|
17
17
|
export * from './particle/particle-system';
|
|
18
18
|
export * from './particle/particle-system-renderer';
|
|
19
19
|
export * from './cal/calculate-loader';
|
|
20
|
-
export * from './cal/calculate-vfx-item';
|
|
21
|
-
export * from './cal/calculate-item';
|
|
22
20
|
export * from './shape/build-line';
|
|
23
21
|
export * from './shape/graphics-path';
|
|
24
22
|
export * from './shape/ellipse';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { FrameContext
|
|
2
|
-
import { Playable, PlayableAsset } from '../
|
|
1
|
+
import type { FrameContext } from '../timeline/playable';
|
|
2
|
+
import { Playable, PlayableAsset } from '../timeline/playable';
|
|
3
3
|
import { ParticleSystem } from './particle-system';
|
|
4
4
|
/**
|
|
5
5
|
* @since 2.0.0
|
|
@@ -11,6 +11,6 @@ export declare class ParticleBehaviourPlayable extends Playable {
|
|
|
11
11
|
processFrame(context: FrameContext): void;
|
|
12
12
|
}
|
|
13
13
|
export declare class ParticleBehaviourPlayableAsset extends PlayableAsset {
|
|
14
|
-
createPlayable(
|
|
14
|
+
createPlayable(): Playable;
|
|
15
15
|
}
|
|
16
16
|
export declare const particleUniformTypeMap: Record<string, string>;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { Color } from '@galacean/effects-math/es/core/color';
|
|
2
1
|
import * as spec from '@galacean/effects-specification';
|
|
3
2
|
export declare const closePointEps = 0.0001;
|
|
4
3
|
export declare const curveEps = 0.0001;
|
|
@@ -16,8 +15,6 @@ export interface StrokeAttributes {
|
|
|
16
15
|
join: spec.LineJoin;
|
|
17
16
|
/** The miter limit to use. */
|
|
18
17
|
miterLimit: number;
|
|
19
|
-
/** Stroke color */
|
|
20
|
-
color: Color;
|
|
21
18
|
}
|
|
22
19
|
/**
|
|
23
20
|
* Builds a line to draw using the polygon method.
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import * as spec from '@galacean/effects-specification';
|
|
2
2
|
import type { ColorPlayableAssetData } from '../../animation';
|
|
3
|
-
import {
|
|
3
|
+
import { MaskableGraphic } from '../../components';
|
|
4
4
|
import type { Engine } from '../../engine';
|
|
5
|
-
import type { FrameContext
|
|
6
|
-
import { Playable, PlayableAsset } from '../
|
|
5
|
+
import type { FrameContext } from '../timeline/playable';
|
|
6
|
+
import { Playable, PlayableAsset } from '../timeline/playable';
|
|
7
7
|
import { TrackAsset } from '../timeline/track';
|
|
8
8
|
import { TrackMixerPlayable } from '../timeline/playables/track-mixer-playable';
|
|
9
|
+
import type { Geometry } from '../../render/geometry';
|
|
9
10
|
/**
|
|
10
11
|
* 图层元素基础属性, 经过处理后的 spec.SpriteContent.options
|
|
11
12
|
*/
|
|
@@ -16,25 +17,41 @@ export type SpriteItemOptions = {
|
|
|
16
17
|
export type splitsDataType = [r: number, x: number, y: number, w: number, h: number | undefined][];
|
|
17
18
|
export declare class SpriteColorPlayableAsset extends PlayableAsset {
|
|
18
19
|
data: ColorPlayableAssetData;
|
|
19
|
-
createPlayable(
|
|
20
|
+
createPlayable(): Playable;
|
|
20
21
|
fromData(data: ColorPlayableAssetData): void;
|
|
21
22
|
}
|
|
22
23
|
export declare class ComponentTimeTrack extends TrackAsset {
|
|
23
|
-
createTrackMixer(
|
|
24
|
+
createTrackMixer(): TrackMixerPlayable;
|
|
25
|
+
}
|
|
26
|
+
export declare class SpriteComponentTimeTrack extends ComponentTimeTrack {
|
|
27
|
+
updateAnimatedObject(boundObject: object): object;
|
|
28
|
+
}
|
|
29
|
+
export declare class EffectComponentTimeTrack extends ComponentTimeTrack {
|
|
30
|
+
updateAnimatedObject(boundObject: object): object;
|
|
24
31
|
}
|
|
25
32
|
export declare class ComponentTimePlayableAsset extends PlayableAsset {
|
|
26
|
-
createPlayable(
|
|
33
|
+
createPlayable(): Playable;
|
|
27
34
|
}
|
|
28
35
|
export declare class ComponentTimePlayable extends Playable {
|
|
29
36
|
processFrame(context: FrameContext): void;
|
|
30
37
|
}
|
|
31
|
-
|
|
38
|
+
/**
|
|
39
|
+
* Sprite component class
|
|
40
|
+
*/
|
|
41
|
+
export declare class SpriteComponent extends MaskableGraphic {
|
|
32
42
|
time: number;
|
|
33
43
|
duration: number;
|
|
34
44
|
frameAnimationLoop: boolean;
|
|
45
|
+
protected textureSheetAnimation?: spec.TextureSheetAnimation;
|
|
35
46
|
constructor(engine: Engine, props?: spec.SpriteComponentData);
|
|
36
47
|
onUpdate(dt: number): void;
|
|
37
48
|
onDisable(): void;
|
|
38
49
|
onDestroy(): void;
|
|
50
|
+
protected updateGeometry(geometry: Geometry): void;
|
|
51
|
+
/**
|
|
52
|
+
* @deprecated
|
|
53
|
+
* 原有打包纹理拆分逻辑,待移除
|
|
54
|
+
*/
|
|
55
|
+
protected updateGeometryFromMultiSplit(): void;
|
|
39
56
|
fromData(data: spec.SpriteComponentData): void;
|
|
40
57
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as spec from '@galacean/effects-specification';
|
|
2
2
|
import type { ItemRenderer } from '../../components';
|
|
3
|
-
import {
|
|
3
|
+
import { MaskableGraphic } from '../../components';
|
|
4
4
|
import type { Engine } from '../../engine';
|
|
5
5
|
import type { Material } from '../../material';
|
|
6
6
|
import type { VFXItem } from '../../vfx-item';
|
|
@@ -12,7 +12,7 @@ export interface TextComponent extends TextComponentBase {
|
|
|
12
12
|
/**
|
|
13
13
|
* @since 2.0.0
|
|
14
14
|
*/
|
|
15
|
-
export declare class TextComponent extends
|
|
15
|
+
export declare class TextComponent extends MaskableGraphic {
|
|
16
16
|
isDirty: boolean;
|
|
17
17
|
/**
|
|
18
18
|
* 文本行数
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { Playable
|
|
2
|
-
import { PlayableAsset } from '
|
|
1
|
+
import type { Playable } from '../playable';
|
|
2
|
+
import { PlayableAsset } from '../playable';
|
|
3
3
|
import * as spec from '@galacean/effects-specification';
|
|
4
4
|
export declare class ColorPropertyPlayableAsset extends PlayableAsset {
|
|
5
5
|
curveData: spec.ColorCurveValue;
|
|
6
|
-
createPlayable(
|
|
6
|
+
createPlayable(): Playable;
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { FixedNumberExpression } from '@galacean/effects-specification';
|
|
2
|
-
import type { Playable
|
|
3
|
-
import { PlayableAsset } from '
|
|
2
|
+
import type { Playable } from '../playable';
|
|
3
|
+
import { PlayableAsset } from '../playable';
|
|
4
4
|
export declare class FloatPropertyPlayableAsset extends PlayableAsset {
|
|
5
5
|
curveData: FixedNumberExpression;
|
|
6
|
-
createPlayable(
|
|
6
|
+
createPlayable(): Playable;
|
|
7
7
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
export * from './activation-playable-asset';
|
|
1
2
|
export * from './color-property-playable-asset';
|
|
2
3
|
export * from './float-property-playable-asset';
|
|
3
4
|
export * from './sub-composition-playable-asset';
|
|
4
|
-
export * from './timeline-asset';
|
|
5
5
|
export * from './vector-property-playable-assets';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Playable
|
|
2
|
-
import { PlayableAsset } from '
|
|
1
|
+
import type { Playable } from '../playable';
|
|
2
|
+
import { PlayableAsset } from '../playable';
|
|
3
3
|
export declare class SubCompositionPlayableAsset extends PlayableAsset {
|
|
4
|
-
createPlayable(
|
|
4
|
+
createPlayable(): Playable;
|
|
5
5
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import * as spec from '@galacean/effects-specification';
|
|
2
|
-
import type { Playable
|
|
3
|
-
import { PlayableAsset } from '
|
|
2
|
+
import type { Playable } from '../playable';
|
|
3
|
+
import { PlayableAsset } from '../playable';
|
|
4
4
|
export declare class Vector4PropertyPlayableAsset extends PlayableAsset {
|
|
5
5
|
curveData: spec.Vector4CurveValue;
|
|
6
|
-
createPlayable(
|
|
6
|
+
createPlayable(): Playable;
|
|
7
7
|
}
|
|
8
8
|
export declare class Vector2PropertyPlayableAsset extends PlayableAsset {
|
|
9
9
|
curveData: spec.Vector2CurveValue;
|
|
10
|
-
createPlayable(
|
|
10
|
+
createPlayable(): Playable;
|
|
11
11
|
}
|
|
@@ -1,19 +1,5 @@
|
|
|
1
1
|
import { EffectsObject } from '../../effects-object';
|
|
2
2
|
import type { Disposable } from '../../utils';
|
|
3
|
-
/**
|
|
4
|
-
* 动画图,负责更新所有的动画节点
|
|
5
|
-
* @since 2.0.0
|
|
6
|
-
*/
|
|
7
|
-
export declare class PlayableGraph {
|
|
8
|
-
private playableOutputs;
|
|
9
|
-
private playables;
|
|
10
|
-
evaluate(dt: number): void;
|
|
11
|
-
addOutput(output: PlayableOutput): void;
|
|
12
|
-
addPlayable(playable: Playable): void;
|
|
13
|
-
private processFrameWithRoot;
|
|
14
|
-
private prepareFrameWithRoot;
|
|
15
|
-
private updatePlayableTime;
|
|
16
|
-
}
|
|
17
3
|
/**
|
|
18
4
|
* 动画图可播放节点对象
|
|
19
5
|
* @since 2.0.0
|
|
@@ -28,7 +14,7 @@ export declare class Playable implements Disposable {
|
|
|
28
14
|
* 当前本地播放的时间
|
|
29
15
|
*/
|
|
30
16
|
protected time: number;
|
|
31
|
-
constructor(
|
|
17
|
+
constructor();
|
|
32
18
|
play(): void;
|
|
33
19
|
pause(): void;
|
|
34
20
|
setTime(time: number): void;
|
|
@@ -50,24 +36,19 @@ export declare class PlayableOutput {
|
|
|
50
36
|
* 绑定到的动画 item
|
|
51
37
|
*/
|
|
52
38
|
userData: object;
|
|
53
|
-
/**
|
|
54
|
-
* 源 playable 对象
|
|
55
|
-
*/
|
|
56
|
-
sourcePlayable: Playable;
|
|
57
39
|
context: FrameContext;
|
|
58
40
|
/**
|
|
59
41
|
* 当前本地播放的时间
|
|
60
42
|
*/
|
|
61
43
|
protected time: number;
|
|
62
44
|
constructor();
|
|
63
|
-
setSourcePlayable(playable: Playable): void;
|
|
64
45
|
setUserData(value: object): void;
|
|
65
46
|
getUserData(): object;
|
|
66
47
|
prepareFrame(): void;
|
|
67
48
|
processFrame(): void;
|
|
68
49
|
}
|
|
69
50
|
export declare abstract class PlayableAsset extends EffectsObject {
|
|
70
|
-
abstract createPlayable(
|
|
51
|
+
abstract createPlayable(): Playable;
|
|
71
52
|
}
|
|
72
53
|
export interface FrameContext {
|
|
73
54
|
deltaTime: number;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { FrameContext } from '
|
|
1
|
+
import type { FrameContext } from '../playable';
|
|
2
2
|
import { TrackMixerPlayable } from './track-mixer-playable';
|
|
3
3
|
export declare class ActivationMixerPlayable extends TrackMixerPlayable {
|
|
4
4
|
evaluate(context: FrameContext): void;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export * from './activation-mixer-playable';
|
|
2
|
+
export * from './activation-playable';
|
|
2
3
|
export * from './color-property-mixer-playable';
|
|
3
4
|
export * from './float-property-mixer-playable';
|
|
4
5
|
export * from './particle-mixer-playable';
|
|
@@ -9,3 +10,4 @@ export * from './sub-composition-mixer-playable';
|
|
|
9
10
|
export * from './track-mixer-playable';
|
|
10
11
|
export * from './transform-mixer-playable';
|
|
11
12
|
export * from './vector-property-mixer-playable';
|
|
13
|
+
export * from './transform-playable';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { FrameContext } from '
|
|
1
|
+
import type { FrameContext } from '../playable';
|
|
2
2
|
import { TrackMixerPlayable } from './track-mixer-playable';
|
|
3
3
|
export declare class ParticleMixerPlayable extends TrackMixerPlayable {
|
|
4
4
|
evaluate(context: FrameContext): void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ValueGetter } from '../../../math';
|
|
2
|
-
import type { FrameContext } from '
|
|
3
|
-
import { Playable } from '
|
|
2
|
+
import type { FrameContext } from '../playable';
|
|
3
|
+
import { Playable } from '../playable';
|
|
4
4
|
export declare class PropertyClipPlayable<T> extends Playable {
|
|
5
5
|
value: T;
|
|
6
6
|
curve: ValueGetter<T>;
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
import type { FrameContext } from '
|
|
1
|
+
import type { FrameContext } from '../playable';
|
|
2
2
|
import { TrackMixerPlayable } from './track-mixer-playable';
|
|
3
3
|
export declare abstract class PropertyMixerPlayable<T> extends TrackMixerPlayable {
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
propertyPath: string;
|
|
5
|
+
protected propertyName: string;
|
|
6
|
+
protected propertyValue: T;
|
|
7
|
+
private directTarget;
|
|
6
8
|
abstract resetPropertyValue(): void;
|
|
7
9
|
abstract addWeightedValue(curveValue: T, weight: number): void;
|
|
8
10
|
evaluate(context: FrameContext): void;
|
|
11
|
+
private preparePath;
|
|
9
12
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { FrameContext } from '
|
|
1
|
+
import type { FrameContext } from '../playable';
|
|
2
2
|
import { TrackMixerPlayable } from './track-mixer-playable';
|
|
3
3
|
export declare class SpriteColorMixerPlayable extends TrackMixerPlayable {
|
|
4
4
|
evaluate(context: FrameContext): void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { FrameContext } from '
|
|
2
|
-
import { Playable } from '
|
|
1
|
+
import type { FrameContext } from '../playable';
|
|
2
|
+
import { Playable } from '../playable';
|
|
3
3
|
export declare class SubCompositionClipPlayable extends Playable {
|
|
4
4
|
processFrame(context: FrameContext): void;
|
|
5
5
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { FrameContext } from '
|
|
1
|
+
import type { FrameContext } from '../playable';
|
|
2
2
|
import { TrackMixerPlayable } from './track-mixer-playable';
|
|
3
3
|
export declare class SubCompositionMixerPlayable extends TrackMixerPlayable {
|
|
4
4
|
evaluate(context: FrameContext): void;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import type { FrameContext } from '
|
|
2
|
-
import { Playable } from '
|
|
1
|
+
import type { FrameContext } from '../playable';
|
|
2
|
+
import { Playable } from '../playable';
|
|
3
|
+
import type { TrackInstance } from '../track-instance';
|
|
3
4
|
export declare class TrackMixerPlayable extends Playable {
|
|
5
|
+
trackInstance: TrackInstance;
|
|
4
6
|
clipPlayables: Playable[];
|
|
5
7
|
clipWeights: number[];
|
|
6
8
|
processFrame(context: FrameContext): void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { FrameContext } from '
|
|
1
|
+
import type { FrameContext } from '../playable';
|
|
2
2
|
import { TrackMixerPlayable } from './track-mixer-playable';
|
|
3
3
|
export declare class TransformMixerPlayable extends TrackMixerPlayable {
|
|
4
4
|
evaluate(context: FrameContext): void;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { Euler } from '@galacean/effects-math/es/core/euler';
|
|
2
|
+
import { Vector3 } from '@galacean/effects-math/es/core/vector3';
|
|
3
|
+
import * as spec from '@galacean/effects-specification';
|
|
4
|
+
import type { ItemLinearVelOverLifetime, ValueGetter } from '../../../math';
|
|
5
|
+
import type { FrameContext } from '../playable';
|
|
6
|
+
import { Playable, PlayableAsset } from '../playable';
|
|
7
|
+
/**
|
|
8
|
+
* 基础位移属性数据
|
|
9
|
+
*/
|
|
10
|
+
export type ItemBasicTransform = {
|
|
11
|
+
position: Vector3;
|
|
12
|
+
rotation: Euler;
|
|
13
|
+
scale: Vector3;
|
|
14
|
+
path?: ValueGetter<Vector3>;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* @since 2.0.0
|
|
18
|
+
*/
|
|
19
|
+
export declare class TransformPlayable extends Playable {
|
|
20
|
+
originalTransform: ItemBasicTransform;
|
|
21
|
+
protected sizeSeparateAxes: boolean;
|
|
22
|
+
protected sizeXOverLifetime: ValueGetter<number>;
|
|
23
|
+
protected sizeYOverLifetime: ValueGetter<number>;
|
|
24
|
+
protected sizeZOverLifetime: ValueGetter<number>;
|
|
25
|
+
protected rotationOverLifetime: {
|
|
26
|
+
asRotation?: boolean;
|
|
27
|
+
separateAxes?: boolean;
|
|
28
|
+
enabled?: boolean;
|
|
29
|
+
x?: ValueGetter<number>;
|
|
30
|
+
y?: ValueGetter<number>;
|
|
31
|
+
z?: ValueGetter<number>;
|
|
32
|
+
};
|
|
33
|
+
gravityModifier: ValueGetter<number>;
|
|
34
|
+
orbitalVelOverLifetime: {
|
|
35
|
+
x?: ValueGetter<number>;
|
|
36
|
+
y?: ValueGetter<number>;
|
|
37
|
+
z?: ValueGetter<number>;
|
|
38
|
+
center: [x: number, y: number, z: number];
|
|
39
|
+
asRotation?: boolean;
|
|
40
|
+
enabled?: boolean;
|
|
41
|
+
};
|
|
42
|
+
speedOverLifetime?: ValueGetter<number>;
|
|
43
|
+
linearVelOverLifetime: ItemLinearVelOverLifetime;
|
|
44
|
+
positionOverLifetime: spec.PositionOverLifetime;
|
|
45
|
+
gravity: Vector3;
|
|
46
|
+
direction: Vector3;
|
|
47
|
+
startSpeed: number;
|
|
48
|
+
data: TransformPlayableAssetData;
|
|
49
|
+
private velocity;
|
|
50
|
+
private boundObject;
|
|
51
|
+
start(): void;
|
|
52
|
+
processFrame(context: FrameContext): void;
|
|
53
|
+
/**
|
|
54
|
+
* 应用时间轴K帧数据到对象
|
|
55
|
+
*/
|
|
56
|
+
private sampleAnimation;
|
|
57
|
+
}
|
|
58
|
+
export declare class TransformPlayableAsset extends PlayableAsset {
|
|
59
|
+
transformAnimationData: TransformPlayableAssetData;
|
|
60
|
+
createPlayable(): Playable;
|
|
61
|
+
fromData(data: TransformPlayableAssetData): void;
|
|
62
|
+
}
|
|
63
|
+
export interface TransformPlayableAssetData extends spec.EffectsObjectData {
|
|
64
|
+
/**
|
|
65
|
+
* 元素大小变化属性
|
|
66
|
+
*/
|
|
67
|
+
sizeOverLifetime?: spec.SizeOverLifetime;
|
|
68
|
+
/**
|
|
69
|
+
* 元素旋转变化属性
|
|
70
|
+
*/
|
|
71
|
+
rotationOverLifetime?: spec.RotationOverLifetime;
|
|
72
|
+
/**
|
|
73
|
+
* 元素位置变化属性
|
|
74
|
+
*/
|
|
75
|
+
positionOverLifetime?: spec.PositionOverLifetime;
|
|
76
|
+
}
|