@galacean/engine-loader 0.0.0-experimental-renderSort.4 → 0.0.0-experimental-stateMachine.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/LICENSE +2 -2
- package/dist/main.js +1234 -706
- package/dist/main.js.map +1 -1
- package/dist/miniprogram.js +1233 -706
- package/dist/module.js +1222 -695
- package/dist/module.js.map +1 -1
- package/package.json +4 -5
- package/types/GLTFContentRestorer.d.ts +7 -6
- package/types/GLTFLoader.d.ts +7 -1
- package/types/gltf/GLTFResource.d.ts +58 -22
- package/types/gltf/GLTFSchema.d.ts +1 -1
- package/types/gltf/GLTFUtils.d.ts +6 -10
- package/types/gltf/extensions/EXT_meshopt_compression.d.ts +13 -0
- package/types/gltf/extensions/GLTFExtensionParser.d.ts +1 -1
- package/types/gltf/extensions/GLTFExtensionSchema.d.ts +18 -10
- package/types/gltf/extensions/KHR_materials_anisotropy.d.ts +1 -0
- package/types/gltf/extensions/MeshoptDecoder.d.ts +8 -0
- package/types/gltf/extensions/index.d.ts +2 -1
- package/types/gltf/index.d.ts +2 -1
- package/types/gltf/parser/GLTFAnimatorControllerParser.d.ts +7 -0
- package/types/gltf/parser/GLTFBufferViewParser.d.ts +5 -0
- package/types/gltf/parser/GLTFMeshParser.d.ts +7 -6
- package/types/gltf/parser/GLTFParser.d.ts +1 -1
- package/types/gltf/parser/GLTFParserContext.d.ts +23 -7
- package/types/gltf/parser/GLTFSchemaParser.d.ts +0 -1
- package/types/gltf/parser/index.d.ts +3 -1
- package/types/index.d.ts +3 -1
- package/types/ktx2/KTX2Loader.d.ts +4 -3
- package/types/resource-deserialize/index.d.ts +2 -1
- package/types/resource-deserialize/resources/animationClip/AnimationClipDecoder.d.ts +0 -1
- package/types/resource-deserialize/resources/parser/HierarchyParser.d.ts +36 -0
- package/types/resource-deserialize/resources/parser/ParserContext.d.ts +29 -0
- package/types/resource-deserialize/resources/parser/ReflectionParser.d.ts +4 -4
- 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/SceneParser.d.ts +3 -17
- package/types/resource-deserialize/resources/scene/SceneParserContext.d.ts +6 -12
- package/types/resource-deserialize/resources/schema/BasicSchema.d.ts +24 -1
- package/types/resource-deserialize/resources/schema/SceneSchema.d.ts +9 -1
- package/types/gltf/GLTFPipeline.d.ts +0 -23
- package/types/resource-deserialize/resources/animationClip/ComponentMap.d.ts +0 -2
- package/types/resource-deserialize/resources/parser/PrefabParser.d.ts +0 -5
- /package/types/{gltf/extensions/KHR_draco_mesh_compression.d.ts → PrimitiveMeshLoader.d.ts} +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Engine, Scene } from "@galacean/engine-core";
|
|
2
2
|
import type { IScene } from "../schema";
|
|
3
3
|
import { SceneParserContext } from "./SceneParserContext";
|
|
4
|
+
import HierarchyParser from "../parser/HierarchyParser";
|
|
4
5
|
/** @Internal */
|
|
5
|
-
export declare class SceneParser {
|
|
6
|
-
readonly context: SceneParserContext;
|
|
6
|
+
export declare class SceneParser extends HierarchyParser<Scene, SceneParserContext> {
|
|
7
7
|
/**
|
|
8
8
|
* Parse scene data.
|
|
9
9
|
* @param engine - the engine of the parser context
|
|
@@ -11,19 +11,5 @@ export declare class SceneParser {
|
|
|
11
11
|
* @returns a promise of scene
|
|
12
12
|
*/
|
|
13
13
|
static parse(engine: Engine, sceneData: IScene): Promise<Scene>;
|
|
14
|
-
|
|
15
|
-
* The promise of parsed scene.
|
|
16
|
-
*/
|
|
17
|
-
readonly promise: Promise<Scene>;
|
|
18
|
-
private _resolve;
|
|
19
|
-
private _reject;
|
|
20
|
-
private _engine;
|
|
21
|
-
private _reflectionParser;
|
|
22
|
-
constructor(context: SceneParserContext);
|
|
23
|
-
/** start parse the scene */
|
|
24
|
-
start(): void;
|
|
25
|
-
private _parseEntities;
|
|
26
|
-
private _organizeEntities;
|
|
27
|
-
private _parseComponents;
|
|
28
|
-
private _clearAndResolveScene;
|
|
14
|
+
protected handleRootEntity(id: string): void;
|
|
29
15
|
}
|
|
@@ -1,15 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
|
|
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> {
|
|
4
5
|
readonly originalData: IScene;
|
|
6
|
+
readonly engine: any;
|
|
5
7
|
readonly scene: Scene;
|
|
6
|
-
|
|
7
|
-
components: Map<string, Component>;
|
|
8
|
-
assets: Map<string, any>;
|
|
9
|
-
entityConfigMap: Map<string, IEntity>;
|
|
10
|
-
rootIds: string[];
|
|
11
|
-
readonly engine: Engine;
|
|
12
|
-
readonly resourceManager: ResourceManager;
|
|
13
|
-
constructor(originalData: IScene, scene: Scene);
|
|
14
|
-
destroy(): void;
|
|
8
|
+
constructor(originalData: IScene, engine: any, scene: Scene);
|
|
15
9
|
}
|
|
@@ -36,11 +36,34 @@ export interface IBasicEntity {
|
|
|
36
36
|
parent?: string;
|
|
37
37
|
layer?: Layer;
|
|
38
38
|
}
|
|
39
|
-
export type IEntity = IBasicEntity | IRefEntity;
|
|
39
|
+
export type IEntity = IBasicEntity | IRefEntity | IStrippedEntity;
|
|
40
40
|
export interface IRefEntity extends IBasicEntity {
|
|
41
41
|
assetRefId: string;
|
|
42
42
|
key?: string;
|
|
43
43
|
isClone?: boolean;
|
|
44
|
+
modifications: {
|
|
45
|
+
target: IPrefabModifyTarget;
|
|
46
|
+
methods?: {
|
|
47
|
+
[methodName: string]: Array<IMethodParams>;
|
|
48
|
+
};
|
|
49
|
+
props?: {
|
|
50
|
+
[key: string]: IBasicType | IMethodParams;
|
|
51
|
+
};
|
|
52
|
+
}[];
|
|
53
|
+
removedEntities: IPrefabModifyTarget[];
|
|
54
|
+
removedComponents: IPrefabModifyTarget[];
|
|
55
|
+
}
|
|
56
|
+
export interface IPrefabModifyTarget {
|
|
57
|
+
entityId?: string;
|
|
58
|
+
componentId?: string;
|
|
59
|
+
}
|
|
60
|
+
export interface IStrippedEntity extends IBasicEntity {
|
|
61
|
+
strippedId: string;
|
|
62
|
+
prefabInstanceId: string;
|
|
63
|
+
prefabSource: {
|
|
64
|
+
assetId: string;
|
|
65
|
+
entityId: string;
|
|
66
|
+
};
|
|
44
67
|
}
|
|
45
68
|
export type IComponent = {
|
|
46
69
|
id: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BackgroundMode, DiffuseMode, ShadowCascadesMode, ShadowResolution } from "@galacean/engine-core";
|
|
1
|
+
import { BackgroundMode, DiffuseMode, FogMode, ShadowCascadesMode, ShadowResolution } from "@galacean/engine-core";
|
|
2
2
|
import type { IReferable } from "@galacean/engine-core/types/asset/IReferable";
|
|
3
3
|
import type { IColor, IPrefabFile, IVector3 } from "./BasicSchema";
|
|
4
4
|
export declare enum SpecularMode {
|
|
@@ -32,6 +32,14 @@ export interface IScene extends IPrefabFile {
|
|
|
32
32
|
shadowCascades: ShadowCascadesMode;
|
|
33
33
|
shadowTwoCascadeSplits: number;
|
|
34
34
|
shadowFourCascadeSplits: IVector3;
|
|
35
|
+
shadowFadeBorder: number;
|
|
36
|
+
};
|
|
37
|
+
fog?: {
|
|
38
|
+
fogMode: FogMode;
|
|
39
|
+
fogStart: number;
|
|
40
|
+
fogEnd: number;
|
|
41
|
+
fogDensity: number;
|
|
42
|
+
fogColor: IColor;
|
|
35
43
|
};
|
|
36
44
|
};
|
|
37
45
|
files: Array<{
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { AssetPromise } from "@galacean/engine-core";
|
|
2
|
-
import { GLTFResource } from "./GLTFResource";
|
|
3
|
-
import { GLTFParser } from "./parser/GLTFParser";
|
|
4
|
-
import { GLTFParserContext } from "./parser/GLTFParserContext";
|
|
5
|
-
/**
|
|
6
|
-
* GLTF pipeline.
|
|
7
|
-
*/
|
|
8
|
-
export declare class GLTFPipeline {
|
|
9
|
-
/**
|
|
10
|
-
* Default pipeline.
|
|
11
|
-
*/
|
|
12
|
-
static defaultPipeline: GLTFPipeline;
|
|
13
|
-
private _parsers;
|
|
14
|
-
/**
|
|
15
|
-
* Constructor of GLTFPipeline.
|
|
16
|
-
* @param parsers - Parsers to be executed in order
|
|
17
|
-
*/
|
|
18
|
-
constructor(...parsers: (new () => GLTFParser)[]);
|
|
19
|
-
/**
|
|
20
|
-
* @internal
|
|
21
|
-
*/
|
|
22
|
-
_parse(context: GLTFParserContext): AssetPromise<GLTFResource>;
|
|
23
|
-
}
|
|
File without changes
|