@galacean/engine-core 1.0.0-beta.1 → 1.0.0-beta.10

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.
Files changed (48) hide show
  1. package/dist/main.js +762 -335
  2. package/dist/main.js.map +1 -1
  3. package/dist/miniprogram.js +762 -335
  4. package/dist/module.js +757 -336
  5. package/dist/module.js.map +1 -1
  6. package/package.json +3 -3
  7. package/types/2d/atlas/SpriteAtlas.d.ts +0 -1
  8. package/types/2d/sprite/Sprite.d.ts +12 -3
  9. package/types/2d/sprite/SpriteMask.d.ts +16 -17
  10. package/types/2d/sprite/SpriteRenderer.d.ts +17 -11
  11. package/types/2d/text/Font.d.ts +0 -1
  12. package/types/2d/text/TextRenderer.d.ts +1 -9
  13. package/types/Camera.d.ts +0 -4
  14. package/types/Component.d.ts +0 -1
  15. package/types/Engine.d.ts +0 -2
  16. package/types/Renderer.d.ts +3 -11
  17. package/types/SafeLoopArray.d.ts +37 -0
  18. package/types/Script.d.ts +0 -1
  19. package/types/animation/Animator.d.ts +2 -3
  20. package/types/animation/internal/AnimationCurveLayerOwner.d.ts +1 -0
  21. package/types/animation/internal/AnimationCurveOwnerLayerData.d.ts +1 -0
  22. package/types/asset/GraphicsResource.d.ts +0 -1
  23. package/types/asset/ReferResource.d.ts +0 -1
  24. package/types/enums/ActiveChangeFlag.d.ts +6 -0
  25. package/types/env-probe/CubeProbe.d.ts +0 -1
  26. package/types/graphic/Buffer.d.ts +0 -1
  27. package/types/graphic/Mesh.d.ts +2 -6
  28. package/types/index.d.ts +1 -1
  29. package/types/lighting/Light.d.ts +0 -1
  30. package/types/material/PBRMaterial.d.ts +11 -2
  31. package/types/mesh/MeshRenderer.d.ts +8 -8
  32. package/types/mesh/ModelMesh.d.ts +0 -1
  33. package/types/mesh/SkinnedMeshRenderer.d.ts +0 -4
  34. package/types/physics/Collider.d.ts +0 -1
  35. package/types/physics/PhysicsScene.d.ts +75 -0
  36. package/types/shader/index.d.ts +1 -0
  37. package/types/shader/state/index.d.ts +6 -0
  38. package/types/shadow/CascadedShadowCasterPass.d.ts +1 -0
  39. package/types/sky/Sky.d.ts +12 -4
  40. package/types/texture/RenderTarget.d.ts +0 -1
  41. package/types/texture/Texture.d.ts +0 -1
  42. package/types/trail/TrailRenderer.d.ts +0 -2
  43. package/types/utils/BoolUpdateFlag.d.ts +12 -0
  44. package/types/utils/DisorderedArray.d.ts +18 -0
  45. package/types/utils/SafeLoopArray.d.ts +41 -0
  46. package/types/utils/UpdateFlag.d.ts +20 -0
  47. package/types/utils/UpdateFlagManager.d.ts +1 -0
  48. package/types/utils/Utils.d.ts +31 -0
@@ -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
  }
@@ -88,5 +88,4 @@ export declare class RenderTarget extends GraphicsResource {
88
88
  * Generate the mipmap of each attachment texture of the renderTarget according to the configuration.
89
89
  */
90
90
  generateMipmaps(): void;
91
- protected _onDestroy(): void;
92
91
  }
@@ -64,7 +64,6 @@ export declare abstract class Texture extends GraphicsResource {
64
64
  * Generate multi-level textures based on the 0th level data.
65
65
  */
66
66
  generateMipmaps(): void;
67
- protected _onDestroy(): void;
68
67
  /**
69
68
  * Get the maximum mip level of the corresponding size:rounding down.
70
69
  * @remarks http://download.nvidia.com/developer/Papers/2005/NP2_Mipmapping/NP2_Mipmap_Creation.pdf
@@ -1,5 +1,4 @@
1
1
  import { Entity } from "../Entity";
2
- import { RenderContext } from "../RenderPipeline/RenderContext";
3
2
  import { MeshRenderer } from "../mesh/MeshRenderer";
4
3
  import { Texture2D } from "../texture";
5
4
  /**
@@ -28,7 +27,6 @@ export declare class TrailRenderer extends MeshRenderer {
28
27
  * @param texture
29
28
  */
30
29
  setTexture(texture: Texture2D): void;
31
- protected _render(context: RenderContext): void;
32
30
  private _initGeometry;
33
31
  private _updateStrapVertices;
34
32
  private _updateStrapCoords;
@@ -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
+ }