@galacean/effects-core 2.0.0-alpha.16 → 2.0.0-alpha.17

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.
@@ -35,7 +35,7 @@ export declare class CompositionComponent extends ItemBehaviour {
35
35
  createContent(): void;
36
36
  onDestroy(): void;
37
37
  hitTest(ray: Ray, x: number, y: number, regions: Region[], force?: boolean, options?: CompositionHitTestOptions): Region[];
38
- fromData(data: any): void;
38
+ fromData(data: unknown): void;
39
39
  private resolveBindings;
40
40
  private resolveTrackBindingsWithRoot;
41
41
  }
@@ -24,7 +24,7 @@ export declare abstract class Component extends EffectsObject {
24
24
  * @internal
25
25
  */
26
26
  export declare abstract class Behaviour extends Component {
27
- _enabled: boolean;
27
+ private _enabled;
28
28
  /**
29
29
  * 组件是否可以更新,true 更新,false 不更新
30
30
  */
@@ -32,7 +32,7 @@ export declare abstract class Behaviour extends Component {
32
32
  get enabled(): boolean;
33
33
  set enabled(value: boolean);
34
34
  protected onBehaviourEnable(): void;
35
- fromData(data: any): void;
35
+ fromData(data: unknown): void;
36
36
  toData(): void;
37
37
  }
38
38
  /**
@@ -53,7 +53,7 @@ export declare class EffectComponent extends RendererComponent {
53
53
  setMaterial(material: Material, destroy?: MaterialDestroyOptions | DestroyOptions.keep): void;
54
54
  getHitTestParams: (force?: boolean) => HitTestTriangleParams | void;
55
55
  getBoundingBox(): BoundingBoxTriangle | void;
56
- fromData(data: any): void;
56
+ fromData(data: unknown): void;
57
57
  toData(): void;
58
58
  /**
59
59
  * 销毁当前资源
@@ -26,7 +26,7 @@ export declare class RendererComponent extends Component {
26
26
  lateUpdate(dt: number): void;
27
27
  render(renderer: Renderer): void;
28
28
  onAttached(): void;
29
- fromData(data: any): void;
29
+ fromData(data: unknown): void;
30
30
  toData(): void;
31
31
  dispose(): void;
32
32
  }
@@ -1,4 +1,5 @@
1
+ export type ClassConstructor = new () => any;
1
2
  export declare const effectsClassStore: Record<string, any>;
2
- export declare function getMergedStore(target: any): any;
3
- export declare function serialize(type?: string, sourceName?: string): (target: any, propertyKey: any) => void;
4
- export declare function effectsClass(className: any): (target: any, context?: any) => void;
3
+ export declare function effectsClass(className: string): (target: Object, context?: unknown) => void;
4
+ export declare function serialize(type?: ClassConstructor, sourceName?: string): (target: Object, propertyKey: string | symbol) => void;
5
+ export declare function getMergedStore(target: Object): Record<string, any>;
@@ -6,6 +6,7 @@ import type { Engine } from './engine';
6
6
  */
7
7
  export declare abstract class EffectsObject {
8
8
  engine: Engine;
9
+ static is(obj: unknown): obj is EffectsObject;
9
10
  protected guid: string;
10
11
  /**
11
12
  * 存储需要序列化的数据
@@ -1,4 +1,4 @@
1
- import type { BaseContent, JSONScene, JSONSceneLegacy } from '@galacean/effects-specification';
1
+ import type { BaseContent, BinaryFile, JSONScene, JSONSceneLegacy, SpineResource, SpineContent } from '@galacean/effects-specification';
2
2
  /**
3
3
  * 2.1 以下版本数据适配(mars-player@2.4.0 及以上版本支持 2.1 以下数据的适配)
4
4
  */
@@ -16,3 +16,5 @@ export declare function version30Migration(json: JSONSceneLegacy): JSONScene;
16
16
  */
17
17
  export declare function version24Migration(json: JSONScene): JSONScene;
18
18
  export declare function convertParam(content?: BaseContent): void;
19
+ export declare function convertBinaryAsset(bins: BinaryFile[], jsonScene: JSONScene): void;
20
+ export declare function convertSpineData(resource: SpineResource, content: SpineContent, jsonScene: JSONScene): void;
package/dist/index.d.ts CHANGED
@@ -33,3 +33,4 @@ export * from './transform';
33
33
  export * from './utils';
34
34
  export * from './vfx-item';
35
35
  export * from './binary-asset';
36
+ export * from './effects-object';