@galacean/effects-core 2.5.1 → 2.6.0-alpha.0

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 (42) 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/index.js +4114 -1688
  9. package/dist/index.js.map +1 -1
  10. package/dist/index.mjs +4081 -1688
  11. package/dist/index.mjs.map +1 -1
  12. package/dist/math/value-getters/color-curve.d.ts +1 -0
  13. package/dist/math/value-getters/vector-curves.d.ts +13 -1
  14. package/dist/plugins/animation-graph/animation-graph-asset.d.ts +13 -0
  15. package/dist/plugins/animation-graph/blender.d.ts +38 -0
  16. package/dist/plugins/animation-graph/graph-context.d.ts +20 -0
  17. package/dist/plugins/animation-graph/graph-data-set.d.ts +5 -0
  18. package/dist/plugins/animation-graph/graph-instance.d.ts +30 -0
  19. package/dist/plugins/animation-graph/graph-node.d.ts +70 -0
  20. package/dist/plugins/animation-graph/index.d.ts +6 -0
  21. package/dist/plugins/animation-graph/node-asset-type.d.ts +3 -0
  22. package/dist/plugins/animation-graph/nodes/animation-clip-node.d.ts +52 -0
  23. package/dist/plugins/animation-graph/nodes/apply-additive-node.d.ts +23 -0
  24. package/dist/plugins/animation-graph/nodes/blend-1d-node.d.ts +23 -0
  25. package/dist/plugins/animation-graph/nodes/bool-nodes.d.ts +39 -0
  26. package/dist/plugins/animation-graph/nodes/const-value-nodes.d.ts +21 -0
  27. package/dist/plugins/animation-graph/nodes/control-parameter-nodes.d.ts +32 -0
  28. package/dist/plugins/animation-graph/nodes/index.d.ts +10 -0
  29. package/dist/plugins/animation-graph/nodes/operator-nodes.d.ts +35 -0
  30. package/dist/plugins/animation-graph/nodes/state-machine-node.d.ts +35 -0
  31. package/dist/plugins/animation-graph/nodes/state-node.d.ts +30 -0
  32. package/dist/plugins/animation-graph/nodes/transition-node.d.ts +48 -0
  33. package/dist/plugins/animation-graph/pose-result.d.ts +6 -0
  34. package/dist/plugins/animation-graph/pose.d.ts +25 -0
  35. package/dist/plugins/animation-graph/skeleton.d.ts +38 -0
  36. package/dist/plugins/cal/calculate-vfx-item.d.ts +25 -22
  37. package/dist/plugins/index.d.ts +1 -0
  38. package/dist/plugins/particle/particle-system.d.ts +3 -1
  39. package/dist/plugins/sprite/sprite-item.d.ts +15 -2
  40. package/dist/plugins/text/text-item.d.ts +0 -11
  41. package/dist/vfx-item.d.ts +4 -0
  42. 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
  */
@@ -225,8 +229,8 @@ export declare class Composition extends EventEmitter<CompositionEvent<Compositi
225
229
  * 是否是否每次渲染时清除 RenderFrame 颜色缓存
226
230
  */
227
231
  protected readonly keepColorBuffer: boolean;
228
- protected rootComposition: CompositionComponent;
229
232
  protected readonly postLoaders: Plugin[];
233
+ protected rootComposition: CompositionComponent;
230
234
  /**
231
235
  * 合成暂停/播放 标识
232
236
  */
@@ -255,10 +259,6 @@ export declare class Composition extends EventEmitter<CompositionEvent<Compositi
255
259
  * 获取合成中所有元素
256
260
  */
257
261
  get items(): VFXItem[];
258
- /**
259
- * 获取合成开始渲染的时间
260
- */
261
- get startTime(): number;
262
262
  /**
263
263
  * 获取合成当前时间
264
264
  */
@@ -340,6 +340,13 @@ export declare class Composition extends EventEmitter<CompositionEvent<Compositi
340
340
  */
341
341
  setTime(time: number): void;
342
342
  addItem(item: VFXItem): void;
343
+ /**
344
+ * 获取合成上某一类型的组件
345
+ * @since 2.6.0
346
+ * @param classConstructor - 要获取的组件类型
347
+ * @returns 查询结果中符合类型的第一个组件
348
+ */
349
+ getComponent<T extends Component>(classConstructor: Constructor<T>): T;
343
350
  /**
344
351
  * 前进合成到指定时间
345
352
  * @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;