@galacean/effects-core 2.5.4 → 2.6.0-alpha.1

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.
Files changed (44) hide show
  1. package/dist/asset-loader.d.ts +0 -1
  2. package/dist/comp-vfx-item.d.ts +0 -1
  3. package/dist/components/animator.d.ts +15 -0
  4. package/dist/components/effect-component.d.ts +1 -0
  5. package/dist/components/index.d.ts +1 -0
  6. package/dist/composition.d.ts +14 -7
  7. package/dist/decorators.d.ts +1 -0
  8. package/dist/events/types.d.ts +2 -1
  9. package/dist/index.js +4142 -1643
  10. package/dist/index.js.map +1 -1
  11. package/dist/index.mjs +4108 -1643
  12. package/dist/index.mjs.map +1 -1
  13. package/dist/math/value-getters/color-curve.d.ts +1 -0
  14. package/dist/math/value-getters/vector-curves.d.ts +13 -1
  15. package/dist/plugins/animation-graph/animation-graph-asset.d.ts +13 -0
  16. package/dist/plugins/animation-graph/blender.d.ts +38 -0
  17. package/dist/plugins/animation-graph/graph-context.d.ts +20 -0
  18. package/dist/plugins/animation-graph/graph-data-set.d.ts +5 -0
  19. package/dist/plugins/animation-graph/graph-instance.d.ts +30 -0
  20. package/dist/plugins/animation-graph/graph-node.d.ts +70 -0
  21. package/dist/plugins/animation-graph/index.d.ts +6 -0
  22. package/dist/plugins/animation-graph/node-asset-type.d.ts +3 -0
  23. package/dist/plugins/animation-graph/nodes/animation-clip-node.d.ts +52 -0
  24. package/dist/plugins/animation-graph/nodes/apply-additive-node.d.ts +23 -0
  25. package/dist/plugins/animation-graph/nodes/blend-node.d.ts +23 -0
  26. package/dist/plugins/animation-graph/nodes/bool-nodes.d.ts +39 -0
  27. package/dist/plugins/animation-graph/nodes/const-value-nodes.d.ts +21 -0
  28. package/dist/plugins/animation-graph/nodes/control-parameter-nodes.d.ts +32 -0
  29. package/dist/plugins/animation-graph/nodes/index.d.ts +11 -0
  30. package/dist/plugins/animation-graph/nodes/layer-blend-node.d.ts +27 -0
  31. package/dist/plugins/animation-graph/nodes/operator-nodes.d.ts +35 -0
  32. package/dist/plugins/animation-graph/nodes/state-machine-node.d.ts +35 -0
  33. package/dist/plugins/animation-graph/nodes/state-node.d.ts +30 -0
  34. package/dist/plugins/animation-graph/nodes/transition-node.d.ts +48 -0
  35. package/dist/plugins/animation-graph/pose-result.d.ts +6 -0
  36. package/dist/plugins/animation-graph/pose.d.ts +26 -0
  37. package/dist/plugins/animation-graph/skeleton.d.ts +38 -0
  38. package/dist/plugins/cal/calculate-vfx-item.d.ts +25 -22
  39. package/dist/plugins/index.d.ts +1 -0
  40. package/dist/plugins/particle/particle-system.d.ts +3 -4
  41. package/dist/plugins/sprite/sprite-item.d.ts +15 -2
  42. package/dist/plugins/text/text-item.d.ts +0 -11
  43. package/dist/vfx-item.d.ts +4 -5
  44. package/package.json +2 -2
@@ -9,7 +9,6 @@ export declare class AssetLoader {
9
9
  constructor(engine: Engine);
10
10
  loadGUID<T>(dataPath: spec.DataPath): T;
11
11
  private findData;
12
- private static getClass;
13
12
  }
14
13
  export declare class Database {
15
14
  loadGUID(guid: string): Promise<EffectsObject | undefined>;
@@ -17,7 +17,6 @@ export interface SceneBindingData {
17
17
  */
18
18
  export declare class CompositionComponent extends Component {
19
19
  time: number;
20
- startTime: number;
21
20
  items: VFXItem[];
22
21
  private reusable;
23
22
  private sceneBindings;
@@ -0,0 +1,15 @@
1
+ import type * as spec from '@galacean/effects-specification';
2
+ import { Component } from './component.js';
3
+ /**
4
+ * @since 2.6.0
5
+ */
6
+ export declare class Animator extends Component {
7
+ private graphAsset;
8
+ setBool(name: string, value: boolean): void;
9
+ setFloat(name: string, value: number): void;
10
+ setTrigger(name: string): void;
11
+ resetTrigger(name: string): void;
12
+ onStart(): void;
13
+ onUpdate(dt: number): void;
14
+ fromData(data: spec.AnimatorData): void;
15
+ }
@@ -4,6 +4,7 @@ import { MeshComponent } from './mesh-component';
4
4
  * @since 2.0.0
5
5
  */
6
6
  export declare class EffectComponent extends MeshComponent {
7
+ time: number;
7
8
  constructor(engine: Engine);
8
9
  onStart(): void;
9
10
  onUpdate(dt: number): void;
@@ -1,3 +1,4 @@
1
+ export * from './animator';
1
2
  export * from './renderer-component';
2
3
  export * from './component';
3
4
  export * from './effect-component';
@@ -9,11 +9,11 @@ import type { MeshRendererOptions, Renderer } from './render';
9
9
  import { RenderFrame } from './render';
10
10
  import type { Scene } from './scene';
11
11
  import type { Texture } from './texture';
12
- import type { Disposable, LostHandler } from './utils';
12
+ import type { Constructor, Disposable, LostHandler } from './utils';
13
13
  import { VFXItem } from './vfx-item';
14
14
  import type { CompositionEvent } from './events';
15
15
  import { EventEmitter } from './events';
16
- import type { PostProcessVolume } from './components';
16
+ import type { Component, PostProcessVolume } from './components';
17
17
  import { SceneTicking } from './composition/scene-ticking';
18
18
  /**
19
19
  * 合成统计信息
@@ -207,6 +207,10 @@ export declare class Composition extends EventEmitter<CompositionEvent<Compositi
207
207
  * 合成的相机对象
208
208
  */
209
209
  readonly camera: Camera;
210
+ /**
211
+ * 合成开始渲染的时间
212
+ */
213
+ readonly startTime: number;
210
214
  /**
211
215
  * 后处理渲染配置
212
216
  */
@@ -224,8 +228,8 @@ export declare class Composition extends EventEmitter<CompositionEvent<Compositi
224
228
  * 是否是否每次渲染时清除 RenderFrame 颜色缓存
225
229
  */
226
230
  protected readonly keepColorBuffer: boolean;
227
- protected rootComposition: CompositionComponent;
228
231
  protected readonly postLoaders: Plugin[];
232
+ protected rootComposition: CompositionComponent;
229
233
  /**
230
234
  * 合成暂停/播放 标识
231
235
  */
@@ -254,10 +258,6 @@ export declare class Composition extends EventEmitter<CompositionEvent<Compositi
254
258
  * 获取合成中所有元素
255
259
  */
256
260
  get items(): VFXItem[];
257
- /**
258
- * 获取合成开始渲染的时间
259
- */
260
- get startTime(): number;
261
261
  /**
262
262
  * 获取合成当前时间
263
263
  */
@@ -339,6 +339,13 @@ export declare class Composition extends EventEmitter<CompositionEvent<Compositi
339
339
  */
340
340
  setTime(time: number): void;
341
341
  addItem(item: VFXItem): void;
342
+ /**
343
+ * 获取合成上某一类型的组件
344
+ * @since 2.6.0
345
+ * @param classConstructor - 要获取的组件类型
346
+ * @returns 查询结果中符合类型的第一个组件
347
+ */
348
+ getComponent<T extends Component>(classConstructor: Constructor<T>): T;
342
349
  /**
343
350
  * 前进合成到指定时间
344
351
  * @param time - 相对0时刻的时间
@@ -1,5 +1,6 @@
1
1
  import type { Constructor } from './utils';
2
2
  export declare const effectsClassStore: Record<string, any>;
3
+ export declare function getClass(className: string): any;
3
4
  export declare function effectsClass(className: string): (target: Object, context?: unknown) => void;
4
5
  export declare function serialize(type?: Constructor, sourceName?: string): (target: Object, propertyKey: string | symbol) => void;
5
6
  export declare function getMergedStore(target: Object): Record<string, any> | undefined;
@@ -5,11 +5,12 @@ import type { Region } from '../plugins';
5
5
  */
6
6
  export type ItemEvent = {
7
7
  /**
8
- * 元素点击事件
8
+ * 元素点击事件(编辑器设置交互行为“消息通知”)
9
9
  */
10
10
  ['click']: [region: Region];
11
11
  /**
12
12
  * 元素消息事件(元素创建/销毁时触发)
13
+ * 注意:仅对交互元素有效
13
14
  */
14
15
  ['message']: [message: Omit<MessageItem, 'compositionId'>];
15
16
  };