@galacean/engine-loader 1.3.2 → 1.3.4

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.
Files changed (142) hide show
  1. package/dist/main.js +87 -49
  2. package/dist/main.js.map +1 -1
  3. package/dist/miniprogram.js +87 -49
  4. package/dist/module.js +87 -49
  5. package/dist/module.js.map +1 -1
  6. package/package.json +4 -4
  7. package/types/gltf/GLTFSchema.d.ts +1 -1
  8. package/types/gltf/extensions/index.d.ts +1 -0
  9. package/types/gltf/parser/GLTFTextureParser.d.ts +4 -2
  10. package/types/draco/src/DRACOWorker.d.ts +0 -23
  11. package/types/draco/src/KHR_draco_mesh_compression.d.ts +0 -9
  12. package/types/draco/src/decoder.d.ts +0 -18
  13. package/types/gltf/GLTFParser.d.ts +0 -9
  14. package/types/gltf/GLTFPipeline.d.ts +0 -23
  15. package/types/gltf/GLTFUtil.d.ts +0 -53
  16. package/types/gltf/Schema.d.ts +0 -814
  17. package/types/gltf/extensions/ExtensionParser.d.ts +0 -8
  18. package/types/gltf/extensions/Schema.d.ts +0 -142
  19. package/types/gltf/extensions/test.d.ts +0 -0
  20. package/types/gltf/parser/AnimationParser.d.ts +0 -7
  21. package/types/gltf/parser/BufferParser.d.ts +0 -7
  22. package/types/gltf/parser/EntityParser.d.ts +0 -9
  23. package/types/gltf/parser/MaterialParser.d.ts +0 -8
  24. package/types/gltf/parser/MeshParser.d.ts +0 -13
  25. package/types/gltf/parser/Parser.d.ts +0 -21
  26. package/types/gltf/parser/ParserContext.d.ts +0 -46
  27. package/types/gltf/parser/SceneParser.d.ts +0 -11
  28. package/types/gltf/parser/SkinParser.d.ts +0 -6
  29. package/types/gltf/parser/TextureParser.d.ts +0 -8
  30. package/types/gltf/parser/Validator.d.ts +0 -5
  31. package/types/ktx2/BinomialLLCTranscoder/BinomialLLCTranscoder.d.ts +0 -13
  32. package/types/ktx2/BinomialLLCTranscoder/TranscodeWorkerCode.d.ts +0 -33
  33. package/types/ktx2/KTX2Parser.d.ts +0 -4
  34. package/types/ktx2/KhronosTranscoder/KhronosTranscoder.d.ts +0 -17
  35. package/types/ktx2/KhronosTranscoder/TranscoderWorkerCode.d.ts +0 -34
  36. package/types/ktx2/TargetFormat.d.ts +0 -8
  37. package/types/ktx2/TranscodeResult.d.ts +0 -10
  38. package/types/ktx2/constants.d.ts +0 -7
  39. package/types/ktx2/zstddec.d.ts +0 -62
  40. package/types/loader/src/AnimationClipLoader.d.ts +0 -1
  41. package/types/loader/src/AnimatorControllerLoader.d.ts +0 -1
  42. package/types/loader/src/BufferLoader.d.ts +0 -1
  43. package/types/loader/src/EnvLoader.d.ts +0 -1
  44. package/types/loader/src/FontLoader.d.ts +0 -1
  45. package/types/loader/src/GLTFContentRestorer.d.ts +0 -92
  46. package/types/loader/src/GLTFLoader.d.ts +0 -22
  47. package/types/loader/src/HDRLoader.d.ts +0 -1
  48. package/types/loader/src/JSONLoader.d.ts +0 -1
  49. package/types/loader/src/KTXCubeLoader.d.ts +0 -1
  50. package/types/loader/src/KTXLoader.d.ts +0 -4
  51. package/types/loader/src/MaterialLoader.d.ts +0 -1
  52. package/types/loader/src/MeshLoader.d.ts +0 -1
  53. package/types/loader/src/ProjectLoader.d.ts +0 -1
  54. package/types/loader/src/SceneLoader.d.ts +0 -1
  55. package/types/loader/src/SourceFontLoader.d.ts +0 -1
  56. package/types/loader/src/SpriteAtlasLoader.d.ts +0 -1
  57. package/types/loader/src/SpriteLoader.d.ts +0 -1
  58. package/types/loader/src/TextLoader.d.ts +0 -1
  59. package/types/loader/src/Texture2DContentRestorer.d.ts +0 -11
  60. package/types/loader/src/Texture2DLoader.d.ts +0 -18
  61. package/types/loader/src/TextureCubeContentRestorer.d.ts +0 -11
  62. package/types/loader/src/TextureCubeLoader.d.ts +0 -1
  63. package/types/loader/src/compressed-texture/KhronosTextureContainer.d.ts +0 -20
  64. package/types/loader/src/compressed-texture/index.d.ts +0 -3
  65. package/types/loader/src/compressed-texture/type.d.ts +0 -87
  66. package/types/loader/src/gltf/GLTFResource.d.ts +0 -65
  67. package/types/loader/src/gltf/GLTFSchema.d.ts +0 -822
  68. package/types/loader/src/gltf/GLTFUtils.d.ts +0 -49
  69. package/types/loader/src/gltf/extensions/EXT_meshopt_compression.d.ts +0 -13
  70. package/types/loader/src/gltf/extensions/GALACEAN_animation_event.d.ts +0 -1
  71. package/types/loader/src/gltf/extensions/GALACEAN_materials_remap.d.ts +0 -1
  72. package/types/loader/src/gltf/extensions/GLTFExtensionParser.d.ts +0 -46
  73. package/types/loader/src/gltf/extensions/GLTFExtensionSchema.d.ts +0 -157
  74. package/types/loader/src/gltf/extensions/KHR_lights_punctual.d.ts +0 -1
  75. package/types/loader/src/gltf/extensions/KHR_materials_anisotropy.d.ts +0 -1
  76. package/types/loader/src/gltf/extensions/KHR_materials_clearcoat.d.ts +0 -1
  77. package/types/loader/src/gltf/extensions/KHR_materials_ior.d.ts +0 -1
  78. package/types/loader/src/gltf/extensions/KHR_materials_pbrSpecularGlossiness.d.ts +0 -1
  79. package/types/loader/src/gltf/extensions/KHR_materials_sheen.d.ts +0 -0
  80. package/types/loader/src/gltf/extensions/KHR_materials_transmission.d.ts +0 -0
  81. package/types/loader/src/gltf/extensions/KHR_materials_unlit.d.ts +0 -1
  82. package/types/loader/src/gltf/extensions/KHR_materials_variants.d.ts +0 -6
  83. package/types/loader/src/gltf/extensions/KHR_materials_volume.d.ts +0 -0
  84. package/types/loader/src/gltf/extensions/KHR_mesh_quantization.d.ts +0 -1
  85. package/types/loader/src/gltf/extensions/KHR_texture_basisu.d.ts +0 -1
  86. package/types/loader/src/gltf/extensions/KHR_texture_transform.d.ts +0 -1
  87. package/types/loader/src/gltf/extensions/MeshoptDecoder.d.ts +0 -8
  88. package/types/loader/src/gltf/extensions/index.d.ts +0 -19
  89. package/types/loader/src/gltf/index.d.ts +0 -5
  90. package/types/loader/src/gltf/parser/GLTFAnimationParser.d.ts +0 -12
  91. package/types/loader/src/gltf/parser/GLTFBufferParser.d.ts +0 -6
  92. package/types/loader/src/gltf/parser/GLTFBufferViewParser.d.ts +0 -5
  93. package/types/loader/src/gltf/parser/GLTFEntityParser.d.ts +0 -6
  94. package/types/loader/src/gltf/parser/GLTFMaterialParser.d.ts +0 -18
  95. package/types/loader/src/gltf/parser/GLTFMeshParser.d.ts +0 -19
  96. package/types/loader/src/gltf/parser/GLTFParser.d.ts +0 -57
  97. package/types/loader/src/gltf/parser/GLTFParserContext.d.ts +0 -70
  98. package/types/loader/src/gltf/parser/GLTFSceneParser.d.ts +0 -11
  99. package/types/loader/src/gltf/parser/GLTFSchemaParser.d.ts +0 -7
  100. package/types/loader/src/gltf/parser/GLTFSkinParser.d.ts +0 -7
  101. package/types/loader/src/gltf/parser/GLTFTextureParser.d.ts +0 -12
  102. package/types/loader/src/gltf/parser/GLTFValidator.d.ts +0 -5
  103. package/types/loader/src/gltf/parser/index.d.ts +0 -13
  104. package/types/loader/src/index.d.ts +0 -28
  105. package/types/loader/src/ktx2/KTX2Container.d.ts +0 -72
  106. package/types/loader/src/ktx2/KTX2Loader.d.ts +0 -65
  107. package/types/loader/src/ktx2/KTX2TargetFormat.d.ts +0 -21
  108. package/types/loader/src/ktx2/WorkerPool.d.ts +0 -32
  109. package/types/loader/src/ktx2/transcoder/AbstractTranscoder.d.ts +0 -55
  110. package/types/loader/src/ktx2/transcoder/BinomialLLCTranscoder.d.ts +0 -8
  111. package/types/loader/src/ktx2/transcoder/BinomialLLCWorkerCode.d.ts +0 -6
  112. package/types/loader/src/ktx2/transcoder/KhronosTranscoder.d.ts +0 -13
  113. package/types/loader/src/ktx2/transcoder/KhronosWorkerCode.d.ts +0 -1
  114. package/types/loader/src/resource-deserialize/index.d.ts +0 -18
  115. package/types/loader/src/resource-deserialize/resources/animationClip/AnimationClipDecoder.d.ts +0 -19
  116. package/types/loader/src/resource-deserialize/resources/animationClip/ComponentMap.d.ts +0 -2
  117. package/types/loader/src/resource-deserialize/resources/mesh/MeshDecoder.d.ts +0 -9
  118. package/types/loader/src/resource-deserialize/resources/mesh/type.d.ts +0 -31
  119. package/types/loader/src/resource-deserialize/resources/parser/PrefabParser.d.ts +0 -5
  120. package/types/loader/src/resource-deserialize/resources/parser/ReflectionParser.d.ts +0 -18
  121. package/types/loader/src/resource-deserialize/resources/scene/EditorTextureLoader.d.ts +0 -4
  122. package/types/loader/src/resource-deserialize/resources/scene/MeshLoader.d.ts +0 -4
  123. package/types/loader/src/resource-deserialize/resources/scene/SceneParser.d.ts +0 -29
  124. package/types/loader/src/resource-deserialize/resources/scene/SceneParserContext.d.ts +0 -15
  125. package/types/loader/src/resource-deserialize/resources/schema/BasicSchema.d.ts +0 -66
  126. package/types/loader/src/resource-deserialize/resources/schema/MaterialSchema.d.ts +0 -91
  127. package/types/loader/src/resource-deserialize/resources/schema/ProjectSchema.d.ts +0 -9
  128. package/types/loader/src/resource-deserialize/resources/schema/SceneSchema.d.ts +0 -43
  129. package/types/loader/src/resource-deserialize/resources/schema/index.d.ts +0 -4
  130. package/types/loader/src/resource-deserialize/resources/texture2D/TextureDecoder.d.ts +0 -5
  131. package/types/loader/src/resource-deserialize/utils/BufferReader.d.ts +0 -28
  132. package/types/loader/src/resource-deserialize/utils/Decorator.d.ts +0 -11
  133. package/types/loader/src/resource-deserialize/utils/FileHeader.d.ts +0 -9
  134. package/types/loader/src/resource-deserialize/utils/Utils.d.ts +0 -5
  135. package/types/prefab/PrefabParserContext.d.ts +0 -6
  136. package/types/prefab/index.d.ts +0 -3
  137. package/types/resource-deserialize/resources/animationClip/ComponentMap.d.ts +0 -2
  138. package/types/resource-deserialize/resources/parser/PrefabParser.d.ts +0 -5
  139. package/types/resource-deserialize/resources/parser/PrefabParserContext.d.ts +0 -5
  140. package/types/resource-deserialize/resources/prefab/PrefabDesign.d.ts +0 -70
  141. package/types/resource-deserialize/resources/prefab/ReflectionParser.d.ts +0 -14
  142. /package/types/gltf/extensions/{KHR_draco_mesh_compression.d.ts → EXT_texture_webp.d.ts} +0 -0
@@ -1,49 +0,0 @@
1
- import { IndexFormat, Texture2D, TypedArray, VertexElementFormat } from "@galacean/engine-core";
2
- import { Color, Vector2, Vector3, Vector4 } from "@galacean/engine-math";
3
- import { AccessorComponentType, AccessorType, IAccessor, IBufferView, IGLTF, ISampler, ISamplerInfo } from "./GLTFSchema";
4
- import { BufferInfo, GLTFParserContext } from "./parser/GLTFParserContext";
5
- /**
6
- * @internal
7
- */
8
- export declare class GLTFUtils {
9
- static floatBufferToVector2Array(buffer: Float32Array): Vector2[];
10
- static floatBufferToVector3Array(buffer: Float32Array): Vector3[];
11
- static floatBufferToVector4Array(buffer: Float32Array): Vector4[];
12
- static floatBufferToColorArray(buffer: Float32Array, isColor3: boolean): Color[];
13
- /**
14
- * Get the number of bytes occupied by accessor type.
15
- */
16
- static getAccessorTypeSize(accessorType: AccessorType): number;
17
- /**
18
- * Get the TypedArray corresponding to the component type.
19
- */
20
- static getComponentType(componentType: AccessorComponentType): Float32ArrayConstructor | Uint32ArrayConstructor | Uint8ArrayConstructor | Uint16ArrayConstructor | Int8ArrayConstructor | Int16ArrayConstructor;
21
- static getNormalizedComponentScale(componentType: AccessorComponentType): number;
22
- static getAccessorBuffer(context: GLTFParserContext, bufferViews: IBufferView[], accessor: IAccessor): Promise<BufferInfo>;
23
- static bufferToVector3Array(data: TypedArray, byteStride: number, accessorByteOffset: number, count: number): Vector3[];
24
- /**
25
- * @deprecated
26
- * Get accessor data.
27
- */
28
- static getAccessorData(glTF: IGLTF, accessor: IAccessor, buffers: ArrayBuffer[]): TypedArray;
29
- static getBufferViewData(bufferView: IBufferView, buffers: ArrayBuffer[]): ArrayBuffer;
30
- /**
31
- * Get accessor data.
32
- */
33
- static processingSparseData(context: GLTFParserContext, accessor: IAccessor, bufferInfo: BufferInfo): Promise<void>;
34
- static getIndexFormat(type: AccessorComponentType): IndexFormat;
35
- static getElementFormat(type: AccessorComponentType, size: number, normalized?: boolean): VertexElementFormat;
36
- /**
37
- * Load image buffer
38
- */
39
- static loadImageBuffer(imageBuffer: ArrayBuffer, type: string): Promise<HTMLImageElement>;
40
- /**
41
- * Parse the glb format.
42
- */
43
- static parseGLB(context: GLTFParserContext, glb: ArrayBuffer): {
44
- glTF: IGLTF;
45
- buffers: ArrayBuffer[];
46
- };
47
- static parseSampler(texture: Texture2D, samplerInfo: ISamplerInfo): void;
48
- static getSamplerInfo(sampler: ISampler): ISamplerInfo;
49
- }
@@ -1,13 +0,0 @@
1
- declare module "@galacean/engine-core" {
2
- interface EngineConfiguration {
3
- /** glTF loader options. */
4
- glTF?: {
5
- /** Meshopt options. If set this option and workCount is great than 0, workers will be created. */
6
- meshOpt?: {
7
- /** Worker count for transcoder, default is 4. */
8
- workerCount: number;
9
- };
10
- };
11
- }
12
- }
13
- export {};
@@ -1,46 +0,0 @@
1
- import { EngineObject } from "@galacean/engine-core";
2
- import { GLTFExtensionOwnerSchema } from "../GLTFSchema";
3
- import { GLTFParserContext } from "../parser/GLTFParserContext";
4
- import { GLTFExtensionSchema } from "./GLTFExtensionSchema";
5
- /**
6
- * Base class of glTF extension parser.
7
- */
8
- export declare abstract class GLTFExtensionParser {
9
- /**
10
- * @internal
11
- * The extension mode.
12
- */
13
- _mode: GLTFExtensionMode;
14
- /**
15
- * Create and parse the resource.
16
- * @remarks This method overrides the default resource creation.
17
- * @param context - The parser context
18
- * @param extensionSchema - The extension schema
19
- * @param extensionOwnerSchema - The extension owner schema
20
- * @returns The resource or promise
21
- */
22
- createAndParse(context: GLTFParserContext, extensionSchema: GLTFExtensionSchema, extensionOwnerSchema: GLTFExtensionOwnerSchema, ...extra: any[]): EngineObject | Promise<EngineObject | Uint8Array>;
23
- /**
24
- * Additive parse to the resource.
25
- * @param context - The parser context
26
- * @param parseResource - The parsed resource
27
- * @param extensionSchema - The extension schema
28
- * @param extensionOwnerSchema - The extension owner schema
29
- * @returns The void or promise
30
- */
31
- additiveParse(context: GLTFParserContext, parseResource: EngineObject, extensionSchema: GLTFExtensionSchema, extensionOwnerSchema: GLTFExtensionOwnerSchema, ...extra: any[]): void | Promise<void>;
32
- }
33
- /**
34
- * glTF Extension mode.
35
- */
36
- export declare enum GLTFExtensionMode {
37
- /**
38
- * Cerate instance and parse mode.
39
- * @remarks
40
- * If the glTF property has multiple extensions of `CreateAndParse` mode, only execute the last one.
41
- * If this method is registered, the default pipeline processing will be ignored.
42
- */
43
- CreateAndParse = 0,
44
- /** Additive parse mode. */
45
- AdditiveParse = 1
46
- }
@@ -1,157 +0,0 @@
1
- import type { IMaterialNormalTextureInfo, ITextureInfo } from "../GLTFSchema";
2
- /**
3
- * Interfaces from the KHR_lights_punctual extension
4
- */
5
- export interface IKHRLightsPunctual_LightNode {
6
- light: number;
7
- }
8
- export interface IKHRLightsPunctual_Light {
9
- type: "directional" | "point" | "spot";
10
- color?: number[];
11
- intensity?: number;
12
- range?: number;
13
- spot?: {
14
- innerConeAngle?: number;
15
- outerConeAngle?: number;
16
- };
17
- }
18
- export interface IKHRLightsPunctual {
19
- lights: IKHRLightsPunctual_Light[];
20
- }
21
- /**
22
- * Interfaces from the KHR_materials_clearcoat extension
23
- */
24
- export interface IKHRMaterialsClearcoat {
25
- clearcoatFactor: number;
26
- clearcoatTexture: ITextureInfo;
27
- clearcoatRoughnessFactor: number;
28
- clearcoatRoughnessTexture: ITextureInfo;
29
- clearcoatNormalTexture: IMaterialNormalTextureInfo;
30
- }
31
- /**
32
- * Interfaces from the KHR_materials_ior extension
33
- */
34
- export interface IKHRMaterialsIor {
35
- ior: number;
36
- }
37
- /**
38
- * Interfaces from the KHR_materials_unlit extension
39
- */
40
- export interface IKHRMaterialsUnlit {
41
- }
42
- /**
43
- * Interfaces from the KHR_materials_pbrSpecularGlossiness extension
44
- */
45
- export interface IKHRMaterialsPbrSpecularGlossiness {
46
- diffuseFactor: number[];
47
- diffuseTexture: ITextureInfo;
48
- specularFactor: number[];
49
- glossinessFactor: number;
50
- specularGlossinessTexture: ITextureInfo;
51
- }
52
- /**
53
- * Interfaces from the KHR_materials_sheen extension
54
- */
55
- export interface IKHRMaterialsSheen {
56
- sheenColorFactor?: number[];
57
- sheenColorTexture?: ITextureInfo;
58
- sheenRoughnessFactor?: number;
59
- sheenRoughnessTexture?: ITextureInfo;
60
- }
61
- /**
62
- * Interfaces from the KHR_materials_specular extension
63
- */
64
- export interface IKHRMaterialsSpecular {
65
- specularFactor: number;
66
- specularColorFactor: number[];
67
- specularTexture: ITextureInfo;
68
- }
69
- /**
70
- * Interfaces from the KHR_materials_transmission extension
71
- */
72
- export interface IKHRMaterialsTransmission {
73
- transmissionFactor?: number;
74
- transmissionTexture?: ITextureInfo;
75
- }
76
- /**
77
- * Interfaces from the KHR_materials_translucency extension
78
- */
79
- export interface IKHRMaterialsTranslucency {
80
- translucencyFactor?: number;
81
- translucencyTexture?: ITextureInfo;
82
- }
83
- /**
84
- * Interfaces from the KHR_materials_variants extension
85
- */
86
- export interface IKHRMaterialVariants_Mapping {
87
- mappings: Array<{
88
- variants: number[];
89
- material: number;
90
- }>;
91
- extensions?: any;
92
- extras?: any;
93
- }
94
- export interface IKHRMaterialVariants_Variant {
95
- name: string;
96
- extensions?: any;
97
- extras?: any;
98
- }
99
- /**
100
- * Interfaces from the KHR_materials_clearcoat extension
101
- */
102
- export interface IKHRMaterialsAnisotropy {
103
- anisotropyStrength: number;
104
- anisotropyRotation: number;
105
- anisotropyTexture: ITextureInfo;
106
- }
107
- export interface IKHRMaterialVariants_Variants {
108
- variants: Array<IKHRMaterialVariants_Variant>;
109
- }
110
- /**
111
- * Interfaces from the KHR_texture_basisu extension
112
- */
113
- export interface IKHRTextureBasisU {
114
- source: number;
115
- }
116
- /**
117
- * Interfaces from the KHR_texture_transform extension
118
- */
119
- export interface IKHRTextureTransform {
120
- offset?: number[];
121
- rotation?: number;
122
- scale?: number[];
123
- texCoord?: number;
124
- }
125
- /**
126
- * Interfaces from the KHR_xmp extension
127
- */
128
- export interface IKHRXmp {
129
- packets: Array<{
130
- [key: string]: unknown;
131
- }>;
132
- }
133
- export interface IKHRXmp_Node {
134
- packet: number;
135
- }
136
- export interface IEXTMeshoptCompressionSchema {
137
- buffer: number;
138
- byteOffset?: number;
139
- byteLength: number;
140
- byteStride: number;
141
- mode: "ATTRIBUTES" | "TRIANGLES" | "INDICES";
142
- count: number;
143
- filter?: "NONE" | "OCTAHEDRAL" | "QUATERNION" | "EXPONENTIAL";
144
- }
145
- export interface IGalaceanMaterialRemap {
146
- refId: string;
147
- key?: string;
148
- isClone?: boolean;
149
- }
150
- export interface IGalaceanAnimation {
151
- events: {
152
- time: number;
153
- functionName: string;
154
- parameter: any;
155
- }[];
156
- }
157
- export type GLTFExtensionSchema = IKHRLightsPunctual_Light | IKHRMaterialsClearcoat | IKHRMaterialsIor | IKHRMaterialsUnlit | IKHRMaterialsPbrSpecularGlossiness | IKHRMaterialsSheen | IKHRMaterialsSpecular | IKHRMaterialsTransmission | IKHRMaterialsTranslucency | IKHRMaterialVariants_Mapping | IKHRMaterialVariants_Variants | IKHRMaterialsAnisotropy | IKHRTextureBasisU | IKHRTextureTransform | IKHRXmp | IKHRXmp_Node | IGalaceanAnimation | Object;
@@ -1,6 +0,0 @@
1
- import { Material, Renderer } from "@galacean/engine-core";
2
- export type IGLTFExtensionVariants = Array<{
3
- renderer: Renderer;
4
- material: Material;
5
- variants: string[];
6
- }>;
@@ -1,8 +0,0 @@
1
- declare const MeshoptDecoder: {
2
- workerCount: number;
3
- ready: Promise<void>;
4
- useWorkers: () => void;
5
- decodeGltfBuffer: (count: any, stride: any, source: any, mode: any, filter: any) => Promise<Uint8Array>;
6
- release(): void;
7
- };
8
- export { MeshoptDecoder };
@@ -1,19 +0,0 @@
1
- import "./KHR_lights_punctual";
2
- import "./KHR_materials_clearcoat";
3
- import "./KHR_materials_ior";
4
- import "./KHR_materials_pbrSpecularGlossiness";
5
- import "./KHR_materials_sheen";
6
- import "./KHR_materials_transmission";
7
- import "./KHR_materials_unlit";
8
- import "./KHR_materials_variants";
9
- import "./KHR_materials_volume";
10
- import "./KHR_mesh_quantization";
11
- import "./KHR_texture_basisu";
12
- import "./KHR_texture_transform";
13
- import "./KHR_materials_ior";
14
- import "./GALACEAN_materials_remap";
15
- import "./GALACEAN_animation_event";
16
- import "./EXT_meshopt_compression";
17
- import "./KHR_materials_anisotropy";
18
- export { GLTFExtensionParser, GLTFExtensionMode } from "./GLTFExtensionParser";
19
- export * from "./GLTFExtensionSchema";
@@ -1,5 +0,0 @@
1
- export { GLTFResource } from "./GLTFResource";
2
- export { GLTFUtils } from "./GLTFUtils";
3
- export * from "./parser";
4
- export * from "./extensions/index";
5
- export type { IMaterial, IMeshPrimitive, ITextureInfo, INode, GLTFExtensionOwnerSchema, AccessorType, IGLTF, IMesh } from "./GLTFSchema";
@@ -1,12 +0,0 @@
1
- import { AnimationClip } from "@galacean/engine-core";
2
- import { IAnimation } from "../GLTFSchema";
3
- import { GLTFParser } from "./GLTFParser";
4
- import { GLTFParserContext } from "./GLTFParserContext";
5
- export declare class GLTFAnimationParser extends GLTFParser {
6
- /**
7
- * @internal
8
- */
9
- static _parseStandardProperty(context: GLTFParserContext, animationClip: AnimationClip, animationInfo: IAnimation): Promise<AnimationClip>;
10
- private static _addCurve;
11
- parse(context: GLTFParserContext, index: number): Promise<AnimationClip>;
12
- }
@@ -1,6 +0,0 @@
1
- import { GLTFParser } from "./GLTFParser";
2
- import { GLTFParserContext } from "./GLTFParserContext";
3
- export declare class GLTFBufferParser extends GLTFParser {
4
- parse(context: GLTFParserContext, index: number): Promise<ArrayBuffer>;
5
- private _parseSingleBuffer;
6
- }
@@ -1,5 +0,0 @@
1
- import { GLTFParserContext } from "./GLTFParserContext";
2
- import { GLTFParser } from "./GLTFParser";
3
- export declare class GLTFBufferViewParser extends GLTFParser {
4
- parse(context: GLTFParserContext, index: number): Promise<Uint8Array>;
5
- }
@@ -1,6 +0,0 @@
1
- import { Entity } from "@galacean/engine-core";
2
- import { GLTFParser } from "./GLTFParser";
3
- import { GLTFParserContext } from "./GLTFParserContext";
4
- export declare class GLTFEntityParser extends GLTFParser {
5
- parse(context: GLTFParserContext, index: number): Entity;
6
- }
@@ -1,18 +0,0 @@
1
- import { BlinnPhongMaterial, Engine, Material, PBRMaterial, PBRSpecularMaterial, UnlitMaterial } from "@galacean/engine-core";
2
- import { IMaterial, ITextureInfo } from "../GLTFSchema";
3
- import { GLTFParser } from "./GLTFParser";
4
- import { GLTFParserContext } from "./GLTFParserContext";
5
- export declare class GLTFMaterialParser extends GLTFParser {
6
- /** @internal */
7
- static _getDefaultMaterial(engine: Engine): BlinnPhongMaterial;
8
- private static _defaultMaterial;
9
- /**
10
- * @internal
11
- */
12
- static _checkOtherTextureTransform(texture: ITextureInfo, textureName: string): void;
13
- /**
14
- * @internal
15
- */
16
- static _parseStandardProperty(context: GLTFParserContext, material: UnlitMaterial | PBRMaterial | PBRSpecularMaterial, materialInfo: IMaterial): void;
17
- parse(context: GLTFParserContext, index: number): Promise<Material>;
18
- }
@@ -1,19 +0,0 @@
1
- import { ModelMesh, TypedArray } from "@galacean/engine-core";
2
- import { ModelMeshRestoreInfo } from "../../GLTFContentRestorer";
3
- import type { IAccessor, IGLTF, IMesh, IMeshPrimitive } from "../GLTFSchema";
4
- import { GLTFParser } from "./GLTFParser";
5
- import { BufferInfo, GLTFParserContext } from "./GLTFParserContext";
6
- export declare class GLTFMeshParser extends GLTFParser {
7
- private static _tempVector3;
8
- /**
9
- * @internal
10
- */
11
- static _parseMeshFromGLTFPrimitive(context: GLTFParserContext, mesh: ModelMesh, meshRestoreInfo: ModelMeshRestoreInfo, gltfMesh: IMesh, gltfPrimitive: IMeshPrimitive, gltf: IGLTF, getVertexBufferData: (semantic: string) => TypedArray, getBlendShapeData: (semantic: string, shapeIndex: number) => Promise<BufferInfo>, getIndexBufferData: () => Promise<TypedArray>, keepMeshData: boolean): Promise<ModelMesh>;
12
- /**
13
- * @internal
14
- */
15
- static _createBlendShape(mesh: ModelMesh, meshRestoreInfo: ModelMeshRestoreInfo, glTFMesh: IMesh, accessors: IAccessor[], glTFTargets: {
16
- [name: string]: number;
17
- }[], getBlendShapeData: (semantic: string, shapeIndex: number) => Promise<BufferInfo>): Promise<void[]>;
18
- parse(context: GLTFParserContext, index: number): Promise<ModelMesh[]>;
19
- }
@@ -1,57 +0,0 @@
1
- import { EngineObject } from "@galacean/engine-core";
2
- import type { GLTFExtensionOwnerSchema } from "../GLTFSchema";
3
- import { GLTFExtensionMode, GLTFExtensionParser } from "../extensions/GLTFExtensionParser";
4
- import { GLTFParserContext } from "./GLTFParserContext";
5
- /**
6
- * Base class of glTF parser.
7
- */
8
- export declare abstract class GLTFParser {
9
- private static readonly _extensionParsers;
10
- /**
11
- * Execute all parses of extension to create resource.
12
- * @param extensions - Related extensions field
13
- * @param context - The parser context
14
- * @param ownerSchema - The extension owner schema
15
- * @param extra - Extra params
16
- * @returns
17
- */
18
- static executeExtensionsCreateAndParse(extensions: {
19
- [key: string]: any;
20
- }, context: GLTFParserContext, ownerSchema: GLTFExtensionOwnerSchema, ...extra: any[]): EngineObject | void | Promise<EngineObject | Uint8Array | void>;
21
- /**
22
- * Execute all parses of extension to parse resource.
23
- * @param extensions - Related extensions field
24
- * @param context - The parser context
25
- * @param parseResource - The parsed resource
26
- * @param ownerSchema - The extension owner schema
27
- * @param extra - Extra params
28
- */
29
- static executeExtensionsAdditiveAndParse(extensions: {
30
- [key: string]: any;
31
- }, context: GLTFParserContext, parseResource: EngineObject, ownerSchema: GLTFExtensionOwnerSchema, ...extra: any[]): void;
32
- /**
33
- * Whether the plugin is registered.
34
- * @param extensionName - Extension name
35
- * @returns Boolean
36
- */
37
- static hasExtensionParser(extensionName: string): boolean;
38
- /**
39
- * Get the last plugin by glTF extension mode.
40
- * @param extensionName - Extension name
41
- * @param mode - GLTF extension mode
42
- * @returns GLTF extension parser
43
- */
44
- static getExtensionParser(extensionName: string, mode: GLTFExtensionMode): GLTFExtensionParser | undefined;
45
- /**
46
- * @internal
47
- */
48
- static _addExtensionParser(extensionName: string, extensionParser: GLTFExtensionParser): void;
49
- private static _createAndParse;
50
- private static _additiveParse;
51
- abstract parse(context: GLTFParserContext, index?: number): any;
52
- }
53
- /**
54
- * Declare ExtensionParser's decorator.
55
- * @param extensionName - Extension name
56
- */
57
- export declare function registerGLTFExtension(extensionName: string, mode: GLTFExtensionMode): (parser: new () => GLTFExtensionParser) => void;
@@ -1,70 +0,0 @@
1
- import { Buffer, Entity, ResourceManager, TypedArray } from "@galacean/engine-core";
2
- import { BufferDataRestoreInfo, GLTFContentRestorer } from "../../GLTFContentRestorer";
3
- import { GLTFParams } from "../../GLTFLoader";
4
- import { GLTFResource } from "../GLTFResource";
5
- import type { IGLTF } from "../GLTFSchema";
6
- import { GLTFParser } from "./GLTFParser";
7
- /**
8
- * @internal
9
- */
10
- export declare class GLTFParserContext {
11
- glTFResource: GLTFResource;
12
- resourceManager: ResourceManager;
13
- params: GLTFParams;
14
- private static readonly _parsers;
15
- static addParser(parserType: GLTFParserType, parser: GLTFParser): void;
16
- glTF: IGLTF;
17
- accessorBufferCache: Record<string, BufferInfo>;
18
- contentRestorer: GLTFContentRestorer;
19
- buffers?: ArrayBuffer[];
20
- private _resourceCache;
21
- private _progress;
22
- /** @internal */
23
- _setTaskCompleteProgress: (loaded: number, total: number) => void;
24
- /** @internal */
25
- _setTaskDetailProgress: (url: string, loaded: number, total: number) => void;
26
- constructor(glTFResource: GLTFResource, resourceManager: ResourceManager, params: GLTFParams);
27
- get<T>(type: GLTFParserType.Entity, index: number): Entity;
28
- get<T>(type: GLTFParserType.Entity): Entity[];
29
- get<T>(type: GLTFParserType.Schema): Promise<T>;
30
- get<T>(type: GLTFParserType.Validator): Promise<T>;
31
- get<T>(type: GLTFParserType, index: number): Promise<T>;
32
- get<T>(type: GLTFParserType): Promise<T[]>;
33
- parse(): Promise<GLTFResource>;
34
- /**
35
- * @internal
36
- */
37
- _onTaskDetail: (url: string, loaded: number, total: number) => void;
38
- /**
39
- * @internal
40
- */
41
- _addTaskCompletePromise(taskPromise: Promise<any>): void;
42
- private _createAnimator;
43
- private _handleSubAsset;
44
- }
45
- /**
46
- * @internal
47
- */
48
- export declare class BufferInfo {
49
- data: TypedArray;
50
- interleaved: boolean;
51
- stride: number;
52
- vertexBuffer: Buffer;
53
- vertexBindingInfos: Record<number, number>;
54
- restoreInfo: BufferDataRestoreInfo;
55
- constructor(data: TypedArray, interleaved: boolean, stride: number);
56
- }
57
- export declare enum GLTFParserType {
58
- Schema = 0,
59
- Validator = 1,
60
- Scene = 2,
61
- Buffer = 3,
62
- BufferView = 4,
63
- Texture = 5,
64
- Material = 6,
65
- Mesh = 7,
66
- Entity = 8,
67
- Skin = 9,
68
- Animation = 10
69
- }
70
- export declare function registerGLTFParser(pipeline: GLTFParserType): (Parser: new () => GLTFParser) => void;
@@ -1,11 +0,0 @@
1
- import { Entity } from "@galacean/engine-core";
2
- import { GLTFParser } from "./GLTFParser";
3
- import { GLTFParserContext } from "./GLTFParserContext";
4
- export declare class GLTFSceneParser extends GLTFParser {
5
- parse(context: GLTFParserContext, index: number): Promise<Entity>;
6
- private _parseEntityComponent;
7
- private _createCamera;
8
- private _createRenderer;
9
- private _computeLocalBounds;
10
- private _computeApproximateBindMatrix;
11
- }
@@ -1,7 +0,0 @@
1
- import { IGLTF } from "../GLTFSchema";
2
- import { GLTFParser } from "./GLTFParser";
3
- import { GLTFParserContext } from "./GLTFParserContext";
4
- export declare class GLTFSchemaParser extends GLTFParser {
5
- parse(context: GLTFParserContext): Promise<IGLTF>;
6
- private _isGLB;
7
- }
@@ -1,7 +0,0 @@
1
- import { Skin } from "@galacean/engine-core";
2
- import { GLTFParser } from "./GLTFParser";
3
- import { GLTFParserContext } from "./GLTFParserContext";
4
- export declare class GLTFSkinParser extends GLTFParser {
5
- parse(context: GLTFParserContext, index: number): Promise<Skin>;
6
- private _findSkeletonRootBone;
7
- }
@@ -1,12 +0,0 @@
1
- import { Texture, TextureWrapMode } from "@galacean/engine-core";
2
- import { GLTFParser } from "./GLTFParser";
3
- import { GLTFParserContext } from "./GLTFParserContext";
4
- export declare class GLTFTextureParser extends GLTFParser {
5
- /** @internal */
6
- static _wrapMap: {
7
- 33071: TextureWrapMode;
8
- 33648: TextureWrapMode;
9
- 10497: TextureWrapMode;
10
- };
11
- parse(context: GLTFParserContext, index: number): Promise<Texture>;
12
- }
@@ -1,5 +0,0 @@
1
- import { GLTFParser } from "./GLTFParser";
2
- import { GLTFParserContext } from "./GLTFParserContext";
3
- export declare class GLTFValidator extends GLTFParser {
4
- parse(context: GLTFParserContext): Promise<void>;
5
- }
@@ -1,13 +0,0 @@
1
- export { GLTFSchemaParser } from "./GLTFSchemaParser";
2
- export { GLTFAnimationParser } from "./GLTFAnimationParser";
3
- export { GLTFBufferParser } from "./GLTFBufferParser";
4
- export { GLTFEntityParser } from "./GLTFEntityParser";
5
- export { GLTFMaterialParser } from "./GLTFMaterialParser";
6
- export { GLTFMeshParser } from "./GLTFMeshParser";
7
- export { GLTFParser, registerGLTFExtension } from "./GLTFParser";
8
- export { GLTFSceneParser } from "./GLTFSceneParser";
9
- export { GLTFSkinParser } from "./GLTFSkinParser";
10
- export { GLTFTextureParser } from "./GLTFTextureParser";
11
- export { GLTFValidator } from "./GLTFValidator";
12
- export { GLTFParserContext, GLTFParserType, registerGLTFParser, BufferInfo } from "./GLTFParserContext";
13
- export { GLTFBufferViewParser } from "./GLTFBufferViewParser";
@@ -1,28 +0,0 @@
1
- import "./AnimationClipLoader";
2
- import "./AnimatorControllerLoader";
3
- import "./BufferLoader";
4
- import "./EnvLoader";
5
- import "./FontLoader";
6
- import "./GLTFLoader";
7
- import "./HDRLoader";
8
- import "./JSONLoader";
9
- import "./KTXCubeLoader";
10
- import "./KTXLoader";
11
- import "./MaterialLoader";
12
- import "./MeshLoader";
13
- import "./SourceFontLoader";
14
- import "./SpriteAtlasLoader";
15
- import "./SpriteLoader";
16
- import "./Texture2DLoader";
17
- import "./TextureCubeLoader";
18
- import "./ProjectLoader";
19
- import "./ktx2/KTX2Loader";
20
- export type { GLTFParams } from "./GLTFLoader";
21
- export * from "./SceneLoader";
22
- export type { Texture2DParams } from "./Texture2DLoader";
23
- export { parseSingleKTX } from "./compressed-texture";
24
- export * from "./gltf";
25
- export { GLTFLoader } from "./GLTFLoader";
26
- export { KTX2Loader, KTX2Transcoder } from "./ktx2/KTX2Loader";
27
- export { KTX2TargetFormat } from "./ktx2/KTX2TargetFormat";
28
- export * from "./resource-deserialize";