@galacean/engine-core 0.0.0-experimental-0.9-plus.6 → 0.0.0-experimental-0.9-plus.7

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": "0.0.0-experimental-0.9-plus.6",
3
+ "version": "0.0.0-experimental-0.9-plus.7",
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.0.0-experimental-0.9-plus.6"
18
+ "@galacean/engine-math": "0.0.0-experimental-0.9-plus.7"
19
19
  },
20
20
  "devDependencies": {
21
- "@galacean/engine-design": "0.0.0-experimental-0.9-plus.6"
21
+ "@galacean/engine-design": "0.0.0-experimental-0.9-plus.7"
22
22
  },
23
23
  "scripts": {
24
24
  "b:types": "tsc"
@@ -96,10 +96,6 @@ export declare class Sprite extends RefObject {
96
96
  * @returns Cloned sprite
97
97
  */
98
98
  clone(): Sprite;
99
- /**
100
- * @override
101
- */
102
- _onDestroy(): void;
103
99
  private _calDefaultSize;
104
100
  private _updatePositions;
105
101
  private _updateUVs;
@@ -54,11 +54,6 @@ export declare class SpriteMask extends Renderer {
54
54
  */
55
55
  get alphaCutoff(): number;
56
56
  set alphaCutoff(value: number);
57
- /**
58
- * @override
59
- * @inheritdoc
60
- */
61
- _onDestroy(): void;
62
57
  /**
63
58
  * @override
64
59
  */
@@ -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
+ }
@@ -0,0 +1,6 @@
1
+ export declare enum ActiveChangeFlag {
2
+ None = 0,
3
+ Scene = 1,
4
+ Hierarchy = 2,
5
+ All = 3
6
+ }
@@ -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";
@@ -7,8 +7,16 @@ export declare class Sky {
7
7
  private static _epsilon;
8
8
  private static _viewProjMatrix;
9
9
  private static _projectionMatrix;
10
- /** Material of the sky. */
11
- material: Material;
12
- /** Mesh of the sky. */
13
- mesh: Mesh;
10
+ private _material;
11
+ private _mesh;
12
+ /**
13
+ * Material of the sky.
14
+ */
15
+ get material(): Material;
16
+ set material(value: Material);
17
+ /**
18
+ * Mesh of the sky.
19
+ */
20
+ get mesh(): Mesh;
21
+ set mesh(value: Mesh);
14
22
  }
@@ -0,0 +1,12 @@
1
+ import { UpdateFlag } from "./UpdateFlag";
2
+ /**
3
+ * Bool update flag.
4
+ */
5
+ export declare class BoolUpdateFlag extends UpdateFlag {
6
+ /** Bool flag. */
7
+ flag: boolean;
8
+ /**
9
+ * @inheritdoc
10
+ */
11
+ dispatch(): void;
12
+ }
@@ -0,0 +1,18 @@
1
+ /**
2
+ * High-performance unordered array, delete uses exchange method to improve performance, internal capacity only increases.
3
+ */
4
+ export declare class DisorderedArray<T> {
5
+ _elements: T[];
6
+ length: number;
7
+ constructor(count?: number);
8
+ add(element: T): void;
9
+ delete(element: T): void;
10
+ get(index: number): T;
11
+ /**
12
+ *
13
+ * @param index
14
+ * @returns The replaced item is used to reset its index.
15
+ */
16
+ deleteByIndex(index: number): T;
17
+ garbageCollection(): void;
18
+ }
@@ -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
+ }
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Used to update tags.
3
+ */
4
+ export declare abstract class UpdateFlag {
5
+ /**
6
+ * Dispatch.
7
+ * @param bit - Bit
8
+ * @param param - Parameter
9
+ */
10
+ abstract dispatch(bit?: number, param?: Object): void;
11
+ /**
12
+ * Clear.
13
+ */
14
+ clearFromManagers(): void;
15
+ /**
16
+ * Destroy.
17
+ */
18
+ destroy(): void;
19
+ private _removeFromManagers;
20
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,31 @@
1
+ export declare class Utils {
2
+ /**
3
+ * Fast remove an element from array.
4
+ * @param array - Array
5
+ * @param item - Element
6
+ */
7
+ static removeFromArray(array: any[], item: any): boolean;
8
+ /**
9
+ * Decodes a given Uint8Array into a string.
10
+ */
11
+ static decodeText(array: Uint8Array): string;
12
+ /**
13
+ * Judge whether the url is absolute url.
14
+ * @param url - The url to be judged.
15
+ * @returns Whether the url is absolute url.
16
+ */
17
+ static isAbsoluteUrl(url: string): boolean;
18
+ /**
19
+ * Get the values of an object.
20
+ */
21
+ static objectValues(obj: any): any[];
22
+ /**
23
+ * Convert a relative URL to an absolute URL based on a given base URL.
24
+ * @param baseUrl - The base url.
25
+ * @param relativeUrl - The relative url.
26
+ * @returns The resolved url.
27
+ */
28
+ static resolveAbsoluteUrl(baseUrl: string, relativeUrl: string): string;
29
+ private static _stringToPath;
30
+ private static _formatRelativePath;
31
+ }