@galacean/effects-core 2.1.0-alpha.5 → 2.1.0-alpha.7
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/color-playable.d.ts +26 -0
- package/dist/animation/index.d.ts +1 -0
- package/dist/asset-manager.d.ts +15 -7
- package/dist/asset.d.ts +4 -0
- package/dist/binary-asset.d.ts +2 -2
- package/dist/comp-vfx-item.d.ts +1 -4
- package/dist/components/base-render-component.d.ts +99 -0
- package/dist/components/index.d.ts +2 -0
- package/dist/components/shape-component.d.ts +206 -0
- package/dist/composition/scene-ticking.d.ts +1 -1
- package/dist/composition-source-manager.d.ts +5 -6
- package/dist/composition.d.ts +12 -9
- package/dist/downloader.d.ts +0 -3
- package/dist/index.d.ts +3 -1
- package/dist/index.js +20120 -17902
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +20118 -17899
- package/dist/index.mjs.map +1 -1
- package/dist/plugin-system.d.ts +7 -5
- package/dist/plugins/cal/calculate-item.d.ts +4 -3
- package/dist/plugins/cal/calculate-loader.d.ts +1 -1
- package/dist/plugins/cal/calculate-vfx-item.d.ts +1 -1
- package/dist/plugins/camera/camera-vfx-item-loader.d.ts +1 -1
- package/dist/plugins/index.d.ts +1 -7
- package/dist/plugins/interact/interact-loader.d.ts +1 -1
- package/dist/plugins/particle/particle-system.d.ts +1 -2
- package/dist/plugins/plugin.d.ts +14 -3
- package/dist/plugins/shape/build-adaptive-bezier.d.ts +1 -0
- package/dist/plugins/shape/ellipse.d.ts +79 -0
- package/dist/plugins/shape/graphics-path.d.ts +37 -0
- package/dist/plugins/shape/point-data.d.ts +6 -0
- package/dist/plugins/shape/point-like.d.ts +31 -0
- package/dist/plugins/shape/point.d.ts +58 -0
- package/dist/plugins/shape/polygon.d.ts +67 -0
- package/dist/plugins/shape/shape-path.d.ts +73 -0
- package/dist/plugins/shape/shape-primitive.d.ts +18 -0
- package/dist/plugins/shape/triangulate.d.ts +1 -0
- package/dist/plugins/sprite/sprite-item.d.ts +17 -111
- package/dist/plugins/sprite/sprite-loader.d.ts +1 -1
- package/dist/plugins/sprite/sprite-mesh.d.ts +3 -4
- package/dist/plugins/text/text-item.d.ts +15 -5
- package/dist/plugins/timeline/index.d.ts +3 -0
- package/dist/plugins/timeline/playable-assets/float-property-playable-asset.d.ts +7 -0
- package/dist/plugins/timeline/playable-assets/index.d.ts +3 -0
- package/dist/plugins/{cal → timeline/playable-assets}/timeline-asset.d.ts +5 -5
- package/dist/plugins/timeline/playables/float-property-clip-playable.d.ts +8 -0
- package/dist/plugins/timeline/playables/float-property-mixer-playable.d.ts +6 -0
- package/dist/plugins/timeline/playables/index.d.ts +5 -0
- package/dist/plugins/timeline/track.d.ts +6 -4
- package/dist/plugins/timeline/tracks/float-property-track.d.ts +8 -0
- package/dist/plugins/timeline/tracks/index.d.ts +5 -0
- package/dist/plugins/timeline/tracks/sub-composition-track.d.ts +1 -1
- package/dist/render/gpu-capability.d.ts +1 -1
- package/dist/render/mesh.d.ts +1 -1
- package/dist/render/renderer.d.ts +1 -1
- package/dist/render/semantic-map.d.ts +1 -1
- package/dist/render/shader.d.ts +1 -1
- package/dist/scene.d.ts +17 -18
- package/dist/serialization-helper.d.ts +3 -3
- package/dist/shape/geometry.d.ts +3 -3
- package/dist/texture/texture.d.ts +9 -0
- package/dist/texture/utils.d.ts +1 -2
- package/dist/utils/color.d.ts +4 -5
- package/dist/utils/index.d.ts +1 -1
- package/dist/vfx-item.d.ts +0 -1
- package/package.json +4 -3
- package/dist/image-asset.d.ts +0 -5
- /package/dist/plugins/timeline/{playables → playable-assets}/sub-composition-playable-asset.d.ts +0 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import * as spec from '@galacean/effects-specification';
|
|
2
|
+
import { type ValueGetter } from '../math';
|
|
3
|
+
import type { FrameContext } from '../plugins/cal/playable-graph';
|
|
4
|
+
import { Playable } from '../plugins/cal/playable-graph';
|
|
5
|
+
import { VFXItem } from '../vfx-item';
|
|
6
|
+
import type { Material } from '../material';
|
|
7
|
+
import type { ColorStop } from '../utils';
|
|
8
|
+
import { BaseRenderComponent } from '../components';
|
|
9
|
+
export interface ColorPlayableAssetData extends spec.EffectsObjectData {
|
|
10
|
+
colorOverLifetime?: spec.ColorOverLifetime;
|
|
11
|
+
}
|
|
12
|
+
export declare class ColorPlayable extends Playable {
|
|
13
|
+
clipData: {
|
|
14
|
+
colorOverLifetime?: spec.ColorOverLifetime;
|
|
15
|
+
startColor?: spec.RGBAColorValue;
|
|
16
|
+
};
|
|
17
|
+
colorOverLifetime: ColorStop[];
|
|
18
|
+
opacityOverLifetime: ValueGetter<number>;
|
|
19
|
+
startColor: spec.RGBAColorValue;
|
|
20
|
+
renderColor: spec.vec4;
|
|
21
|
+
activeComponent?: BaseRenderComponent;
|
|
22
|
+
activeMaterial?: Material;
|
|
23
|
+
processFrame(context: FrameContext): void;
|
|
24
|
+
create(clipData: ColorPlayableAssetData): this;
|
|
25
|
+
getActiveComponent(boundObject: VFXItem): BaseRenderComponent;
|
|
26
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './color-playable';
|
package/dist/asset-manager.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Downloader } from './downloader';
|
|
2
|
-
import type {
|
|
2
|
+
import type { SceneLoadOptions } from './scene';
|
|
3
|
+
import { Scene } from './scene';
|
|
3
4
|
import type { Disposable } from './utils';
|
|
4
5
|
import type { Renderer } from './render';
|
|
5
6
|
/**
|
|
@@ -7,20 +8,24 @@ import type { Renderer } from './render';
|
|
|
7
8
|
* 用于加载和动效中所有的资源文件,包括图片、插件、图层粒子数据等
|
|
8
9
|
*/
|
|
9
10
|
export declare class AssetManager implements Disposable {
|
|
10
|
-
|
|
11
|
+
options: Omit<SceneLoadOptions, 'speed' | 'autoplay' | 'reusable'>;
|
|
11
12
|
private readonly downloader;
|
|
12
13
|
/**
|
|
13
|
-
* 相对url的基本路径
|
|
14
|
+
* 相对 url 的基本路径
|
|
14
15
|
*/
|
|
15
16
|
private baseUrl;
|
|
16
17
|
/**
|
|
17
|
-
* 图像资源,用于创建和释放GPU纹理资源
|
|
18
|
+
* 图像资源,用于创建和释放 GPU 纹理资源
|
|
18
19
|
*/
|
|
19
20
|
private assets;
|
|
21
|
+
/**
|
|
22
|
+
* TextureSource 来源
|
|
23
|
+
*/
|
|
24
|
+
private sourceFrom;
|
|
20
25
|
/**
|
|
21
26
|
* 自定义文本缓存,随页面销毁而销毁
|
|
22
27
|
*/
|
|
23
|
-
static
|
|
28
|
+
private static fontCache;
|
|
24
29
|
private id;
|
|
25
30
|
/**
|
|
26
31
|
* 加载超时时间
|
|
@@ -36,7 +41,7 @@ export declare class AssetManager implements Disposable {
|
|
|
36
41
|
* @param options - 场景加载参数
|
|
37
42
|
* @param downloader - 资源下载对象
|
|
38
43
|
*/
|
|
39
|
-
constructor(options?: SceneLoadOptions, downloader?: Downloader);
|
|
44
|
+
constructor(options?: Omit<SceneLoadOptions, 'speed' | 'autoplay' | 'reusable'>, downloader?: Downloader);
|
|
40
45
|
updateOptions(options?: SceneLoadOptions): void;
|
|
41
46
|
/**
|
|
42
47
|
* 场景创建,通过 json 创建出场景对象,并进行提前编译等工作
|
|
@@ -45,7 +50,7 @@ export declare class AssetManager implements Disposable {
|
|
|
45
50
|
* @param options - 扩展参数
|
|
46
51
|
* @returns
|
|
47
52
|
*/
|
|
48
|
-
loadScene(url:
|
|
53
|
+
loadScene(url: Scene.LoadType, renderer?: Renderer, options?: {
|
|
49
54
|
env: string;
|
|
50
55
|
}): Promise<Scene>;
|
|
51
56
|
private precompile;
|
|
@@ -53,9 +58,12 @@ export declare class AssetManager implements Disposable {
|
|
|
53
58
|
private processBins;
|
|
54
59
|
private processFontURL;
|
|
55
60
|
private processImages;
|
|
61
|
+
private processPluginAssets;
|
|
62
|
+
private prepareAssets;
|
|
56
63
|
private processTextures;
|
|
57
64
|
private loadJSON;
|
|
58
65
|
private loadBins;
|
|
66
|
+
private assignImagesToAssets;
|
|
59
67
|
private removeTimer;
|
|
60
68
|
/**
|
|
61
69
|
* 销毁方法
|
package/dist/asset.d.ts
ADDED
package/dist/binary-asset.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as spec from '@galacean/effects-specification';
|
|
2
2
|
import { EffectsObject } from './effects-object';
|
|
3
3
|
export declare class BinaryAsset extends EffectsObject {
|
|
4
4
|
buffer: ArrayBuffer;
|
|
5
|
-
fromData(data: EffectsObjectData): void;
|
|
5
|
+
fromData(data: spec.EffectsObjectData): void;
|
|
6
6
|
}
|
package/dist/comp-vfx-item.d.ts
CHANGED
|
@@ -2,7 +2,6 @@ import type { Ray } from '@galacean/effects-math/es/core/ray';
|
|
|
2
2
|
import * as spec from '@galacean/effects-specification';
|
|
3
3
|
import { Behaviour } from './components';
|
|
4
4
|
import type { CompositionHitTestOptions } from './composition';
|
|
5
|
-
import type { ContentOptions } from './composition-source-manager';
|
|
6
5
|
import type { Region, TrackAsset } from './plugins';
|
|
7
6
|
import { VFXItem } from './vfx-item';
|
|
8
7
|
export interface SceneBinding {
|
|
@@ -19,9 +18,7 @@ export interface SceneBindingData {
|
|
|
19
18
|
export declare class CompositionComponent extends Behaviour {
|
|
20
19
|
time: number;
|
|
21
20
|
startTime: number;
|
|
22
|
-
refId: string;
|
|
23
21
|
items: VFXItem[];
|
|
24
|
-
data: ContentOptions;
|
|
25
22
|
private reusable;
|
|
26
23
|
private sceneBindings;
|
|
27
24
|
private timelineAsset;
|
|
@@ -36,7 +33,7 @@ export declare class CompositionComponent extends Behaviour {
|
|
|
36
33
|
hideItems(): void;
|
|
37
34
|
onDestroy(): void;
|
|
38
35
|
hitTest(ray: Ray, x: number, y: number, regions: Region[], force?: boolean, options?: CompositionHitTestOptions): Region[];
|
|
39
|
-
fromData(data:
|
|
36
|
+
fromData(data: any): void;
|
|
40
37
|
private resolveBindings;
|
|
41
38
|
private resolveTrackBindingsWithRoot;
|
|
42
39
|
}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import * as spec from '@galacean/effects-specification';
|
|
2
|
+
import { Matrix4 } from '@galacean/effects-math/es/core/matrix4';
|
|
3
|
+
import { RendererComponent } from './renderer-component';
|
|
4
|
+
import type { Texture } from '../texture';
|
|
5
|
+
import type { GeometryDrawMode, Renderer } from '../render';
|
|
6
|
+
import { Geometry } from '../render';
|
|
7
|
+
import type { Engine } from '../engine';
|
|
8
|
+
import type { BoundingBoxTriangle, HitTestTriangleParams } from '../plugins';
|
|
9
|
+
import { Material } from '../material';
|
|
10
|
+
/**
|
|
11
|
+
* 图层元素渲染属性, 经过处理后的 spec.SpriteContent.renderer
|
|
12
|
+
*/
|
|
13
|
+
export interface ItemRenderer extends Required<Omit<spec.RendererOptions, 'texture' | 'shape' | 'anchor' | 'particleOrigin'>> {
|
|
14
|
+
order: number;
|
|
15
|
+
mask: number;
|
|
16
|
+
texture: Texture;
|
|
17
|
+
anchor?: spec.vec2;
|
|
18
|
+
particleOrigin?: spec.ParticleOrigin;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* 图层的渲染属性,用于 Mesh 的合并判断
|
|
22
|
+
*/
|
|
23
|
+
export interface ItemRenderInfo {
|
|
24
|
+
side: number;
|
|
25
|
+
occlusion: boolean;
|
|
26
|
+
blending: number;
|
|
27
|
+
cachePrefix: string;
|
|
28
|
+
mask: number;
|
|
29
|
+
maskMode: number;
|
|
30
|
+
cacheId: string;
|
|
31
|
+
wireframe?: boolean;
|
|
32
|
+
}
|
|
33
|
+
export declare class BaseRenderComponent extends RendererComponent {
|
|
34
|
+
interaction?: {
|
|
35
|
+
behavior: spec.InteractBehavior;
|
|
36
|
+
};
|
|
37
|
+
cachePrefix: string;
|
|
38
|
+
geoData: {
|
|
39
|
+
atlasOffset: number[] | spec.TypedArray;
|
|
40
|
+
index: number[] | spec.TypedArray;
|
|
41
|
+
};
|
|
42
|
+
anchor?: spec.vec2;
|
|
43
|
+
renderer: ItemRenderer;
|
|
44
|
+
emptyTexture: Texture;
|
|
45
|
+
color: spec.vec4;
|
|
46
|
+
worldMatrix: Matrix4;
|
|
47
|
+
geometry: Geometry;
|
|
48
|
+
protected renderInfo: ItemRenderInfo;
|
|
49
|
+
protected readonly wireframe?: boolean;
|
|
50
|
+
protected preMultiAlpha: number;
|
|
51
|
+
protected visible: boolean;
|
|
52
|
+
protected isManualTimeSet: boolean;
|
|
53
|
+
protected frameAnimationTime: number;
|
|
54
|
+
constructor(engine: Engine);
|
|
55
|
+
/**
|
|
56
|
+
* 设置当前 Mesh 的可见性。
|
|
57
|
+
* @param visible - true:可见,false:不可见
|
|
58
|
+
*/
|
|
59
|
+
setVisible(visible: boolean): void;
|
|
60
|
+
/**
|
|
61
|
+
* 获取当前 Mesh 的可见性。
|
|
62
|
+
*/
|
|
63
|
+
getVisible(): boolean;
|
|
64
|
+
/**
|
|
65
|
+
* 设置当前图层的颜色
|
|
66
|
+
* > Tips: 透明度也属于颜色的一部分,当有透明度/颜色 K 帧变化时,该 API 会失效
|
|
67
|
+
* @since 2.0.0
|
|
68
|
+
* @param color - 颜色值
|
|
69
|
+
*/
|
|
70
|
+
setColor(color: spec.vec4): void;
|
|
71
|
+
/**
|
|
72
|
+
* 设置当前 Mesh 的纹理
|
|
73
|
+
* @since 2.0.0
|
|
74
|
+
* @param texture - 纹理对象
|
|
75
|
+
*/
|
|
76
|
+
setTexture(texture: Texture): void;
|
|
77
|
+
render(renderer: Renderer): void;
|
|
78
|
+
onStart(): void;
|
|
79
|
+
onDestroy(): void;
|
|
80
|
+
protected getItemInitData(): {
|
|
81
|
+
atlasOffset: spec.TypedArray | number[];
|
|
82
|
+
index: number[];
|
|
83
|
+
};
|
|
84
|
+
protected setItem(): void;
|
|
85
|
+
protected getItemGeometryData(): {
|
|
86
|
+
index: number[];
|
|
87
|
+
atlasOffset: number[];
|
|
88
|
+
};
|
|
89
|
+
protected createGeometry(mode: GeometryDrawMode): Geometry;
|
|
90
|
+
protected createMaterial(renderInfo: ItemRenderInfo, count: number): Material;
|
|
91
|
+
getTextures(): Texture[];
|
|
92
|
+
/**
|
|
93
|
+
* 获取图层包围盒的类型和世界坐标
|
|
94
|
+
* @returns
|
|
95
|
+
*/
|
|
96
|
+
getBoundingBox(): BoundingBoxTriangle | void;
|
|
97
|
+
getHitTestParams: (force?: boolean) => HitTestTriangleParams | undefined;
|
|
98
|
+
}
|
|
99
|
+
export declare function getImageItemRenderInfo(item: BaseRenderComponent): ItemRenderInfo;
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
import type * as spec from '@galacean/effects-specification';
|
|
2
|
+
import type { Engine } from '../engine';
|
|
3
|
+
import type { Renderer } from '../render';
|
|
4
|
+
import { RendererComponent } from './renderer-component';
|
|
5
|
+
/**
|
|
6
|
+
* 图形组件
|
|
7
|
+
* @since 2.1.0
|
|
8
|
+
*/
|
|
9
|
+
export declare class ShapeComponent extends RendererComponent {
|
|
10
|
+
private path;
|
|
11
|
+
private curveValues;
|
|
12
|
+
private geometry;
|
|
13
|
+
private data;
|
|
14
|
+
private dirty;
|
|
15
|
+
private vert;
|
|
16
|
+
private frag;
|
|
17
|
+
constructor(engine: Engine);
|
|
18
|
+
onUpdate(dt: number): void;
|
|
19
|
+
render(renderer: Renderer): void;
|
|
20
|
+
private buildGeometryFromPath;
|
|
21
|
+
private buildPath;
|
|
22
|
+
fromData(data: ShapeComponentData): void;
|
|
23
|
+
}
|
|
24
|
+
/************************** Test Interface **********************************/
|
|
25
|
+
/**
|
|
26
|
+
* 矢量图形组件
|
|
27
|
+
*/
|
|
28
|
+
export interface ShapeComponentData extends spec.ComponentData {
|
|
29
|
+
/**
|
|
30
|
+
* 矢量类型
|
|
31
|
+
*/
|
|
32
|
+
type: ComponentShapeType;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* 矢量图形类型
|
|
36
|
+
*/
|
|
37
|
+
export declare enum ComponentShapeType {
|
|
38
|
+
/**
|
|
39
|
+
* 自定义图形
|
|
40
|
+
*/
|
|
41
|
+
CUSTOM = 0,
|
|
42
|
+
/**
|
|
43
|
+
* 矩形
|
|
44
|
+
*/
|
|
45
|
+
RECTANGLE = 1,
|
|
46
|
+
/**
|
|
47
|
+
* 椭圆
|
|
48
|
+
*/
|
|
49
|
+
ELLIPSE = 2,
|
|
50
|
+
/**
|
|
51
|
+
* 多边形
|
|
52
|
+
*/
|
|
53
|
+
POLYGON = 3,
|
|
54
|
+
/**
|
|
55
|
+
* 星形
|
|
56
|
+
*/
|
|
57
|
+
STAR = 4
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* 自定义图形组件
|
|
61
|
+
*/
|
|
62
|
+
export interface ShapeCustomComponent extends ShapeComponentData {
|
|
63
|
+
/**
|
|
64
|
+
* 矢量类型 - 形状
|
|
65
|
+
*/
|
|
66
|
+
type: ComponentShapeType.CUSTOM;
|
|
67
|
+
/**
|
|
68
|
+
* 矢量参数 - 形状
|
|
69
|
+
*/
|
|
70
|
+
param: ShapeCustomParam;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* 矢量路径参数
|
|
74
|
+
*/
|
|
75
|
+
export interface ShapeCustomParam {
|
|
76
|
+
/**
|
|
77
|
+
* 路径点
|
|
78
|
+
*/
|
|
79
|
+
points: spec.Vector3Data[];
|
|
80
|
+
/**
|
|
81
|
+
* 入射控制点
|
|
82
|
+
*/
|
|
83
|
+
easingIn: spec.Vector3Data[];
|
|
84
|
+
/**
|
|
85
|
+
* 入射控制点
|
|
86
|
+
*/
|
|
87
|
+
easingOut: spec.Vector3Data[];
|
|
88
|
+
/**
|
|
89
|
+
* 自定义形状
|
|
90
|
+
*/
|
|
91
|
+
shapes: CustomShape[];
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* 自定义形状参数
|
|
95
|
+
*/
|
|
96
|
+
export interface CustomShape {
|
|
97
|
+
/**
|
|
98
|
+
* 是否垂直与平面 - 用于减少实时运算
|
|
99
|
+
*/
|
|
100
|
+
verticalToPlane: 'x' | 'y' | 'z' | 'none';
|
|
101
|
+
/**
|
|
102
|
+
* 点索引 - 用于构成闭合图形
|
|
103
|
+
*/
|
|
104
|
+
indexes: CustomShapePoint[];
|
|
105
|
+
/**
|
|
106
|
+
* 是否为闭合图形 - 用于Stroke
|
|
107
|
+
*/
|
|
108
|
+
close: boolean;
|
|
109
|
+
/**
|
|
110
|
+
* 填充属性
|
|
111
|
+
*/
|
|
112
|
+
fill?: ShapeFillParam;
|
|
113
|
+
/**
|
|
114
|
+
* 描边属性
|
|
115
|
+
*/
|
|
116
|
+
stroke?: ShapeStrokeParam;
|
|
117
|
+
/**
|
|
118
|
+
* 空间变换
|
|
119
|
+
*/
|
|
120
|
+
transform?: spec.TransformData;
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* 自定义形状点
|
|
124
|
+
*/
|
|
125
|
+
export interface CustomShapePoint {
|
|
126
|
+
/**
|
|
127
|
+
* 顶点索引
|
|
128
|
+
*/
|
|
129
|
+
point: number;
|
|
130
|
+
/**
|
|
131
|
+
* 入射点索引
|
|
132
|
+
*/
|
|
133
|
+
easingIn: number;
|
|
134
|
+
/**
|
|
135
|
+
* 出射点索引
|
|
136
|
+
*/
|
|
137
|
+
easingOut: number;
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* 矢量填充参数
|
|
141
|
+
*/
|
|
142
|
+
export interface ShapeFillParam {
|
|
143
|
+
/**
|
|
144
|
+
* 填充颜色
|
|
145
|
+
*/
|
|
146
|
+
color: spec.ColorExpression;
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* 矢量描边参数
|
|
150
|
+
*/
|
|
151
|
+
export interface ShapeStrokeParam {
|
|
152
|
+
/**
|
|
153
|
+
* 线宽
|
|
154
|
+
*/
|
|
155
|
+
width: number;
|
|
156
|
+
/**
|
|
157
|
+
* 线颜色
|
|
158
|
+
*/
|
|
159
|
+
color: spec.ColorExpression;
|
|
160
|
+
/**
|
|
161
|
+
* 连接类型
|
|
162
|
+
*/
|
|
163
|
+
connectType: ShapeConnectType;
|
|
164
|
+
/**
|
|
165
|
+
* 点类型
|
|
166
|
+
*/
|
|
167
|
+
pointType: ShapePointType;
|
|
168
|
+
}
|
|
169
|
+
export declare enum ShapeConnectType {
|
|
170
|
+
}
|
|
171
|
+
export declare enum ShapePointType {
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
174
|
+
* @description 椭圆组件参数
|
|
175
|
+
*/
|
|
176
|
+
export interface ShapeEllipseComponent extends ShapeComponentData {
|
|
177
|
+
type: ComponentShapeType.ELLIPSE;
|
|
178
|
+
param: ShapeEllipseParam;
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* @description 椭圆参数
|
|
182
|
+
*/
|
|
183
|
+
export interface ShapeEllipseParam {
|
|
184
|
+
/**
|
|
185
|
+
* @description x轴半径
|
|
186
|
+
* -- TODO 后续完善类型
|
|
187
|
+
* -- TODO 可以看一下用xRadius/yRadius 还是 width/height
|
|
188
|
+
*/
|
|
189
|
+
xRadius: number;
|
|
190
|
+
/**
|
|
191
|
+
* @description y轴半径
|
|
192
|
+
*/
|
|
193
|
+
yRadius: number;
|
|
194
|
+
/**
|
|
195
|
+
* 填充属性
|
|
196
|
+
*/
|
|
197
|
+
fill?: ShapeFillParam;
|
|
198
|
+
/**
|
|
199
|
+
* 描边属性
|
|
200
|
+
*/
|
|
201
|
+
stroke?: ShapeStrokeParam;
|
|
202
|
+
/**
|
|
203
|
+
* 空间变换
|
|
204
|
+
*/
|
|
205
|
+
transform?: spec.TransformData;
|
|
206
|
+
}
|
|
@@ -5,13 +5,12 @@ import type { PluginSystem } from './plugin-system';
|
|
|
5
5
|
import type { Scene, SceneRenderLevel } from './scene';
|
|
6
6
|
import type { Texture } from './texture';
|
|
7
7
|
import type { Disposable } from './utils';
|
|
8
|
-
import type { VFXItemProps } from './vfx-item';
|
|
9
8
|
export interface ContentOptions {
|
|
10
9
|
id: string;
|
|
11
10
|
duration: number;
|
|
12
11
|
name: string;
|
|
13
12
|
endBehavior: spec.EndBehavior;
|
|
14
|
-
items:
|
|
13
|
+
items: spec.DataPath[];
|
|
15
14
|
camera: spec.CameraOptions;
|
|
16
15
|
startTime: number;
|
|
17
16
|
timelineAsset: spec.DataPath;
|
|
@@ -22,17 +21,17 @@ export interface ContentOptions {
|
|
|
22
21
|
*/
|
|
23
22
|
export declare class CompositionSourceManager implements Disposable {
|
|
24
23
|
composition?: spec.CompositionData;
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
refCompositionProps: Map<string, VFXItemProps>;
|
|
24
|
+
sourceContent?: spec.CompositionData;
|
|
25
|
+
refCompositionProps: Map<string, spec.CompositionData>;
|
|
28
26
|
renderLevel?: SceneRenderLevel;
|
|
29
27
|
pluginSystem?: PluginSystem;
|
|
30
28
|
totalTime: number;
|
|
31
|
-
imgUsage: Record<string, number
|
|
29
|
+
imgUsage: Record<string, number>;
|
|
32
30
|
textures: Texture[];
|
|
33
31
|
jsonScene?: spec.JSONScene;
|
|
34
32
|
mask: number;
|
|
35
33
|
engine: Engine;
|
|
34
|
+
private refCompositions;
|
|
36
35
|
constructor(scene: Scene, engine: Engine);
|
|
37
36
|
private getContent;
|
|
38
37
|
private assembleItems;
|
package/dist/composition.d.ts
CHANGED
|
@@ -9,20 +9,25 @@ import type { PluginSystem } from './plugin-system';
|
|
|
9
9
|
import type { EventSystem, Plugin, Region } from './plugins';
|
|
10
10
|
import type { MeshRendererOptions, Renderer } from './render';
|
|
11
11
|
import { RenderFrame } from './render';
|
|
12
|
-
import type { Scene
|
|
12
|
+
import type { Scene } from './scene';
|
|
13
13
|
import type { Texture } from './texture';
|
|
14
14
|
import type { Disposable, LostHandler } from './utils';
|
|
15
|
-
import type { VFXItemProps } from './vfx-item';
|
|
16
15
|
import { VFXItem } from './vfx-item';
|
|
17
16
|
import type { CompositionEvent } from './events';
|
|
18
17
|
import { EventEmitter } from './events';
|
|
19
|
-
import type { PostProcessVolume } from './components
|
|
18
|
+
import type { PostProcessVolume } from './components';
|
|
20
19
|
import { SceneTicking } from './composition/scene-ticking';
|
|
21
20
|
export interface CompositionStatistic {
|
|
22
|
-
loadTime: number;
|
|
23
21
|
loadStart: number;
|
|
22
|
+
loadTime: number;
|
|
23
|
+
/**
|
|
24
|
+
* Shader 编译耗时
|
|
25
|
+
*/
|
|
26
|
+
compileTime: number;
|
|
27
|
+
/**
|
|
28
|
+
* 从加载到渲染第一帧的时间(含 Shader 编译)
|
|
29
|
+
*/
|
|
24
30
|
firstFrameTime: number;
|
|
25
|
-
precompileTime: number;
|
|
26
31
|
}
|
|
27
32
|
export interface MessageItem {
|
|
28
33
|
id: string;
|
|
@@ -87,7 +92,6 @@ export declare class Composition extends EventEmitter<CompositionEvent<Compositi
|
|
|
87
92
|
* 是否播放完成后销毁 texture 对象
|
|
88
93
|
*/
|
|
89
94
|
keepResource: boolean;
|
|
90
|
-
extraCamera: VFXItem;
|
|
91
95
|
/**
|
|
92
96
|
* 合成内的元素否允许点击、拖拽交互
|
|
93
97
|
* @since 1.6.0
|
|
@@ -133,7 +137,7 @@ export declare class Composition extends EventEmitter<CompositionEvent<Compositi
|
|
|
133
137
|
/**
|
|
134
138
|
* 合成对应的 url 或者 JSON
|
|
135
139
|
*/
|
|
136
|
-
readonly url:
|
|
140
|
+
readonly url: Scene.LoadType;
|
|
137
141
|
/**
|
|
138
142
|
* 合成根元素
|
|
139
143
|
*/
|
|
@@ -145,7 +149,7 @@ export declare class Composition extends EventEmitter<CompositionEvent<Compositi
|
|
|
145
149
|
/**
|
|
146
150
|
* 预合成的合成属性,在 content 中会被其元素属性覆盖
|
|
147
151
|
*/
|
|
148
|
-
refCompositionProps: Map<string,
|
|
152
|
+
refCompositionProps: Map<string, spec.CompositionData>;
|
|
149
153
|
/**
|
|
150
154
|
* 合成的相机对象
|
|
151
155
|
*/
|
|
@@ -298,7 +302,6 @@ export declare class Composition extends EventEmitter<CompositionEvent<Compositi
|
|
|
298
302
|
* 构建父子树,同时保存到 itemCacheMap 中便于查找
|
|
299
303
|
*/
|
|
300
304
|
private buildItemTree;
|
|
301
|
-
private getParentIdWithoutSuffix;
|
|
302
305
|
/**
|
|
303
306
|
* 更新视频数据到纹理
|
|
304
307
|
* @override
|
package/dist/downloader.d.ts
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export * as math from '@galacean/effects-math/es/core/index';
|
|
2
2
|
export * as spec from '@galacean/effects-specification';
|
|
3
|
+
export * from './asset';
|
|
4
|
+
export * from './binary-asset';
|
|
3
5
|
export * from './asset-loader';
|
|
4
6
|
export * from './asset-manager';
|
|
5
7
|
export * from './camera';
|
|
@@ -32,8 +34,8 @@ export * from './ticker';
|
|
|
32
34
|
export * from './transform';
|
|
33
35
|
export * from './utils';
|
|
34
36
|
export * from './vfx-item';
|
|
35
|
-
export * from './binary-asset';
|
|
36
37
|
export * from './effects-object';
|
|
37
38
|
export * from './effects-package';
|
|
38
39
|
export * from './events';
|
|
40
|
+
export * from './pass-render-level';
|
|
39
41
|
export declare const version: string;
|