@galacean/engine-loader 1.3.0-alpha.2 → 1.3.0-beta.10
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/main.js +130 -82
- package/dist/main.js.map +1 -1
- package/dist/miniprogram.js +130 -82
- package/dist/module.js +125 -81
- package/dist/module.js.map +1 -1
- package/package.json +4 -4
- package/types/gltf/extensions/EXT_meshopt_compression.d.ts +16 -3
- package/types/gltf/extensions/MeshoptDecoder.d.ts +10 -6
- package/types/index.d.ts +0 -1
- package/types/resource-deserialize/index.d.ts +3 -0
- package/types/resource-deserialize/resources/prefab/PrefabParser.d.ts +14 -0
- package/types/resource-deserialize/resources/prefab/PrefabParserContext.d.ts +5 -0
- package/types/resource-deserialize/resources/scene/SceneParserContext.d.ts +9 -0
- package/types/resource-deserialize/resources/schema/SceneSchema.d.ts +3 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@galacean/engine-loader",
|
|
3
|
-
"version": "1.3.0-
|
|
3
|
+
"version": "1.3.0-beta.10",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"registry": "https://registry.npmjs.org"
|
|
@@ -15,9 +15,9 @@
|
|
|
15
15
|
"types/**/*"
|
|
16
16
|
],
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@galacean/engine-
|
|
19
|
-
"@galacean/engine-
|
|
20
|
-
"@galacean/engine-rhi-webgl": "1.3.0-
|
|
18
|
+
"@galacean/engine-math": "1.3.0-beta.10",
|
|
19
|
+
"@galacean/engine-core": "1.3.0-beta.10",
|
|
20
|
+
"@galacean/engine-rhi-webgl": "1.3.0-beta.10"
|
|
21
21
|
},
|
|
22
22
|
"scripts": {
|
|
23
23
|
"b:types": "tsc"
|
|
@@ -1,11 +1,24 @@
|
|
|
1
1
|
declare module "@galacean/engine-core" {
|
|
2
2
|
interface EngineConfiguration {
|
|
3
|
-
|
|
3
|
+
glTFLoader?: {
|
|
4
|
+
/** Meshopt options. If set this option and workCount is great than 0, workers will be created. */
|
|
5
|
+
meshOpt?: {
|
|
6
|
+
/**
|
|
7
|
+
* Worker count for transcoder.
|
|
8
|
+
* @defaultValue 4
|
|
9
|
+
*/
|
|
10
|
+
workerCount?: number;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
/** @deprecated glTF loader options. */
|
|
4
14
|
glTF?: {
|
|
5
15
|
/** Meshopt options. If set this option and workCount is great than 0, workers will be created. */
|
|
6
16
|
meshOpt?: {
|
|
7
|
-
/**
|
|
8
|
-
|
|
17
|
+
/**
|
|
18
|
+
* Worker count for transcoder.
|
|
19
|
+
* @defaultValue 4
|
|
20
|
+
*/
|
|
21
|
+
workerCount?: number;
|
|
9
22
|
};
|
|
10
23
|
};
|
|
11
24
|
}
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
declare
|
|
1
|
+
export declare let ready: Promise<{
|
|
2
2
|
workerCount: number;
|
|
3
|
-
|
|
4
|
-
useWorkers: () => void;
|
|
3
|
+
useWorkers: (count?: number) => void;
|
|
5
4
|
decodeGltfBuffer: (count: any, stride: any, source: any, mode: any, filter: any) => Promise<Uint8Array>;
|
|
6
|
-
release()
|
|
7
|
-
}
|
|
8
|
-
export
|
|
5
|
+
release: () => void;
|
|
6
|
+
}>;
|
|
7
|
+
export declare function getMeshoptDecoder(): Promise<{
|
|
8
|
+
workerCount: number;
|
|
9
|
+
useWorkers: (count?: number) => void;
|
|
10
|
+
decodeGltfBuffer: (count: any, stride: any, source: any, mode: any, filter: any) => Promise<Uint8Array>;
|
|
11
|
+
release: () => void;
|
|
12
|
+
}>;
|
package/types/index.d.ts
CHANGED
|
@@ -16,3 +16,6 @@ export * from "./resources/scene/SceneParser";
|
|
|
16
16
|
export * from "./resources/scene/MeshLoader";
|
|
17
17
|
export * from "./resources/scene/EditorTextureLoader";
|
|
18
18
|
export * from "./resources/parser/ParserContext";
|
|
19
|
+
export * from "./utils/BufferReader";
|
|
20
|
+
export * from "./utils/Decorator";
|
|
21
|
+
export * from "./utils/FileHeader";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Entity, Engine } from "@galacean/engine-core";
|
|
2
|
+
import type { IPrefabFile } from "../schema";
|
|
3
|
+
import { PrefabParserContext } from "./PrefabParserContext";
|
|
4
|
+
import HierarchyParser from "../parser/HierarchyParser";
|
|
5
|
+
export declare class PrefabParser extends HierarchyParser<Entity, PrefabParserContext> {
|
|
6
|
+
/**
|
|
7
|
+
* Parse prefab data.
|
|
8
|
+
* @param engine - the engine of the parser context
|
|
9
|
+
* @param prefabData - prefab data which is exported by editor
|
|
10
|
+
* @returns a promise of prefab
|
|
11
|
+
*/
|
|
12
|
+
static parse(engine: Engine, prefabData: IPrefabFile): PrefabParser;
|
|
13
|
+
protected handleRootEntity(id: string): void;
|
|
14
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Scene } from "@galacean/engine-core";
|
|
2
|
+
import { IScene } from "../schema";
|
|
3
|
+
import { ParserContext } from "../parser/ParserContext";
|
|
4
|
+
export declare class SceneParserContext extends ParserContext<IScene, Scene> {
|
|
5
|
+
readonly originalData: IScene;
|
|
6
|
+
readonly engine: any;
|
|
7
|
+
readonly scene: Scene;
|
|
8
|
+
constructor(originalData: IScene, engine: any, scene: Scene);
|
|
9
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BackgroundMode, BackgroundTextureFillMode, DiffuseMode, FogMode, ShadowCascadesMode, ShadowResolution, TonemappingMode } from "@galacean/engine-core";
|
|
1
|
+
import { BackgroundMode, BackgroundTextureFillMode, BloomDownScaleMode, DiffuseMode, FogMode, ShadowCascadesMode, ShadowResolution, TonemappingMode } from "@galacean/engine-core";
|
|
2
2
|
import type { IReferable } from "@galacean/engine-core/types/asset/IReferable";
|
|
3
3
|
import type { IColor, IHierarchyFile, IVector3 } from "./BasicSchema";
|
|
4
4
|
export declare enum SpecularMode {
|
|
@@ -28,6 +28,7 @@ export interface IScene extends IHierarchyFile {
|
|
|
28
28
|
};
|
|
29
29
|
shadow?: {
|
|
30
30
|
castShadows: boolean;
|
|
31
|
+
enableTransparentShadow: boolean;
|
|
31
32
|
shadowResolution: ShadowResolution;
|
|
32
33
|
shadowDistance: number;
|
|
33
34
|
shadowCascades: ShadowCascadesMode;
|
|
@@ -46,6 +47,7 @@ export interface IScene extends IHierarchyFile {
|
|
|
46
47
|
isActive: boolean;
|
|
47
48
|
bloom: {
|
|
48
49
|
enabled: boolean;
|
|
50
|
+
downScale: BloomDownScaleMode;
|
|
49
51
|
threshold: number;
|
|
50
52
|
scatter: number;
|
|
51
53
|
intensity: number;
|