@galacean/engine-loader 1.4.0-alpha.0 → 1.4.0-alpha.2
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 +245 -60
- package/dist/main.js.map +1 -1
- package/dist/module.js +246 -61
- package/dist/module.js.map +1 -1
- package/package.json +4 -4
- package/types/AudioLoader.d.ts +1 -0
- package/types/GLTFContentRestorer.d.ts +1 -2
- package/types/PhysicsMaterialLoader.d.ts +1 -0
- package/types/Texture2DContentRestorer.d.ts +1 -2
- package/types/TextureCubeContentRestorer.d.ts +1 -2
- package/types/gltf/extensions/GLTFExtensionSchema.d.ts +10 -1
- package/types/gltf/extensions/KHR_materials_sheen.d.ts +1 -0
- package/types/gltf/extensions/KHR_materials_transmission.d.ts +1 -0
- package/types/gltf/extensions/KHR_materials_volume.d.ts +1 -0
- package/types/index.d.ts +2 -0
- package/types/resource-deserialize/resources/parser/ParserContext.d.ts +5 -10
- package/types/resource-deserialize/resources/parser/ReflectionParser.d.ts +1 -0
- package/types/resource-deserialize/resources/schema/BasicSchema.d.ts +4 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@galacean/engine-loader",
|
|
3
|
-
"version": "1.4.0-alpha.
|
|
3
|
+
"version": "1.4.0-alpha.2",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"registry": "https://registry.npmjs.org"
|
|
@@ -18,9 +18,9 @@
|
|
|
18
18
|
"types/**/*"
|
|
19
19
|
],
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@galacean/engine-
|
|
22
|
-
"@galacean/engine-rhi-webgl": "1.4.0-alpha.
|
|
23
|
-
"@galacean/engine-
|
|
21
|
+
"@galacean/engine-math": "1.4.0-alpha.2",
|
|
22
|
+
"@galacean/engine-rhi-webgl": "1.4.0-alpha.2",
|
|
23
|
+
"@galacean/engine-core": "1.4.0-alpha.2"
|
|
24
24
|
},
|
|
25
25
|
"scripts": {
|
|
26
26
|
"b:types": "tsc"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { AssetPromise, BlendShape, Buffer, ContentRestorer, ModelMesh, Texture2D } from "@galacean/engine-core";
|
|
2
|
-
import { RequestConfig } from "@galacean/engine-core/types/asset/request";
|
|
1
|
+
import { AssetPromise, BlendShape, Buffer, ContentRestorer, ModelMesh, RequestConfig, Texture2D } from "@galacean/engine-core";
|
|
3
2
|
import { Vector2 } from "@galacean/engine-math";
|
|
4
3
|
import { GLTFResource } from "./gltf/GLTFResource";
|
|
5
4
|
import type { AccessorComponentType, IBufferView } from "./gltf/GLTFSchema";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { AssetPromise, ContentRestorer, Texture2D } from "@galacean/engine-core";
|
|
2
|
-
import { RequestConfig } from "@galacean/engine-core/types/asset/request";
|
|
1
|
+
import { AssetPromise, ContentRestorer, RequestConfig, Texture2D } from "@galacean/engine-core";
|
|
3
2
|
/**
|
|
4
3
|
* @internal
|
|
5
4
|
*/
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { AssetPromise, ContentRestorer, TextureCube } from "@galacean/engine-core";
|
|
2
|
-
import { RequestConfig } from "@galacean/engine-core/types/asset/request";
|
|
1
|
+
import { AssetPromise, ContentRestorer, RequestConfig, TextureCube } from "@galacean/engine-core";
|
|
3
2
|
/**
|
|
4
3
|
* @internal
|
|
5
4
|
*/
|
|
@@ -165,4 +165,13 @@ export interface IKHRMaterialsIridescence {
|
|
|
165
165
|
iridescenceThicknessMaximum?: number;
|
|
166
166
|
iridescenceThicknessTexture?: ITextureInfo;
|
|
167
167
|
}
|
|
168
|
-
|
|
168
|
+
/**
|
|
169
|
+
* Interfaces from the KHR_materials_volume extension
|
|
170
|
+
*/
|
|
171
|
+
export interface IKHRMaterialsVolume {
|
|
172
|
+
thicknessFactor?: number;
|
|
173
|
+
thicknessTexture?: ITextureInfo;
|
|
174
|
+
attenuationDistance?: number;
|
|
175
|
+
attenuationColor?: number[];
|
|
176
|
+
}
|
|
177
|
+
export type GLTFExtensionSchema = IKHRLightsPunctual_Light | IKHRMaterialsClearcoat | IKHRMaterialsIor | IKHRMaterialsUnlit | IKHRMaterialsPbrSpecularGlossiness | IKHRMaterialsSheen | IKHRMaterialsSpecular | IKHRMaterialsTransmission | IKHRMaterialsTranslucency | IKHRMaterialVariants_Mapping | IKHRMaterialVariants_Variants | IKHRMaterialsAnisotropy | IKHRTextureBasisU | IKHRTextureTransform | IKHRXmp | IKHRXmp_Node | IGalaceanAnimation | IKHRMaterialsIridescence | IKHRMaterialsVolume | Object;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/types/index.d.ts
CHANGED
|
@@ -18,9 +18,11 @@ import "./SpriteAtlasLoader";
|
|
|
18
18
|
import "./SpriteLoader";
|
|
19
19
|
import "./Texture2DLoader";
|
|
20
20
|
import "./TextureCubeLoader";
|
|
21
|
+
import "./AudioLoader";
|
|
21
22
|
import "./ktx2/KTX2Loader";
|
|
22
23
|
import "./ShaderLoader";
|
|
23
24
|
import "./ShaderChunkLoader";
|
|
25
|
+
import "./PhysicsMaterialLoader";
|
|
24
26
|
export { GLTFLoader } from "./GLTFLoader";
|
|
25
27
|
export type { GLTFParams } from "./GLTFLoader";
|
|
26
28
|
export * from "./SceneLoader";
|
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
import { Component, Engine, EngineObject, Entity, ReferResource, ResourceManager, Scene } from "@galacean/engine-core";
|
|
2
|
-
import type { IEntity, IHierarchyFile } from "../schema";
|
|
2
|
+
import type { IComponentRef, IEntity, IHierarchyFile } from "../schema";
|
|
3
3
|
export declare enum ParserType {
|
|
4
4
|
Prefab = 0,
|
|
5
5
|
Scene = 1
|
|
6
6
|
}
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
9
|
-
* @export
|
|
10
|
-
* @class ParserContext
|
|
11
|
-
* @template T
|
|
12
|
-
* @template I
|
|
8
|
+
* @internal
|
|
13
9
|
*/
|
|
14
10
|
export declare class ParserContext<T extends IHierarchyFile, I extends EngineObject> {
|
|
15
11
|
readonly engine: Engine;
|
|
@@ -20,11 +16,10 @@ export declare class ParserContext<T extends IHierarchyFile, I extends EngineObj
|
|
|
20
16
|
components: Map<string, Component>;
|
|
21
17
|
rootIds: string[];
|
|
22
18
|
strippedIds: string[];
|
|
19
|
+
componentWaitingMap: Map<string, Function[]>;
|
|
23
20
|
readonly resourceManager: ResourceManager;
|
|
24
21
|
constructor(engine: Engine, type: ParserType, resource: ReferResource | Scene);
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
* @memberof ParserContext
|
|
28
|
-
*/
|
|
22
|
+
addComponent(id: string, component: Component): void;
|
|
23
|
+
getComponentByRef(ref: IComponentRef): Promise<Component>;
|
|
29
24
|
clear(): void;
|
|
30
25
|
}
|