@galacean/effects-plugin-model 2.1.0-alpha.6 → 2.1.0-alpha.8

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/effects-plugin-model",
3
- "version": "2.1.0-alpha.6",
3
+ "version": "2.1.0-alpha.8",
4
4
  "description": "Galacean Effects player model plugin",
5
5
  "module": "./dist/index.mjs",
6
6
  "main": "./dist/index.js",
@@ -48,15 +48,15 @@
48
48
  "registry": "https://registry.npmjs.org"
49
49
  },
50
50
  "dependencies": {
51
- "@galacean/effects-helper": "2.1.0-alpha.6"
51
+ "@galacean/effects-helper": "2.1.0-alpha.8"
52
52
  },
53
53
  "devDependencies": {
54
54
  "@vvfx/resource-detection": "^0.6.2",
55
55
  "@types/hammerjs": "^2.0.45",
56
56
  "fpsmeter": "^0.3.1",
57
57
  "hammerjs": "^2.0.8",
58
- "@galacean/effects": "2.1.0-alpha.6",
59
- "@galacean/effects-plugin-editor-gizmo": "2.1.0-alpha.6"
58
+ "@galacean/effects": "2.1.0-alpha.8",
59
+ "@galacean/effects-plugin-editor-gizmo": "2.1.0-alpha.8"
60
60
  },
61
61
  "scripts": {
62
62
  "dev": "vite",
@@ -1,132 +0,0 @@
1
- import type { Engine, VFXItem } from '@galacean/effects';
2
- import { Behaviour, Transform } from '@galacean/effects';
3
- import type { ModelTreeContent, ModelTreeOptions } from '../index';
4
- import { PAnimationManager } from '../runtime';
5
- /**
6
- * 场景树节点描述
7
- */
8
- export interface ModelTreeNode {
9
- /**
10
- * 名称
11
- */
12
- name?: string;
13
- /**
14
- * 变换
15
- */
16
- transform: Transform;
17
- /**
18
- * 子节点
19
- */
20
- children: ModelTreeNode[];
21
- /**
22
- * 索引
23
- */
24
- id: string;
25
- /**
26
- * 场景树元素
27
- */
28
- tree: ModelTreeItem;
29
- }
30
- /**
31
- * 场景树元素类,支持插件中节点树相关的动画能力
32
- */
33
- export declare class ModelTreeItem {
34
- private allNodes;
35
- private nodes;
36
- private cacheMap;
37
- /**
38
- * 基础变换
39
- */
40
- readonly baseTransform: Transform;
41
- /**
42
- * 动画管理器
43
- */
44
- animationManager: PAnimationManager;
45
- /**
46
- * 构造函数,创建场景树结构
47
- * @param props - 场景树数据
48
- * @param owner - 场景树元素
49
- */
50
- constructor(props: ModelTreeOptions, owner: VFXItem);
51
- /**
52
- * 场景树更新,主要是动画更新
53
- * @param dt - 时间间隔
54
- */
55
- tick(dt: number): void;
56
- /**
57
- * 获取所有节点
58
- * @returns
59
- */
60
- getNodes(): ModelTreeNode[];
61
- /**
62
- * 根据节点编号,查询节点
63
- * @param nodeId - 节点编号
64
- * @returns
65
- */
66
- getNodeById(nodeId: string | number): ModelTreeNode | undefined;
67
- /**
68
- * 根据节点名称,查询节点
69
- * @param name - 名称
70
- * @returns
71
- */
72
- getNodeByName(name: string): ModelTreeNode | undefined;
73
- /**
74
- * 根据节点 id 查询节点变换,如果查询不到节点就直接返回基础变换
75
- * @param nodeId - 节点 id
76
- * @returns
77
- */
78
- getNodeTransform(nodeId: string): Transform;
79
- /**
80
- * 销毁场景树对象
81
- */
82
- dispose(): void;
83
- private build;
84
- }
85
- /**
86
- * 插件场景树组件类,实现 3D 场景树功能
87
- * @since 2.0.0
88
- */
89
- export declare class ModelTreeComponent extends Behaviour {
90
- /**
91
- * 内部节点树元素
92
- */
93
- content: ModelTreeItem;
94
- /**
95
- * 参数
96
- */
97
- options?: ModelTreeContent;
98
- /**
99
- * 构造函数,创建节点树元素
100
- * @param engine
101
- * @param options
102
- */
103
- constructor(engine: Engine, options?: ModelTreeContent);
104
- /**
105
- * 反序列化,保存入参和创建节点树元素
106
- * @param options
107
- */
108
- fromData(options: ModelTreeContent): void;
109
- /**
110
- * 组件开始,查询合成中场景管理器并设置到动画管理器中
111
- */
112
- onStart(): void;
113
- /**
114
- * 组件更新,内部对象更新
115
- * @param dt
116
- */
117
- onUpdate(dt: number): void;
118
- /**
119
- * 组件销毁,内部对象销毁
120
- */
121
- onDestroy(): void;
122
- /**
123
- * 创建内部场景树元素
124
- */
125
- createContent(): void;
126
- /**
127
- * 获取元素的变换
128
- * @param itemId - 元素索引
129
- * @returns
130
- */
131
- getNodeTransform(itemId: string): Transform;
132
- }
@@ -1,14 +0,0 @@
1
- import { AbstractPlugin } from '@galacean/effects';
2
- /**
3
- * 场景树插件类,支持 3D 相关的节点动画和骨骼动画等
4
- */
5
- export declare class ModelTreePlugin extends AbstractPlugin {
6
- /**
7
- * 插件名称
8
- */
9
- name: string;
10
- /**
11
- * 高优先级更新
12
- */
13
- order: number;
14
- }