@galacean/engine-core 0.9.17 → 0.9.19
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 +18 -25
- package/dist/main.js.map +1 -1
- package/dist/miniprogram.js +18 -25
- package/dist/module.js +18 -25
- package/dist/module.js.map +1 -1
- package/package.json +3 -3
- package/types/RenderPipeline/MeshRenderData.d.ts +3 -1
- package/types/RenderPipeline/SpriteMaskRenderData.d.ts +3 -1
- package/types/RenderPipeline/SpriteRenderData.d.ts +3 -1
- package/types/RenderPipeline/TextRenderData.d.ts +3 -1
- package/types/SafeLoopArray.d.ts +37 -0
- package/types/animation/Animator.d.ts +2 -2
- package/types/enums/ActiveChangeFlag.d.ts +6 -0
- package/types/physics/PhysicsScene.d.ts +75 -0
- package/types/shader/state/index.d.ts +6 -0
- package/types/texture/enums/TextureUsage.d.ts +9 -0
- package/types/utils/SafeLoopArray.d.ts +41 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@galacean/engine-core",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.19",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"registry": "https://registry.npmjs.org"
|
|
@@ -15,10 +15,10 @@
|
|
|
15
15
|
"types/**/*"
|
|
16
16
|
],
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@galacean/engine-math": "0.9.
|
|
18
|
+
"@galacean/engine-math": "0.9.19"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
|
-
"@galacean/engine-design": "0.9.
|
|
21
|
+
"@galacean/engine-design": "0.9.19"
|
|
22
22
|
},
|
|
23
23
|
"scripts": {
|
|
24
24
|
"b:types": "tsc"
|
|
@@ -2,14 +2,16 @@ import { Mesh } from "../graphic/Mesh";
|
|
|
2
2
|
import { SubMesh } from "../graphic/SubMesh";
|
|
3
3
|
import { Material } from "../material/Material";
|
|
4
4
|
import { Renderer } from "../Renderer";
|
|
5
|
+
import { IPoolElement } from "./IPoolElement";
|
|
5
6
|
import { RenderData } from "./RenderData";
|
|
6
7
|
/**
|
|
7
8
|
* Render element.
|
|
8
9
|
*/
|
|
9
|
-
export declare class MeshRenderData extends RenderData {
|
|
10
|
+
export declare class MeshRenderData extends RenderData implements IPoolElement {
|
|
10
11
|
/** Mesh. */
|
|
11
12
|
mesh: Mesh;
|
|
12
13
|
/** Sub mesh. */
|
|
13
14
|
subMesh: SubMesh;
|
|
14
15
|
set(component: Renderer, material: Material, mesh: Mesh, subMesh: SubMesh): void;
|
|
16
|
+
dispose(): void;
|
|
15
17
|
}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { VertexData2D } from "../2d/data/VertexData2D";
|
|
2
2
|
import { Material } from "../material/Material";
|
|
3
3
|
import { Renderer } from "../Renderer";
|
|
4
|
+
import { IPoolElement } from "./IPoolElement";
|
|
4
5
|
import { RenderData } from "./RenderData";
|
|
5
|
-
export declare class SpriteMaskRenderData extends RenderData {
|
|
6
|
+
export declare class SpriteMaskRenderData extends RenderData implements IPoolElement {
|
|
6
7
|
isAdd: boolean;
|
|
7
8
|
verticesData: VertexData2D;
|
|
8
9
|
constructor();
|
|
9
10
|
set(component: Renderer, material: Material, verticesData: VertexData2D): void;
|
|
11
|
+
dispose(): void;
|
|
10
12
|
}
|
|
@@ -2,11 +2,13 @@ import { VertexData2D } from "../2d/data/VertexData2D";
|
|
|
2
2
|
import { Material } from "../material/Material";
|
|
3
3
|
import { Renderer } from "../Renderer";
|
|
4
4
|
import { Texture2D } from "../texture";
|
|
5
|
+
import { IPoolElement } from "./IPoolElement";
|
|
5
6
|
import { RenderData } from "./RenderData";
|
|
6
|
-
export declare class SpriteRenderData extends RenderData {
|
|
7
|
+
export declare class SpriteRenderData extends RenderData implements IPoolElement {
|
|
7
8
|
verticesData: VertexData2D;
|
|
8
9
|
texture: Texture2D;
|
|
9
10
|
dataIndex: number;
|
|
10
11
|
constructor();
|
|
11
12
|
set(component: Renderer, material: Material, verticesData: VertexData2D, texture: Texture2D, dataIndex?: number): void;
|
|
13
|
+
dispose(): void;
|
|
12
14
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import { IPoolElement } from "./IPoolElement";
|
|
1
2
|
import { RenderData } from "./RenderData";
|
|
2
3
|
import { SpriteRenderData } from "./SpriteRenderData";
|
|
3
|
-
export declare class TextRenderData extends RenderData {
|
|
4
|
+
export declare class TextRenderData extends RenderData implements IPoolElement {
|
|
4
5
|
charsData: SpriteRenderData[];
|
|
5
6
|
constructor();
|
|
7
|
+
dispose(): void;
|
|
6
8
|
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export declare class SafeLoopArray<T> {
|
|
2
|
+
private _array;
|
|
3
|
+
private _loopArray;
|
|
4
|
+
private _loopArrayDirty;
|
|
5
|
+
/**
|
|
6
|
+
* Get the length of the array.
|
|
7
|
+
*/
|
|
8
|
+
get length(): number;
|
|
9
|
+
/**
|
|
10
|
+
* Push item to the array.
|
|
11
|
+
* @param item - The item which want to be pushed
|
|
12
|
+
*/
|
|
13
|
+
push(item: T): void;
|
|
14
|
+
/**
|
|
15
|
+
* Splice the array.
|
|
16
|
+
* @param index - The index of the array
|
|
17
|
+
* @param deleteCount - The count of the array which want to be deleted
|
|
18
|
+
* @param item - The item which want to be added
|
|
19
|
+
*/
|
|
20
|
+
splice(index: number, deleteCount: number, item?: T): void;
|
|
21
|
+
/**
|
|
22
|
+
* The index of the item.
|
|
23
|
+
* @param item - The item which want to get the index
|
|
24
|
+
* @returns Index of the item
|
|
25
|
+
*/
|
|
26
|
+
indexOf(item: T): number;
|
|
27
|
+
/**
|
|
28
|
+
* Get the array.
|
|
29
|
+
* @returns The array
|
|
30
|
+
*/
|
|
31
|
+
getArray(): ReadonlyArray<T>;
|
|
32
|
+
/**
|
|
33
|
+
* Get the array use for loop.
|
|
34
|
+
* @returns The array use for loop
|
|
35
|
+
*/
|
|
36
|
+
getLoopArray(): ReadonlyArray<T>;
|
|
37
|
+
}
|
|
@@ -13,9 +13,9 @@ export declare class Animator extends Component {
|
|
|
13
13
|
speed: number;
|
|
14
14
|
protected _animatorController: AnimatorController;
|
|
15
15
|
protected _controllerUpdateFlag: BoolUpdateFlag;
|
|
16
|
+
protected _updateMark: number;
|
|
16
17
|
private _animatorLayersData;
|
|
17
18
|
private _curveOwnerPool;
|
|
18
|
-
private _needRevertCurveOwners;
|
|
19
19
|
private _animationEventHandlerPool;
|
|
20
20
|
private _tempAnimatorStateInfo;
|
|
21
21
|
private _controlledRenderers;
|
|
@@ -83,5 +83,5 @@ export declare class Animator extends Component {
|
|
|
83
83
|
private _callAnimatorScriptOnUpdate;
|
|
84
84
|
private _callAnimatorScriptOnExit;
|
|
85
85
|
private _checkAutoPlay;
|
|
86
|
-
private
|
|
86
|
+
private _checkRevertOwner;
|
|
87
87
|
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { Ray, Vector3 } from "@galacean/engine-math";
|
|
2
|
+
import { Layer } from "../Layer";
|
|
3
|
+
import { Scene } from "../Scene";
|
|
4
|
+
import { HitResult } from "./HitResult";
|
|
5
|
+
/**
|
|
6
|
+
* A physics scene is a collection of colliders and constraints which can interact.
|
|
7
|
+
*/
|
|
8
|
+
export declare class PhysicsScene {
|
|
9
|
+
private static _collision;
|
|
10
|
+
private _scene;
|
|
11
|
+
private _restTime;
|
|
12
|
+
private _colliders;
|
|
13
|
+
private _gravity;
|
|
14
|
+
private _nativePhysicsScene;
|
|
15
|
+
private _onContactEnter;
|
|
16
|
+
private _onContactExit;
|
|
17
|
+
private _onContactStay;
|
|
18
|
+
private _onTriggerEnter;
|
|
19
|
+
private _onTriggerExit;
|
|
20
|
+
private _onTriggerStay;
|
|
21
|
+
/** The fixed time step in seconds at which physics are performed. */
|
|
22
|
+
fixedTimeStep: number;
|
|
23
|
+
/**
|
|
24
|
+
* The gravity of physics scene.
|
|
25
|
+
*/
|
|
26
|
+
get gravity(): Vector3;
|
|
27
|
+
set gravity(value: Vector3);
|
|
28
|
+
constructor(scene: Scene);
|
|
29
|
+
/**
|
|
30
|
+
* Casts a ray through the Scene and returns the first hit.
|
|
31
|
+
* @param ray - The ray
|
|
32
|
+
* @returns Returns True if the ray intersects with a collider, otherwise false
|
|
33
|
+
*/
|
|
34
|
+
raycast(ray: Ray): boolean;
|
|
35
|
+
/**
|
|
36
|
+
* Casts a ray through the Scene and returns the first hit.
|
|
37
|
+
* @param ray - The ray
|
|
38
|
+
* @param outHitResult - If true is returned, outHitResult will contain more detailed collision information
|
|
39
|
+
* @returns Returns True if the ray intersects with a collider, otherwise false
|
|
40
|
+
*/
|
|
41
|
+
raycast(ray: Ray, outHitResult: HitResult): boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Casts a ray through the Scene and returns the first hit.
|
|
44
|
+
* @param ray - The ray
|
|
45
|
+
* @param distance - The max distance the ray should check
|
|
46
|
+
* @returns Returns True if the ray intersects with a collider, otherwise false
|
|
47
|
+
*/
|
|
48
|
+
raycast(ray: Ray, distance: number): boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Casts a ray through the Scene and returns the first hit.
|
|
51
|
+
* @param ray - The ray
|
|
52
|
+
* @param distance - The max distance the ray should check
|
|
53
|
+
* @param outHitResult - If true is returned, outHitResult will contain more detailed collision information
|
|
54
|
+
* @returns Returns True if the ray intersects with a collider, otherwise false
|
|
55
|
+
*/
|
|
56
|
+
raycast(ray: Ray, distance: number, outHitResult: HitResult): boolean;
|
|
57
|
+
/**
|
|
58
|
+
* Casts a ray through the Scene and returns the first hit.
|
|
59
|
+
* @param ray - The ray
|
|
60
|
+
* @param distance - The max distance the ray should check
|
|
61
|
+
* @param layerMask - Layer mask that is used to selectively ignore Colliders when casting
|
|
62
|
+
* @returns Returns True if the ray intersects with a collider, otherwise false
|
|
63
|
+
*/
|
|
64
|
+
raycast(ray: Ray, distance: number, layerMask: Layer): boolean;
|
|
65
|
+
/**
|
|
66
|
+
* Casts a ray through the Scene and returns the first hit.
|
|
67
|
+
* @param ray - The ray
|
|
68
|
+
* @param distance - The max distance the ray should check
|
|
69
|
+
* @param layerMask - Layer mask that is used to selectively ignore Colliders when casting
|
|
70
|
+
* @param outHitResult - If true is returned, outHitResult will contain more detailed collision information
|
|
71
|
+
* @returns Returns True if the ray intersects with a collider, otherwise false.
|
|
72
|
+
*/
|
|
73
|
+
raycast(ray: Ray, distance: number, layerMask: Layer, outHitResult: HitResult): boolean;
|
|
74
|
+
private _setGravity;
|
|
75
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { BlendState } from "./BlendState";
|
|
2
|
+
export { DepthState } from "./DepthState";
|
|
3
|
+
export { RasterState } from "./RasterState";
|
|
4
|
+
export { RenderState } from "./RenderState";
|
|
5
|
+
export { RenderTargetBlendState } from "./RenderTargetBlendState";
|
|
6
|
+
export { StencilState } from "./StencilState";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Texture usage.
|
|
3
|
+
*/
|
|
4
|
+
export declare enum TextureUsage {
|
|
5
|
+
/** The content of the texture is intended to be specified once. */
|
|
6
|
+
Static = 0,
|
|
7
|
+
/** The content of the texture is intended to be updated frequently, with better performance. */
|
|
8
|
+
Dynamic = 1
|
|
9
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
export declare class SafeLoopArray<T> {
|
|
2
|
+
private _array;
|
|
3
|
+
private _loopArray;
|
|
4
|
+
private _loopArrayDirty;
|
|
5
|
+
/**
|
|
6
|
+
* Get the length of the array.
|
|
7
|
+
*/
|
|
8
|
+
get length(): number;
|
|
9
|
+
/**
|
|
10
|
+
* Push item to the array.
|
|
11
|
+
* @param item - The item which want to be pushed
|
|
12
|
+
*/
|
|
13
|
+
push(item: T): void;
|
|
14
|
+
/**
|
|
15
|
+
* Add item to the array.
|
|
16
|
+
* @param index - The index of the array
|
|
17
|
+
* @param item - The item which want to be added
|
|
18
|
+
*/
|
|
19
|
+
add(index: number, item: T): void;
|
|
20
|
+
/**
|
|
21
|
+
* Remove item from the array.
|
|
22
|
+
* @param index - The index of the array
|
|
23
|
+
*/
|
|
24
|
+
removeByIndex(index: number): void;
|
|
25
|
+
/**
|
|
26
|
+
* The index of the item.
|
|
27
|
+
* @param item - The item which want to get the index
|
|
28
|
+
* @returns Index of the item
|
|
29
|
+
*/
|
|
30
|
+
indexOf(item: T): number;
|
|
31
|
+
/**
|
|
32
|
+
* Get the array.
|
|
33
|
+
* @returns The array
|
|
34
|
+
*/
|
|
35
|
+
getArray(): ReadonlyArray<T>;
|
|
36
|
+
/**
|
|
37
|
+
* Get the array use for loop.
|
|
38
|
+
* @returns The array use for loop
|
|
39
|
+
*/
|
|
40
|
+
getLoopArray(): ReadonlyArray<T>;
|
|
41
|
+
}
|