@galacean/effects-core 1.2.1 → 2.0.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/asset-loader.d.ts +103 -0
- package/dist/asset-manager.d.ts +10 -1
- package/dist/asset-migrations.d.ts +2 -0
- package/dist/comp-vfx-item.d.ts +19 -63
- package/dist/components/component.d.ts +63 -0
- package/dist/components/effect-component.d.ts +63 -0
- package/dist/components/index.d.ts +3 -0
- package/dist/components/renderer-component.d.ts +32 -0
- package/dist/composition-source-manager.d.ts +7 -6
- package/dist/composition.d.ts +40 -41
- package/dist/decorators.d.ts +4 -0
- package/dist/effects-object.d.ts +25 -0
- package/dist/engine.d.ts +23 -4
- package/dist/index.d.ts +25 -21
- package/dist/index.js +17926 -17495
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +17891 -17467
- package/dist/index.mjs.map +1 -1
- package/dist/material/material.d.ts +5 -4
- package/dist/material/utils.d.ts +1 -1
- package/dist/pass-render-level.d.ts +1 -1
- package/dist/plugins/cal/animation-mixer-playable.d.ts +4 -0
- package/dist/plugins/cal/animation-playable-output.d.ts +4 -0
- package/dist/plugins/cal/animation-playable.d.ts +6 -0
- package/dist/plugins/cal/animation-stream.d.ts +14 -0
- package/dist/plugins/cal/calculate-item.d.ts +34 -57
- package/dist/plugins/cal/calculate-vfx-item.d.ts +71 -25
- package/dist/plugins/cal/playable-graph.d.ts +62 -0
- package/dist/plugins/cal/track.d.ts +35 -0
- package/dist/plugins/camera/camera-controller-node.d.ts +11 -8
- package/dist/plugins/index.d.ts +2 -5
- package/dist/plugins/interact/click-handler.d.ts +3 -3
- package/dist/plugins/interact/interact-item.d.ts +27 -1
- package/dist/plugins/interact/interact-loader.d.ts +0 -10
- package/dist/plugins/interact/interact-vfx-item.d.ts +7 -27
- package/dist/plugins/particle/particle-loader.d.ts +2 -11
- package/dist/plugins/particle/particle-mesh.d.ts +4 -9
- package/dist/plugins/particle/particle-system-renderer.d.ts +36 -0
- package/dist/plugins/particle/particle-system.d.ts +22 -21
- package/dist/plugins/particle/particle-vfx-item.d.ts +9 -25
- package/dist/plugins/particle/trail-mesh.d.ts +3 -5
- package/dist/plugins/sprite/sprite-item.d.ts +69 -42
- package/dist/plugins/sprite/sprite-loader.d.ts +3 -15
- package/dist/plugins/sprite/sprite-mesh.d.ts +4 -36
- package/dist/plugins/text/text-item.d.ts +12 -9
- package/dist/plugins/text/text-loader.d.ts +0 -15
- package/dist/render/geometry.d.ts +5 -14
- package/dist/render/mesh.d.ts +5 -16
- package/dist/render/render-frame.d.ts +3 -8
- package/dist/render/render-pass.d.ts +10 -9
- package/dist/render/renderer.d.ts +5 -5
- package/dist/render/shader.d.ts +7 -4
- package/dist/semantic-map.d.ts +1 -1
- package/dist/serialization-helper.d.ts +14 -0
- package/dist/texture/texture.d.ts +4 -4
- package/dist/transform.d.ts +14 -4
- package/dist/utils/asserts.d.ts +1 -1
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/timeline-component.d.ts +1 -34
- package/dist/vfx-item.d.ts +56 -147
- package/package.json +3 -2
- package/dist/filter.d.ts +0 -63
- package/dist/filters/alpha-frame.d.ts +0 -5
- package/dist/filters/alpha-mask.d.ts +0 -5
- package/dist/filters/bloom.d.ts +0 -8
- package/dist/filters/camera-move.d.ts +0 -5
- package/dist/filters/delay.d.ts +0 -14
- package/dist/filters/distortion.d.ts +0 -5
- package/dist/filters/gaussian.d.ts +0 -27
- package/dist/filters/index.d.ts +0 -2
- package/dist/filters/lum.d.ts +0 -5
- package/dist/filters/utils.d.ts +0 -7
- package/dist/plugins/camera/camera-vfx-item.d.ts +0 -13
- package/dist/plugins/sprite/filter-sprite-vfx-item.d.ts +0 -13
- package/dist/plugins/sprite/sprite-group.d.ts +0 -95
- package/dist/plugins/sprite/sprite-vfx-item.d.ts +0 -33
- package/dist/plugins/text/text-mesh.d.ts +0 -15
- package/dist/plugins/text/text-vfx-item.d.ts +0 -28
|
@@ -4,6 +4,7 @@ import type { Texture } from '../texture';
|
|
|
4
4
|
import type { DestroyOptions, Disposable } from '../utils';
|
|
5
5
|
import type { UniformSemantic, UniformValue } from './types';
|
|
6
6
|
import type { Engine } from '../engine';
|
|
7
|
+
import { EffectsObject } from '../effects-object';
|
|
7
8
|
/**
|
|
8
9
|
* 材质销毁设置
|
|
9
10
|
*/
|
|
@@ -53,19 +54,19 @@ export interface MaterialProps {
|
|
|
53
54
|
/**
|
|
54
55
|
* Material 抽象类
|
|
55
56
|
*/
|
|
56
|
-
export declare abstract class Material implements Disposable {
|
|
57
|
-
readonly props: MaterialProps;
|
|
57
|
+
export declare abstract class Material extends EffectsObject implements Disposable {
|
|
58
58
|
shaderSource: ShaderWithSource;
|
|
59
59
|
readonly uniformSemantics: Record<string, UniformSemantic>;
|
|
60
60
|
readonly renderType: MaterialRenderType;
|
|
61
61
|
readonly name: string;
|
|
62
|
+
readonly props: MaterialProps;
|
|
62
63
|
protected destroyed: boolean;
|
|
63
64
|
protected initialized: boolean;
|
|
64
65
|
/**
|
|
65
66
|
*
|
|
66
67
|
* @param props - 材质属性
|
|
67
68
|
*/
|
|
68
|
-
constructor(
|
|
69
|
+
constructor(engine: Engine, props?: MaterialProps);
|
|
69
70
|
/******** effects-core 中会调用 引擎必须实现 ***********************/
|
|
70
71
|
/**
|
|
71
72
|
* 设置 Material 的颜色融合开关
|
|
@@ -337,7 +338,7 @@ export declare abstract class Material implements Disposable {
|
|
|
337
338
|
/**
|
|
338
339
|
* 创建 Material
|
|
339
340
|
*/
|
|
340
|
-
static create: (engine: Engine, props
|
|
341
|
+
static create: (engine: Engine, props?: MaterialProps) => Material;
|
|
341
342
|
/**
|
|
342
343
|
* 初始化 GPU 资源
|
|
343
344
|
* @override
|
package/dist/material/utils.d.ts
CHANGED
|
@@ -12,6 +12,6 @@ export declare function getPreMultiAlpha(blending?: number): number;
|
|
|
12
12
|
* @return 去除版本号的 shader 文本
|
|
13
13
|
*/
|
|
14
14
|
export declare function createShaderWithMarcos(marcos: ShaderMarcos, shader: string, shaderType: ShaderType, level: number): string;
|
|
15
|
-
export declare function setBlendMode(material: Material, blendMode
|
|
15
|
+
export declare function setBlendMode(material: Material, blendMode?: number): void;
|
|
16
16
|
export declare function setSideMode(material: Material, side: spec.SideMode): void;
|
|
17
17
|
export declare function setMaskMode(material: Material, maskMode: number): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function passRenderLevel(l
|
|
1
|
+
export declare function passRenderLevel(l?: string, renderLevel?: string): boolean;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { 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
|
+
getInputStream(index: number): AnimationStream | undefined;
|
|
9
|
+
}
|
|
10
|
+
export interface AnimationCurveValue {
|
|
11
|
+
componentType: string;
|
|
12
|
+
propertyName: string;
|
|
13
|
+
value: number;
|
|
14
|
+
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import * as spec from '@galacean/effects-specification';
|
|
2
|
-
import { Euler, Vector3 } from '@galacean/effects-math/es/core/index';
|
|
2
|
+
import type { Euler, Vector3 } from '@galacean/effects-math/es/core/index';
|
|
3
|
+
import { ItemBehaviour } from '../../components';
|
|
4
|
+
import type { Engine } from '../../engine';
|
|
3
5
|
import type { ValueGetter } from '../../math';
|
|
4
|
-
import
|
|
5
|
-
import type {
|
|
6
|
-
import type { SpriteRenderData } from '../sprite/sprite-mesh';
|
|
6
|
+
import { PlayableGraph } from './playable-graph';
|
|
7
|
+
import type { Track } from './track';
|
|
7
8
|
/**
|
|
8
9
|
* 基础位移属性数据
|
|
9
10
|
*/
|
|
@@ -21,64 +22,40 @@ export type ItemLinearVelOverLifetime = {
|
|
|
21
22
|
enabled?: boolean;
|
|
22
23
|
};
|
|
23
24
|
export interface CalculateItemOptions {
|
|
24
|
-
|
|
25
|
-
startSpeed: number;
|
|
26
|
-
direction: Vector3;
|
|
27
|
-
startSize: number;
|
|
28
|
-
sizeAspect: number;
|
|
25
|
+
start: number;
|
|
29
26
|
duration: number;
|
|
30
27
|
looping: boolean;
|
|
31
28
|
endBehavior: number;
|
|
32
|
-
reusable?: boolean;
|
|
33
|
-
gravity: Vector3;
|
|
34
|
-
gravityModifier: ValueGetter<number>;
|
|
35
29
|
startRotation?: number;
|
|
36
30
|
start3DRotation?: number;
|
|
37
31
|
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
32
|
+
/**
|
|
33
|
+
* @since 2.0.0
|
|
34
|
+
* @internal
|
|
35
|
+
*/
|
|
36
|
+
export declare class TimelineComponent extends ItemBehaviour {
|
|
41
37
|
id: string;
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
z?: ValueGetter<number>;
|
|
66
|
-
center: [x: number, y: number, z: number];
|
|
67
|
-
asRotation?: boolean;
|
|
68
|
-
enabled?: boolean;
|
|
69
|
-
};
|
|
70
|
-
speedOverLifetime?: ValueGetter<number>;
|
|
71
|
-
positionOverLifetime: ValueGetter<number>;
|
|
72
|
-
linearVelOverLifetime: ItemLinearVelOverLifetime;
|
|
73
|
-
/*****************/
|
|
74
|
-
private _velocity;
|
|
75
|
-
constructor(props: spec.NullContent, vfxItem: VFXItem<VFXItemContent>);
|
|
76
|
-
get ended(): boolean;
|
|
77
|
-
get startSize(): Vector3;
|
|
78
|
-
set startSize(scale: Vector3);
|
|
79
|
-
get velocity(): Vector3;
|
|
80
|
-
getWillTranslate(): boolean;
|
|
81
|
-
updateTime(globalTime: number): void;
|
|
82
|
-
getRenderData(_time: number, init?: boolean): SpriteRenderData;
|
|
83
|
-
protected calculateScaling(sizeChanged: boolean, sizeInc: Vector3, init?: boolean): void;
|
|
38
|
+
reusable: boolean;
|
|
39
|
+
timelineStarted: boolean;
|
|
40
|
+
playableGraph: PlayableGraph;
|
|
41
|
+
options: CalculateItemOptions;
|
|
42
|
+
/**
|
|
43
|
+
* 元素动画已经播放的时间
|
|
44
|
+
*/
|
|
45
|
+
private time;
|
|
46
|
+
private tracks;
|
|
47
|
+
private trackSeed;
|
|
48
|
+
constructor(engine: Engine);
|
|
49
|
+
start(): void;
|
|
50
|
+
update(dt: number): void;
|
|
51
|
+
setTime(time: number): void;
|
|
52
|
+
getTime(): number;
|
|
53
|
+
toLocalTime(time: number): number;
|
|
54
|
+
createTrack<T extends Track>(classConstructor: new () => T, name?: string): T;
|
|
55
|
+
getTracks(): Track[];
|
|
56
|
+
findTrack(name: string): Track | undefined;
|
|
57
|
+
rebuildGraph(): void;
|
|
58
|
+
compileTracks(graph: PlayableGraph): void;
|
|
59
|
+
fromData(data: spec.NullContent): void;
|
|
60
|
+
toData(): void;
|
|
84
61
|
}
|
|
@@ -1,26 +1,72 @@
|
|
|
1
|
-
import
|
|
2
|
-
import type
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import type {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
1
|
+
import { Vector3 } from '@galacean/effects-math/es/core/vector3';
|
|
2
|
+
import type * as spec from '@galacean/effects-specification';
|
|
3
|
+
import type { ValueGetter } from '../../math';
|
|
4
|
+
import { AnimationPlayable } from './animation-playable';
|
|
5
|
+
import type { ItemBasicTransform, ItemLinearVelOverLifetime } from './calculate-item';
|
|
6
|
+
import { Playable } from './playable-graph';
|
|
7
|
+
/**
|
|
8
|
+
* @since 2.0.0
|
|
9
|
+
* @internal
|
|
10
|
+
*/
|
|
11
|
+
export declare class AnimationClipPlayable extends AnimationPlayable {
|
|
12
|
+
originalTransform: ItemBasicTransform;
|
|
13
|
+
protected sizeSeparateAxes: boolean;
|
|
14
|
+
protected sizeXOverLifetime: ValueGetter<number>;
|
|
15
|
+
protected sizeYOverLifetime: ValueGetter<number>;
|
|
16
|
+
protected sizeZOverLifetime: ValueGetter<number>;
|
|
17
|
+
protected rotationOverLifetime: {
|
|
18
|
+
asRotation?: boolean;
|
|
19
|
+
separateAxes?: boolean;
|
|
20
|
+
enabled?: boolean;
|
|
21
|
+
x?: ValueGetter<number>;
|
|
22
|
+
y?: ValueGetter<number>;
|
|
23
|
+
z?: ValueGetter<number>;
|
|
24
|
+
};
|
|
25
|
+
gravityModifier: ValueGetter<number>;
|
|
26
|
+
orbitalVelOverLifetime: {
|
|
27
|
+
x?: ValueGetter<number>;
|
|
28
|
+
y?: ValueGetter<number>;
|
|
29
|
+
z?: ValueGetter<number>;
|
|
30
|
+
center: [x: number, y: number, z: number];
|
|
31
|
+
asRotation?: boolean;
|
|
32
|
+
enabled?: boolean;
|
|
33
|
+
};
|
|
34
|
+
speedOverLifetime?: ValueGetter<number>;
|
|
35
|
+
linearVelOverLifetime: ItemLinearVelOverLifetime;
|
|
36
|
+
positionOverLifetime: spec.PositionOverLifetime;
|
|
37
|
+
gravity: Vector3;
|
|
38
|
+
direction: Vector3;
|
|
39
|
+
startSpeed: number;
|
|
40
|
+
private velocity;
|
|
41
|
+
processFrame(dt: number): void;
|
|
42
|
+
/**
|
|
43
|
+
* 应用时间轴K帧数据到对象
|
|
44
|
+
*/
|
|
45
|
+
private sampleAnimation;
|
|
46
|
+
fromData(data: TransformAnimationData): void;
|
|
47
|
+
}
|
|
48
|
+
export interface TransformAnimationData {
|
|
49
|
+
/**
|
|
50
|
+
* 元素大小变化属性
|
|
51
|
+
*/
|
|
52
|
+
sizeOverLifetime?: spec.SizeOverLifetime;
|
|
53
|
+
/**
|
|
54
|
+
* 元素旋转变化属性
|
|
55
|
+
*/
|
|
56
|
+
rotationOverLifetime?: spec.RotationOverLifetime;
|
|
57
|
+
/**
|
|
58
|
+
* 元素位置变化属性
|
|
59
|
+
*/
|
|
60
|
+
positionOverLifetime?: spec.PositionOverLifetime;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* @since 2.0.0
|
|
64
|
+
* @internal
|
|
65
|
+
*/
|
|
66
|
+
export declare class ActivationClipPlayable extends Playable {
|
|
67
|
+
onGraphStart(): void;
|
|
68
|
+
onPlayablePlay(): void;
|
|
69
|
+
onPlayableDestroy(): void;
|
|
70
|
+
private hideRendererComponents;
|
|
71
|
+
private showRendererComponents;
|
|
26
72
|
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import type { VFXItem, VFXItemContent } from '../../vfx-item';
|
|
2
|
+
/**
|
|
3
|
+
* 动画图,负责更新所有的动画节点
|
|
4
|
+
* @since 2.0.0
|
|
5
|
+
* @internal
|
|
6
|
+
*/
|
|
7
|
+
export declare class PlayableGraph {
|
|
8
|
+
private playableOutputs;
|
|
9
|
+
constructor();
|
|
10
|
+
evaluate(dt: number): void;
|
|
11
|
+
connect(source: Playable, destination: Playable): void;
|
|
12
|
+
addOutput(output: PlayableOutput): void;
|
|
13
|
+
private callProcessFrame;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* 动画图可播放节点对象
|
|
17
|
+
* @since 2.0.0
|
|
18
|
+
* @internal
|
|
19
|
+
*/
|
|
20
|
+
export declare class Playable {
|
|
21
|
+
bindingItem: VFXItem<VFXItemContent>;
|
|
22
|
+
private inputs;
|
|
23
|
+
/**
|
|
24
|
+
* 当前本地播放的时间
|
|
25
|
+
*/
|
|
26
|
+
protected time: number;
|
|
27
|
+
constructor();
|
|
28
|
+
connect(playable: Playable): void;
|
|
29
|
+
getInputs(): Playable[];
|
|
30
|
+
getInput(index: number): Playable | undefined;
|
|
31
|
+
setTime(time: number): void;
|
|
32
|
+
getTime(): number;
|
|
33
|
+
onGraphStart(): void;
|
|
34
|
+
onGraphStop(): void;
|
|
35
|
+
onPlayablePlay(): void;
|
|
36
|
+
processFrame(dt: number): void;
|
|
37
|
+
onPlayableDestroy(): void;
|
|
38
|
+
fromData(data: any): void;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* 动画图输出节点对象,将动画数据采样到绑定的元素属性上
|
|
42
|
+
* @since 2.0.0
|
|
43
|
+
* @internal
|
|
44
|
+
*/
|
|
45
|
+
export declare class PlayableOutput {
|
|
46
|
+
/**
|
|
47
|
+
* 绑定到的动画 item
|
|
48
|
+
*/
|
|
49
|
+
bindingItem: VFXItem<VFXItemContent>;
|
|
50
|
+
/**
|
|
51
|
+
* 源 playable 对象
|
|
52
|
+
*/
|
|
53
|
+
sourcePlayable: Playable;
|
|
54
|
+
/**
|
|
55
|
+
* 当前本地播放的时间
|
|
56
|
+
*/
|
|
57
|
+
protected time: number;
|
|
58
|
+
constructor();
|
|
59
|
+
setSourcePlayeble(playable: Playable): void;
|
|
60
|
+
onGraphStart(): void;
|
|
61
|
+
processFrame(dt: number): void;
|
|
62
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { VFXItem, VFXItemContent } from '../../vfx-item';
|
|
2
|
+
import { Playable, PlayableOutput } from './playable-graph';
|
|
3
|
+
/**
|
|
4
|
+
* @since 2.0.0
|
|
5
|
+
* @internal
|
|
6
|
+
*/
|
|
7
|
+
export declare class Track {
|
|
8
|
+
id: string;
|
|
9
|
+
name: string;
|
|
10
|
+
bindingItem: VFXItem<VFXItemContent>;
|
|
11
|
+
private clips;
|
|
12
|
+
private clipSeed;
|
|
13
|
+
constructor();
|
|
14
|
+
createOutput(): PlayableOutput;
|
|
15
|
+
/**
|
|
16
|
+
* 重写该方法以创建自定义混合器
|
|
17
|
+
*/
|
|
18
|
+
createMixerPlayable(): Playable;
|
|
19
|
+
createPlayebleTree(): Playable;
|
|
20
|
+
createClip<T extends Playable>(classConstructor: new () => T, name?: string): TimelineClip;
|
|
21
|
+
getClips(): TimelineClip[];
|
|
22
|
+
findClip(name: string): TimelineClip | undefined;
|
|
23
|
+
private addClip;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* @since 2.0.0
|
|
27
|
+
* @internal
|
|
28
|
+
*/
|
|
29
|
+
export declare class TimelineClip {
|
|
30
|
+
id: string;
|
|
31
|
+
name: string;
|
|
32
|
+
start: number;
|
|
33
|
+
duration: number;
|
|
34
|
+
playable: Playable;
|
|
35
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type * as spec from '@galacean/effects-specification';
|
|
2
1
|
import { Euler, Vector3 } from '@galacean/effects-math/es/core/index';
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
import type * as spec from '@galacean/effects-specification';
|
|
3
|
+
import { ItemBehaviour } from '../../components';
|
|
4
|
+
import type { Engine } from '../../engine';
|
|
5
|
+
export declare class CameraController extends ItemBehaviour {
|
|
6
6
|
near: number;
|
|
7
7
|
far: number;
|
|
8
8
|
fov: number;
|
|
@@ -10,8 +10,11 @@ export declare class CameraController {
|
|
|
10
10
|
position: Vector3;
|
|
11
11
|
rotation: Euler;
|
|
12
12
|
private options;
|
|
13
|
-
private
|
|
14
|
-
private
|
|
15
|
-
constructor(
|
|
16
|
-
|
|
13
|
+
private translateOverLifetime?;
|
|
14
|
+
private rotationOverLifetime?;
|
|
15
|
+
constructor(engine: Engine, props?: spec.CameraContent);
|
|
16
|
+
start(): void;
|
|
17
|
+
update(): void;
|
|
18
|
+
fromData(data: spec.CameraContent): void;
|
|
19
|
+
private updateCamera;
|
|
17
20
|
}
|
package/dist/plugins/index.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
export * from './plugin';
|
|
2
2
|
export * from './camera/camera-controller-node';
|
|
3
3
|
export * from './camera/camera-vfx-item-loader';
|
|
4
|
-
export * from './camera/camera-vfx-item';
|
|
5
4
|
export * from './interact/click-handler';
|
|
6
5
|
export * from './interact/event-system';
|
|
7
6
|
export * from './interact/interact-loader';
|
|
@@ -9,18 +8,16 @@ export * from './interact/interact-mesh';
|
|
|
9
8
|
export * from './interact/interact-vfx-item';
|
|
10
9
|
export * from './interact/interact-item';
|
|
11
10
|
export * from './sprite/sprite-loader';
|
|
12
|
-
export * from './sprite/sprite-vfx-item';
|
|
13
11
|
export * from './sprite/sprite-item';
|
|
14
12
|
export * from './sprite/sprite-mesh';
|
|
15
|
-
export * from './sprite/filter-sprite-vfx-item';
|
|
16
13
|
export * from './particle/particle-loader';
|
|
17
14
|
export * from './particle/particle-mesh';
|
|
18
15
|
export * from './particle/particle-vfx-item';
|
|
19
16
|
export * from './particle/particle-system';
|
|
17
|
+
export * from './particle/particle-system-renderer';
|
|
20
18
|
export * from './cal/calculate-loader';
|
|
21
19
|
export * from './cal/calculate-vfx-item';
|
|
22
20
|
export * from './cal/calculate-item';
|
|
23
21
|
export * from './text/text-item';
|
|
24
22
|
export * from './text/text-loader';
|
|
25
|
-
export * from './
|
|
26
|
-
export * from './text/text-vfx-item';
|
|
23
|
+
export * from './cal/track';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type * as spec from '@galacean/effects-specification';
|
|
2
1
|
import type { Matrix4, Ray, TriangleLike, Vector2, Vector3 } from '@galacean/effects-math/es/core/index';
|
|
3
|
-
import type
|
|
2
|
+
import type * as spec from '@galacean/effects-specification';
|
|
3
|
+
import type { VFXItem, VFXItemContent } 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:
|
|
49
|
+
compContent: VFXItem<VFXItemContent>;
|
|
50
50
|
name: string;
|
|
51
51
|
id: string;
|
|
52
52
|
position: Vector3;
|
|
@@ -1,2 +1,28 @@
|
|
|
1
|
-
|
|
1
|
+
import * as spec from '@galacean/effects-specification';
|
|
2
|
+
import type { BoundingBoxTriangle, HitTestTriangleParams } from './click-handler';
|
|
3
|
+
import type { EventSystem, TouchEventType } from './event-system';
|
|
4
|
+
import { InteractMesh } from './interact-mesh';
|
|
5
|
+
import { RendererComponent } from '../../components';
|
|
6
|
+
import type { DragEventType } from './interact-vfx-item';
|
|
7
|
+
import type { Renderer } from '../../render';
|
|
8
|
+
/**
|
|
9
|
+
* @since 2.0.0
|
|
10
|
+
* @internal
|
|
11
|
+
*/
|
|
12
|
+
export declare class InteractComponent extends RendererComponent {
|
|
13
|
+
clickable: boolean;
|
|
14
|
+
dragEvent: DragEventType | null;
|
|
15
|
+
bouncingArg: TouchEventType | null;
|
|
16
|
+
previewContent: InteractMesh | null;
|
|
17
|
+
interactData: spec.InteractContent;
|
|
18
|
+
start(): void;
|
|
19
|
+
update(dt: number): void;
|
|
20
|
+
render(renderer: Renderer): void;
|
|
21
|
+
onDestroy(): void;
|
|
22
|
+
endDragTarget(): void;
|
|
23
|
+
handleDragMove(evt: Partial<DragEventType>, event: TouchEventType): void;
|
|
24
|
+
beginDragTarget(options: spec.DragInteractOption, eventSystem: EventSystem): void;
|
|
25
|
+
getHitTestParams: (force?: boolean) => HitTestTriangleParams | void;
|
|
26
|
+
getBoundingBox(): BoundingBoxTriangle | void;
|
|
27
|
+
fromData(data: any): void;
|
|
2
28
|
}
|
|
@@ -1,13 +1,3 @@
|
|
|
1
1
|
import { AbstractPlugin } from '../index';
|
|
2
|
-
import type { RenderFrame } from '../../render';
|
|
3
|
-
import type { Composition } from '../../composition';
|
|
4
|
-
import type { VFXItem } from '../../vfx-item';
|
|
5
|
-
import type { InteractItem } from './interact-item';
|
|
6
2
|
export declare class InteractLoader extends AbstractPlugin {
|
|
7
|
-
private mesh;
|
|
8
|
-
onCompositionItemLifeBegin(composition: Composition, item: VFXItem<InteractItem>): void;
|
|
9
|
-
onCompositionItemRemoved(composition: Composition, item: VFXItem<InteractItem>): void;
|
|
10
|
-
prepareRenderFrame(composition: Composition, renderFrame: RenderFrame): boolean;
|
|
11
|
-
private addMesh;
|
|
12
|
-
private removeMesh;
|
|
13
3
|
}
|
|
@@ -1,28 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import type {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
import type { Engine } from '../../engine';
|
|
9
|
-
export declare class InteractVFXItem extends VFXItem<InteractItem> {
|
|
10
|
-
previewContent: InteractMesh | null;
|
|
11
|
-
private ui;
|
|
12
|
-
private clickable;
|
|
13
|
-
private dragEvent;
|
|
14
|
-
private bouncingArg;
|
|
15
|
-
engine?: Engine;
|
|
16
|
-
constructor(props: VFXItemProps, composition: Composition);
|
|
17
|
-
get type(): spec.ItemType;
|
|
18
|
-
onConstructed(options: spec.InteractItem): void;
|
|
19
|
-
onLifetimeBegin(composition: Composition): void;
|
|
20
|
-
onItemUpdate(): void;
|
|
21
|
-
onItemRemoved(composition: Composition): void;
|
|
22
|
-
getBoundingBox(): BoundingBoxTriangle | void;
|
|
23
|
-
getHitTestParams(): HitTestTriangleParams | void;
|
|
24
|
-
protected doCreateContent(composition: Composition): InteractItem;
|
|
25
|
-
private beginDragTarget;
|
|
26
|
-
private endDragTarget;
|
|
27
|
-
private handleDragMove;
|
|
1
|
+
import type { vec3 } from '@galacean/effects-specification';
|
|
2
|
+
import type { TouchEventType } from './event-system';
|
|
3
|
+
export interface DragEventType extends TouchEventType {
|
|
4
|
+
cameraParam?: {
|
|
5
|
+
position: vec3;
|
|
6
|
+
fov: number;
|
|
7
|
+
};
|
|
28
8
|
}
|
|
@@ -1,18 +1,9 @@
|
|
|
1
1
|
import * as spec from '@galacean/effects-specification';
|
|
2
|
-
import type {
|
|
3
|
-
import type { Renderer
|
|
4
|
-
import { type VFXItem } from '../../vfx-item';
|
|
2
|
+
import type { Engine } from '../../engine';
|
|
3
|
+
import type { Renderer } from '../../render';
|
|
5
4
|
import { AbstractPlugin } from '../index';
|
|
6
|
-
import type { ParticleSystem } from './particle-system';
|
|
7
5
|
import type { PrecompileOptions } from '../../plugin-system';
|
|
8
|
-
import type { Engine } from '../../engine';
|
|
9
6
|
export declare class ParticleLoader extends AbstractPlugin {
|
|
10
|
-
private meshes;
|
|
11
7
|
engine: Engine;
|
|
12
8
|
static precompile(compositions: spec.Composition[], renderer: Renderer, options?: PrecompileOptions): Promise<any>;
|
|
13
|
-
onCompositionItemLifeBegin(composition: Composition, item: VFXItem<ParticleSystem>): void;
|
|
14
|
-
onCompositionItemRemoved(composition: Composition, item: VFXItem<ParticleSystem>): void;
|
|
15
|
-
prepareRenderFrame(composition: Composition, pipeline: RenderFrame): boolean;
|
|
16
|
-
private add;
|
|
17
|
-
private remove;
|
|
18
9
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import type * as spec from '@galacean/effects-specification';
|
|
2
2
|
import type { Matrix4 } from '@galacean/effects-math/es/core/index';
|
|
3
3
|
import { Vector2, Vector3 } from '@galacean/effects-math/es/core/index';
|
|
4
|
-
import type { Composition } from '../../composition';
|
|
5
4
|
import type { ValueGetter } from '../../math';
|
|
6
5
|
import type { SharedShaderWithSource, GPUCapability } from '../../render';
|
|
7
6
|
import { Geometry, Mesh } from '../../render';
|
|
8
7
|
import { Texture } from '../../texture';
|
|
9
8
|
import { Transform } from '../../transform';
|
|
9
|
+
import type { Engine } from '../../engine';
|
|
10
10
|
export type Point = {
|
|
11
11
|
vel: Vector3;
|
|
12
12
|
lifetime: number;
|
|
@@ -85,8 +85,6 @@ export interface ParticleMeshProps extends ParticleMeshData {
|
|
|
85
85
|
curve: ValueGetter<number>;
|
|
86
86
|
target: spec.vec3;
|
|
87
87
|
};
|
|
88
|
-
listIndex: number;
|
|
89
|
-
duration: number;
|
|
90
88
|
maxCount: number;
|
|
91
89
|
shaderCachePrefix: string;
|
|
92
90
|
name: string;
|
|
@@ -135,15 +133,12 @@ export declare class ParticleMesh implements ParticleMeshData {
|
|
|
135
133
|
z?: ValueGetter<number>;
|
|
136
134
|
};
|
|
137
135
|
speedOverLifetime?: ValueGetter<number>;
|
|
136
|
+
time: number;
|
|
138
137
|
readonly useSprite?: boolean;
|
|
139
138
|
readonly textureOffsets: number[];
|
|
140
139
|
readonly maxCount: number;
|
|
141
140
|
readonly anchor: Vector2;
|
|
142
|
-
constructor(
|
|
143
|
-
composition: Composition;
|
|
144
|
-
});
|
|
145
|
-
get time(): number;
|
|
146
|
-
set time(v: number);
|
|
141
|
+
constructor(engine: Engine, props: ParticleMeshProps);
|
|
147
142
|
getPointColor(index: number): number[];
|
|
148
143
|
/**
|
|
149
144
|
* 待废弃
|
|
@@ -154,7 +149,7 @@ export declare class ParticleMesh implements ParticleMeshData {
|
|
|
154
149
|
resetGeometryData(geometry: Geometry): void;
|
|
155
150
|
minusTime(time: number): void;
|
|
156
151
|
removePoint(index: number): void;
|
|
157
|
-
setPoint(
|
|
152
|
+
setPoint(index: number, point: Point): void;
|
|
158
153
|
}
|
|
159
154
|
export declare function getParticleMeshShader(item: spec.ParticleItem, env: string | undefined, gpuCapability: GPUCapability): {
|
|
160
155
|
shader: SharedShaderWithSource;
|