@galacean/engine-core 2.0.0-alpha.13 → 2.0.0-alpha.15

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-core",
3
- "version": "2.0.0-alpha.13",
3
+ "version": "2.0.0-alpha.15",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "registry": "https://registry.npmjs.org"
@@ -18,10 +18,10 @@
18
18
  "types/**/*"
19
19
  ],
20
20
  "dependencies": {
21
- "@galacean/engine-math": "2.0.0-alpha.13"
21
+ "@galacean/engine-math": "2.0.0-alpha.15"
22
22
  },
23
23
  "devDependencies": {
24
- "@galacean/engine-design": "2.0.0-alpha.13"
24
+ "@galacean/engine-design": "2.0.0-alpha.15"
25
25
  },
26
26
  "scripts": {
27
27
  "b:types": "tsc"
@@ -0,0 +1,58 @@
1
+ import { Component } from "./Component";
2
+ /**
3
+ * Signal is a typed event mechanism for Galacean Engine.
4
+ * @typeParam T - Tuple type of the signal arguments
5
+ */
6
+ export declare class Signal<T extends any[] = []> {
7
+ private _listeners;
8
+ /**
9
+ * Add a listener for this signal.
10
+ * @param fn - The callback function
11
+ * @param target - The `this` context for the callback
12
+ */
13
+ on(fn: (...args: T) => void, target?: any): void;
14
+ /**
15
+ * Add a structured binding listener. Structured bindings support clone remapping.
16
+ * @param target - The target component
17
+ * @param methodName - The method name to invoke on the target
18
+ * @param args - Pre-resolved arguments
19
+ */
20
+ on(target: Component, methodName: string, ...args: any[]): void;
21
+ /**
22
+ * Add a one-time listener that is automatically removed after first invocation.
23
+ * @param fn - The callback function
24
+ * @param target - The `this` context for the callback
25
+ */
26
+ once(fn: (...args: T) => void, target?: any): void;
27
+ /**
28
+ * Add a one-time structured binding listener.
29
+ * @param target - The target component
30
+ * @param methodName - The method name to invoke on the target
31
+ * @param args - Pre-resolved arguments
32
+ */
33
+ once(target: Component, methodName: string, ...args: any[]): void;
34
+ /**
35
+ * Remove a listener. Both `fn` and `target` must match the values passed to `on`/`once`.
36
+ * @param fn - The callback function to remove
37
+ * @param target - The `this` context that was used when adding the listener
38
+ */
39
+ off(fn: (...args: T) => void, target?: any): void;
40
+ /**
41
+ * Remove a structured binding listener by target and method name.
42
+ * @param target - The target component
43
+ * @param methodName - The method name
44
+ */
45
+ off(target: Component, methodName: string): void;
46
+ /**
47
+ * Remove all listeners, or all listeners for a specific target.
48
+ * @param target - If provided, only remove listeners bound to this target
49
+ */
50
+ removeAll(target?: any): void;
51
+ /**
52
+ * Invoke the signal, calling all listeners in order.
53
+ * @param args - Arguments to pass to each listener
54
+ */
55
+ invoke(...args: T): void;
56
+ private _cloneArguments;
57
+ private _addListener;
58
+ }
@@ -51,5 +51,7 @@ export declare enum AssetType {
51
51
  /** Project asset. */
52
52
  Project = "project",
53
53
  /** PhysicsMaterial. */
54
- PhysicsMaterial = "PhysicsMaterial"
54
+ PhysicsMaterial = "PhysicsMaterial",
55
+ /** RenderTarget. */
56
+ RenderTarget = "RenderTarget"
55
57
  }
@@ -0,0 +1 @@
1
+ export {};
package/types/index.d.ts CHANGED
@@ -8,6 +8,7 @@ export { SceneManager } from "./SceneManager";
8
8
  export { Entity } from "./Entity";
9
9
  export { Component } from "./Component";
10
10
  export { Script } from "./Script";
11
+ export { Signal } from "./Signal";
11
12
  export { Renderer, RendererUpdateFlags } from "./Renderer";
12
13
  export { dependentComponents, DependentMode } from "./ComponentsDependencies";
13
14
  export { Camera } from "./Camera";
@@ -63,6 +64,7 @@ export * from "./env-probe/index";
63
64
  export * from "./shader/index";
64
65
  export * from "./Layer";
65
66
  export * from "./clone/CloneManager";
67
+ export { CloneUtils } from "./clone/CloneUtils";
66
68
  export * from "./renderingHardwareInterface/index";
67
69
  export * from "./physics/index";
68
70
  export * from "./Utils";
@@ -26,6 +26,10 @@ export declare class RenderTarget extends GraphicsResource {
26
26
  * Render target height.
27
27
  */
28
28
  get height(): number;
29
+ /**
30
+ * Render color textures.
31
+ */
32
+ get colorTextures(): ReadonlyArray<Texture>;
29
33
  /**
30
34
  * Render color texture count.
31
35
  */