@galacean/effects-core 2.3.0-beta.0 → 2.3.0-beta.1
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 +0 -1
- package/dist/asset-service.d.ts +17 -1
- package/dist/index.js +112 -284
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +112 -284
- package/dist/index.mjs.map +1 -1
- package/dist/plugin-system.d.ts +3 -3
- package/dist/plugins/particle/particle-loader.d.ts +0 -4
- package/dist/plugins/plugin.d.ts +8 -1
- package/dist/plugins/sprite/sprite-loader.d.ts +0 -4
- package/dist/scene.d.ts +0 -6
- package/package.json +2 -2
package/dist/plugin-system.d.ts
CHANGED
|
@@ -16,11 +16,11 @@ export type PrecompileOptions = {
|
|
|
16
16
|
* @param itemClass class of item
|
|
17
17
|
* @param isDefault load
|
|
18
18
|
*/
|
|
19
|
-
export declare function registerPlugin
|
|
19
|
+
export declare function registerPlugin(name: string, pluginClass: PluginConstructor, itemClass: VFXItemConstructor): void;
|
|
20
20
|
export declare function unregisterPlugin(name: string): void;
|
|
21
21
|
export declare class PluginSystem {
|
|
22
22
|
readonly plugins: Plugin[];
|
|
23
|
-
constructor(
|
|
23
|
+
constructor();
|
|
24
24
|
initializeComposition(composition: Composition, scene: Scene): void;
|
|
25
25
|
destroyComposition(comp: Composition): void;
|
|
26
26
|
resetComposition(comp: Composition, renderFrame: RenderFrame): void;
|
|
@@ -29,7 +29,7 @@ export declare class PluginSystem {
|
|
|
29
29
|
assets: spec.AssetBase[];
|
|
30
30
|
loadedAssets: unknown[];
|
|
31
31
|
}[]>;
|
|
32
|
-
precompile(compositions: spec.CompositionData[], renderer: Renderer, options?: PrecompileOptions):
|
|
32
|
+
precompile(compositions: spec.CompositionData[], renderer: Renderer, options?: PrecompileOptions): void;
|
|
33
33
|
loadResources(scene: Scene, options: SceneLoadOptions): Promise<unknown[]>;
|
|
34
34
|
private callStatic;
|
|
35
35
|
}
|
|
@@ -1,9 +1,5 @@
|
|
|
1
|
-
import type * as spec from '@galacean/effects-specification';
|
|
2
1
|
import type { Engine } from '../../engine';
|
|
3
|
-
import type { Renderer } from '../../render';
|
|
4
2
|
import { AbstractPlugin } from '../plugin';
|
|
5
|
-
import type { PrecompileOptions } from '../../plugin-system';
|
|
6
3
|
export declare class ParticleLoader extends AbstractPlugin {
|
|
7
4
|
engine: Engine;
|
|
8
|
-
static precompile(compositions: spec.Composition[], renderer: Renderer, options?: PrecompileOptions): Promise<any>;
|
|
9
5
|
}
|
package/dist/plugins/plugin.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import type { Scene, SceneLoadOptions } from '../scene';
|
|
|
3
3
|
import type { VFXItem } from '../vfx-item';
|
|
4
4
|
import type { RenderFrame, Renderer } from '../render';
|
|
5
5
|
import type { Composition } from '../composition';
|
|
6
|
+
import type { PrecompileOptions } from '../plugin-system';
|
|
6
7
|
export interface Plugin {
|
|
7
8
|
/**
|
|
8
9
|
* plugin 的数组内排序,按照升序排列
|
|
@@ -10,6 +11,12 @@ export interface Plugin {
|
|
|
10
11
|
*/
|
|
11
12
|
order: number;
|
|
12
13
|
name: string;
|
|
14
|
+
/**
|
|
15
|
+
* 在加载到 JSON 后,就可以进行提前编译
|
|
16
|
+
* @param json
|
|
17
|
+
* @param player
|
|
18
|
+
*/
|
|
19
|
+
precompile: (compositions: spec.CompositionData[], renderer: Renderer, options?: PrecompileOptions) => void;
|
|
13
20
|
/**
|
|
14
21
|
* 合成创建时调用,用于触发元素在合成创建时的回调
|
|
15
22
|
* @param composition
|
|
@@ -121,7 +128,7 @@ export declare abstract class AbstractPlugin implements Plugin {
|
|
|
121
128
|
* @param json
|
|
122
129
|
* @param player
|
|
123
130
|
*/
|
|
124
|
-
|
|
131
|
+
precompile(compositions: spec.CompositionData[], renderer: Renderer, options?: PrecompileOptions): void;
|
|
125
132
|
onCompositionConstructed(composition: Composition, scene: Scene): void;
|
|
126
133
|
onCompositionItemLifeBegin(composition: Composition, item: VFXItem): void;
|
|
127
134
|
onCompositionItemLifeEnd(composition: Composition, item: VFXItem): void;
|
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
import type * as spec from '@galacean/effects-specification';
|
|
2
|
-
import type { PrecompileOptions } from '../../plugin-system';
|
|
3
|
-
import type { Renderer } from '../../render';
|
|
4
1
|
import { AbstractPlugin } from '../plugin';
|
|
5
2
|
export declare class SpriteLoader extends AbstractPlugin {
|
|
6
3
|
name: string;
|
|
7
|
-
static precompile(compositions: spec.Composition[], render: Renderer, options?: PrecompileOptions): Promise<any>;
|
|
8
4
|
}
|
package/dist/scene.d.ts
CHANGED
|
@@ -2,7 +2,6 @@ import type * as spec from '@galacean/effects-specification';
|
|
|
2
2
|
import type { Texture } from './texture';
|
|
3
3
|
import type { PluginSystem } from './plugin-system';
|
|
4
4
|
import type { PickEnum } from './utils';
|
|
5
|
-
import type { AssetManager } from './asset-manager';
|
|
6
5
|
export type ImageLike = spec.HTMLImageLike | ArrayBuffer | Texture;
|
|
7
6
|
export type SceneRenderLevel = PickEnum<spec.RenderLevel, spec.RenderLevel.A | spec.RenderLevel.B | spec.RenderLevel.S>;
|
|
8
7
|
/**
|
|
@@ -37,11 +36,6 @@ export declare namespace Scene {
|
|
|
37
36
|
url: string;
|
|
38
37
|
options?: SceneLoadOptions;
|
|
39
38
|
};
|
|
40
|
-
export interface LoadResult {
|
|
41
|
-
scene: Scene;
|
|
42
|
-
assetManager: AssetManager;
|
|
43
|
-
options: SceneLoadOptions;
|
|
44
|
-
}
|
|
45
39
|
/**
|
|
46
40
|
* 接受用于加载的数据类型
|
|
47
41
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@galacean/effects-core",
|
|
3
|
-
"version": "2.3.0-beta.
|
|
3
|
+
"version": "2.3.0-beta.1",
|
|
4
4
|
"description": "Galacean Effects runtime core for the web",
|
|
5
5
|
"module": "./dist/index.mjs",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"registry": "https://registry.npmjs.org"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@galacean/effects-specification": "2.2.0
|
|
45
|
+
"@galacean/effects-specification": "2.2.0",
|
|
46
46
|
"@galacean/effects-math": "1.1.0",
|
|
47
47
|
"flatbuffers": "24.3.25",
|
|
48
48
|
"uuid": "9.0.1",
|