@galacean/engine-core 1.0.0-beta.17 → 1.0.0-beta.18
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 +188 -160
- package/dist/main.js.map +1 -1
- package/dist/miniprogram.js +188 -160
- package/dist/module.js +188 -160
- package/dist/module.js.map +1 -1
- package/package.json +3 -3
- package/types/asset/request.d.ts +7 -3
- package/types/base/EventDispatcher.d.ts +1 -1
- package/types/SafeLoopArray.d.ts +0 -37
- package/types/enums/ActiveChangeFlag.d.ts +0 -6
- package/types/physics/PhysicsScene.d.ts +0 -75
- package/types/utils/SafeLoopArray.d.ts +0 -41
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@galacean/engine-core",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.18",
|
|
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": "1.0.0-beta.
|
|
18
|
+
"@galacean/engine-math": "1.0.0-beta.18"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
|
-
"@galacean/engine-design": "1.0.0-beta.
|
|
21
|
+
"@galacean/engine-design": "1.0.0-beta.18"
|
|
22
22
|
},
|
|
23
23
|
"scripts": {
|
|
24
24
|
"b:types": "tsc"
|
package/types/asset/request.d.ts
CHANGED
|
@@ -17,9 +17,13 @@ export declare class MultiExecutor {
|
|
|
17
17
|
private interval;
|
|
18
18
|
private _timeoutId;
|
|
19
19
|
private _currentCount;
|
|
20
|
+
private _onComplete;
|
|
21
|
+
private _onError;
|
|
22
|
+
private _error;
|
|
20
23
|
constructor(execFunc: (count?: number) => Promise<any>, totalCount: number, interval: number);
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
+
start(): this;
|
|
25
|
+
onComplete(func: Function): this;
|
|
26
|
+
onError(func: Function): this;
|
|
27
|
+
cancel(): void;
|
|
24
28
|
private exec;
|
|
25
29
|
}
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
* EventDispatcher, which can be inherited as a base class.
|
|
3
3
|
*/
|
|
4
4
|
export declare class EventDispatcher {
|
|
5
|
+
private static _dispatchingListenersPool;
|
|
5
6
|
private _events;
|
|
6
7
|
private _eventCount;
|
|
7
|
-
private _dispatchingListeners;
|
|
8
8
|
/**
|
|
9
9
|
* Determine whether there is event listening.
|
|
10
10
|
* @param event - Event name
|
package/types/SafeLoopArray.d.ts
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,75 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,41 +0,0 @@
|
|
|
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
|
-
}
|