@galacean/engine-loader 1.0.0-beta.16 → 1.0.0-beta.17

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@galacean/engine-loader",
3
- "version": "1.0.0-beta.16",
3
+ "version": "1.0.0-beta.17",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "registry": "https://registry.npmjs.org"
@@ -15,10 +15,10 @@
15
15
  "types/**/*"
16
16
  ],
17
17
  "dependencies": {
18
- "@galacean/engine-draco": "1.0.0-beta.16",
19
- "@galacean/engine-core": "1.0.0-beta.16",
20
- "@galacean/engine-rhi-webgl": "1.0.0-beta.16",
21
- "@galacean/engine-math": "1.0.0-beta.16"
18
+ "@galacean/engine-draco": "1.0.0-beta.17",
19
+ "@galacean/engine-core": "1.0.0-beta.17",
20
+ "@galacean/engine-math": "1.0.0-beta.17",
21
+ "@galacean/engine-rhi-webgl": "1.0.0-beta.17"
22
22
  },
23
23
  "scripts": {
24
24
  "b:types": "tsc"
@@ -19,7 +19,7 @@ export declare class GLTFUtils {
19
19
  */
20
20
  static getComponentType(componentType: AccessorComponentType): Float32ArrayConstructor | Uint32ArrayConstructor | Uint8ArrayConstructor | Uint16ArrayConstructor | Int8ArrayConstructor | Int16ArrayConstructor;
21
21
  static getNormalizedComponentScale(componentType: AccessorComponentType): number;
22
- static getAccessorBuffer(context: GLTFParserContext, bufferViews: IBufferView[], accessor: IAccessor): BufferInfo;
22
+ static getAccessorBuffer(context: GLTFParserContext, bufferViews: IBufferView[], accessor: IAccessor): Promise<BufferInfo>;
23
23
  /**
24
24
  * @deprecated
25
25
  * Get accessor data.
@@ -6,7 +6,7 @@ export declare class GLTFAnimationParser extends GLTFParser {
6
6
  /**
7
7
  * @internal
8
8
  */
9
- static _parseStandardProperty(context: GLTFParserContext, animationClip: AnimationClip, animationInfo: IAnimation): void;
9
+ static _parseStandardProperty(context: GLTFParserContext, animationClip: AnimationClip, animationInfo: IAnimation): Promise<void>;
10
10
  private static _addCurve;
11
11
  parse(context: GLTFParserContext): AssetPromise<AnimationClip[]>;
12
12
  }
@@ -8,12 +8,12 @@ export declare class GLTFMeshParser extends GLTFParser {
8
8
  /**
9
9
  * @internal
10
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) => BufferInfo, getIndexBufferData: () => TypedArray, keepMeshData: boolean): Promise<ModelMesh>;
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
12
  /**
13
13
  * @internal
14
14
  */
15
15
  static _createBlendShape(mesh: ModelMesh, meshRestoreInfo: ModelMeshRestoreInfo, glTFMesh: IMesh, glTFTargets: {
16
16
  [name: string]: number;
17
- }[], getBlendShapeData: (semantic: string, shapeIndex: number) => BufferInfo): void;
17
+ }[], getBlendShapeData: (semantic: string, shapeIndex: number) => Promise<BufferInfo>): Promise<void[]>;
18
18
  parse(context: GLTFParserContext): AssetPromise<ModelMesh[][]>;
19
19
  }
@@ -7,7 +7,6 @@ import type { IGLTF } from "../GLTFSchema";
7
7
  */
8
8
  export declare class GLTFParserContext {
9
9
  glTF: IGLTF;
10
- buffers: ArrayBuffer[];
11
10
  glTFResource: GLTFResource;
12
11
  keepMeshData: boolean;
13
12
  hasSkinned: boolean;
@@ -21,7 +20,13 @@ export declare class GLTFParserContext {
21
20
  masterPromiseInfo: PromiseInfo<GLTFResource>;
22
21
  promiseMap: Record<string, AssetPromise<any>>;
23
22
  contentRestorer: GLTFContentRestorer;
23
+ /** @internal */
24
+ _buffers: ArrayBuffer[] | Promise<ArrayBuffer[]>;
24
25
  constructor(url: string);
26
+ /**
27
+ * Get all the buffer data.
28
+ */
29
+ getBuffers(): Promise<ArrayBuffer[]>;
25
30
  private _initPromiseInfo;
26
31
  }
27
32
  /**
@@ -1,6 +1,7 @@
1
+ import { AssetPromise } from "@galacean/engine-core";
1
2
  import { GLTFParserContext } from ".";
2
3
  import { GLTFParser } from "./GLTFParser";
3
4
  export declare class GLTFSkinParser extends GLTFParser {
4
- parse(context: GLTFParserContext): void;
5
+ parse(context: GLTFParserContext): AssetPromise<void>;
5
6
  private _findSkeletonRootBone;
6
7
  }
@@ -1,8 +1,9 @@
1
1
  import { AssetPromise, Texture2D } from "@galacean/engine-core";
2
- import { GLTFParser } from "./GLTFParser";
3
2
  import { GLTFParserContext } from ".";
3
+ import { GLTFParser } from "./GLTFParser";
4
4
  export declare class GLTFTextureParser extends GLTFParser {
5
5
  private static _wrapMap;
6
6
  parse(context: GLTFParserContext): AssetPromise<Texture2D[]>;
7
+ private _getSamplerInfo;
7
8
  private _parseSampler;
8
9
  }