@galacean/engine-loader 2.0.0-alpha.14 → 2.0.0-alpha.16

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/engine-loader",
3
- "version": "2.0.0-alpha.14",
3
+ "version": "2.0.0-alpha.16",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "registry": "https://registry.npmjs.org"
@@ -19,9 +19,9 @@
19
19
  "libs/**/*"
20
20
  ],
21
21
  "dependencies": {
22
- "@galacean/engine-math": "2.0.0-alpha.14",
23
- "@galacean/engine-core": "2.0.0-alpha.14",
24
- "@galacean/engine-rhi-webgl": "2.0.0-alpha.14"
22
+ "@galacean/engine-core": "2.0.0-alpha.16",
23
+ "@galacean/engine-math": "2.0.0-alpha.16",
24
+ "@galacean/engine-rhi-webgl": "2.0.0-alpha.16"
25
25
  },
26
26
  "scripts": {
27
27
  "b:types": "tsc"
@@ -1,5 +1,5 @@
1
- import { EngineObject, Entity } from "@galacean/engine-core";
2
- import type { IBasicType, IClass, IEntity, IHierarchyFile, IMethodParams } from "../schema";
1
+ import { EngineObject, Entity, Signal } from "@galacean/engine-core";
2
+ import type { IBasicType, IClass, IEntity, IHierarchyFile, IMethodParams, ISignalRef } from "../schema";
3
3
  import { ParserContext } from "./ParserContext";
4
4
  export declare class ReflectionParser {
5
5
  private readonly _context;
@@ -8,12 +8,15 @@ export declare class ReflectionParser {
8
8
  parseClassObject(item: IClass): Promise<any>;
9
9
  parsePropsAndMethods(instance: any, item: Omit<IClass, "class">): Promise<any>;
10
10
  parseMethod(instance: any, methodName: string, methodParams: IMethodParams): Promise<any>;
11
+ parseSignal(signalRef: ISignalRef): Promise<Signal>;
11
12
  parseBasicType(value: IBasicType, originValue?: any): Promise<any>;
12
13
  private _getEntityByConfig;
14
+ private _resolveEntityByPath;
13
15
  private static _isClass;
14
16
  private static _isClassType;
15
17
  private static _isAssetRef;
16
18
  private static _isEntityRef;
17
19
  private static _isComponentRef;
20
+ private static _isSignalRef;
18
21
  private static _isMethodObject;
19
22
  }
@@ -83,15 +83,23 @@ export interface IInstance {
83
83
  export type IClassType = {
84
84
  classType: string;
85
85
  };
86
- export type IBasicType = string | number | boolean | null | undefined | IAssetRef | IClass | IClassType | IMethodParams | IEntityRef;
86
+ export type IBasicType = string | number | boolean | null | undefined | IAssetRef | IClass | IClassType | IMethodParams | IEntityRef | IComponentRef | ISignalRef;
87
87
  export type IAssetRef = {
88
88
  key?: string;
89
89
  url: string;
90
90
  };
91
91
  export type IEntityRef = {
92
- entityId: string;
92
+ entityPath: number[];
93
93
  };
94
94
  export type IComponentRef = {
95
- ownerId: string;
96
- componentId: string;
95
+ entityPath: number[];
96
+ componentType: string;
97
+ componentIndex: number;
98
+ };
99
+ export type ISignalRef = {
100
+ listeners: Array<{
101
+ target: IComponentRef;
102
+ methodName: string;
103
+ arguments?: Array<IBasicType>;
104
+ }>;
97
105
  };