@galacean/engine-loader 1.2.0-beta.2 → 1.2.0-beta.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@galacean/engine-loader",
3
- "version": "1.2.0-beta.2",
3
+ "version": "1.2.0-beta.4",
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-core": "1.2.0-beta.2",
19
- "@galacean/engine-rhi-webgl": "1.2.0-beta.2",
20
- "@galacean/engine-math": "1.2.0-beta.2"
18
+ "@galacean/engine-core": "1.2.0-beta.4",
19
+ "@galacean/engine-rhi-webgl": "1.2.0-beta.4",
20
+ "@galacean/engine-math": "1.2.0-beta.4"
21
21
  },
22
22
  "scripts": {
23
23
  "b:types": "tsc"
@@ -1,20 +1,22 @@
1
- import { AnimationClip, Camera, Engine, Entity, Light, Material, ModelMesh, ReferResource, Skin, Texture2D } from "@galacean/engine-core";
1
+ import { AnimationClip, AnimatorController, Camera, Engine, Entity, Light, Material, ModelMesh, ReferResource, Skin, Texture2D } from "@galacean/engine-core";
2
2
  /**
3
3
  * Product after glTF parser, usually, `defaultSceneRoot` is only needed to use.
4
4
  */
5
5
  export declare class GLTFResource extends ReferResource {
6
6
  /** glTF file url. */
7
7
  readonly url: string;
8
- /** Texture2D after TextureParser. */
8
+ /** The array of loaded textures. */
9
9
  readonly textures?: Texture2D[];
10
- /** Material after MaterialParser. */
10
+ /** The array of loaded materials. */
11
11
  readonly materials?: Material[];
12
- /** ModelMesh after MeshParser. */
12
+ /** The array of loaded Meshes. */
13
13
  readonly meshes?: ModelMesh[][];
14
- /** Skin after SkinParser. */
14
+ /** The array of loaded skins. */
15
15
  readonly skins?: Skin[];
16
- /** AnimationClip after AnimationParser. */
16
+ /** The array of loaded animationClips. */
17
17
  readonly animations?: AnimationClip[];
18
+ /** The loaded AnimatorController. */
19
+ readonly animatorController?: AnimatorController;
18
20
  /** @internal */
19
21
  _defaultSceneRoot: Entity;
20
22
  /** @internal */
@@ -0,0 +1,7 @@
1
+ import { AnimatorController } from "@galacean/engine-core";
2
+ import { GLTFParser } from "./GLTFParser";
3
+ import { GLTFParserContext } from "./GLTFParserContext";
4
+ export declare class GLTFAnimatorControllerParser extends GLTFParser {
5
+ parse(context: GLTFParserContext): Promise<AnimatorController>;
6
+ private _createAnimatorController;
7
+ }
@@ -17,6 +17,7 @@ export declare class GLTFParserContext {
17
17
  accessorBufferCache: Record<string, BufferInfo>;
18
18
  contentRestorer: GLTFContentRestorer;
19
19
  buffers?: ArrayBuffer[];
20
+ needAnimatorController: boolean;
20
21
  private _resourceCache;
21
22
  private _progress;
22
23
  /** @internal */
@@ -28,6 +29,7 @@ export declare class GLTFParserContext {
28
29
  get<T>(type: GLTFParserType.Entity): Entity[];
29
30
  get<T>(type: GLTFParserType.Schema): Promise<T>;
30
31
  get<T>(type: GLTFParserType.Validator): Promise<T>;
32
+ get<T>(type: GLTFParserType.AnimatorController): Promise<T>;
31
33
  get<T>(type: GLTFParserType, index: number): Promise<T>;
32
34
  get<T>(type: GLTFParserType): Promise<T[]>;
33
35
  parse(): Promise<GLTFResource>;
@@ -39,7 +41,6 @@ export declare class GLTFParserContext {
39
41
  * @internal
40
42
  */
41
43
  _addTaskCompletePromise(taskPromise: Promise<any>): void;
42
- private _createAnimator;
43
44
  private _handleSubAsset;
44
45
  }
45
46
  /**
@@ -65,6 +66,7 @@ export declare enum GLTFParserType {
65
66
  Mesh = 7,
66
67
  Entity = 8,
67
68
  Skin = 9,
68
- Animation = 10
69
+ Animation = 10,
70
+ AnimatorController = 11
69
71
  }
70
72
  export declare function registerGLTFParser(pipeline: GLTFParserType): (Parser: new () => GLTFParser) => void;
@@ -11,3 +11,4 @@ export { GLTFTextureParser } from "./GLTFTextureParser";
11
11
  export { GLTFValidator } from "./GLTFValidator";
12
12
  export { GLTFParserContext, GLTFParserType, registerGLTFParser, BufferInfo } from "./GLTFParserContext";
13
13
  export { GLTFBufferViewParser } from "./GLTFBufferViewParser";
14
+ export { GLTFAnimatorControllerParser } from "./GLTFAnimatorControllerParser";