@galacean/engine-core 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/dist/main.js +1229 -1071
- package/dist/main.js.map +1 -1
- package/dist/module.js +1228 -1072
- package/dist/module.js.map +1 -1
- package/package.json +3 -3
- package/types/Renderer.d.ts +1 -2
- package/types/Signal.d.ts +58 -0
- package/types/clone/CloneUtils.d.ts +1 -0
- package/types/clone/ComponentCloner.d.ts +0 -2
- package/types/index.d.ts +2 -0
- package/types/mesh/Skin.d.ts +1 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@galacean/engine-core",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.16",
|
|
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.
|
|
21
|
+
"@galacean/engine-math": "2.0.0-alpha.16"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
|
-
"@galacean/engine-design": "2.0.0-alpha.
|
|
24
|
+
"@galacean/engine-design": "2.0.0-alpha.16"
|
|
25
25
|
},
|
|
26
26
|
"scripts": {
|
|
27
27
|
"b:types": "tsc"
|
package/types/Renderer.d.ts
CHANGED
|
@@ -3,7 +3,6 @@ import { Component } from "./Component";
|
|
|
3
3
|
import { Entity } from "./Entity";
|
|
4
4
|
import { RenderContext } from "./RenderPipeline/RenderContext";
|
|
5
5
|
import { TransformModifyFlags } from "./Transform";
|
|
6
|
-
import { IComponentCustomClone } from "./clone/ComponentCloner";
|
|
7
6
|
import { SpriteMaskLayer } from "./enums/SpriteMaskLayer";
|
|
8
7
|
import { Material } from "./material";
|
|
9
8
|
import { ShaderData } from "./shader/ShaderData";
|
|
@@ -11,7 +10,7 @@ import { ShaderData } from "./shader/ShaderData";
|
|
|
11
10
|
* Basis for all renderers.
|
|
12
11
|
* @decorator `@dependentComponents(Transform, DependentMode.CheckOnly)`
|
|
13
12
|
*/
|
|
14
|
-
export declare class Renderer extends Component
|
|
13
|
+
export declare class Renderer extends Component {
|
|
15
14
|
private static _tempVector0;
|
|
16
15
|
private static _receiveShadowMacro;
|
|
17
16
|
private static _localMatrixProperty;
|
|
@@ -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
|
+
}
|
|
@@ -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";
|
package/types/mesh/Skin.d.ts
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { Matrix } from "@galacean/engine-math";
|
|
2
2
|
import { Entity } from "../Entity";
|
|
3
3
|
import { EngineObject } from "../base/EngineObject";
|
|
4
|
-
import { IComponentCustomClone } from "../clone/ComponentCloner";
|
|
5
4
|
/**
|
|
6
5
|
* Skin used for skinned mesh renderer.
|
|
7
6
|
*/
|
|
8
|
-
export declare class Skin extends EngineObject
|
|
7
|
+
export declare class Skin extends EngineObject {
|
|
9
8
|
name: string;
|
|
10
9
|
/** Inverse bind matrices. */
|
|
11
10
|
inverseBindMatrices: Matrix[];
|