@galacean/effects-plugin-model 2.0.0-alpha.12 → 2.0.0-alpha.13

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.
@@ -1,4 +1,4 @@
1
- import type { Composition, CameraOptionsEx, spec, VFXItem, VFXItemContent } from '@galacean/effects';
1
+ import type { Composition, CameraOptionsEx, spec, VFXItem } from '@galacean/effects';
2
2
  import { Transform } from '@galacean/effects';
3
3
  import type { CameraGestureHandler, CameraKeyEvent } from './protocol';
4
4
  import { CameraGestureType } from './protocol';
@@ -8,7 +8,7 @@ export declare class CameraGestureHandlerImp implements CameraGestureHandler {
8
8
  private cameraCoordiante;
9
9
  private startParams;
10
10
  constructor(composition: Composition);
11
- getItem(): VFXItem<VFXItemContent> | undefined;
11
+ getItem(): VFXItem | undefined;
12
12
  getCurrentTarget(): string;
13
13
  getCurrentType(): CameraGestureType;
14
14
  onKeyEvent(event: CameraKeyEvent): CameraOptionsEx;
@@ -5,7 +5,7 @@ export declare class JSONConverter {
5
5
  engine: Engine;
6
6
  renderer: Renderer;
7
7
  downloader: Downloader;
8
- treeItemList: spec.VFXItemData[];
8
+ treeInfo: TreeInfo;
9
9
  constructor(player: Player);
10
10
  processScene(sceneData: string | Object): Promise<spec.JSONScene>;
11
11
  setImage(newScene: spec.JSONScene, oldScene: spec.JSONScene): void;
@@ -20,10 +20,26 @@ export declare class JSONConverter {
20
20
  private createMeshComponent;
21
21
  private createItemsFromTreeComponent;
22
22
  private createLightComponent;
23
+ private createAnimationComponent;
23
24
  private getMaterialData;
24
- private getStringTags;
25
+ private setupMaterial;
25
26
  private getTextureData;
26
27
  private getTransformData;
28
+ private setupBoneData;
29
+ }
30
+ declare class TreeInfo {
31
+ tree2NodeList: Record<string, spec.VFXItemData[]>;
32
+ nodeList2Tree: Record<string, spec.VFXItemData>;
33
+ nodeId2Node: Record<string, spec.VFXItemData>;
34
+ node2Path: Record<string, string>;
35
+ add(treeItem: spec.VFXItemData, treeNodeList: spec.VFXItemData[]): void;
36
+ setNodePath(node: spec.VFXItemData): void;
37
+ getTreeNodeListByTreeId(id: string): spec.VFXItemData[];
38
+ getTreeNodeListByNodeId(id: string): spec.VFXItemData[];
39
+ getTreeItemByNodeId(id: string): spec.VFXItemData;
40
+ getTreeNode(treeId: string, nodeIndex: number): spec.VFXItemData;
41
+ getAllTreeNodeList(): spec.VFXItemData[];
42
+ getNodePath(id: string): string;
27
43
  }
28
44
  export interface ModelData {
29
45
  vertices: spec.TypedArray;
@@ -34,3 +50,4 @@ export interface ModelData {
34
50
  }
35
51
  export declare function getGeometryDataFromOptions(geomOptions: GeometryProps): spec.GeometryData;
36
52
  export declare function getGeometryDataFromPropsList(geomPropsList: GeometryProps[]): spec.GeometryData | undefined;
53
+ export {};
@@ -1,5 +1,5 @@
1
1
  import { spec } from '@galacean/effects';
2
- import type { Texture, Engine, EffectComponentData, TextureSourceOptions } from '@galacean/effects';
2
+ import type { Texture, Engine, TextureSourceOptions } from '@galacean/effects';
3
3
  import type { LoaderOptions, SkyboxType, LoadSceneOptions, LoadSceneECSResult, LoaderECS } from './protocol';
4
4
  import type { ModelMeshComponentData, ModelSkyboxComponentData, ModelAnimationOptions, ModelCameraOptions, ModelLightOptions, ModelTreeOptions, ModelLightComponentData, ModelCameraComponentData } from '../index';
5
5
  import type { GLTFImage, GLTFTexture, GLTFScene, GLTFLight, GLTFCamera, GLTFAnimation, GLTFResources } from '@vvfx/resource-detection';
@@ -24,12 +24,14 @@ export declare class LoaderECSImpl implements LoaderECS {
24
24
  materials: spec.MaterialData[];
25
25
  shaders: spec.ShaderData[];
26
26
  geometries: spec.GeometryData[];
27
+ animations: spec.AnimationClipData[];
27
28
  engine: Engine;
28
29
  constructor(composition?: spec.Composition);
29
30
  initial(engine: Engine, options?: LoaderOptions): void;
30
31
  loadScene(options: LoadSceneOptions): Promise<LoadSceneECSResult>;
32
+ checkMeshComponentData(mesh: ModelMeshComponentData, resource: GLTFResources): void;
31
33
  processGLTFResource(resource: GLTFResources): void;
32
- processComponentData(components: EffectComponentData[]): void;
34
+ processComponentData(components: spec.EffectComponentData[]): void;
33
35
  processLightComponentData(light: ModelLightComponentData): void;
34
36
  processCameraComponentData(camera: ModelCameraComponentData): void;
35
37
  processMeshComponentData(mesh: ModelMeshComponentData): void;
package/dist/index.d.ts CHANGED
@@ -42,6 +42,7 @@ export type ModelLightType = spec.LightType;
42
42
  export type ModelLightComponentData = spec.ModelLightComponentData;
43
43
  export type ModelCameraComponentData = spec.ModelCameraComponentData;
44
44
  export type ModelSkyboxComponentData = spec.SkyboxComponentData;
45
+ export type AnimationComponentData = spec.AnimationComponentData;
45
46
  export * from './gesture';
46
47
  export * from './gltf';
47
48
  export * from './plugin';