@galacean/engine-core 1.2.0-alpha.1 → 1.2.0-alpha.11

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 (86) hide show
  1. package/dist/main.js +564 -483
  2. package/dist/main.js.map +1 -1
  3. package/dist/miniprogram.js +564 -483
  4. package/dist/module.js +563 -482
  5. package/dist/module.js.map +1 -1
  6. package/package.json +3 -3
  7. package/types/Camera.d.ts +11 -5
  8. package/types/Canvas.d.ts +2 -1
  9. package/types/Engine.d.ts +4 -2
  10. package/types/RenderPipeline/MeshRenderElement.d.ts +19 -0
  11. package/types/RenderPipeline/SpriteElement.d.ts +15 -0
  12. package/types/RenderPipeline/SpriteMaskElement.d.ts +12 -0
  13. package/types/RenderPipeline/TextRenderElement.d.ts +8 -0
  14. package/types/Scene.d.ts +5 -0
  15. package/types/Utils.d.ts +6 -0
  16. package/types/asset/AssetType.d.ts +2 -0
  17. package/types/asset/IRefObject.d.ts +2 -0
  18. package/types/asset/Loader.d.ts +7 -0
  19. package/types/asset/RefObject.d.ts +27 -0
  20. package/types/asset/ResourceManager.d.ts +2 -0
  21. package/types/base/Event.d.ts +24 -0
  22. package/types/base/Util.d.ts +14 -0
  23. package/types/input/InputManager.d.ts +0 -2
  24. package/types/input/interface/IInput.d.ts +0 -8
  25. package/types/particle/modules/MainModule.d.ts +2 -0
  26. package/types/particle/modules/shape/BaseShape.d.ts +2 -2
  27. package/types/particle/modules/shape/BoxShape.d.ts +2 -1
  28. package/types/particle/modules/shape/CircleShape.d.ts +2 -1
  29. package/types/particle/modules/shape/ConeShape.d.ts +2 -1
  30. package/types/particle/modules/shape/HemisphereShape.d.ts +2 -1
  31. package/types/particle/modules/shape/SphereShape.d.ts +2 -1
  32. package/types/particle/modules/shape/index.d.ts +1 -0
  33. package/types/physics/HitResult.d.ts +3 -0
  34. package/types/shaderlib/ShaderFactory.d.ts +6 -1
  35. package/types/shadow/CascadedShadowCasterPass.d.ts +0 -1
  36. package/types/texture/Texture.d.ts +1 -0
  37. package/types/texture/enums/TextureFormat.d.ts +28 -26
  38. package/types/xr/XRPose.d.ts +0 -15
  39. package/types/xr/feature/XRFeature.d.ts +0 -16
  40. package/types/xr/feature/XRFeatureManager.d.ts +0 -65
  41. package/types/xr/feature/XRFeatureType.d.ts +0 -13
  42. package/types/xr/feature/camera/XRCameraManager.d.ts +0 -26
  43. package/types/xr/feature/hitTest/TrackableType.d.ts +0 -10
  44. package/types/xr/feature/hitTest/XRHitResult.d.ts +0 -19
  45. package/types/xr/feature/hitTest/XRHitTest.d.ts +0 -39
  46. package/types/xr/feature/hitTest/XRHitTestManager.d.ts +0 -38
  47. package/types/xr/feature/hitTest/XRHitTestType.d.ts +0 -16
  48. package/types/xr/feature/movementTracking/XRMovementTracking.d.ts +0 -18
  49. package/types/xr/feature/movementTracking/XRMovementTrackingManager.d.ts +0 -10
  50. package/types/xr/feature/movementTracking/XRMovementTrackingMode.d.ts +0 -5
  51. package/types/xr/feature/trackable/XRRequestTrackingState.d.ts +0 -11
  52. package/types/xr/feature/trackable/XRTrackableFeature.d.ts +0 -38
  53. package/types/xr/feature/trackable/XRTrackableManager.d.ts +0 -41
  54. package/types/xr/feature/trackable/XRTracked.d.ts +0 -1
  55. package/types/xr/feature/trackable/anchor/XRAnchor.d.ts +0 -6
  56. package/types/xr/feature/trackable/anchor/XRAnchorTracking.d.ts +0 -37
  57. package/types/xr/feature/trackable/anchor/XRAnchorTrackingManager.d.ts +0 -20
  58. package/types/xr/feature/trackable/anchor/XRRequestAnchor.d.ts +0 -15
  59. package/types/xr/feature/trackable/image/XRImageTracking.d.ts +0 -24
  60. package/types/xr/feature/trackable/image/XRImageTrackingManager.d.ts +0 -31
  61. package/types/xr/feature/trackable/image/XRReferenceImage.d.ts +0 -11
  62. package/types/xr/feature/trackable/image/XRRequestImage.d.ts +0 -13
  63. package/types/xr/feature/trackable/image/XRTrackedImage.d.ts +0 -8
  64. package/types/xr/feature/trackable/plane/XRPlaneMode.d.ts +0 -13
  65. package/types/xr/feature/trackable/plane/XRPlaneTracking.d.ts +0 -23
  66. package/types/xr/feature/trackable/plane/XRPlaneTrackingManager.d.ts +0 -11
  67. package/types/xr/feature/trackable/plane/XRRequestPlane.d.ts +0 -12
  68. package/types/xr/feature/trackable/plane/XRTrackedPlane.d.ts +0 -20
  69. package/types/xr/index.d.ts +0 -25
  70. package/types/xr/input/XRCamera.d.ts +0 -15
  71. package/types/xr/input/XRController.d.ts +0 -38
  72. package/types/xr/input/XRControllerPoseMode.d.ts +0 -9
  73. package/types/xr/input/XRInput.d.ts +0 -8
  74. package/types/xr/input/XRInputButton.d.ts +0 -19
  75. package/types/xr/input/XRInputEvent.d.ts +0 -24
  76. package/types/xr/input/XRInputEventType.d.ts +0 -11
  77. package/types/xr/input/XRInputManager.d.ts +0 -31
  78. package/types/xr/input/XRInputType.d.ts +0 -23
  79. package/types/xr/input/XRTargetRayMode.d.ts +0 -12
  80. package/types/xr/input/XRTrackedInputDevice.d.ts +0 -21
  81. package/types/xr/input/XRTrackedUpdateFlag.d.ts +0 -11
  82. package/types/xr/input/XRTrackingState.d.ts +0 -11
  83. package/types/xr/session/XRSessionManager.d.ts +0 -45
  84. package/types/xr/session/XRSessionMode.d.ts +0 -8
  85. package/types/xr/session/XRSessionState.d.ts +0 -13
  86. /package/types/{xr/feature/trackable/XRRequestTracking.d.ts → 2d/data/RenderData2D.d.ts} +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@galacean/engine-core",
3
- "version": "1.2.0-alpha.1",
3
+ "version": "1.2.0-alpha.11",
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.2.0-alpha.1"
18
+ "@galacean/engine-math": "1.2.0-alpha.11"
19
19
  },
20
20
  "devDependencies": {
21
- "@galacean/engine-design": "1.2.0-alpha.1"
21
+ "@galacean/engine-design": "1.2.0-alpha.11"
22
22
  },
23
23
  "scripts": {
24
24
  "b:types": "tsc"
package/types/Camera.d.ts CHANGED
@@ -37,18 +37,18 @@ export declare class Camera extends Component {
37
37
  depthTextureMode: DepthTextureMode;
38
38
  private _priority;
39
39
  private _shaderData;
40
- private _isProjMatSetting;
40
+ private _isCustomViewMatrix;
41
+ private _isCustomProjectionMatrix;
41
42
  private _nearClipPlane;
42
43
  private _farClipPlane;
43
44
  private _fieldOfView;
44
45
  private _orthographicSize;
45
46
  private _isProjectionDirty;
46
47
  private _isInvProjMatDirty;
47
- private _isFrustumProjectDirty;
48
48
  private _customAspectRatio;
49
49
  private _renderTarget;
50
50
  private _depthBufferParams;
51
- private _frustumViewChangeFlag;
51
+ private _frustumChangeFlag;
52
52
  private _transform;
53
53
  private _isViewMatrixDirty;
54
54
  private _isInvViewProjDirty;
@@ -112,12 +112,13 @@ export declare class Camera extends Component {
112
112
  * View matrix.
113
113
  */
114
114
  get viewMatrix(): Readonly<Matrix>;
115
+ set viewMatrix(value: Matrix);
115
116
  /**
116
117
  * The projection matrix is ​​calculated by the relevant parameters of the camera by default.
117
118
  * If it is manually set, the manual value will be maintained. Call resetProjectionMatrix() to restore it.
118
119
  */
120
+ get projectionMatrix(): Readonly<Matrix>;
119
121
  set projectionMatrix(value: Matrix);
120
- get projectionMatrix(): Matrix;
121
122
  /**
122
123
  * Whether to enable HDR.
123
124
  * @todo When render pipeline modification
@@ -129,6 +130,10 @@ export declare class Camera extends Component {
129
130
  */
130
131
  get renderTarget(): RenderTarget | null;
131
132
  set renderTarget(value: RenderTarget | null);
133
+ /**
134
+ * Restore the view matrix to the world matrix of the entity.
135
+ */
136
+ resetViewMatrix(): void;
132
137
  /**
133
138
  * Restore the automatic calculation of projection matrix through fieldOfView, nearClipPlane and farClipPlane.
134
139
  */
@@ -237,7 +242,8 @@ export declare class Camera extends Component {
237
242
  */
238
243
  _onDisableInScene(): void;
239
244
  private _updatePixelViewport;
240
- private _projMatChange;
245
+ private _viewMatrixChange;
246
+ private _projectionMatrixChange;
241
247
  private _innerViewportToWorldPoint;
242
248
  private _updateShaderData;
243
249
  /**
package/types/Canvas.d.ts CHANGED
@@ -14,5 +14,6 @@ export declare abstract class Canvas {
14
14
  */
15
15
  get height(): number;
16
16
  set height(value: number);
17
- protected abstract _onSizeChanged(width: number, height: number): void;
17
+ protected abstract _onWidthChanged(value: number): void;
18
+ protected abstract _onHeightChange(value: number): void;
18
19
  }
package/types/Engine.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { IHardwareRenderer, IPhysics, IShaderLab, IXRDevice } from "@galacean/engine-design";
1
+ import { IHardwareRenderer, IInputOptions, IPhysics, IShaderLab, IXRDevice } from "@galacean/engine-design";
2
2
  import { Canvas } from "./Canvas";
3
3
  import { EngineSettings } from "./EngineSettings";
4
4
  import { Entity } from "./Entity";
@@ -136,6 +136,8 @@ export interface EngineConfiguration {
136
136
  xrDevice?: IXRDevice;
137
137
  /** Color space. */
138
138
  colorSpace?: ColorSpace;
139
- /** Shader lab */
139
+ /** Shader lab. */
140
140
  shaderLab?: IShaderLab;
141
+ /** Input options. */
142
+ input?: IInputOptions;
141
143
  }
@@ -0,0 +1,19 @@
1
+ import { Mesh } from "../graphic/Mesh";
2
+ import { SubMesh } from "../graphic/SubMesh";
3
+ import { Material } from "../material/Material";
4
+ import { Renderer } from "../Renderer";
5
+ import { ShaderPass } from "../shader/ShaderPass";
6
+ import { RenderState } from "../shader/state/RenderState";
7
+ import { IPoolElement } from "./IPoolElement";
8
+ import { RenderElement } from "./RenderElement";
9
+ /**
10
+ * Render element.
11
+ */
12
+ export declare class MeshRenderElement extends RenderElement implements IPoolElement {
13
+ /** Mesh. */
14
+ mesh: Mesh;
15
+ /** Sub mesh. */
16
+ subMesh: SubMesh;
17
+ setValue(component: Renderer, mesh: Mesh, subMesh: SubMesh, material: Material, renderState: RenderState, shaderPass: ShaderPass): void;
18
+ dispose(): void;
19
+ }
@@ -0,0 +1,15 @@
1
+ import { RenderData2D } from "../2d/data/RenderData2D";
2
+ import { Material } from "../material/Material";
3
+ import { Renderer } from "../Renderer";
4
+ import { ShaderPass } from "../shader";
5
+ import { RenderState } from "../shader/state/RenderState";
6
+ import { Texture2D } from "../texture";
7
+ import { IPoolElement } from "./IPoolElement";
8
+ import { RenderElement } from "./RenderElement";
9
+ export declare class SpriteElement extends RenderElement implements IPoolElement {
10
+ renderData: RenderData2D;
11
+ texture: Texture2D;
12
+ constructor();
13
+ setValue(component: Renderer, renderDate: RenderData2D, material: Material, texture: Texture2D, renderState: RenderState, shaderPass: ShaderPass): void;
14
+ dispose(): void;
15
+ }
@@ -0,0 +1,12 @@
1
+ import { RenderData2D } from "../2d/data/RenderData2D";
2
+ import { Material } from "../material/Material";
3
+ import { Renderer } from "../Renderer";
4
+ import { IPoolElement } from "./IPoolElement";
5
+ import { RenderElement } from "./RenderElement";
6
+ export declare class SpriteMaskElement extends RenderElement implements IPoolElement {
7
+ renderData: RenderData2D;
8
+ isAdd: boolean;
9
+ constructor();
10
+ setValue(component: Renderer, renderData: RenderData2D, material: Material): void;
11
+ dispose(): void;
12
+ }
@@ -0,0 +1,8 @@
1
+ import { IPoolElement } from "./IPoolElement";
2
+ import { RenderElement } from "./RenderElement";
3
+ import { SpriteElement } from "./SpriteElement";
4
+ export declare class TextRenderElement extends RenderElement implements IPoolElement {
5
+ charElements: SpriteElement[];
6
+ constructor();
7
+ dispose(): void;
8
+ }
package/types/Scene.d.ts CHANGED
@@ -30,6 +30,11 @@ export declare class Scene extends EngineObject {
30
30
  shadowFourCascadeSplits: Vector3;
31
31
  /** Max Shadow distance. */
32
32
  shadowDistance: number;
33
+ /**
34
+ * Last shadow fade distance in percentage, range [0,1].
35
+ * @remarks Value 0 is used for no shadow fade.
36
+ */
37
+ shadowFadeBorder: number;
33
38
  private _background;
34
39
  private _shaderData;
35
40
  private _shadowCascades;
package/types/Utils.d.ts CHANGED
@@ -15,6 +15,12 @@ export declare class Utils {
15
15
  * @returns Whether the url is absolute url.
16
16
  */
17
17
  static isAbsoluteUrl(url: string): boolean;
18
+ /**
19
+ * Judge whether the url is base64 url.
20
+ * @param url - The url to be judged.
21
+ * @returns Whether the url is base64 url.
22
+ */
23
+ static isBase64Url(url: string): boolean;
18
24
  /**
19
25
  * Get the values of an object.
20
26
  */
@@ -39,6 +39,8 @@ export declare enum AssetType {
39
39
  KTX2 = "KTX2",
40
40
  /** Sprite. */
41
41
  Sprite = "Sprite",
42
+ /** PrimitiveMesh. */
43
+ PrimitiveMesh = "PrimitiveMesh",
42
44
  /** Sprite Atlas. */
43
45
  SpriteAtlas = "SpriteAtlas",
44
46
  /** Ambient light. */
@@ -0,0 +1,2 @@
1
+ export interface IRefObject {
2
+ }
@@ -24,7 +24,14 @@ export declare abstract class Loader<T> {
24
24
  static getClass(className: string): {
25
25
  new (...args: any): any;
26
26
  };
27
+ /**
28
+ * Get the class name by class object.
29
+ * @param obj - class object
30
+ * @returns class name
31
+ */
32
+ static getClassName(obj: Object): string;
27
33
  private static _engineObjects;
34
+ private static _classNameMap;
28
35
  constructor(useCache: boolean);
29
36
  initialize?(engine: Engine, configuration: EngineConfiguration): Promise<void>;
30
37
  abstract load(item: LoadItem, resourceManager: ResourceManager): AssetPromise<T>;
@@ -0,0 +1,27 @@
1
+ import { EngineObject } from "../base/EngineObject";
2
+ import { Engine } from "../Engine";
3
+ import { IRefObject } from "./IRefObject";
4
+ /**
5
+ * The base class of assets, with reference counting capability.
6
+ */
7
+ export declare abstract class RefObject extends EngineObject implements IRefObject {
8
+ /** Whether to ignore the garbage collection check, if it is true, it will not be affected by ResourceManager.gc(). */
9
+ isGCIgnored: boolean;
10
+ private _refCount;
11
+ /**
12
+ * Counted by valid references.
13
+ */
14
+ get refCount(): number;
15
+ protected constructor(engine: Engine);
16
+ /**
17
+ * Destroy self.
18
+ * @param force - Whether to force the destruction, if it is false, refCount = 0 can be released successfully.
19
+ * @returns Whether the release was successful.
20
+ */
21
+ destroy(force?: boolean): boolean;
22
+ /**
23
+ * Called when the resource is destroyed.
24
+ * Subclasses can override this function.
25
+ */
26
+ protected abstract _onDestroy(): void;
27
+ }
@@ -15,6 +15,8 @@ export declare class ResourceManager {
15
15
  retryInterval: number;
16
16
  /** The default timeout period for loading assets, in milliseconds. */
17
17
  timeout: number;
18
+ /** Base url for loading assets. */
19
+ baseUrl: string | null;
18
20
  private _loadingPromises;
19
21
  /** Asset path pool, key is the `instanceID` of resource, value is asset path. */
20
22
  private _assetPool;
@@ -0,0 +1,24 @@
1
+ import { EventDispatcher } from "./EventDispatcher";
2
+ export type Listener = ((e: Event) => any) & {
3
+ once?: boolean;
4
+ };
5
+ /** Event Object. * @class */
6
+ export declare class Event {
7
+ get propagationStopped(): boolean;
8
+ get target(): EventDispatcher;
9
+ set target(t: EventDispatcher);
10
+ get timeStamp(): number;
11
+ get currentTarget(): EventDispatcher;
12
+ set currentTarget(t: EventDispatcher);
13
+ get bubbles(): boolean;
14
+ get type(): string | number;
15
+ data: any;
16
+ private _timeStamp;
17
+ private _target;
18
+ private _currentTarget;
19
+ private _bubbles;
20
+ private _propagationStopped;
21
+ private _type;
22
+ constructor(type: string | number, target?: EventDispatcher, data?: any, bubbles?: boolean);
23
+ stopPropagation(): void;
24
+ }
@@ -0,0 +1,14 @@
1
+ export declare const Util: {
2
+ isArray: (value: any) => boolean;
3
+ isArrayLike(x: any): boolean;
4
+ clone<T>(obj: T): T;
5
+ downloadBlob(blob: Blob, fileName?: string): void;
6
+ };
7
+ export declare const isArrayLike: <T>(x: any) => x is ArrayLike<T>;
8
+ /**
9
+ * Fastly remove an element from array.
10
+ * @param array - Array
11
+ * @param item - Element
12
+ */
13
+ export declare function removeFromArray(array: any[], item: any): boolean;
14
+ export declare function ObjectValues(obj: any): any[];
@@ -62,6 +62,4 @@ export declare class InputManager {
62
62
  * @returns Whether the pointer is released during the current frame
63
63
  */
64
64
  isPointerUp(pointerButton?: PointerButton): boolean;
65
- private _onBlur;
66
- private _onFocus;
67
65
  }
@@ -7,12 +7,4 @@ export interface IInput {
7
7
  * Function called when the engine is destroyed.
8
8
  */
9
9
  _destroy(): void;
10
- /**
11
- * Function called when focused.
12
- */
13
- _onFocus(): void;
14
- /**
15
- * Function called when focus is lost.
16
- */
17
- _onBlur(): void;
18
10
  }
@@ -1,3 +1,4 @@
1
+ import { Rand } from "@galacean/engine-math";
1
2
  import { ICustomClone } from "../../clone/ComponentCloner";
2
3
  import { ParticleScaleMode } from "../enums/ParticleScaleMode";
3
4
  import { ParticleSimulationSpace } from "../enums/ParticleSimulationSpace";
@@ -54,6 +55,7 @@ export declare class MainModule implements ICustomClone {
54
55
  scalingMode: ParticleScaleMode;
55
56
  /** If set to true, the Particle Generator automatically begins to play on startup. */
56
57
  playOnEnabled: boolean;
58
+ readonly _gravityModifierRand: Rand;
57
59
  private _generator;
58
60
  private _gravity;
59
61
  /**
@@ -4,9 +4,9 @@ import { ParticleShapeType } from "./enums/ParticleShapeType";
4
4
  */
5
5
  export declare abstract class BaseShape {
6
6
  /** The type of shape to emit particles from. */
7
- shapeType: ParticleShapeType;
7
+ abstract readonly shapeType: ParticleShapeType;
8
8
  /** Specifies whether the ShapeModule is enabled or disabled. */
9
- enable: boolean;
9
+ enabled: boolean;
10
10
  /** Randomizes the starting direction of particles. */
11
11
  randomDirectionAmount: number;
12
12
  }
@@ -1,11 +1,12 @@
1
1
  import { Vector3 } from "@galacean/engine-math";
2
2
  import { BaseShape } from "./BaseShape";
3
+ import { ParticleShapeType } from "./enums/ParticleShapeType";
3
4
  /**
4
5
  * Particle shape that emits particles from a box.
5
6
  */
6
7
  export declare class BoxShape extends BaseShape {
7
8
  private static _tempVector30;
9
+ readonly shapeType = ParticleShapeType.Box;
8
10
  /** The size of the box. */
9
11
  size: Vector3;
10
- constructor();
11
12
  }
@@ -1,10 +1,12 @@
1
1
  import { BaseShape } from "./BaseShape";
2
2
  import { ParticleShapeArcMode } from "./enums/ParticleShapeArcMode";
3
+ import { ParticleShapeType } from "./enums/ParticleShapeType";
3
4
  /**
4
5
  * Particle shape that emits particles from a circle.
5
6
  */
6
7
  export declare class CircleShape extends BaseShape {
7
8
  private static _tempPositionPoint;
9
+ readonly shapeType = ParticleShapeType.Circle;
8
10
  /** Radius of the shape to emit particles from. */
9
11
  radius: number;
10
12
  /** Angle of the circle arc to emit particles from. */
@@ -13,5 +15,4 @@ export declare class CircleShape extends BaseShape {
13
15
  arcMode: ParticleShapeArcMode;
14
16
  /** The speed of complete 360 degree rotation. */
15
17
  arcSpeed: number;
16
- constructor();
17
18
  }
@@ -1,4 +1,5 @@
1
1
  import { BaseShape } from "./BaseShape";
2
+ import { ParticleShapeType } from "./enums/ParticleShapeType";
2
3
  /**
3
4
  * Cone shape.
4
5
  */
@@ -7,6 +8,7 @@ export declare class ConeShape extends BaseShape {
7
8
  private static _tempVector21;
8
9
  private static _tempVector30;
9
10
  private static _tempVector31;
11
+ readonly shapeType = ParticleShapeType.Cone;
10
12
  /** Angle of the cone to emit particles from. */
11
13
  angle: number;
12
14
  /** Radius of the shape to emit particles from. */
@@ -15,7 +17,6 @@ export declare class ConeShape extends BaseShape {
15
17
  length: number;
16
18
  /** Cone emitter type. */
17
19
  emitType: ConeEmitType;
18
- constructor();
19
20
  }
20
21
  /**
21
22
  * Cone emitter type.
@@ -1,9 +1,10 @@
1
1
  import { BaseShape } from "./BaseShape";
2
+ import { ParticleShapeType } from "./enums/ParticleShapeType";
2
3
  /**
3
4
  * Particle shape that emits particles from a hemisphere.
4
5
  */
5
6
  export declare class HemisphereShape extends BaseShape {
7
+ readonly shapeType = ParticleShapeType.Hemisphere;
6
8
  /** Radius of the shape to emit particles from. */
7
9
  radius: number;
8
- constructor();
9
10
  }
@@ -1,9 +1,10 @@
1
1
  import { BaseShape } from "./BaseShape";
2
+ import { ParticleShapeType } from "./enums/ParticleShapeType";
2
3
  /**
3
4
  * Particle shape that emits particles from a sphere.
4
5
  */
5
6
  export declare class SphereShape extends BaseShape {
7
+ readonly shapeType = ParticleShapeType.Sphere;
6
8
  /** Radius of the shape to emit particles from. */
7
9
  radius: number;
8
- constructor();
9
10
  }
@@ -4,3 +4,4 @@ export { ConeShape, ConeEmitType } from "./ConeShape";
4
4
  export { HemisphereShape } from "./HemisphereShape";
5
5
  export { SphereShape } from "./SphereShape";
6
6
  export { ParticleShapeArcMode } from "./enums/ParticleShapeArcMode";
7
+ export { ParticleShapeType } from "./enums/ParticleShapeType";
@@ -1,5 +1,6 @@
1
1
  import { Entity } from "../Entity";
2
2
  import { Vector3 } from "@galacean/engine-math";
3
+ import { ColliderShape } from "./shape";
3
4
  /**
4
5
  * Structure used to get information back from a raycast or a sweep.
5
6
  */
@@ -12,4 +13,6 @@ export declare class HitResult {
12
13
  point: Vector3;
13
14
  /** The normal of the surface the ray hit. */
14
15
  normal: Vector3;
16
+ /** The shape of the collider that was hit. */
17
+ shape: ColliderShape;
15
18
  }
@@ -1,7 +1,12 @@
1
1
  export declare class ShaderFactory {
2
2
  static parseCustomMacros(macros: string[]): string;
3
3
  static registerInclude(includeName: string, includeSource: string): void;
4
- static parseIncludes(src: string): string;
4
+ static unRegisterInclude(includeName: string): void;
5
+ /**
6
+ * @param regex The default regex is for engine's builtin glsl `#include` syntax,
7
+ * since `ShaderLab` use the same parsing function but different syntax for `#include` --- `/^[ \t]*#include +"([\w\d.]+)"/gm`
8
+ */
9
+ static parseIncludes(src: string, regex?: RegExp): string;
5
10
  /**
6
11
  * Convert lower GLSL version to GLSL 300 es.
7
12
  * @param shader - code
@@ -28,7 +28,6 @@ export declare class CascadedShadowCasterPass extends PipelinePass {
28
28
  private _shadowSliceData;
29
29
  private _lightUp;
30
30
  private _lightSide;
31
- private _existShadowMap;
32
31
  private _splitBoundSpheres;
33
32
  /** The end is project precision problem in shader. */
34
33
  private _shadowMatrices;
@@ -76,4 +76,5 @@ export declare abstract class Texture extends GraphicsResource {
76
76
  */
77
77
  protected _getMaxMiplevel(size: number): number;
78
78
  protected _getMipmapCount(): number;
79
+ protected _isIntFormat(): boolean;
79
80
  }
@@ -20,56 +20,58 @@ export declare enum TextureFormat {
20
20
  R16G16B16A16 = 7,
21
21
  /** RGBA format, 32 bits per channel. */
22
22
  R32G32B32A32 = 8,
23
+ /** RGBA unsigned integer format, 32 bits per channel. */
24
+ R32G32B32A32_UInt = 9,
23
25
  /** RGB compressed format, 4 bits per pixel. */
24
- BC1 = 9,
26
+ BC1 = 10,
25
27
  /** RGBA compressed format, 8 bits per pixel. */
26
- BC3 = 10,
28
+ BC3 = 11,
27
29
  /** RGB(A) compressed format, 128 bits per 4x4 pixel block. */
28
- BC7 = 11,
30
+ BC7 = 12,
29
31
  /** RGB compressed format, 4 bits per pixel. */
30
- ETC1_RGB = 12,
32
+ ETC1_RGB = 13,
31
33
  /** RGB compressed format, 4 bits per pixel. */
32
- ETC2_RGB = 13,
34
+ ETC2_RGB = 14,
33
35
  /** RGBA compressed format, 5 bits per pixel, 4 bit in RGB, 1 bit in A. */
34
- ETC2_RGBA5 = 14,
36
+ ETC2_RGBA5 = 15,
35
37
  /** RGB compressed format, 8 bits per pixel. */
36
- ETC2_RGBA8 = 15,
38
+ ETC2_RGBA8 = 16,
37
39
  /** RGB compressed format, 2 bits per pixel. */
38
- PVRTC_RGB2 = 16,
40
+ PVRTC_RGB2 = 17,
39
41
  /** RGBA compressed format, 2 bits per pixel. */
40
- PVRTC_RGBA2 = 17,
42
+ PVRTC_RGBA2 = 18,
41
43
  /** RGB compressed format, 4 bits per pixel. */
42
- PVRTC_RGB4 = 18,
44
+ PVRTC_RGB4 = 19,
43
45
  /** RGBA compressed format, 4 bits per pixel. */
44
- PVRTC_RGBA4 = 19,
46
+ PVRTC_RGBA4 = 20,
45
47
  /** RGB(A) compressed format, 128 bits per 4x4 pixel block. */
46
- ASTC_4x4 = 20,
48
+ ASTC_4x4 = 21,
47
49
  /** RGB(A) compressed format, 128 bits per 5x5 pixel block. */
48
- ASTC_5x5 = 21,
50
+ ASTC_5x5 = 22,
49
51
  /** RGB(A) compressed format, 128 bits per 6x6 pixel block. */
50
- ASTC_6x6 = 22,
52
+ ASTC_6x6 = 23,
51
53
  /** RGB(A) compressed format, 128 bits per 8x8 pixel block. */
52
- ASTC_8x8 = 23,
54
+ ASTC_8x8 = 24,
53
55
  /** RGB(A) compressed format, 128 bits per 10x10 pixel block. */
54
- ASTC_10x10 = 24,
56
+ ASTC_10x10 = 25,
55
57
  /** RGB(A) compressed format, 128 bits per 12x12 pixel block. */
56
- ASTC_12x12 = 25,
58
+ ASTC_12x12 = 26,
57
59
  /** Automatic depth format, engine will automatically select the supported precision. */
58
- Depth = 26,
60
+ Depth = 27,
59
61
  /** Automatic depth stencil format, engine will automatically select the supported precision. */
60
- DepthStencil = 27,
62
+ DepthStencil = 28,
61
63
  /** 16-bit depth format. */
62
- Depth16 = 28,
64
+ Depth16 = 29,
63
65
  /** 24-bit depth format. */
64
- Depth24 = 29,
66
+ Depth24 = 30,
65
67
  /** 32-bit depth format. */
66
- Depth32 = 30,
68
+ Depth32 = 31,
67
69
  /** 16-bit depth + 8-bit stencil format. */
68
- Depth24Stencil8 = 31,
70
+ Depth24Stencil8 = 32,
69
71
  /** 32-bit depth + 8-bit stencil format. */
70
- Depth32Stencil8 = 32,
72
+ Depth32Stencil8 = 33,
71
73
  /** @deprecated Use `TextureFormat.BC1` instead. */
72
- DXT1 = 33,
74
+ DXT1 = 34,
73
75
  /** @deprecated Use `TextureFormat.BC3` instead. */
74
- DXT5 = 34
76
+ DXT5 = 35
75
77
  }
@@ -1,15 +0,0 @@
1
- import { IXRPose } from "@galacean/engine-design";
2
- import { Matrix, Quaternion, Vector3 } from "@galacean/engine-math";
3
- /**
4
- * Data for describing pose in the XR space.
5
- */
6
- export declare class XRPose implements IXRPose {
7
- /** The position of the pose in XR space. */
8
- position: Vector3;
9
- /** The rotation of the pose in XR space. */
10
- rotation: Quaternion;
11
- /** The matrix of the pose in XR space. */
12
- matrix: Matrix;
13
- /** The inverse matrix of the pose in XR space. */
14
- inverseMatrix: Matrix;
15
- }
@@ -1,16 +0,0 @@
1
- import { IXRPlatformFeature } from "@galacean/engine-design";
2
- import { XRManager } from "../XRManager";
3
- import { XRFeatureType } from "./XRFeatureType";
4
- /**
5
- * The base class of XR feature manager.
6
- */
7
- export declare abstract class XRFeature<T extends IXRPlatformFeature = IXRPlatformFeature> {
8
- protected _xrManager: XRManager;
9
- protected _type: XRFeatureType;
10
- protected _enabled: boolean;
11
- /**
12
- * Returns whether the feature is enabled.
13
- */
14
- get enabled(): boolean;
15
- set enabled(value: boolean);
16
- }