@galacean/engine-loader 1.2.0-alpha.9 → 1.2.0-beta.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/dist/main.js +160 -219
- package/dist/main.js.map +1 -1
- package/dist/miniprogram.js +160 -219
- package/dist/module.js +160 -219
- package/dist/module.js.map +1 -1
- package/package.json +4 -4
- package/types/GLTFContentRestorer.d.ts +7 -6
- package/types/gltf/GLTFUtils.d.ts +5 -9
- package/types/gltf/parser/GLTFMeshParser.d.ts +7 -6
- package/types/gltf/parser/GLTFSchemaParser.d.ts +0 -1
- package/types/resource-deserialize/resources/schema/SceneSchema.d.ts +9 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@galacean/engine-loader",
|
|
3
|
-
"version": "1.2.0-
|
|
3
|
+
"version": "1.2.0-beta.1",
|
|
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-math": "1.2.0-
|
|
18
|
+
"@galacean/engine-rhi-webgl": "1.2.0-beta.1",
|
|
19
|
+
"@galacean/engine-core": "1.2.0-beta.1",
|
|
20
|
+
"@galacean/engine-math": "1.2.0-beta.1"
|
|
21
21
|
},
|
|
22
22
|
"scripts": {
|
|
23
23
|
"b:types": "tsc"
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { AssetPromise, BlendShape, Buffer, ContentRestorer, ModelMesh, Texture2D
|
|
1
|
+
import { AssetPromise, BlendShape, Buffer, ContentRestorer, ModelMesh, Texture2D } from "@galacean/engine-core";
|
|
2
2
|
import { RequestConfig } from "@galacean/engine-core/types/asset/request";
|
|
3
3
|
import { Vector2 } from "@galacean/engine-math";
|
|
4
4
|
import { GLTFResource } from "./gltf/GLTFResource";
|
|
5
|
-
import type { IBufferView } from "./gltf/GLTFSchema";
|
|
5
|
+
import type { AccessorComponentType, IBufferView } from "./gltf/GLTFSchema";
|
|
6
6
|
/**
|
|
7
7
|
* @internal
|
|
8
8
|
*/
|
|
@@ -65,10 +65,10 @@ export declare class BufferDataRestoreInfo {
|
|
|
65
65
|
*/
|
|
66
66
|
export declare class RestoreDataAccessor {
|
|
67
67
|
bufferIndex: number;
|
|
68
|
-
TypedArray:
|
|
68
|
+
TypedArray: Uint8ArrayConstructor | Int8ArrayConstructor | Int16ArrayConstructor | Uint16ArrayConstructor | Uint32ArrayConstructor | Float32ArrayConstructor;
|
|
69
69
|
byteOffset: number;
|
|
70
70
|
length: number;
|
|
71
|
-
constructor(bufferIndex: number, TypedArray:
|
|
71
|
+
constructor(bufferIndex: number, TypedArray: Uint8ArrayConstructor | Int8ArrayConstructor | Int16ArrayConstructor | Uint16ArrayConstructor | Uint32ArrayConstructor | Float32ArrayConstructor, byteOffset: number, length: number);
|
|
72
72
|
}
|
|
73
73
|
/**
|
|
74
74
|
* @internal
|
|
@@ -85,8 +85,9 @@ export declare class BlendShapeRestoreInfo {
|
|
|
85
85
|
*/
|
|
86
86
|
export declare class BlendShapeDataRestoreInfo {
|
|
87
87
|
buffer: BufferDataRestoreInfo;
|
|
88
|
-
stride: number;
|
|
89
88
|
byteOffset: number;
|
|
90
89
|
count: number;
|
|
91
|
-
|
|
90
|
+
normalized: boolean;
|
|
91
|
+
componentType: AccessorComponentType;
|
|
92
|
+
constructor(buffer: BufferDataRestoreInfo, byteOffset: number, count: number, normalized: boolean, componentType: AccessorComponentType);
|
|
92
93
|
}
|
|
@@ -20,12 +20,7 @@ export declare class GLTFUtils {
|
|
|
20
20
|
static getComponentType(componentType: AccessorComponentType): Float32ArrayConstructor | Uint32ArrayConstructor | Uint8ArrayConstructor | Uint16ArrayConstructor | Int8ArrayConstructor | Int16ArrayConstructor;
|
|
21
21
|
static getNormalizedComponentScale(componentType: AccessorComponentType): number;
|
|
22
22
|
static getAccessorBuffer(context: GLTFParserContext, bufferViews: IBufferView[], accessor: IAccessor): Promise<BufferInfo>;
|
|
23
|
-
static bufferToVector3Array(
|
|
24
|
-
/**
|
|
25
|
-
* @deprecated
|
|
26
|
-
* Get accessor data.
|
|
27
|
-
*/
|
|
28
|
-
static getAccessorData(glTF: IGLTF, accessor: IAccessor, buffers: ArrayBuffer[]): TypedArray;
|
|
23
|
+
static bufferToVector3Array(buffer: TypedArray, byteOffset: number, count: number, normalized: boolean, componentType: AccessorComponentType): Vector3[];
|
|
29
24
|
static getBufferViewData(bufferView: IBufferView, buffers: ArrayBuffer[]): ArrayBuffer;
|
|
30
25
|
/**
|
|
31
26
|
* Get accessor data.
|
|
@@ -40,9 +35,10 @@ export declare class GLTFUtils {
|
|
|
40
35
|
/**
|
|
41
36
|
* Parse the glb format.
|
|
42
37
|
*/
|
|
43
|
-
static parseGLB(context: GLTFParserContext,
|
|
44
|
-
glTF
|
|
45
|
-
buffers
|
|
38
|
+
static parseGLB(context: GLTFParserContext, originBuffer: ArrayBuffer): {
|
|
39
|
+
glTF?: IGLTF;
|
|
40
|
+
buffers?: ArrayBuffer[];
|
|
41
|
+
originBuffer?: ArrayBuffer;
|
|
46
42
|
};
|
|
47
43
|
static parseSampler(texture: Texture2D, samplerInfo: ISamplerInfo): void;
|
|
48
44
|
static getSamplerInfo(sampler: ISampler): ISamplerInfo;
|
|
@@ -1,19 +1,20 @@
|
|
|
1
|
-
import { ModelMesh
|
|
1
|
+
import { ModelMesh } from "@galacean/engine-core";
|
|
2
2
|
import { ModelMeshRestoreInfo } from "../../GLTFContentRestorer";
|
|
3
|
-
import type {
|
|
3
|
+
import type { IGLTF, IMesh, IMeshPrimitive } from "../GLTFSchema";
|
|
4
4
|
import { GLTFParser } from "./GLTFParser";
|
|
5
|
-
import {
|
|
5
|
+
import { GLTFParserContext } from "./GLTFParserContext";
|
|
6
6
|
export declare class GLTFMeshParser extends GLTFParser {
|
|
7
7
|
private static _tempVector3;
|
|
8
8
|
/**
|
|
9
9
|
* @internal
|
|
10
10
|
*/
|
|
11
|
-
static _parseMeshFromGLTFPrimitive(context: GLTFParserContext, mesh: ModelMesh, meshRestoreInfo: ModelMeshRestoreInfo, gltfMesh: IMesh, gltfPrimitive: IMeshPrimitive, gltf: IGLTF,
|
|
11
|
+
static _parseMeshFromGLTFPrimitive(context: GLTFParserContext, mesh: ModelMesh, meshRestoreInfo: ModelMeshRestoreInfo, gltfMesh: IMesh, gltfPrimitive: IMeshPrimitive, gltf: IGLTF, keepMeshData: boolean): Promise<ModelMesh>;
|
|
12
|
+
private static _getBlendShapeData;
|
|
12
13
|
/**
|
|
13
14
|
* @internal
|
|
14
15
|
*/
|
|
15
|
-
static _createBlendShape(mesh: ModelMesh, meshRestoreInfo: ModelMeshRestoreInfo, glTFMesh: IMesh,
|
|
16
|
+
static _createBlendShape(context: GLTFParserContext, mesh: ModelMesh, meshRestoreInfo: ModelMeshRestoreInfo, glTFMesh: IMesh, gltfPrimitive: IMeshPrimitive, glTFTargets: {
|
|
16
17
|
[name: string]: number;
|
|
17
|
-
}[]
|
|
18
|
+
}[]): Promise<void>;
|
|
18
19
|
parse(context: GLTFParserContext, index: number): Promise<ModelMesh[]>;
|
|
19
20
|
}
|
|
@@ -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<{
|