@galacean/effects-core 2.3.0-alpha.1 → 2.3.0-beta.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-manager.d.ts +2 -2
- package/dist/asset-service.d.ts +24 -0
- package/dist/camera.d.ts +19 -4
- package/dist/comp-vfx-item.d.ts +2 -1
- package/dist/components/shape-component.d.ts +4 -3
- package/dist/composition-source-manager.d.ts +1 -7
- package/dist/composition.d.ts +0 -4
- package/dist/fallback/migration.d.ts +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +5515 -5350
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5515 -5351
- package/dist/index.mjs.map +1 -1
- package/dist/plugins/particle/particle-mesh.d.ts +1 -1
- package/dist/plugins/particle/particle-system.d.ts +11 -0
- package/dist/plugins/shape/build-line.d.ts +6 -4
- package/dist/plugins/shape/graphics-path.d.ts +7 -1
- package/dist/plugins/shape/polygon.d.ts +4 -0
- package/dist/plugins/shape/rectangle.d.ts +21 -88
- package/dist/plugins/shape/shape-path.d.ts +7 -1
- package/dist/plugins/text/text-item.d.ts +16 -0
- package/dist/scene.d.ts +6 -0
- package/dist/vfx-item.d.ts +13 -4
- package/package.json +2 -2
package/dist/asset-manager.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Downloader } from './downloader';
|
|
2
|
-
import type { SceneLoadOptions } from './scene';
|
|
2
|
+
import type { ImageLike, SceneLoadOptions } from './scene';
|
|
3
3
|
import { Scene } from './scene';
|
|
4
4
|
import type { Disposable } from './utils';
|
|
5
5
|
import type { Renderer } from './render';
|
|
@@ -53,13 +53,13 @@ export declare class AssetManager implements Disposable {
|
|
|
53
53
|
loadScene(url: Scene.LoadType, renderer?: Renderer, options?: {
|
|
54
54
|
env: string;
|
|
55
55
|
}): Promise<Scene>;
|
|
56
|
+
getAssets(): Record<string, ImageLike>;
|
|
56
57
|
private precompile;
|
|
57
58
|
private processJSON;
|
|
58
59
|
private processBins;
|
|
59
60
|
private processFontURL;
|
|
60
61
|
private processImages;
|
|
61
62
|
private processPluginAssets;
|
|
62
|
-
private prepareAssets;
|
|
63
63
|
private processTextures;
|
|
64
64
|
private loadJSON;
|
|
65
65
|
private loadBins;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { Disposable } from './utils';
|
|
2
|
+
import type { Engine } from './engine';
|
|
3
|
+
import type { ImageLike } from './scene';
|
|
4
|
+
import { Scene } from './scene';
|
|
5
|
+
/**
|
|
6
|
+
*
|
|
7
|
+
*/
|
|
8
|
+
export declare class AssetService implements Disposable {
|
|
9
|
+
private readonly engine;
|
|
10
|
+
private readonly builtinObjects;
|
|
11
|
+
/**
|
|
12
|
+
*
|
|
13
|
+
* @param engine
|
|
14
|
+
*/
|
|
15
|
+
constructor(engine: Engine);
|
|
16
|
+
initializeTexture(scene: Scene): void;
|
|
17
|
+
prepareAssets(scene: Scene, assets: Record<string, ImageLike>): void;
|
|
18
|
+
createShaderVariant(): void;
|
|
19
|
+
private destroyBuiltinObjects;
|
|
20
|
+
/**
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
dispose(): void;
|
|
24
|
+
}
|
package/dist/camera.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { Vector3 } from '@galacean/effects-math/es/core/vector3';
|
|
2
|
-
import { Quaternion } from '@galacean/effects-math/es/core/quaternion';
|
|
2
|
+
import type { Quaternion } from '@galacean/effects-math/es/core/quaternion';
|
|
3
3
|
import { Matrix4 } from '@galacean/effects-math/es/core/matrix4';
|
|
4
|
-
import { Euler } from '@galacean/effects-math/es/core/euler';
|
|
4
|
+
import type { Euler } from '@galacean/effects-math/es/core/euler';
|
|
5
5
|
import * as spec from '@galacean/effects-specification';
|
|
6
|
+
import { Transform } from './transform';
|
|
6
7
|
interface CameraOptionsBase {
|
|
7
8
|
/**
|
|
8
9
|
* 相机近平面
|
|
@@ -72,6 +73,7 @@ export declare class Camera {
|
|
|
72
73
|
private inverseViewMatrix;
|
|
73
74
|
private inverseProjectionMatrix;
|
|
74
75
|
private inverseViewProjectionMatrix;
|
|
76
|
+
private transform;
|
|
75
77
|
private dirty;
|
|
76
78
|
/**
|
|
77
79
|
*
|
|
@@ -110,17 +112,31 @@ export declare class Camera {
|
|
|
110
112
|
set clipMode(clipMode: spec.CameraClipMode | undefined);
|
|
111
113
|
get clipMode(): spec.CameraClipMode | undefined;
|
|
112
114
|
/**
|
|
113
|
-
*
|
|
115
|
+
* 设置相机的本地位置
|
|
114
116
|
* @param value
|
|
115
117
|
*/
|
|
116
118
|
set position(value: Vector3);
|
|
119
|
+
/**
|
|
120
|
+
* 获取相机的本地位置
|
|
121
|
+
*/
|
|
117
122
|
get position(): Vector3;
|
|
123
|
+
/**
|
|
124
|
+
* 获取相机的世界位置
|
|
125
|
+
* @since 2.3.0
|
|
126
|
+
*/
|
|
127
|
+
get worldPosition(): Vector3;
|
|
118
128
|
/**
|
|
119
129
|
* 设置相机的旋转角度
|
|
120
130
|
* @param value
|
|
121
131
|
*/
|
|
122
132
|
set rotation(value: Euler);
|
|
123
133
|
get rotation(): Euler;
|
|
134
|
+
/**
|
|
135
|
+
* 设置相机变换
|
|
136
|
+
* @since 2.3.0
|
|
137
|
+
* @param transform
|
|
138
|
+
*/
|
|
139
|
+
setTransform(transform: Transform): void;
|
|
124
140
|
setViewportMatrix(matrix: Matrix4): void;
|
|
125
141
|
getViewportMatrix(): Matrix4;
|
|
126
142
|
/**
|
|
@@ -187,6 +203,5 @@ export declare class Camera {
|
|
|
187
203
|
* 更新相机相关的矩阵,获取矩阵前会自动调用
|
|
188
204
|
*/
|
|
189
205
|
updateMatrix(): void;
|
|
190
|
-
private setRotationByQuat;
|
|
191
206
|
}
|
|
192
207
|
export {};
|
package/dist/comp-vfx-item.d.ts
CHANGED
|
@@ -27,8 +27,9 @@ export declare class CompositionComponent extends Behaviour {
|
|
|
27
27
|
onStart(): void;
|
|
28
28
|
setReusable(value: boolean): void;
|
|
29
29
|
getReusable(): boolean;
|
|
30
|
+
pause(): void;
|
|
31
|
+
resume(): void;
|
|
30
32
|
onUpdate(dt: number): void;
|
|
31
|
-
createContent(): void;
|
|
32
33
|
onEnable(): void;
|
|
33
34
|
onDisable(): void;
|
|
34
35
|
onDestroy(): void;
|
|
@@ -91,10 +91,12 @@ export interface PolygonAttribute extends ShapeAttribute {
|
|
|
91
91
|
* @since 2.1.0
|
|
92
92
|
*/
|
|
93
93
|
export declare class ShapeComponent extends MeshComponent {
|
|
94
|
-
|
|
94
|
+
private hasStroke;
|
|
95
|
+
private hasFill;
|
|
96
|
+
private shapeDirty;
|
|
95
97
|
private graphicsPath;
|
|
96
98
|
private curveValues;
|
|
97
|
-
private
|
|
99
|
+
private fillAttribute;
|
|
98
100
|
private strokeAttributes;
|
|
99
101
|
private shapeAttribute;
|
|
100
102
|
private vert;
|
|
@@ -109,7 +111,6 @@ export declare class ShapeComponent extends MeshComponent {
|
|
|
109
111
|
onUpdate(dt: number): void;
|
|
110
112
|
private buildGeometryFromPath;
|
|
111
113
|
private buildPath;
|
|
112
|
-
private setFillColor;
|
|
113
114
|
fromData(data: spec.ShapeComponentData): void;
|
|
114
115
|
}
|
|
115
116
|
export {};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import * as spec from '@galacean/effects-specification';
|
|
2
2
|
import type { SceneBindingData } from './comp-vfx-item';
|
|
3
3
|
import type { Engine } from './engine';
|
|
4
|
-
import type { PluginSystem } from './plugin-system';
|
|
5
4
|
import type { Scene, SceneRenderLevel } from './scene';
|
|
6
5
|
import type { Texture } from './texture';
|
|
7
6
|
import type { Disposable } from './utils';
|
|
@@ -20,18 +19,13 @@ export interface ContentOptions {
|
|
|
20
19
|
* 合成资源管理
|
|
21
20
|
*/
|
|
22
21
|
export declare class CompositionSourceManager implements Disposable {
|
|
23
|
-
|
|
22
|
+
engine: Engine;
|
|
24
23
|
sourceContent?: spec.CompositionData;
|
|
25
|
-
refCompositionProps: Map<string, spec.CompositionData>;
|
|
26
24
|
renderLevel?: SceneRenderLevel;
|
|
27
|
-
pluginSystem?: PluginSystem;
|
|
28
|
-
totalTime: number;
|
|
29
25
|
imgUsage: Record<string, number>;
|
|
30
26
|
textures: Texture[];
|
|
31
27
|
jsonScene?: spec.JSONScene;
|
|
32
28
|
mask: number;
|
|
33
|
-
engine: Engine;
|
|
34
|
-
private refCompositions;
|
|
35
29
|
constructor(scene: Scene, engine: Engine);
|
|
36
30
|
private getContent;
|
|
37
31
|
private assembleItems;
|
package/dist/composition.d.ts
CHANGED
|
@@ -209,10 +209,6 @@ export declare class Composition extends EventEmitter<CompositionEvent<Compositi
|
|
|
209
209
|
* 预合成数组
|
|
210
210
|
*/
|
|
211
211
|
readonly refContent: VFXItem[];
|
|
212
|
-
/**
|
|
213
|
-
* 预合成的合成属性,在 content 中会被其元素属性覆盖
|
|
214
|
-
*/
|
|
215
|
-
readonly refCompositionProps: Map<string, spec.CompositionData>;
|
|
216
212
|
/**
|
|
217
213
|
* 合成的相机对象
|
|
218
214
|
*/
|
|
@@ -11,7 +11,7 @@ export declare function version22Migration(json: JSONSceneLegacy): JSONSceneLega
|
|
|
11
11
|
* 3.1 版本数据适配
|
|
12
12
|
* - 富文本插件名称的适配
|
|
13
13
|
*/
|
|
14
|
-
export declare function version31Migration(json:
|
|
14
|
+
export declare function version31Migration(json: JSONScene): JSONScene;
|
|
15
15
|
/**
|
|
16
16
|
* 3.0 以下版本数据适配(runtime 2.0及以上版本支持)
|
|
17
17
|
*/
|
package/dist/index.d.ts
CHANGED