@galacean/engine-loader 0.0.0-experimental-animator-additive.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/LICENSE +21 -0
- package/README.md +1 -0
- package/dist/main.js +4511 -0
- package/dist/main.js.map +1 -0
- package/dist/miniprogram.js +4511 -0
- package/dist/module.js +4501 -0
- package/dist/module.js.map +1 -0
- package/package.json +26 -0
- package/types/AnimationClipLoader.d.ts +0 -0
- package/types/AnimatorControllerLoader.d.ts +1 -0
- package/types/BufferLoader.d.ts +1 -0
- package/types/EnvLoader.d.ts +1 -0
- package/types/FontLoader.d.ts +1 -0
- package/types/GLTFContentRestorer.d.ts +85 -0
- package/types/GLTFLoader.d.ts +15 -0
- package/types/HDRLoader.d.ts +1 -0
- package/types/JSONLoader.d.ts +1 -0
- package/types/KTXCubeLoader.d.ts +1 -0
- package/types/KTXLoader.d.ts +4 -0
- package/types/MaterialLoader.d.ts +1 -0
- package/types/MeshLoader.d.ts +1 -0
- package/types/SceneLoader.d.ts +1 -0
- package/types/SourceFontLoader.d.ts +1 -0
- package/types/SpriteAtlasLoader.d.ts +1 -0
- package/types/SpriteLoader.d.ts +1 -0
- package/types/TextLoader.d.ts +1 -0
- package/types/Texture2DContentRestorer.d.ts +14 -0
- package/types/Texture2DLoader.d.ts +10 -0
- package/types/TextureCubeContentRestorer.d.ts +14 -0
- package/types/TextureCubeLoader.d.ts +1 -0
- package/types/compressed-texture/KhronosTextureContainer.d.ts +20 -0
- package/types/compressed-texture/index.d.ts +3 -0
- package/types/compressed-texture/type.d.ts +87 -0
- package/types/gltf/GLTFParser.d.ts +9 -0
- package/types/gltf/GLTFPipeline.d.ts +23 -0
- package/types/gltf/GLTFResource.d.ts +39 -0
- package/types/gltf/GLTFSchema.d.ts +816 -0
- package/types/gltf/GLTFUtil.d.ts +53 -0
- package/types/gltf/Schema.d.ts +814 -0
- package/types/gltf/extensions/ExtensionParser.d.ts +8 -0
- package/types/gltf/extensions/GALACEAN_materials_remap.d.ts +1 -0
- package/types/gltf/extensions/GLTFExtensionParser.d.ts +52 -0
- package/types/gltf/extensions/GLTFExtensionSchema.d.ts +149 -0
- package/types/gltf/extensions/KHR_draco_mesh_compression.d.ts +1 -0
- package/types/gltf/extensions/KHR_lights_punctual.d.ts +1 -0
- package/types/gltf/extensions/KHR_materials_clearcoat.d.ts +1 -0
- package/types/gltf/extensions/KHR_materials_ior.d.ts +0 -0
- package/types/gltf/extensions/KHR_materials_pbrSpecularGlossiness.d.ts +1 -0
- package/types/gltf/extensions/KHR_materials_sheen.d.ts +0 -0
- package/types/gltf/extensions/KHR_materials_transmission.d.ts +0 -0
- package/types/gltf/extensions/KHR_materials_unlit.d.ts +1 -0
- package/types/gltf/extensions/KHR_materials_variants.d.ts +1 -0
- package/types/gltf/extensions/KHR_materials_volume.d.ts +0 -0
- package/types/gltf/extensions/KHR_mesh_quantization.d.ts +1 -0
- package/types/gltf/extensions/KHR_texture_basisu.d.ts +0 -0
- package/types/gltf/extensions/KHR_texture_transform.d.ts +1 -0
- package/types/gltf/extensions/OASIS_animation.d.ts +1 -0
- package/types/gltf/extensions/OASIS_materials_remap.d.ts +1 -0
- package/types/gltf/extensions/Schema.d.ts +142 -0
- package/types/gltf/extensions/index.d.ts +14 -0
- package/types/gltf/index.d.ts +6 -0
- package/types/gltf/parser/AnimationParser.d.ts +7 -0
- package/types/gltf/parser/BufferParser.d.ts +7 -0
- package/types/gltf/parser/EntityParser.d.ts +9 -0
- package/types/gltf/parser/GLTFAnimationParser.d.ts +12 -0
- package/types/gltf/parser/GLTFBufferParser.d.ts +7 -0
- package/types/gltf/parser/GLTFEntityParser.d.ts +9 -0
- package/types/gltf/parser/GLTFMaterialParser.d.ts +15 -0
- package/types/gltf/parser/GLTFMeshParser.d.ts +19 -0
- package/types/gltf/parser/GLTFParser.d.ts +63 -0
- package/types/gltf/parser/GLTFParserContext.d.ts +48 -0
- package/types/gltf/parser/GLTFSceneParser.d.ts +11 -0
- package/types/gltf/parser/GLTFSkinParser.d.ts +6 -0
- package/types/gltf/parser/GLTFTextureParser.d.ts +8 -0
- package/types/gltf/parser/GLTFValidator.d.ts +6 -0
- package/types/gltf/parser/MaterialParser.d.ts +8 -0
- package/types/gltf/parser/MeshParser.d.ts +13 -0
- package/types/gltf/parser/Parser.d.ts +21 -0
- package/types/gltf/parser/ParserContext.d.ts +46 -0
- package/types/gltf/parser/SceneParser.d.ts +11 -0
- package/types/gltf/parser/SkinParser.d.ts +6 -0
- package/types/gltf/parser/TextureParser.d.ts +8 -0
- package/types/gltf/parser/Validator.d.ts +5 -0
- package/types/gltf/parser/index.d.ts +11 -0
- package/types/index.d.ts +23 -0
- package/types/resource-deserialize/index.d.ts +18 -0
- package/types/resource-deserialize/resources/animationClip/AnimationClipDecoder.d.ts +17 -0
- package/types/resource-deserialize/resources/animationClip/ComponentMap.d.ts +2 -0
- package/types/resource-deserialize/resources/animationClip/type.d.ts +30 -0
- package/types/resource-deserialize/resources/animatorController/AnimatorControllerDecoder.d.ts +6 -0
- package/types/resource-deserialize/resources/animatorController/type.d.ts +0 -0
- package/types/resource-deserialize/resources/mesh/MeshDecoder.d.ts +9 -0
- package/types/resource-deserialize/resources/mesh/type.d.ts +31 -0
- package/types/resource-deserialize/resources/prefab/PrefabDesign.d.ts +70 -0
- package/types/resource-deserialize/resources/prefab/PrefabParser.d.ts +5 -0
- package/types/resource-deserialize/resources/prefab/ReflectionParser.d.ts +14 -0
- package/types/resource-deserialize/resources/scene/EditorTextureLoader.d.ts +4 -0
- package/types/resource-deserialize/resources/scene/MeshLoader.d.ts +4 -0
- package/types/resource-deserialize/resources/scene/SceneParser.d.ts +28 -0
- package/types/resource-deserialize/resources/scene/SceneParserContext.d.ts +13 -0
- package/types/resource-deserialize/resources/texture2D/TextureDecoder.d.ts +5 -0
- package/types/resource-deserialize/utils/BufferReader.d.ts +32 -0
- package/types/resource-deserialize/utils/Decorator.d.ts +11 -0
- package/types/resource-deserialize/utils/FileHeader.d.ts +9 -0
- package/types/resource-deserialize/utils/Utils.d.ts +5 -0
package/package.json
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@galacean/engine-loader",
|
|
3
|
+
"version": "0.0.0-experimental-animator-additive.1",
|
|
4
|
+
"publishConfig": {
|
|
5
|
+
"access": "public",
|
|
6
|
+
"registry": "https://registry.npmjs.org"
|
|
7
|
+
},
|
|
8
|
+
"license": "MIT",
|
|
9
|
+
"types": "types/index.d.ts",
|
|
10
|
+
"main": "dist/main.js",
|
|
11
|
+
"module": "dist/module.js",
|
|
12
|
+
"debug": "src/index.ts",
|
|
13
|
+
"files": [
|
|
14
|
+
"dist/**/*",
|
|
15
|
+
"types/**/*"
|
|
16
|
+
],
|
|
17
|
+
"dependencies": {
|
|
18
|
+
"@galacean/engine-core": "0.0.0-experimental-animator-additive.1",
|
|
19
|
+
"@galacean/engine-draco": "0.0.0-experimental-animator-additive.1",
|
|
20
|
+
"@galacean/engine-math": "0.0.0-experimental-animator-additive.1",
|
|
21
|
+
"@galacean/engine-rhi-webgl": "0.0.0-experimental-animator-additive.1"
|
|
22
|
+
},
|
|
23
|
+
"scripts": {
|
|
24
|
+
"b:types": "tsc"
|
|
25
|
+
}
|
|
26
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { AssetPromise, BlendShape, Buffer, ContentRestorer, ModelMesh, Texture2D } from "@oasis-engine/core";
|
|
2
|
+
import { RequestConfig } from "@oasis-engine/core/types/asset/request";
|
|
3
|
+
import { Vector2 } from "@oasis-engine/math";
|
|
4
|
+
import { GLTFResource } from "./gltf/GLTFResource";
|
|
5
|
+
import { IBufferView } from "./gltf/GLTFSchema";
|
|
6
|
+
/**
|
|
7
|
+
* @internal
|
|
8
|
+
*/
|
|
9
|
+
export declare class GLTFContentRestorer extends ContentRestorer<GLTFResource> {
|
|
10
|
+
isGLB: boolean;
|
|
11
|
+
bufferRequests: BufferRequestInfo[];
|
|
12
|
+
glbBufferSlices: Vector2[];
|
|
13
|
+
bufferTextures: BufferTextureRestoreInfo[];
|
|
14
|
+
meshes: ModelMeshRestoreInfo[];
|
|
15
|
+
/**
|
|
16
|
+
* @override
|
|
17
|
+
*/
|
|
18
|
+
restoreContent(): AssetPromise<GLTFResource>;
|
|
19
|
+
private _getBufferData;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* @internal
|
|
23
|
+
*/
|
|
24
|
+
export declare class BufferRequestInfo {
|
|
25
|
+
url: string;
|
|
26
|
+
config: RequestConfig;
|
|
27
|
+
constructor(url: string, config: RequestConfig);
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* @internal
|
|
31
|
+
*/
|
|
32
|
+
export declare class BufferTextureRestoreInfo {
|
|
33
|
+
texture: Texture2D;
|
|
34
|
+
bufferView: IBufferView;
|
|
35
|
+
mimeType: string;
|
|
36
|
+
constructor(texture: Texture2D, bufferView: IBufferView, mimeType: string);
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* @internal
|
|
40
|
+
*/
|
|
41
|
+
export declare class ModelMeshRestoreInfo {
|
|
42
|
+
mesh: ModelMesh;
|
|
43
|
+
vertexBuffers: BufferRestoreInfo[];
|
|
44
|
+
indexBuffer: BufferDataRestoreInfo;
|
|
45
|
+
blendShapes: BlendShapeRestoreInfo[];
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* @internal
|
|
49
|
+
*/
|
|
50
|
+
export declare class BufferRestoreInfo {
|
|
51
|
+
buffer: Buffer;
|
|
52
|
+
data: BufferDataRestoreInfo;
|
|
53
|
+
constructor(buffer: Buffer, data: BufferDataRestoreInfo);
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* @internal
|
|
57
|
+
*/
|
|
58
|
+
export declare class BufferDataRestoreInfo {
|
|
59
|
+
main: RestoreDataAccessor;
|
|
60
|
+
typeSize?: number;
|
|
61
|
+
sparseCount?: number;
|
|
62
|
+
sparseIndices?: RestoreDataAccessor;
|
|
63
|
+
sparseValues?: RestoreDataAccessor;
|
|
64
|
+
constructor(main: RestoreDataAccessor, typeSize?: number, sparseCount?: number, sparseIndices?: RestoreDataAccessor, sparseValues?: RestoreDataAccessor);
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* @internal
|
|
68
|
+
*/
|
|
69
|
+
export declare class RestoreDataAccessor {
|
|
70
|
+
bufferIndex: number;
|
|
71
|
+
TypedArray: new (buffer: ArrayBuffer, byteOffset: number, length?: number) => ArrayBufferView;
|
|
72
|
+
byteOffset: number;
|
|
73
|
+
length: number;
|
|
74
|
+
constructor(bufferIndex: number, TypedArray: new (buffer: ArrayBuffer, byteOffset: number, length?: number) => ArrayBufferView, byteOffset: number, length: number);
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* @internal
|
|
78
|
+
*/
|
|
79
|
+
export declare class BlendShapeRestoreInfo {
|
|
80
|
+
blendShape: BlendShape;
|
|
81
|
+
position: BufferDataRestoreInfo;
|
|
82
|
+
normal?: BufferDataRestoreInfo;
|
|
83
|
+
tangent?: BufferDataRestoreInfo;
|
|
84
|
+
constructor(blendShape: BlendShape, position: BufferDataRestoreInfo, normal?: BufferDataRestoreInfo, tangent?: BufferDataRestoreInfo);
|
|
85
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { AssetPromise, Loader, LoadItem, ResourceManager } from "@galacean/engine-core";
|
|
2
|
+
import { GLTFResource } from "./gltf/GLTFResource";
|
|
3
|
+
export declare class GLTFLoader extends Loader<GLTFResource> {
|
|
4
|
+
load(item: LoadItem, resourceManager: ResourceManager): Record<string, AssetPromise<any>>;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* GlTF loader params.
|
|
8
|
+
*/
|
|
9
|
+
export interface GLTFParams {
|
|
10
|
+
/**
|
|
11
|
+
* @beta Now only contains vertex information, need to improve.
|
|
12
|
+
* Keep raw mesh data for glTF parser, default is false.
|
|
13
|
+
*/
|
|
14
|
+
keepMeshData: boolean;
|
|
15
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { AssetPromise, ContentRestorer, Texture2D } from "@oasis-engine/core";
|
|
2
|
+
import { RequestConfig } from "@oasis-engine/core/types/asset/request";
|
|
3
|
+
/**
|
|
4
|
+
* @internal
|
|
5
|
+
*/
|
|
6
|
+
export declare class Texture2DContentRestorer extends ContentRestorer<Texture2D> {
|
|
7
|
+
url: string;
|
|
8
|
+
requestConfig: RequestConfig;
|
|
9
|
+
constructor(resource: Texture2D, url: string, requestConfig: RequestConfig);
|
|
10
|
+
/**
|
|
11
|
+
* @override
|
|
12
|
+
*/
|
|
13
|
+
restoreContent(): AssetPromise<Texture2D>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { TextureFormat } from "@galacean/engine-core";
|
|
2
|
+
/**
|
|
3
|
+
* Texture2D loader params interface.
|
|
4
|
+
*/
|
|
5
|
+
export interface Texture2DParams {
|
|
6
|
+
/** Texture format. default `TextureFormat.R8G8B8A8` */
|
|
7
|
+
format: TextureFormat;
|
|
8
|
+
/** Whether to use multi-level texture, default is true. */
|
|
9
|
+
mipmap: boolean;
|
|
10
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { AssetPromise, ContentRestorer, TextureCube } from "@oasis-engine/core";
|
|
2
|
+
import { RequestConfig } from "@oasis-engine/core/types/asset/request";
|
|
3
|
+
/**
|
|
4
|
+
* @internal
|
|
5
|
+
*/
|
|
6
|
+
export declare class TextureCubeContentRestorer extends ContentRestorer<TextureCube> {
|
|
7
|
+
urls: string[];
|
|
8
|
+
requestConfig: RequestConfig;
|
|
9
|
+
constructor(resource: TextureCube, urls: string[], requestConfig: RequestConfig);
|
|
10
|
+
/**
|
|
11
|
+
* @override
|
|
12
|
+
*/
|
|
13
|
+
restoreContent(): AssetPromise<TextureCube>;
|
|
14
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* ported from https://github.com/BabylonJS/Babylon.js/blob/master/src/Tools/babylon.khronosTextureContainer.ts
|
|
4
|
+
*/
|
|
5
|
+
import { KTXContainer } from "./type";
|
|
6
|
+
/**
|
|
7
|
+
* for description see https://www.khronos.org/opengles/sdk/tools/KTX/
|
|
8
|
+
* for file layout see https://www.khronos.org/opengles/sdk/tools/KTX/file_format_spec/
|
|
9
|
+
*/
|
|
10
|
+
export declare const khronosTextureContainerParser: {
|
|
11
|
+
/**
|
|
12
|
+
*
|
|
13
|
+
* @param buffer contents of the KTX container file
|
|
14
|
+
* @param facesExpected should be either 1 or 6, based whether a cube texture or or
|
|
15
|
+
* @param threeDExpected provision for indicating that data should be a 3D texture, not implemented
|
|
16
|
+
* @param textureArrayExpected provision for indicating that data should be a texture array, not implemented
|
|
17
|
+
* @param mapEngineFormat get Galacean Engine native TextureFormat?
|
|
18
|
+
*/
|
|
19
|
+
parse(buffer: ArrayBuffer, facesExpected: number, withMipmaps: boolean, mapEngineFormat?: boolean): KTXContainer;
|
|
20
|
+
};
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { TextureFormat } from "@galacean/engine-core";
|
|
2
|
+
import { GLCompressedTextureInternalFormat } from "@galacean/engine-rhi-webgl";
|
|
3
|
+
export type CompressedTextureData = {
|
|
4
|
+
internalFormat: GLCompressedTextureInternalFormat;
|
|
5
|
+
width: number;
|
|
6
|
+
height: number;
|
|
7
|
+
mipmaps: Mipmap[];
|
|
8
|
+
engineFormat: TextureFormat;
|
|
9
|
+
};
|
|
10
|
+
export type CompressedCubeData = {
|
|
11
|
+
engineFormat: TextureFormat;
|
|
12
|
+
internalFormat: number;
|
|
13
|
+
width: number;
|
|
14
|
+
height: number;
|
|
15
|
+
mipmapsFaces: Mipmap[][];
|
|
16
|
+
};
|
|
17
|
+
export type Mipmap = {
|
|
18
|
+
data: ArrayBufferView;
|
|
19
|
+
width: number;
|
|
20
|
+
height: number;
|
|
21
|
+
};
|
|
22
|
+
export type KTXContainer = {
|
|
23
|
+
/**
|
|
24
|
+
* origin buffer data
|
|
25
|
+
*/
|
|
26
|
+
buffer: ArrayBuffer;
|
|
27
|
+
/**
|
|
28
|
+
* Gets the openGL type
|
|
29
|
+
*/
|
|
30
|
+
glType: number;
|
|
31
|
+
/**
|
|
32
|
+
* Gets the openGL type size
|
|
33
|
+
*/
|
|
34
|
+
glTypeSize: number;
|
|
35
|
+
/**
|
|
36
|
+
* Gets the openGL format
|
|
37
|
+
*/
|
|
38
|
+
glFormat: number;
|
|
39
|
+
/**
|
|
40
|
+
* Gets the openGL internal format
|
|
41
|
+
*/
|
|
42
|
+
glInternalFormat: number;
|
|
43
|
+
/**
|
|
44
|
+
* Gets the base internal format
|
|
45
|
+
*/
|
|
46
|
+
glBaseInternalFormat: GLCompressedTextureInternalFormat;
|
|
47
|
+
/**
|
|
48
|
+
* Gets image width in pixel
|
|
49
|
+
*/
|
|
50
|
+
pixelWidth: number;
|
|
51
|
+
/**
|
|
52
|
+
* Gets image height in pixel
|
|
53
|
+
*/
|
|
54
|
+
pixelHeight: number;
|
|
55
|
+
/**
|
|
56
|
+
* Gets image depth in pixels
|
|
57
|
+
*/
|
|
58
|
+
pixelDepth: number;
|
|
59
|
+
/**
|
|
60
|
+
* Gets the number of array elements
|
|
61
|
+
*/
|
|
62
|
+
numberOfArrayElements: number;
|
|
63
|
+
/**
|
|
64
|
+
* Gets the number of faces
|
|
65
|
+
*/
|
|
66
|
+
numberOfFaces: number;
|
|
67
|
+
/**
|
|
68
|
+
* Gets the number of mipmap levels
|
|
69
|
+
*/
|
|
70
|
+
numberOfMipmapLevels: number;
|
|
71
|
+
/**
|
|
72
|
+
* Gets the bytes of key value data
|
|
73
|
+
*/
|
|
74
|
+
bytesOfKeyValueData: number;
|
|
75
|
+
/**
|
|
76
|
+
* Gets the load type
|
|
77
|
+
*/
|
|
78
|
+
loadType: number;
|
|
79
|
+
/**
|
|
80
|
+
* parsed mipmap data
|
|
81
|
+
*/
|
|
82
|
+
mipmaps?: Mipmap[];
|
|
83
|
+
/**
|
|
84
|
+
* Galacean Engine native TextureFormat
|
|
85
|
+
*/
|
|
86
|
+
engineFormat?: TextureFormat;
|
|
87
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { AssetPromise } from "@galacean/engine-core";
|
|
2
|
+
import { GLTFResource } from "./GLTFResource";
|
|
3
|
+
import { ParserContext } from "./parser/ParserContext";
|
|
4
|
+
export declare class GLTFParser {
|
|
5
|
+
static defaultPipeline: GLTFParser;
|
|
6
|
+
private _pipes;
|
|
7
|
+
private constructor();
|
|
8
|
+
parse(context: ParserContext): AssetPromise<GLTFResource>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { AssetPromise } from "@oasis-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
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { AnimationClip, Camera, Engine, EngineObject, Entity, Light, Material, ModelMesh, Renderer, Skin, Texture2D } from "@galacean/engine-core";
|
|
2
|
+
/**
|
|
3
|
+
* Product after GLTF parser, usually, `defaultSceneRoot` is only needed to use.
|
|
4
|
+
*/
|
|
5
|
+
export declare class GLTFResource extends EngineObject {
|
|
6
|
+
/** GLTF file url. */
|
|
7
|
+
url: string;
|
|
8
|
+
/** Texture2D after TextureParser. */
|
|
9
|
+
textures?: Texture2D[];
|
|
10
|
+
/** Material after MaterialParser. */
|
|
11
|
+
materials?: Material[];
|
|
12
|
+
/** ModelMesh after MeshParser. */
|
|
13
|
+
meshes?: ModelMesh[][];
|
|
14
|
+
/** Skin after SkinParser. */
|
|
15
|
+
skins?: Skin[];
|
|
16
|
+
/** AnimationClip after AnimationParser. */
|
|
17
|
+
animations?: AnimationClip[];
|
|
18
|
+
/** Entity after EntityParser. */
|
|
19
|
+
entities: Entity[];
|
|
20
|
+
/** Camera after SceneParser. */
|
|
21
|
+
cameras?: Camera[];
|
|
22
|
+
/** Export lights in extension KHR_lights_punctual */
|
|
23
|
+
lights?: Light[];
|
|
24
|
+
/** RootEntities after SceneParser. */
|
|
25
|
+
sceneRoots: Entity[];
|
|
26
|
+
/** RootEntity after SceneParser. */
|
|
27
|
+
defaultSceneRoot: Entity;
|
|
28
|
+
/** Renderer can replace material by `renderer.setMaterial` if gltf use plugin-in KHR_materials_variants. */
|
|
29
|
+
variants?: {
|
|
30
|
+
renderer: Renderer;
|
|
31
|
+
material: Material;
|
|
32
|
+
variants: string[];
|
|
33
|
+
}[];
|
|
34
|
+
constructor(engine: Engine, url: string);
|
|
35
|
+
/**
|
|
36
|
+
* @override
|
|
37
|
+
*/
|
|
38
|
+
destroy(): void;
|
|
39
|
+
}
|