@galacean/engine-loader 0.9.8 → 0.9.10

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": "0.9.8",
3
+ "version": "0.9.10",
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": "0.9.8",
19
- "@galacean/engine-core": "0.9.8",
20
- "@galacean/engine-math": "0.9.8",
21
- "@galacean/engine-rhi-webgl": "0.9.8"
18
+ "@galacean/engine-draco": "0.9.10",
19
+ "@galacean/engine-core": "0.9.10",
20
+ "@galacean/engine-rhi-webgl": "0.9.10",
21
+ "@galacean/engine-math": "0.9.10"
22
22
  },
23
23
  "scripts": {
24
24
  "b:types": "tsc"
@@ -139,4 +139,11 @@ export interface IGalaceanMaterialRemap {
139
139
  key?: string;
140
140
  isClone?: boolean;
141
141
  }
142
- export type GLTFExtensionSchema = IKHRLightsPunctual_Light | IKHRDracoMeshCompression | IKHRMaterialsClearcoat | IKHRMaterialsIor | IKHRMaterialsUnlit | IKHRMaterialsPbrSpecularGlossiness | IKHRMaterialsSheen | IKHRMaterialsSpecular | IKHRMaterialsTransmission | IKHRMaterialsTranslucency | IKHRMaterialVariants_Mapping | IKHRMaterialVariants_Variants | IKHRTextureBasisU | IKHRTextureTransform | IKHRXmp | IKHRXmp_Node | Object;
142
+ export interface IGalaceanAnimation {
143
+ events: {
144
+ time: number;
145
+ functionName: string;
146
+ parameter: any;
147
+ }[];
148
+ }
149
+ export type GLTFExtensionSchema = IKHRLightsPunctual_Light | IKHRDracoMeshCompression | IKHRMaterialsClearcoat | IKHRMaterialsIor | IKHRMaterialsUnlit | IKHRMaterialsPbrSpecularGlossiness | IKHRMaterialsSheen | IKHRMaterialsSpecular | IKHRMaterialsTransmission | IKHRMaterialsTranslucency | IKHRMaterialVariants_Mapping | IKHRMaterialVariants_Variants | IKHRTextureBasisU | IKHRTextureTransform | IKHRXmp | IKHRXmp_Node | IGalaceanAnimation | Object;
@@ -1,6 +1,6 @@
1
1
  export { GLTFPipeline } from "./GLTFPipeline";
2
2
  export { GLTFResource } from "./GLTFResource";
3
- export { GLTFUtil } from "./GLTFUtil";
3
+ export { GLTFUtils } from "./GLTFUtils";
4
4
  export * from "./parser";
5
5
  export * from "./extensions/index";
6
6
  export type { IMaterial, IMeshPrimitive, ITextureInfo, INode, GLTFExtensionOwnerSchema } from "./GLTFSchema";
@@ -1,7 +1,12 @@
1
1
  import { AnimationClip, AssetPromise } from "@galacean/engine-core";
2
+ import { IAnimation } from "../GLTFSchema";
2
3
  import { GLTFParser } from "./GLTFParser";
3
4
  import { GLTFParserContext } from "./GLTFParserContext";
4
5
  export declare class GLTFAnimationParser extends GLTFParser {
6
+ /**
7
+ * @internal
8
+ */
9
+ static _parseStandardProperty(context: GLTFParserContext, animationClip: AnimationClip, animationInfo: IAnimation): void;
10
+ private static _addCurve;
5
11
  parse(context: GLTFParserContext): AssetPromise<AnimationClip[]>;
6
- private _addCurve;
7
12
  }
@@ -1,18 +1,19 @@
1
1
  import { AssetPromise, ModelMesh, TypedArray } from "@galacean/engine-core";
2
+ import { ModelMeshRestoreInfo } from "../../GLTFContentRestorer";
2
3
  import { IGLTF, IMesh, IMeshPrimitive } from "../GLTFSchema";
3
4
  import { GLTFParser } from "./GLTFParser";
4
- import { GLTFParserContext } from "./GLTFParserContext";
5
+ import { BufferInfo, GLTFParserContext } from "./GLTFParserContext";
5
6
  export declare class GLTFMeshParser extends GLTFParser {
6
7
  private static _tempVector3;
7
8
  /**
8
9
  * @internal
9
10
  */
10
- static _parseMeshFromGLTFPrimitive(context: GLTFParserContext, mesh: ModelMesh, gltfMesh: IMesh, gltfPrimitive: IMeshPrimitive, gltf: IGLTF, getVertexBufferData: (semantic: string) => TypedArray, getBlendShapeData: (semantic: string, shapeIndex: number) => TypedArray, 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) => BufferInfo, getIndexBufferData: () => TypedArray, keepMeshData: boolean): Promise<ModelMesh>;
11
12
  /**
12
13
  * @internal
13
14
  */
14
- static _createBlendShape(mesh: ModelMesh, glTFMesh: IMesh, glTFTargets: {
15
+ static _createBlendShape(mesh: ModelMesh, meshRestoreInfo: ModelMeshRestoreInfo, glTFMesh: IMesh, glTFTargets: {
15
16
  [name: string]: number;
16
- }[], getBlendShapeData: (semantic: string, shapeIndex: number) => TypedArray): void;
17
+ }[], getBlendShapeData: (semantic: string, shapeIndex: number) => BufferInfo): void;
17
18
  parse(context: GLTFParserContext): AssetPromise<ModelMesh[][]>;
18
19
  }
@@ -1,16 +1,16 @@
1
1
  import { AnimationClip, AssetPromise, Buffer, Entity, Material, ModelMesh, Texture2D, TypedArray } from "@galacean/engine-core";
2
+ import { BufferDataRestoreInfo, GLTFContentRestorer } from "../../GLTFContentRestorer";
2
3
  import { GLTFResource } from "../GLTFResource";
3
4
  import { IGLTF } from "../GLTFSchema";
4
5
  /**
5
6
  * @internal
6
7
  */
7
8
  export declare class GLTFParserContext {
8
- gltf: IGLTF;
9
+ glTF: IGLTF;
9
10
  buffers: ArrayBuffer[];
10
11
  glTFResource: GLTFResource;
11
12
  keepMeshData: boolean;
12
13
  hasSkinned: boolean;
13
- /** chain asset promise */
14
14
  chainPromises: AssetPromise<any>[];
15
15
  accessorBufferCache: Record<string, BufferInfo>;
16
16
  texturesPromiseInfo: PromiseInfo<Texture2D[]>;
@@ -20,6 +20,7 @@ export declare class GLTFParserContext {
20
20
  defaultSceneRootPromiseInfo: PromiseInfo<Entity>;
21
21
  masterPromiseInfo: PromiseInfo<GLTFResource>;
22
22
  promiseMap: Record<string, AssetPromise<any>>;
23
+ contentRestorer: GLTFContentRestorer;
23
24
  constructor(url: string);
24
25
  private _initPromiseInfo;
25
26
  }
@@ -32,6 +33,7 @@ export declare class BufferInfo {
32
33
  stride: number;
33
34
  vertexBuffer: Buffer;
34
35
  vertexBindingInfos: Record<number, number>;
36
+ restoreInfo: BufferDataRestoreInfo;
35
37
  constructor(data: TypedArray, interleaved: boolean, stride: number);
36
38
  }
37
39
  /**
@@ -1,5 +1,5 @@
1
+ import { GLTFParserContext } from ".";
1
2
  import { GLTFParser } from "./GLTFParser";
2
- import { GLTFParserContext } from "./GLTFParserContext";
3
3
  export declare class GLTFSkinParser extends GLTFParser {
4
4
  parse(context: GLTFParserContext): void;
5
5
  private _findSkeletonRootBone;
@@ -1,6 +1,6 @@
1
1
  import { AssetPromise, Texture2D } from "@galacean/engine-core";
2
2
  import { GLTFParser } from "./GLTFParser";
3
- import { GLTFParserContext } from "./GLTFParserContext";
3
+ import { GLTFParserContext } from ".";
4
4
  export declare class GLTFTextureParser extends GLTFParser {
5
5
  private static _wrapMap;
6
6
  parse(context: GLTFParserContext): AssetPromise<Texture2D[]>;