@galacean/engine-core 0.0.0-experimental-1.0-xr.0 → 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.
Files changed (116) hide show
  1. package/dist/main.js +16233 -17946
  2. package/dist/main.js.map +1 -1
  3. package/dist/miniprogram.js +16233 -17946
  4. package/dist/module.js +16229 -17935
  5. package/dist/module.js.map +1 -1
  6. package/package.json +3 -3
  7. package/types/2d/atlas/SpriteAtlas.d.ts +6 -2
  8. package/types/2d/data/RenderData2D.d.ts +1 -0
  9. package/types/2d/enums/SpriteDrawMode.d.ts +2 -4
  10. package/types/2d/index.d.ts +0 -1
  11. package/types/2d/sprite/Sprite.d.ts +2 -2
  12. package/types/2d/sprite/SpriteMask.d.ts +12 -2
  13. package/types/2d/sprite/SpriteRenderer.d.ts +12 -17
  14. package/types/2d/text/Font.d.ts +7 -2
  15. package/types/2d/text/TextRenderer.d.ts +12 -2
  16. package/types/2d/text/index.d.ts +0 -1
  17. package/types/Camera.d.ts +8 -27
  18. package/types/Component.d.ts +8 -0
  19. package/types/ComponentsDependencies.d.ts +9 -17
  20. package/types/Engine.d.ts +40 -33
  21. package/types/Entity.d.ts +1 -1
  22. package/types/RenderPipeline/Basic2DBatcher.d.ts +7 -6
  23. package/types/RenderPipeline/BasicRenderPipeline.d.ts +6 -8
  24. package/types/RenderPipeline/MeshRenderElement.d.ts +17 -0
  25. package/types/RenderPipeline/RenderElement.d.ts +7 -5
  26. package/types/RenderPipeline/RenderPass.d.ts +1 -1
  27. package/types/RenderPipeline/RenderQueue.d.ts +5 -3
  28. package/types/RenderPipeline/SpriteElement.d.ts +13 -0
  29. package/types/RenderPipeline/SpriteMaskBatcher.d.ts +3 -4
  30. package/types/RenderPipeline/SpriteMaskElement.d.ts +10 -0
  31. package/types/RenderPipeline/TextRenderElement.d.ts +6 -0
  32. package/types/Renderer.d.ts +14 -4
  33. package/types/SafeLoopArray.d.ts +37 -0
  34. package/types/Scene.d.ts +1 -0
  35. package/types/Script.d.ts +15 -18
  36. package/types/Transform.d.ts +12 -9
  37. package/types/Utils.d.ts +0 -28
  38. package/types/animation/AnimationClip.d.ts +1 -2
  39. package/types/animation/animationCurve/AnimationFloatArrayCurve.d.ts +1 -0
  40. package/types/animation/internal/AnimationCurveLayerOwner.d.ts +1 -0
  41. package/types/animation/internal/AnimationCurveOwnerLayerData.d.ts +1 -0
  42. package/types/asset/AssetType.d.ts +16 -16
  43. package/types/asset/IRefObject.d.ts +2 -0
  44. package/types/asset/RefObject.d.ts +27 -0
  45. package/types/asset/ResourceManager.d.ts +9 -17
  46. package/types/base/Constant.d.ts +1 -2
  47. package/types/base/EngineObject.d.ts +0 -1
  48. package/types/base/Event.d.ts +24 -0
  49. package/types/base/EventDispatcher.d.ts +14 -1
  50. package/types/base/Time.d.ts +24 -25
  51. package/types/base/Util.d.ts +14 -0
  52. package/types/base/index.d.ts +2 -0
  53. package/types/enums/ActiveChangeFlag.d.ts +6 -0
  54. package/types/env-probe/CubeProbe.d.ts +7 -0
  55. package/types/env-probe/Probe.d.ts +6 -0
  56. package/types/graphic/Buffer.d.ts +12 -5
  57. package/types/graphic/Mesh.d.ts +16 -5
  58. package/types/index.d.ts +7 -9
  59. package/types/input/InputManager.d.ts +1 -1
  60. package/types/input/interface/IInput.d.ts +1 -1
  61. package/types/lighting/DirectLight.d.ts +1 -0
  62. package/types/lighting/Light.d.ts +1 -0
  63. package/types/lighting/SpotLight.d.ts +1 -0
  64. package/types/material/BaseMaterial.d.ts +10 -8
  65. package/types/material/BlinnPhongMaterial.d.ts +3 -0
  66. package/types/material/Material.d.ts +10 -3
  67. package/types/material/PBRMaterial.d.ts +1 -1
  68. package/types/material/PBRSpecularMaterial.d.ts +1 -1
  69. package/types/material/UnlitMaterial.d.ts +1 -1
  70. package/types/mesh/BlendShape.d.ts +1 -1
  71. package/types/mesh/BlendShapeFrame.d.ts +6 -28
  72. package/types/mesh/MeshRenderer.d.ts +12 -3
  73. package/types/mesh/ModelMesh.d.ts +5 -5
  74. package/types/mesh/PrimitiveMesh.d.ts +2 -4
  75. package/types/mesh/SkinnedMeshRenderer.d.ts +15 -0
  76. package/types/particle/ParticleRenderer.d.ts +2 -2
  77. package/types/physics/CharacterController.d.ts +2 -0
  78. package/types/physics/Collider.d.ts +1 -1
  79. package/types/physics/PhysicsManager.d.ts +20 -1
  80. package/types/physics/PhysicsScene.d.ts +75 -0
  81. package/types/physics/joint/HingeJoint.d.ts +2 -2
  82. package/types/physics/joint/Joint.d.ts +2 -2
  83. package/types/physics/joint/SpringJoint.d.ts +1 -1
  84. package/types/renderingHardwareInterface/index.d.ts +0 -1
  85. package/types/shader/Shader.d.ts +23 -32
  86. package/types/shader/ShaderData.d.ts +24 -24
  87. package/types/shader/ShaderMacro.d.ts +0 -16
  88. package/types/shader/ShaderPass.d.ts +2 -9
  89. package/types/shader/ShaderProperty.d.ts +0 -7
  90. package/types/shader/index.d.ts +1 -4
  91. package/types/shader/state/index.d.ts +6 -0
  92. package/types/shadow/CascadedShadowCasterPass.d.ts +1 -0
  93. package/types/sky/Sky.d.ts +12 -4
  94. package/types/sky/SkyBoxMaterial.d.ts +9 -27
  95. package/types/sky/index.d.ts +0 -1
  96. package/types/texture/RenderTarget.d.ts +6 -2
  97. package/types/texture/Texture.d.ts +6 -2
  98. package/types/trail/TrailRenderer.d.ts +5 -0
  99. package/types/utils/BoolUpdateFlag.d.ts +12 -0
  100. package/types/utils/DisorderedArray.d.ts +18 -0
  101. package/types/utils/SafeLoopArray.d.ts +41 -0
  102. package/types/utils/UpdateFlag.d.ts +20 -0
  103. package/types/utils/UpdateFlagManager.d.ts +1 -0
  104. package/types/utils/Utils.d.ts +31 -0
  105. package/types/xr/XRCamera.d.ts +0 -13
  106. package/types/xr/XRHandle.d.ts +0 -12
  107. package/types/xr/XRInputManager.d.ts +0 -27
  108. package/types/xr/XRManager.d.ts +0 -41
  109. package/types/xr/enum/EnumXRButton.d.ts +0 -9
  110. package/types/xr/enum/EnumXREvent.d.ts +0 -10
  111. package/types/xr/enum/EnumXREye.d.ts +0 -5
  112. package/types/xr/enum/EnumXRFeature.d.ts +0 -5
  113. package/types/xr/enum/EnumXRHandedness.d.ts +0 -5
  114. package/types/xr/enum/EnumXRMode.d.ts +0 -5
  115. package/types/xr/enum/EnumXRSpaceType.d.ts +0 -7
  116. package/types/xr/index.d.ts +0 -10
@@ -1,4 +1,4 @@
1
- import { GraphicsResource } from "../asset/GraphicsResource";
1
+ import { RefObject } from "../asset/RefObject";
2
2
  import { Engine } from "../Engine";
3
3
  import { BufferBindFlag } from "./enums/BufferBindFlag";
4
4
  import { BufferUsage } from "./enums/BufferUsage";
@@ -6,11 +6,14 @@ import { SetDataOptions } from "./enums/SetDataOptions";
6
6
  /**
7
7
  * Buffer.
8
8
  */
9
- export declare class Buffer extends GraphicsResource {
9
+ export declare class Buffer extends RefObject {
10
+ _glBindTarget: number;
11
+ _glBufferUsage: number;
12
+ _nativeBuffer: WebGLBuffer;
13
+ private _hardwareRenderer;
10
14
  private _type;
11
15
  private _byteLength;
12
16
  private _bufferUsage;
13
- private _platformBuffer;
14
17
  /**
15
18
  * Buffer binding flag.
16
19
  */
@@ -90,9 +93,13 @@ export declare class Buffer extends GraphicsResource {
90
93
  * @param dataLength - Output data length
91
94
  */
92
95
  getData(data: ArrayBufferView, bufferByteOffset: number, dataOffset: number, dataLength: number): void;
93
- _rebuild(): void;
96
+ /**
97
+ * @override
98
+ * Destroy.
99
+ */
100
+ _onDestroy(): void;
94
101
  /**
95
102
  * @deprecated
96
103
  */
97
- resize(byteLength: number): void;
104
+ resize(dataLength: number): void;
98
105
  }
@@ -1,12 +1,14 @@
1
1
  import { BoundingBox } from "@galacean/engine-math";
2
+ import { RefObject } from "../asset/RefObject";
2
3
  import { Engine } from "../Engine";
3
- import { GraphicsResource } from "../asset/GraphicsResource";
4
- import { SubMesh } from "../graphic/SubMesh";
5
4
  import { MeshTopology } from "../graphic/enums/MeshTopology";
5
+ import { IndexBufferBinding } from "../graphic/IndexBufferBinding";
6
+ import { SubMesh } from "../graphic/SubMesh";
7
+ import { VertexElement } from "../graphic/VertexElement";
6
8
  /**
7
9
  * Mesh.
8
10
  */
9
- export declare abstract class Mesh extends GraphicsResource {
11
+ export declare abstract class Mesh extends RefObject {
10
12
  /** Name. */
11
13
  name: string;
12
14
  private _bounds;
@@ -53,7 +55,16 @@ export declare abstract class Mesh extends GraphicsResource {
53
55
  * Clear all sub-mesh.
54
56
  */
55
57
  clearSubMesh(): void;
56
- _addReferCount(value: number): void;
57
- _rebuild(): void;
58
+ /**
59
+ * @override
60
+ */
61
+ _addRefCount(value: number): void;
62
+ /**
63
+ * @override
64
+ * Destroy.
65
+ */
66
+ _onDestroy(): void;
67
+ protected _setVertexElements(elements: VertexElement[]): void;
68
+ protected _setIndexBufferBinding(binding: IndexBufferBinding | null): void;
58
69
  private _onBoundsChanged;
59
70
  }
package/types/index.d.ts CHANGED
@@ -8,21 +8,23 @@ export { Entity } from "./Entity";
8
8
  export { Component } from "./Component";
9
9
  export { Script } from "./Script";
10
10
  export { Renderer } from "./Renderer";
11
- export { dependentComponents, DependentMode } from "./ComponentsDependencies";
11
+ export { dependentComponents } from "./ComponentsDependencies";
12
12
  export { Camera } from "./Camera";
13
13
  export { Transform } from "./Transform";
14
14
  export { BoolUpdateFlag } from "./BoolUpdateFlag";
15
15
  export type { EngineSettings } from "./EngineSettings";
16
- export type { EngineConfiguration } from "./Engine";
17
16
  export { request } from "./asset/request";
18
17
  export { Loader } from "./asset/Loader";
19
- export { ContentRestorer } from "./asset/ContentRestorer";
20
18
  export { ResourceManager, resourceLoader } from "./asset/ResourceManager";
21
19
  export { AssetPromise } from "./asset/AssetPromise";
22
20
  export type { LoadItem } from "./asset/LoadItem";
23
21
  export { AssetType } from "./asset/AssetType";
24
- export { ReferResource } from "./asset/ReferResource";
25
- export * from "./RenderPipeline";
22
+ export { RefObject } from "./asset/RefObject";
23
+ export { BasicRenderPipeline } from "./RenderPipeline/BasicRenderPipeline";
24
+ export { RenderQueue } from "./RenderPipeline/RenderQueue";
25
+ export { RenderPass } from "./RenderPipeline/RenderPass";
26
+ export { MeshRenderElement } from "./RenderPipeline/MeshRenderElement";
27
+ export { SpriteElement } from "./RenderPipeline/SpriteElement";
26
28
  export * from "./base";
27
29
  export { Background } from "./Background";
28
30
  export { BackgroundMode } from "./enums/BackgroundMode";
@@ -49,7 +51,3 @@ export * from "./Layer";
49
51
  export * from "./clone/CloneManager";
50
52
  export * from "./renderingHardwareInterface/index";
51
53
  export * from "./physics/index";
52
- export * from "./Utils";
53
- export * from "./xr/index";
54
- export { Basic2DBatcher } from "./RenderPipeline/Basic2DBatcher";
55
- export { ShaderMacroCollection } from "./shader/ShaderMacroCollection";
@@ -6,9 +6,9 @@ import { Vector3 } from "@galacean/engine-math";
6
6
  * InputManager manages device input such as mouse, touch, keyboard, etc.
7
7
  */
8
8
  export declare class InputManager {
9
- private _engine;
10
9
  /** Sometimes the input module will not be initialized, such as off-screen rendering. */
11
10
  private _initialized;
11
+ private _curFrameCount;
12
12
  private _wheelManager;
13
13
  private _pointerManager;
14
14
  private _keyboardManager;
@@ -2,7 +2,7 @@ export interface IInput {
2
2
  /**
3
3
  * Handler function updated every frame.
4
4
  */
5
- _update(): void;
5
+ _update(frameCount?: number): void;
6
6
  /**
7
7
  * Function called when the engine is destroyed.
8
8
  */
@@ -8,6 +8,7 @@ export declare class DirectLight extends Light {
8
8
  private static _colorProperty;
9
9
  private static _directionProperty;
10
10
  private static _combinedData;
11
+ private _forward;
11
12
  private _reverseDirection;
12
13
  /**
13
14
  * Get direction.
@@ -44,4 +44,5 @@ export declare abstract class Light extends Component {
44
44
  * Inverse view matrix.
45
45
  */
46
46
  get inverseViewMatrix(): Matrix;
47
+ protected _getLightColor(): Color;
47
48
  }
@@ -18,6 +18,7 @@ export declare class SpotLight extends Light {
18
18
  angle: number;
19
19
  /** Angle, in radians, from falloff begins to ends. */
20
20
  penumbra: number;
21
+ private _forward;
21
22
  private _inverseDirection;
22
23
  private _projectMatrix;
23
24
  /**
@@ -1,21 +1,21 @@
1
1
  import { Engine } from "../Engine";
2
- import { Shader, ShaderProperty } from "../shader";
2
+ import { Shader } from "../shader";
3
3
  import { ShaderMacro } from "../shader/ShaderMacro";
4
4
  import { BlendMode } from "./enums/BlendMode";
5
5
  import { RenderFace } from "./enums/RenderFace";
6
6
  import { Material } from "./Material";
7
7
  export declare class BaseMaterial extends Material {
8
+ protected static _baseColorProp: import("../shader").ShaderProperty;
9
+ protected static _baseTextureProp: import("../shader").ShaderProperty;
8
10
  protected static _baseTextureMacro: ShaderMacro;
11
+ protected static _tilingOffsetProp: import("../shader").ShaderProperty;
12
+ protected static _normalTextureProp: import("../shader").ShaderProperty;
13
+ protected static _normalIntensityProp: import("../shader").ShaderProperty;
9
14
  protected static _normalTextureMacro: ShaderMacro;
15
+ protected static _emissiveColorProp: import("../shader").ShaderProperty;
16
+ protected static _emissiveTextureProp: import("../shader").ShaderProperty;
10
17
  protected static _emissiveTextureMacro: ShaderMacro;
11
18
  protected static _transparentMacro: ShaderMacro;
12
- protected static _baseColorProp: ShaderProperty;
13
- protected static _baseTextureProp: ShaderProperty;
14
- protected static _tilingOffsetProp: ShaderProperty;
15
- protected static _normalTextureProp: ShaderProperty;
16
- protected static _normalIntensityProp: ShaderProperty;
17
- protected static _emissiveColorProp: ShaderProperty;
18
- protected static _emissiveTextureProp: ShaderProperty;
19
19
  private static _alphaCutoffProp;
20
20
  private static _alphaCutoffMacro;
21
21
  private _renderFace;
@@ -75,10 +75,12 @@ export declare class BaseMaterial extends Material {
75
75
  */
76
76
  setRenderFace(passIndex: number, renderFace: RenderFace): void;
77
77
  /**
78
+ * @override
78
79
  * Clone and return the instance.
79
80
  */
80
81
  clone(): BaseMaterial;
81
82
  /**
83
+ * @override
82
84
  * Clone to the target material.
83
85
  * @param target - target material
84
86
  */
@@ -64,5 +64,8 @@ export declare class BlinnPhongMaterial extends BaseMaterial {
64
64
  * @param engine - Engine to which the material belongs
65
65
  */
66
66
  constructor(engine: Engine);
67
+ /**
68
+ * @override
69
+ */
67
70
  clone(): BlinnPhongMaterial;
68
71
  }
@@ -1,13 +1,13 @@
1
1
  import { IClone } from "@galacean/engine-design";
2
+ import { RefObject } from "../asset/RefObject";
2
3
  import { Engine } from "../Engine";
3
- import { ReferResource } from "../asset/ReferResource";
4
4
  import { Shader } from "../shader/Shader";
5
5
  import { ShaderData } from "../shader/ShaderData";
6
6
  import { RenderState } from "../shader/state/RenderState";
7
7
  /**
8
8
  * Material.
9
9
  */
10
- export declare class Material extends ReferResource implements IClone {
10
+ export declare class Material extends RefObject implements IClone {
11
11
  /** Name. */
12
12
  name: string;
13
13
  /** Shader data. */
@@ -40,5 +40,12 @@ export declare class Material extends ReferResource implements IClone {
40
40
  * @param target - target material
41
41
  */
42
42
  cloneTo(target: Material): void;
43
- _addReferCount(value: number): void;
43
+ /**
44
+ * @override
45
+ */
46
+ _addRefCount(value: number): void;
47
+ /**
48
+ * @override
49
+ */
50
+ protected _onDestroy(): void;
44
51
  }
@@ -39,7 +39,7 @@ export declare class PBRMaterial extends PBRBaseMaterial {
39
39
  */
40
40
  constructor(engine: Engine);
41
41
  /**
42
- * @inheritdoc
42
+ * @override
43
43
  */
44
44
  clone(): PBRMaterial;
45
45
  }
@@ -32,7 +32,7 @@ export declare class PBRSpecularMaterial extends PBRBaseMaterial {
32
32
  */
33
33
  constructor(engine: Engine);
34
34
  /**
35
- * @inheritdoc
35
+ * @override
36
36
  */
37
37
  clone(): PBRSpecularMaterial;
38
38
  }
@@ -27,7 +27,7 @@ export declare class UnlitMaterial extends BaseMaterial {
27
27
  */
28
28
  constructor(engine: Engine);
29
29
  /**
30
- * @inheritdoc
30
+ * @override
31
31
  */
32
32
  clone(): UnlitMaterial;
33
33
  }
@@ -6,6 +6,7 @@ import { BlendShapeFrame } from "./BlendShapeFrame";
6
6
  export declare class BlendShape {
7
7
  /** Name of BlendShape. */
8
8
  name: string;
9
+ private _dataChangeManager;
9
10
  private _frames;
10
11
  /**
11
12
  * Frames of BlendShape.
@@ -35,5 +36,4 @@ export declare class BlendShape {
35
36
  clearFrames(): void;
36
37
  private _addFrame;
37
38
  private _updateUseNormalAndTangent;
38
- private _frameDataChangeListener;
39
39
  }
@@ -5,28 +5,12 @@ import { Vector3 } from "@galacean/engine-math";
5
5
  export declare class BlendShapeFrame {
6
6
  /** Weight of BlendShapeFrame. */
7
7
  readonly weight: number;
8
- private _dirty;
9
- private _deltaPositions;
10
- private _deltaNormals;
11
- private _deltaTangents;
12
- /**
13
- * Delta positions for the frame being added.
14
- * @remarks Need to re-assign after modification to ensure that the modification takes effect.
15
- */
16
- get deltaPositions(): Vector3[];
17
- set deltaPositions(value: Vector3[]);
18
- /**
19
- * Delta normals for the frame being added.
20
- * @remarks Need to re-assign after modification to ensure that the modification takes effect.
21
- */
22
- get deltaNormals(): Vector3[];
23
- set deltaNormals(value: Vector3[]);
24
- /**
25
- * Delta tangents for the frame being added.
26
- * @remarks Need to re-assign after modification to ensure that the modification takes effect.
27
- */
28
- get deltaTangents(): Vector3[];
29
- set deltaTangents(value: Vector3[]);
8
+ /** Delta positions for the frame being added. */
9
+ readonly deltaPositions: Readonly<Readonly<Vector3>[]>;
10
+ /** Delta normals for the frame being added. */
11
+ readonly deltaNormals: Readonly<Readonly<Vector3[]> | null>;
12
+ /** Delta tangents for the frame being added. */
13
+ readonly deltaTangents: Readonly<Readonly<Vector3[]> | null>;
30
14
  /**
31
15
  * Create a BlendShapeFrame.
32
16
  * @param weight - Weight of BlendShapeFrame
@@ -36,9 +20,3 @@ export declare class BlendShapeFrame {
36
20
  */
37
21
  constructor(weight: number, deltaPositions: Vector3[], deltaNormals?: Vector3[], deltaTangents?: Vector3[]);
38
22
  }
39
- export declare enum BlendShapeFrameDirty {
40
- Position = 1,
41
- Normal = 2,
42
- Tangent = 4,
43
- All = 7
44
- }
@@ -1,15 +1,16 @@
1
+ import { BoundingBox } from "@galacean/engine-math";
2
+ import { RenderContext } from "../RenderPipeline/RenderContext";
1
3
  import { Renderer } from "../Renderer";
2
- import { ICustomClone } from "../clone/ComponentCloner";
3
4
  import { Mesh } from "../graphic/Mesh";
4
5
  /**
5
6
  * MeshRenderer Component.
6
7
  */
7
- export declare class MeshRenderer extends Renderer implements ICustomClone {
8
+ export declare class MeshRenderer extends Renderer {
8
9
  private static _uvMacro;
9
10
  private static _uv1Macro;
10
11
  private static _normalMacro;
11
12
  private static _tangentMacro;
12
- private static _enableVertexColorMacro;
13
+ private static _vertexColorMacro;
13
14
  private _enableVertexColor;
14
15
  /**
15
16
  * Mesh assigned to the renderer.
@@ -21,6 +22,14 @@ export declare class MeshRenderer extends Renderer implements ICustomClone {
21
22
  */
22
23
  get enableVertexColor(): boolean;
23
24
  set enableVertexColor(value: boolean);
25
+ /**
26
+ * @override
27
+ */
28
+ protected _updateBounds(worldBounds: BoundingBox): void;
29
+ /**
30
+ * @override
31
+ */
32
+ protected _render(context: RenderContext): void;
24
33
  private _setMesh;
25
34
  private _onMeshChanged;
26
35
  }
@@ -15,7 +15,7 @@ export declare class ModelMesh extends Mesh {
15
15
  private static _tempVec3;
16
16
  private static _tempVec4;
17
17
  private _vertexCount;
18
- private _readable;
18
+ private _accessible;
19
19
  private _verticesFloat32;
20
20
  private _verticesUint8;
21
21
  private _indices;
@@ -42,9 +42,9 @@ export declare class ModelMesh extends Mesh {
42
42
  private _customVertexElements;
43
43
  private _vertexCountChanged;
44
44
  /**
45
- * Whether to read data of the mesh.
45
+ * Whether to access data of the mesh.
46
46
  */
47
- get readable(): boolean;
47
+ get accessible(): boolean;
48
48
  /**
49
49
  * Vertex count of current mesh.
50
50
  */
@@ -207,9 +207,9 @@ export declare class ModelMesh extends Mesh {
207
207
  getBlendShapeName(index: number): string;
208
208
  /**
209
209
  * Upload Mesh Data to GPU.
210
- * @param noLongerReadable - Whether to read data later. If true, you'll never read data anymore (free memory cache)
210
+ * @param noLongerAccessible - Whether to access data later. If true, you'll never access data anymore (free memory cache)
211
211
  */
212
- uploadData(noLongerReadable: boolean): void;
212
+ uploadData(noLongerAccessible: boolean): void;
213
213
  /**
214
214
  * Calculate mesh tangent.
215
215
  * @remark need to set positions(with or not with indices), normals, uv before calculation.
@@ -63,8 +63,8 @@ export declare class PrimitiveMesh {
63
63
  * @param engine - Engine
64
64
  * @param radius - The radius of cap
65
65
  * @param height - The height of torso
66
- * @param radialSegments - Cone radial segments
67
- * @param heightSegments - Cone height segments
66
+ * @param radialSegments - Cylinder radial segments
67
+ * @param heightSegments - Cylinder height segments
68
68
  * @param noLongerAccessible - No longer access the vertices of the mesh after creation
69
69
  * @returns Cone model mesh
70
70
  */
@@ -80,8 +80,6 @@ export declare class PrimitiveMesh {
80
80
  * @returns Capsule model mesh
81
81
  */
82
82
  static createCapsule(engine: Engine, radius?: number, height?: number, radialSegments?: number, heightSegments?: number, noLongerAccessible?: boolean): ModelMesh;
83
- static _setCylinderData(cylinderMesh: ModelMesh, radiusTop: number, radiusBottom: number, height: number, radialSegments: number, heightSegments: number, noLongerAccessible: boolean, isRestoreMode: boolean): void;
84
- static _setCapsuleData(capsuleMesh: ModelMesh, radius: number, height: number, radialSegments: number, heightSegments: number, noLongerAccessible: boolean, isRestoreMode: boolean): void;
85
83
  private static _initialize;
86
84
  private static _generateIndices;
87
85
  private static _createCapsuleCap;
@@ -1,14 +1,17 @@
1
1
  import { BoundingBox } from "@galacean/engine-math";
2
2
  import { Entity } from "../Entity";
3
+ import { RenderContext } from "../RenderPipeline/RenderContext";
3
4
  import { MeshRenderer } from "./MeshRenderer";
4
5
  import { Skin } from "./Skin";
5
6
  /**
6
7
  * SkinnedMeshRenderer.
7
8
  */
8
9
  export declare class SkinnedMeshRenderer extends MeshRenderer {
10
+ private static _tempMatrix;
9
11
  private static _jointCountProperty;
10
12
  private static _jointSamplerProperty;
11
13
  private static _jointMatrixProperty;
14
+ private _supportSkinning;
12
15
  private _hasInitSkin;
13
16
  private _jointDataCreateCache;
14
17
  private _skin;
@@ -40,6 +43,18 @@ export declare class SkinnedMeshRenderer extends MeshRenderer {
40
43
  */
41
44
  get rootBone(): Entity;
42
45
  set rootBone(value: Entity);
46
+ /**
47
+ * @override
48
+ */
49
+ protected _updateShaderData(context: RenderContext): void;
50
+ /**
51
+ * @override
52
+ */
53
+ protected _registerEntityTransformListener(): void;
54
+ /**
55
+ * @override
56
+ */
57
+ protected _updateBounds(worldBounds: BoundingBox): void;
43
58
  private _initSkin;
44
59
  private _computeApproximateBindMatrix;
45
60
  private _findByEntityName;
@@ -1,6 +1,6 @@
1
- import { Color, Vector3 } from "@galacean/engine-math";
2
- import { MeshRenderer } from "../mesh/MeshRenderer";
1
+ import { Vector3, Color } from "@galacean/engine-math";
3
2
  import { Texture } from "../texture";
3
+ import { MeshRenderer } from "../mesh/MeshRenderer";
4
4
  /**
5
5
  * Blend mode enums of the particle renderer's material.
6
6
  */
@@ -41,10 +41,12 @@ export declare class CharacterController extends Collider {
41
41
  /**
42
42
  * Add collider shape on this controller.
43
43
  * @param shape - Collider shape
44
+ * @override
44
45
  */
45
46
  addShape(shape: ColliderShape): void;
46
47
  /**
47
48
  * Remove all shape attached.
49
+ * @override
48
50
  */
49
51
  clearShapes(): void;
50
52
  private _setUpDirection;
@@ -3,7 +3,7 @@ import { Component } from "../Component";
3
3
  import { ColliderShape } from "./shape/ColliderShape";
4
4
  /**
5
5
  * Base class for all colliders.
6
- * @decorator `@dependentComponents(Transform, DependentMode.CheckOnly)`
6
+ * @decorator `@dependentComponents(Transform)`
7
7
  */
8
8
  export declare class Collider extends Component {
9
9
  protected _updateFlag: BoolUpdateFlag;
@@ -1,3 +1,4 @@
1
+ import { IPhysics } from "@galacean/engine-design";
1
2
  import { Ray, Vector3 } from "@galacean/engine-math";
2
3
  import { Engine } from "../Engine";
3
4
  import { Layer } from "../Layer";
@@ -6,7 +7,6 @@ import { HitResult } from "./HitResult";
6
7
  * A physics manager is a collection of colliders and constraints which can interact.
7
8
  */
8
9
  export declare class PhysicsManager {
9
- private static _collision;
10
10
  private _engine;
11
11
  private _restTime;
12
12
  private _colliders;
@@ -21,12 +21,31 @@ export declare class PhysicsManager {
21
21
  private _onTriggerStay;
22
22
  /** The fixed time step in seconds at which physics are performed. */
23
23
  fixedTimeStep: number;
24
+ /**
25
+ * The max allowed time step in seconds one frame.
26
+ *
27
+ * @remarks
28
+ * When the frame rate is low or stutter occurs, the maximum execution time of physics will not exceed this value.
29
+ * So physics will slow down a bit when performance hitch occurs.
30
+ */
31
+ maxAllowedTimeStep: number;
24
32
  /**
25
33
  * The gravity of physics scene.
26
34
  */
27
35
  get gravity(): Vector3;
28
36
  set gravity(value: Vector3);
37
+ /**
38
+ * @deprecated
39
+ * Please use `maxAllowedTimeStep` instead.
40
+ */
41
+ get maxSumTimeStep(): number;
42
+ set maxSumTimeStep(value: number);
29
43
  constructor(engine: Engine);
44
+ /**
45
+ * initialize PhysicsManager.
46
+ * @param physics - Physics Engine
47
+ */
48
+ initialize(physics: IPhysics): void;
30
49
  /**
31
50
  * Casts a ray through the Scene and returns the first hit.
32
51
  * @param ray - The ray
@@ -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
+ }
@@ -1,7 +1,7 @@
1
- import { Vector3 } from "@galacean/engine-math";
2
1
  import { Joint } from "./Joint";
3
- import { JointLimits } from "./JointLimits";
2
+ import { Vector3 } from "@galacean/engine-math";
4
3
  import { JointMotor } from "./JointMotor";
4
+ import { JointLimits } from "./JointLimits";
5
5
  /**
6
6
  * A joint which behaves in a similar way to a hinge or axle.
7
7
  */
@@ -1,11 +1,11 @@
1
1
  import { IJoint } from "@galacean/engine-design";
2
2
  import { Vector3 } from "@galacean/engine-math";
3
3
  import { Component } from "../../Component";
4
- import { Entity } from "../../Entity";
5
4
  import { Collider } from "../Collider";
5
+ import { Entity } from "../../Entity";
6
6
  /**
7
7
  * A base class providing common functionality for joints.
8
- * @decorator `@dependentComponents(Collider, DependentMode.CheckOnly)`
8
+ * @decorator `@dependentComponents(Collider)`
9
9
  */
10
10
  export declare class Joint extends Component {
11
11
  protected _connectedCollider: JointCollider;
@@ -1,5 +1,5 @@
1
- import { Vector3 } from "@galacean/engine-math";
2
1
  import { Joint } from "./Joint";
2
+ import { Vector3 } from "@galacean/engine-math";
3
3
  /**
4
4
  * A joint that maintains an upper or lower bound (or both) on the distance between two points on different objects.
5
5
  */
@@ -1,5 +1,4 @@
1
1
  export type { IHardwareRenderer } from "./IHardwareRenderer";
2
- export type { IPlatformBuffer } from "./IPlatformBuffer";
3
2
  export type { IPlatformRenderTarget } from "./IPlatformRenderTarget";
4
3
  export type { IPlatformTexture } from "./IPlatformTexture";
5
4
  export type { IPlatformTexture2D } from "./IPlatformTexture2D";