@galacean/engine-core 1.0.0 → 1.0.1

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 (261) hide show
  1. package/dist/main.js +15449 -13299
  2. package/dist/main.js.map +1 -1
  3. package/dist/miniprogram.js +15449 -13299
  4. package/dist/module.js +15435 -13295
  5. package/dist/module.js.map +1 -1
  6. package/package.json +3 -3
  7. package/types/2d/assembler/TiledSpriteAssembler.d.ts +1 -0
  8. package/types/2d/atlas/SpriteAtlas.d.ts +2 -6
  9. package/types/2d/data/VertexData2D.d.ts +1 -0
  10. package/types/2d/enums/SpriteDrawMode.d.ts +4 -2
  11. package/types/2d/enums/SpriteTileMode.d.ts +11 -0
  12. package/types/2d/index.d.ts +1 -0
  13. package/types/2d/sprite/Sprite.d.ts +17 -8
  14. package/types/2d/sprite/SpriteMask.d.ts +16 -22
  15. package/types/2d/sprite/SpriteRenderer.d.ts +31 -17
  16. package/types/2d/text/Font.d.ts +2 -7
  17. package/types/2d/text/TextRenderer.d.ts +1 -13
  18. package/types/2d/text/index.d.ts +1 -0
  19. package/types/Camera.d.ts +32 -10
  20. package/types/Component.d.ts +0 -8
  21. package/types/ComponentsDependencies.d.ts +17 -9
  22. package/types/ComponentsManager.d.ts +3 -2
  23. package/types/DisorderedArray.d.ts +4 -3
  24. package/types/Engine.d.ts +35 -43
  25. package/types/Entity.d.ts +2 -2
  26. package/types/RenderPipeline/Basic2DBatcher.d.ts +6 -7
  27. package/types/RenderPipeline/BasicRenderPipeline.d.ts +8 -6
  28. package/types/RenderPipeline/ClassPool.d.ts +3 -1
  29. package/types/RenderPipeline/CullingResults.d.ts +1 -0
  30. package/types/RenderPipeline/DepthOnlyPass.d.ts +1 -0
  31. package/types/RenderPipeline/IPoolElement.d.ts +3 -0
  32. package/types/RenderPipeline/MeshRenderData.d.ts +17 -0
  33. package/types/RenderPipeline/PipelinePass.d.ts +16 -0
  34. package/types/RenderPipeline/PipelineUtils.d.ts +1 -0
  35. package/types/RenderPipeline/RenderData.d.ts +7 -0
  36. package/types/RenderPipeline/RenderElement.d.ts +8 -8
  37. package/types/RenderPipeline/RenderElementX.d.ts +12 -0
  38. package/types/RenderPipeline/RenderPass.d.ts +1 -1
  39. package/types/RenderPipeline/RenderQueue.d.ts +3 -5
  40. package/types/RenderPipeline/SpriteMaskBatcher.d.ts +4 -3
  41. package/types/RenderPipeline/SpriteMaskRenderData.d.ts +12 -0
  42. package/types/RenderPipeline/SpriteRenderData.d.ts +14 -0
  43. package/types/RenderPipeline/TextRenderData.d.ts +8 -0
  44. package/types/RenderPipeline/enums/PipelineStage.d.ts +9 -0
  45. package/types/RenderPipeline/index.d.ts +4 -0
  46. package/types/Renderer.d.ts +10 -15
  47. package/types/SafeLoopArray.d.ts +37 -0
  48. package/types/Scene.d.ts +13 -5
  49. package/types/Script.d.ts +18 -15
  50. package/types/Ticker.d.ts +30 -0
  51. package/types/Transform.d.ts +10 -12
  52. package/types/Utils.d.ts +28 -0
  53. package/types/animation/AnimationClip.d.ts +2 -1
  54. package/types/animation/Animator.d.ts +7 -4
  55. package/types/animation/animationCurve/AnimationFloatArrayCurve.d.ts +0 -1
  56. package/types/animation/animationCurve/AnimationRectCurve.d.ts +8 -0
  57. package/types/animation/animationCurve/AnimationRefCurve.d.ts +8 -0
  58. package/types/animation/enums/LayerState.d.ts +3 -1
  59. package/types/animation/internal/AnimationCurveLayerOwner.d.ts +1 -0
  60. package/types/animation/internal/AnimationCurveOwnerLayerData.d.ts +1 -0
  61. package/types/asset/AssetType.d.ts +16 -16
  62. package/types/asset/ContentRestorer.d.ts +17 -0
  63. package/types/asset/GraphicsResource.d.ts +5 -0
  64. package/types/asset/IReferable.d.ts +2 -0
  65. package/types/asset/LoadItem.d.ts +16 -9
  66. package/types/asset/ReferResource.d.ts +22 -0
  67. package/types/asset/ResourceManager.d.ts +17 -9
  68. package/types/asset/request.d.ts +7 -3
  69. package/types/base/Constant.d.ts +2 -1
  70. package/types/base/EngineObject.d.ts +1 -0
  71. package/types/base/EventDispatcher.d.ts +2 -15
  72. package/types/base/Time.d.ts +27 -24
  73. package/types/base/index.d.ts +0 -2
  74. package/types/enums/ActiveChangeFlag.d.ts +6 -0
  75. package/types/enums/DepthTextureMode.d.ts +7 -0
  76. package/types/env-probe/CubeProbe.d.ts +0 -7
  77. package/types/env-probe/Probe.d.ts +0 -6
  78. package/types/graphic/Buffer.d.ts +5 -12
  79. package/types/graphic/Mesh.d.ts +5 -16
  80. package/types/graphic/Primitive.d.ts +1 -0
  81. package/types/graphic/PrimitiveVertexBinding.d.ts +1 -0
  82. package/types/graphic/SubMesh.d.ts +3 -1
  83. package/types/graphic/SubPrimitive.d.ts +9 -0
  84. package/types/index.d.ts +8 -7
  85. package/types/input/InputManager.d.ts +1 -1
  86. package/types/input/interface/IInput.d.ts +1 -1
  87. package/types/lighting/AmbientLight.d.ts +4 -1
  88. package/types/lighting/DirectLight.d.ts +0 -1
  89. package/types/lighting/Light.d.ts +0 -1
  90. package/types/lighting/LightManager.d.ts +1 -0
  91. package/types/lighting/SpotLight.d.ts +0 -1
  92. package/types/material/BaseMaterial.d.ts +8 -10
  93. package/types/material/BlinnPhongMaterial.d.ts +0 -3
  94. package/types/material/Material.d.ts +8 -8
  95. package/types/material/PBRMaterial.d.ts +12 -3
  96. package/types/material/PBRSpecularMaterial.d.ts +1 -1
  97. package/types/material/UnlitMaterial.d.ts +1 -1
  98. package/types/mesh/BlendShape.d.ts +1 -1
  99. package/types/mesh/BlendShapeFrame.d.ts +28 -6
  100. package/types/mesh/MeshRenderer.d.ts +7 -12
  101. package/types/mesh/ModelMesh.d.ts +5 -5
  102. package/types/mesh/PrimitiveMesh.d.ts +4 -2
  103. package/types/mesh/PrimitiveMeshRestorer.d.ts +1 -0
  104. package/types/mesh/SkinnedMeshRenderer.d.ts +0 -14
  105. package/types/particle/ParticleBufferUtils.d.ts +1 -0
  106. package/types/particle/ParticleData.d.ts +1 -0
  107. package/types/particle/ParticleGenerator.d.ts +72 -0
  108. package/types/particle/ParticleMaterial.d.ts +28 -0
  109. package/types/particle/ParticleMesh.d.ts +289 -0
  110. package/types/particle/ParticleRenderer.d.ts +2 -2
  111. package/types/particle/ParticleShaderDeclaration.d.ts +1 -0
  112. package/types/particle/ParticleShaderMacro.d.ts +1 -0
  113. package/types/particle/ParticleShaderProperty.d.ts +1 -0
  114. package/types/particle/ParticleSystem.d.ts +41 -0
  115. package/types/particle/ParticleVertexElements.d.ts +1 -0
  116. package/types/particle/ParticleVertexUtils.d.ts +1 -0
  117. package/types/particle/enum/ParticleAnimationRowMode.d.ts +9 -0
  118. package/types/particle/enum/ParticleAnimationType.d.ts +9 -0
  119. package/types/particle/enum/ParticleCurveMode.d.ts +13 -0
  120. package/types/particle/enum/ParticleGradientMode.d.ts +13 -0
  121. package/types/particle/enum/ParticleRenderMode.d.ts +17 -0
  122. package/types/particle/enum/ParticleScaleMode.d.ts +11 -0
  123. package/types/particle/enum/ParticleShapeMultiModeValue.d.ts +9 -0
  124. package/types/particle/enum/ParticleShapeType.d.ts +15 -0
  125. package/types/particle/enum/ParticleSimulationSpace.d.ts +9 -0
  126. package/types/particle/enum/index.d.ts +9 -0
  127. package/types/particle/enums/ParticleCurveMode.d.ts +9 -0
  128. package/types/particle/enums/ParticleGradientMode.d.ts +9 -0
  129. package/types/particle/enums/ParticleRandomSubSeeds.d.ts +1 -0
  130. package/types/particle/enums/ParticleRenderMode.d.ts +17 -0
  131. package/types/particle/enums/ParticleScaleMode.d.ts +11 -0
  132. package/types/particle/enums/ParticleSimulationSpace.d.ts +9 -0
  133. package/types/particle/enums/ParticleStopMode.d.ts +6 -0
  134. package/types/particle/enums/attributes/BillboardParticleVertexAttribute.d.ts +1 -0
  135. package/types/particle/enums/attributes/MeshParticleVertexAttribute.d.ts +5 -0
  136. package/types/particle/enums/attributes/ParticleInstanceVertexAttribute.d.ts +1 -0
  137. package/types/particle/module/Burst.d.ts +38 -0
  138. package/types/particle/module/ColorGradient.d.ts +75 -0
  139. package/types/particle/module/ColorOverLifetimeModule.d.ts +20 -0
  140. package/types/particle/module/EmissionModule.d.ts +63 -0
  141. package/types/particle/module/FrameOverTime.d.ts +73 -0
  142. package/types/particle/module/ParticleCurve.d.ts +37 -0
  143. package/types/particle/module/RotationOverLifetimeModule.d.ts +21 -0
  144. package/types/particle/module/RotationVelocityGradient.d.ts +184 -0
  145. package/types/particle/module/SizeGradient.d.ts +151 -0
  146. package/types/particle/module/SizeOverLifetimeModule.d.ts +21 -0
  147. package/types/particle/module/StartFrame.d.ts +46 -0
  148. package/types/particle/module/TextureSheetAnimationModule.d.ts +37 -0
  149. package/types/particle/module/VelocityGradient.d.ts +110 -0
  150. package/types/particle/module/VelocityOverLifetimeModule.d.ts +22 -0
  151. package/types/particle/module/index.d.ts +15 -0
  152. package/types/particle/module/shape/BaseShape.d.ts +26 -0
  153. package/types/particle/module/shape/BoxShape.d.ts +20 -0
  154. package/types/particle/module/shape/CircleShape.d.ts +27 -0
  155. package/types/particle/module/shape/ConeShape.d.ts +35 -0
  156. package/types/particle/module/shape/HemisphereShape.d.ts +23 -0
  157. package/types/particle/module/shape/ShapeUtils.d.ts +1 -0
  158. package/types/particle/module/shape/SphereShape.d.ts +23 -0
  159. package/types/particle/module/shape/index.d.ts +5 -0
  160. package/types/particle/modules/Burst.d.ts +14 -0
  161. package/types/particle/modules/ColorOverLifetimeModule.d.ts +20 -0
  162. package/types/particle/modules/EmissionModule.d.ts +45 -0
  163. package/types/particle/modules/MainModule.d.ts +68 -0
  164. package/types/particle/modules/ParticleCompositeCurve.d.ts +56 -0
  165. package/types/particle/modules/ParticleCompositeGradient.d.ts +55 -0
  166. package/types/particle/modules/ParticleCurve.d.ts +56 -0
  167. package/types/particle/modules/ParticleGeneratorModule.d.ts +12 -0
  168. package/types/particle/modules/ParticleGradient.d.ts +94 -0
  169. package/types/particle/modules/RotationOverLifetimeModule.d.ts +34 -0
  170. package/types/particle/modules/ShapeModule.d.ts +9 -0
  171. package/types/particle/modules/SizeOverLifetimeModule.d.ts +34 -0
  172. package/types/particle/modules/TextureSheetAnimationModule.d.ts +42 -0
  173. package/types/particle/modules/VelocityOverLifetimeModule.d.ts +34 -0
  174. package/types/particle/modules/shape/BaseShape.d.ts +12 -0
  175. package/types/particle/modules/shape/BoxShape.d.ts +11 -0
  176. package/types/particle/modules/shape/CircleShape.d.ts +17 -0
  177. package/types/particle/modules/shape/ConeShape.d.ts +28 -0
  178. package/types/particle/modules/shape/HemisphereShape.d.ts +9 -0
  179. package/types/particle/modules/shape/ShapeUtils.d.ts +1 -0
  180. package/types/particle/modules/shape/SphereShape.d.ts +9 -0
  181. package/types/particle/modules/shape/enums/ParticleShapeArcMode.d.ts +9 -0
  182. package/types/particle/modules/shape/enums/ParticleShapeMultiModeValue.d.ts +9 -0
  183. package/types/particle/modules/shape/enums/ParticleShapeType.d.ts +15 -0
  184. package/types/particle/modules/shape/index.d.ts +6 -0
  185. package/types/particle/moudules/Burst.d.ts +25 -0
  186. package/types/particle/moudules/Emission.d.ts +47 -0
  187. package/types/particle/moudules/EmissionModule.d.ts +49 -0
  188. package/types/particle/moudules/MainModule.d.ts +59 -0
  189. package/types/particle/moudules/ParticleCurve.d.ts +27 -0
  190. package/types/particle/moudules/ParticleGradient.d.ts +28 -0
  191. package/types/particle/moudules/ShapeModule.d.ts +7 -0
  192. package/types/particle/moudules/shape/BaseShape.d.ts +28 -0
  193. package/types/particle/moudules/shape/BoxShape.d.ts +20 -0
  194. package/types/particle/moudules/shape/CircleShape.d.ts +27 -0
  195. package/types/particle/moudules/shape/ConeShape.d.ts +35 -0
  196. package/types/particle/moudules/shape/HemisphereShape.d.ts +23 -0
  197. package/types/particle/moudules/shape/ShapeUtils.d.ts +1 -0
  198. package/types/particle/moudules/shape/SphereShape.d.ts +23 -0
  199. package/types/particle/moudules/shape/enums/ParticleShapeMultiModeValue.d.ts +9 -0
  200. package/types/particle/moudules/shape/enums/ParticleShapeType.d.ts +15 -0
  201. package/types/particle/moudules/shape/index.d.ts +5 -0
  202. package/types/physics/CharacterController.d.ts +0 -2
  203. package/types/physics/Collider.d.ts +1 -1
  204. package/types/physics/Collision.d.ts +4 -0
  205. package/types/physics/PhysicsManager.d.ts +5 -22
  206. package/types/physics/PhysicsScene.d.ts +79 -0
  207. package/types/physics/joint/HingeJoint.d.ts +2 -2
  208. package/types/physics/joint/Joint.d.ts +2 -2
  209. package/types/physics/joint/SpringJoint.d.ts +1 -1
  210. package/types/renderingHardwareInterface/IPlatformBuffer.d.ts +8 -0
  211. package/types/renderingHardwareInterface/index.d.ts +1 -0
  212. package/types/shader/Shader.d.ts +32 -23
  213. package/types/shader/ShaderData.d.ts +24 -24
  214. package/types/shader/ShaderMacro.d.ts +16 -0
  215. package/types/shader/ShaderPart.d.ts +41 -0
  216. package/types/shader/ShaderPass.d.ts +9 -2
  217. package/types/shader/ShaderProperty.d.ts +7 -0
  218. package/types/shader/ShaderTagKey.d.ts +16 -0
  219. package/types/shader/SubShader.d.ts +19 -0
  220. package/types/shader/enums/RenderStateElementKey.d.ts +60 -0
  221. package/types/shader/index.d.ts +5 -1
  222. package/types/shader/state/index.d.ts +6 -0
  223. package/types/shaderlib/particle/index.d.ts +14 -0
  224. package/types/shadow/CascadedShadowCasterPass.d.ts +1 -1
  225. package/types/shadow/PipelinePass.d.ts +16 -0
  226. package/types/sky/Sky.d.ts +12 -4
  227. package/types/sky/SkyBoxMaterial.d.ts +27 -9
  228. package/types/sky/SkyProceduralMaterial.d.ts +72 -0
  229. package/types/sky/index.d.ts +1 -0
  230. package/types/texture/RenderTarget.d.ts +2 -6
  231. package/types/texture/Texture.d.ts +8 -6
  232. package/types/texture/Texture2D.d.ts +3 -1
  233. package/types/texture/enums/TextureUsage.d.ts +9 -0
  234. package/types/texture/index.d.ts +1 -0
  235. package/types/trail/TrailRenderer.d.ts +0 -5
  236. package/types/utils/BoolUpdateFlag.d.ts +12 -0
  237. package/types/utils/DisorderedArray.d.ts +18 -0
  238. package/types/utils/SafeLoopArray.d.ts +41 -0
  239. package/types/utils/UpdateFlag.d.ts +20 -0
  240. package/types/utils/UpdateFlagManager.d.ts +1 -0
  241. package/types/utils/Utils.d.ts +31 -0
  242. package/types/xr/XRManager.d.ts +31 -0
  243. package/types/xr/component/XRPoseDriver.d.ts +10 -0
  244. package/types/xr/data/XRCamera.d.ts +6 -0
  245. package/types/xr/data/XRDevice.d.ts +9 -0
  246. package/types/xr/data/XRHandle.d.ts +10 -0
  247. package/types/xr/enum/EnumXRButton.d.ts +5 -0
  248. package/types/xr/enum/EnumXRDevicePhase.d.ts +4 -0
  249. package/types/xr/enum/EnumXRFeature.d.ts +9 -0
  250. package/types/xr/enum/EnumXRInputSource.d.ts +8 -0
  251. package/types/xr/enum/EnumXRMode.d.ts +7 -0
  252. package/types/xr/enum/EnumXRSubsystem.d.ts +4 -0
  253. package/types/xr/enum/EnumXRTrackingMode.d.ts +7 -0
  254. package/types/xr/feature/XRCameraManager.d.ts +21 -0
  255. package/types/xr/feature/XRFeature.d.ts +29 -0
  256. package/types/xr/feature/XRImageTrackManager.d.ts +10 -0
  257. package/types/xr/feature/XRInputManager.d.ts +16 -0
  258. package/types/xr/index.d.ts +18 -0
  259. package/types/xr/provider/XRProvider.d.ts +19 -0
  260. package/types/xr/subsystem/XRInputSubsystem.d.ts +5 -0
  261. package/types/xr/subsystem/XRSubsystem.d.ts +30 -0
@@ -0,0 +1,27 @@
1
+ import { IClone } from "@galacean/engine-design";
2
+ import { ParticleCurveMode } from "../enums/ParticleCurveMode";
3
+ /**
4
+ * Particle curve.
5
+ */
6
+ export declare class ParticleCurve implements IClone {
7
+ /** The curve mode. */
8
+ mode: ParticleCurveMode;
9
+ constant: number;
10
+ constantMin: number;
11
+ constantMax: number;
12
+ /**
13
+ * Query the curve value at the specified time.
14
+ * @param time - Normalized time at which to evaluate the curve, Valid when `mode` is set to `Curve` or `TwoCurves`
15
+ * @param lerpFactor - Lerp factor between two constants or curves, Valid when `mode` is set to `TwoConstants` or `TwoCurves`
16
+ * @returns - The result curve value
17
+ */
18
+ evaluate(time: number, lerpFactor: number): number;
19
+ /**
20
+ * @inheritDoc
21
+ */
22
+ cloneTo(destEmission: ParticleCurve): void;
23
+ /**
24
+ * @inheritDoc
25
+ */
26
+ clone(): ParticleCurve;
27
+ }
@@ -0,0 +1,28 @@
1
+ import { IClone } from "@galacean/engine-design";
2
+ import { Color } from "@galacean/engine-math";
3
+ import { ParticleGradientMode } from "../enums/ParticleGradientMode";
4
+ /**
5
+ * Particle curve.
6
+ */
7
+ export declare class ParticleGradient implements IClone {
8
+ /** The curve mode. */
9
+ mode: ParticleGradientMode;
10
+ color: Color;
11
+ colorMin: Color;
12
+ colorMax: Color;
13
+ /**
14
+ * Query the color at the specified time.
15
+ * @param time - Normalized time at which to evaluate the gradient, Valid when `mode` is set to `Gradient` or `TwoGradients`
16
+ * @param lerpFactor - Lerp factor between two colors or gradients, Valid when `mode` is set to `TwoColors` or `TwoGradients`
17
+ * @param out - The result color
18
+ */
19
+ evaluate(time: number, lerpFactor: number, out: Color): void;
20
+ /**
21
+ * @inheritDoc
22
+ */
23
+ cloneTo(destEmission: ParticleGradient): void;
24
+ /**
25
+ * @inheritDoc
26
+ */
27
+ clone(): ParticleGradient;
28
+ }
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Shape module of `ParticleSystem`.
3
+ */
4
+ export declare class ShapeModule {
5
+ /** Specifies whether the Shape Module is enabled or disabled. */
6
+ enabled: boolean;
7
+ }
@@ -0,0 +1,28 @@
1
+ import { IClone } from "@galacean/engine-design";
2
+ import { BoundingBox, Rand } from "@galacean/engine-math";
3
+ import { ParticleShapeType } from "./enums/ParticleShapeType";
4
+ /**
5
+ * Configures the initial positions and directions of particles.
6
+ */
7
+ export declare class BaseShape implements IClone {
8
+ /** The type of shape to emit particles from. */
9
+ shapeType: ParticleShapeType;
10
+ /** Specifies whether the ShapeModule is enabled or disabled. */
11
+ enable: boolean;
12
+ /** Randomizes the starting direction of particles. */
13
+ randomDirectionAmount: number;
14
+ protected _rand: Rand;
15
+ constructor(randSeed?: number);
16
+ /**
17
+ * @override
18
+ * @inheritDoc
19
+ */
20
+ cloneTo(destShape: BaseShape): void;
21
+ /**
22
+ * @override
23
+ * @inheritDoc
24
+ */
25
+ clone(): BaseShape;
26
+ protected _getShapeBoundBox(boundBox: BoundingBox): void;
27
+ protected _getSpeedBoundBox(boundBox: BoundingBox): void;
28
+ }
@@ -0,0 +1,20 @@
1
+ import { BoundingBox, Vector3 } from "@galacean/engine-math";
2
+ import { BaseShape } from "./BaseShape";
3
+ /**
4
+ * Box emitter shape
5
+ */
6
+ export declare class BoxShape extends BaseShape {
7
+ /** Thickness of the box to emit particles from. */
8
+ boxThickness: Vector3;
9
+ constructor();
10
+ /**
11
+ * @inheritDoc
12
+ */
13
+ protected _getShapeBoundBox(boundBox: BoundingBox): void;
14
+ /**
15
+ * @inheritDoc
16
+ */
17
+ protected _getSpeedBoundBox(boundBox: BoundingBox): void;
18
+ cloneTo(destShape: BoxShape): void;
19
+ clone(): BoxShape;
20
+ }
@@ -0,0 +1,27 @@
1
+ import { BoundingBox, Vector2, Vector3 } from "@galacean/engine-math";
2
+ import { BaseShape } from "./BaseShape";
3
+ import { ParticleShapeMultiModeValue } from "./enums/ParticleShapeMultiModeValue";
4
+ /**
5
+ * Circle Particle Emitter
6
+ */
7
+ export declare class CircleShape extends BaseShape {
8
+ protected static _tempPositionPoint: Vector2;
9
+ /** Radius of the shape to emit particles from. */
10
+ radius: number;
11
+ /** Angle of the circle arc to emit particles from. */
12
+ arc: number;
13
+ /** The mode to generate particles around the arc. */
14
+ arcMode: ParticleShapeMultiModeValue;
15
+ constructor();
16
+ /**
17
+ * @inheritDoc
18
+ */
19
+ protected _getShapeBoundBox(boundBox: BoundingBox): void;
20
+ /**
21
+ * @inheritDoc
22
+ */
23
+ protected _getSpeedBoundBox(boundBox: BoundingBox): void;
24
+ _generatePositionAndDirection(position: Vector3, direction: Vector3): void;
25
+ cloneTo(destShape: CircleShape): void;
26
+ clone(): CircleShape;
27
+ }
@@ -0,0 +1,35 @@
1
+ import { BoundingBox, Vector2, Vector3 } from "@galacean/engine-math";
2
+ import { BaseShape } from "./BaseShape";
3
+ export declare enum ConeEmitType {
4
+ Base = 0,
5
+ BaseShell = 1,
6
+ Volume = 2,
7
+ VolumeShell = 3
8
+ }
9
+ /**
10
+ * Cone particle emitter
11
+ */
12
+ export declare class ConeShape extends BaseShape {
13
+ protected static _tempPositionPoint: Vector2;
14
+ protected static _tempDirectionPoint: Vector2;
15
+ /** Angle of the cone to emit particles from. */
16
+ angle: number;
17
+ /** Radius of the shape to emit particles from. */
18
+ radius: number;
19
+ /** Length of the cone to emit particles from. */
20
+ length: number;
21
+ /** Cone emitter subtype */
22
+ emitType: ConeEmitType;
23
+ constructor();
24
+ /**
25
+ * @inheritDoc
26
+ */
27
+ protected _getShapeBoundBox(boundBox: BoundingBox): void;
28
+ /**
29
+ * @inheritDoc
30
+ */
31
+ protected _getSpeedBoundBox(boundBox: BoundingBox): void;
32
+ _generatePositionAndDirection(position: Vector3, direction: Vector3): void;
33
+ cloneTo(destShape: ConeShape): void;
34
+ clone(): ConeShape;
35
+ }
@@ -0,0 +1,23 @@
1
+ import { BoundingBox, Vector3 } from "@galacean/engine-math";
2
+ import { BaseShape } from "./BaseShape";
3
+ /**
4
+ * Hemisphere emitter
5
+ */
6
+ export declare class HemisphereShape extends BaseShape {
7
+ /** Radius of the shape to emit particles from. */
8
+ radius: number;
9
+ /** Whether emit from shell */
10
+ emitFromShell: boolean;
11
+ constructor();
12
+ /**
13
+ * @inheritDoc
14
+ */
15
+ protected _getShapeBoundBox(boundBox: BoundingBox): void;
16
+ /**
17
+ * @inheritDoc
18
+ */
19
+ protected _getSpeedBoundBox(boundBox: BoundingBox): void;
20
+ _generatePositionAndDirection(position: Vector3, direction: Vector3): void;
21
+ cloneTo(destShape: HemisphereShape): void;
22
+ clone(): HemisphereShape;
23
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,23 @@
1
+ import { BoundingBox, Rand, Vector3 } from "@galacean/engine-math";
2
+ import { BaseShape } from "./BaseShape";
3
+ /**
4
+ * Sphere emitter
5
+ */
6
+ export declare class SphereShape extends BaseShape {
7
+ /** Radius of the shape to emit particles from. */
8
+ radius: number;
9
+ /** Whether emit from shell */
10
+ emitFromShell: boolean;
11
+ constructor();
12
+ /**
13
+ * @inheritDoc
14
+ */
15
+ protected _getShapeBoundBox(boundBox: BoundingBox): void;
16
+ /**
17
+ * @inheritDoc
18
+ */
19
+ protected _getSpeedBoundBox(boundBox: BoundingBox): void;
20
+ _generatePositionAndDirection(position: Vector3, direction: Vector3, rand?: Rand, randomSeeds?: Uint32Array): void;
21
+ cloneTo(destShape: SphereShape): void;
22
+ clone(): SphereShape;
23
+ }
@@ -0,0 +1,9 @@
1
+ /**
2
+ * The mode used to generate new points in a shape.
3
+ */
4
+ export declare enum ParticleShapeMultiModeValue {
5
+ /** Generate points randomly. (Default) */
6
+ Random = 0,
7
+ /** Animate the emission point around the shape. */
8
+ Loop = 1
9
+ }
@@ -0,0 +1,15 @@
1
+ /**
2
+ * The emission shape.
3
+ */
4
+ export declare enum ParticleShapeType {
5
+ /** Emit from the volume of a box. */
6
+ Box = 0,
7
+ /** Emit from a circle. */
8
+ Circle = 1,
9
+ /** Emit from the base of a cone. */
10
+ Cone = 2,
11
+ /** Emit from a half-sphere. */
12
+ Hemisphere = 3,
13
+ /** Emit from a sphere. */
14
+ Sphere = 4
15
+ }
@@ -0,0 +1,5 @@
1
+ export { BoxShape } from "./BoxShape";
2
+ export { CircleShape } from "./CircleShape";
3
+ export { ConeShape, ConeEmitType } from "./ConeShape";
4
+ export { HemisphereShape } from "./HemisphereShape";
5
+ export { SphereShape } from "./SphereShape";
@@ -41,12 +41,10 @@ export declare class CharacterController extends Collider {
41
41
  /**
42
42
  * Add collider shape on this controller.
43
43
  * @param shape - Collider shape
44
- * @override
45
44
  */
46
45
  addShape(shape: ColliderShape): void;
47
46
  /**
48
47
  * Remove all shape attached.
49
- * @override
50
48
  */
51
49
  clearShapes(): void;
52
50
  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)`
6
+ * @decorator `@dependentComponents(Transform, DependentMode.CheckOnly)`
7
7
  */
8
8
  export declare class Collider extends Component {
9
9
  protected _updateFlag: BoolUpdateFlag;
@@ -0,0 +1,4 @@
1
+ import { ColliderShape } from "./shape";
2
+ export declare class Collision {
3
+ shape: ColliderShape;
4
+ }
@@ -1,4 +1,3 @@
1
- import { IPhysics } from "@galacean/engine-design";
2
1
  import { Ray, Vector3 } from "@galacean/engine-math";
3
2
  import { Engine } from "../Engine";
4
3
  import { Layer } from "../Layer";
@@ -7,8 +6,10 @@ import { HitResult } from "./HitResult";
7
6
  * A physics manager is a collection of colliders and constraints which can interact.
8
7
  */
9
8
  export declare class PhysicsManager {
9
+ private static _collision;
10
10
  private _engine;
11
11
  private _restTime;
12
+ private _fixedTimeStep;
12
13
  private _colliders;
13
14
  private _gravity;
14
15
  private _nativePhysicsManager;
@@ -19,33 +20,15 @@ export declare class PhysicsManager {
19
20
  private _onTriggerEnter;
20
21
  private _onTriggerExit;
21
22
  private _onTriggerStay;
22
- /** The fixed time step in seconds at which physics are performed. */
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;
32
23
  /**
33
24
  * The gravity of physics scene.
34
25
  */
35
26
  get gravity(): Vector3;
36
27
  set gravity(value: Vector3);
37
- /**
38
- * @deprecated
39
- * Please use `maxAllowedTimeStep` instead.
40
- */
41
- get maxSumTimeStep(): number;
42
- set maxSumTimeStep(value: number);
28
+ /** The fixed time step in seconds at which physics are performed. */
29
+ get fixedTimeStep(): number;
30
+ set fixedTimeStep(value: number);
43
31
  constructor(engine: Engine);
44
- /**
45
- * initialize PhysicsManager.
46
- * @param physics - Physics Engine
47
- */
48
- initialize(physics: IPhysics): void;
49
32
  /**
50
33
  * Casts a ray through the Scene and returns the first hit.
51
34
  * @param ray - The ray
@@ -0,0 +1,79 @@
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 _fixedTimeStep;
13
+ private _colliders;
14
+ private _gravity;
15
+ private _nativePhysicsScene;
16
+ private _onContactEnter;
17
+ private _onContactExit;
18
+ private _onContactStay;
19
+ private _onTriggerEnter;
20
+ private _onTriggerExit;
21
+ private _onTriggerStay;
22
+ /**
23
+ * The gravity of physics scene.
24
+ */
25
+ get gravity(): Vector3;
26
+ set gravity(value: Vector3);
27
+ /**
28
+ * The fixed time step in seconds at which physics are performed.
29
+ */
30
+ get fixedTimeStep(): number;
31
+ set fixedTimeStep(value: number);
32
+ constructor(scene: Scene);
33
+ /**
34
+ * Casts a ray through the Scene and returns the first hit.
35
+ * @param ray - The ray
36
+ * @returns Returns True if the ray intersects with a collider, otherwise false
37
+ */
38
+ raycast(ray: Ray): boolean;
39
+ /**
40
+ * Casts a ray through the Scene and returns the first hit.
41
+ * @param ray - The ray
42
+ * @param outHitResult - If true is returned, outHitResult will contain more detailed collision information
43
+ * @returns Returns True if the ray intersects with a collider, otherwise false
44
+ */
45
+ raycast(ray: Ray, outHitResult: HitResult): boolean;
46
+ /**
47
+ * Casts a ray through the Scene and returns the first hit.
48
+ * @param ray - The ray
49
+ * @param distance - The max distance the ray should check
50
+ * @returns Returns True if the ray intersects with a collider, otherwise false
51
+ */
52
+ raycast(ray: Ray, distance: number): boolean;
53
+ /**
54
+ * Casts a ray through the Scene and returns the first hit.
55
+ * @param ray - The ray
56
+ * @param distance - The max distance the ray should check
57
+ * @param outHitResult - If true is returned, outHitResult will contain more detailed collision information
58
+ * @returns Returns True if the ray intersects with a collider, otherwise false
59
+ */
60
+ raycast(ray: Ray, distance: number, outHitResult: HitResult): boolean;
61
+ /**
62
+ * Casts a ray through the Scene and returns the first hit.
63
+ * @param ray - The ray
64
+ * @param distance - The max distance the ray should check
65
+ * @param layerMask - Layer mask that is used to selectively ignore Colliders when casting
66
+ * @returns Returns True if the ray intersects with a collider, otherwise false
67
+ */
68
+ raycast(ray: Ray, distance: number, layerMask: Layer): boolean;
69
+ /**
70
+ * Casts a ray through the Scene and returns the first hit.
71
+ * @param ray - The ray
72
+ * @param distance - The max distance the ray should check
73
+ * @param layerMask - Layer mask that is used to selectively ignore Colliders when casting
74
+ * @param outHitResult - If true is returned, outHitResult will contain more detailed collision information
75
+ * @returns Returns True if the ray intersects with a collider, otherwise false.
76
+ */
77
+ raycast(ray: Ray, distance: number, layerMask: Layer, outHitResult: HitResult): boolean;
78
+ private _setGravity;
79
+ }
@@ -1,7 +1,7 @@
1
- import { Joint } from "./Joint";
2
1
  import { Vector3 } from "@galacean/engine-math";
3
- import { JointMotor } from "./JointMotor";
2
+ import { Joint } from "./Joint";
4
3
  import { JointLimits } from "./JointLimits";
4
+ import { JointMotor } from "./JointMotor";
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 { Collider } from "../Collider";
5
4
  import { Entity } from "../../Entity";
5
+ import { Collider } from "../Collider";
6
6
  /**
7
7
  * A base class providing common functionality for joints.
8
- * @decorator `@dependentComponents(Collider)`
8
+ * @decorator `@dependentComponents(Collider, DependentMode.CheckOnly)`
9
9
  */
10
10
  export declare class Joint extends Component {
11
11
  protected _connectedCollider: JointCollider;
@@ -1,5 +1,5 @@
1
- import { Joint } from "./Joint";
2
1
  import { Vector3 } from "@galacean/engine-math";
2
+ import { Joint } from "./Joint";
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
  */
@@ -0,0 +1,8 @@
1
+ import { SetDataOptions } from "../graphic";
2
+ export interface IPlatformBuffer {
3
+ bind(): void;
4
+ setData(byteLength: number, data: ArrayBuffer | ArrayBufferView, bufferByteOffset?: number, dataOffset?: number, dataLength?: number, options?: SetDataOptions): void;
5
+ getData(data: ArrayBufferView, bufferByteOffset?: number, dataOffset?: number, dataLength?: number): void;
6
+ resize(byteLength: number): void;
7
+ destroy(): void;
8
+ }
@@ -1,4 +1,5 @@
1
1
  export type { IHardwareRenderer } from "./IHardwareRenderer";
2
+ export type { IPlatformBuffer } from "./IPlatformBuffer";
2
3
  export type { IPlatformRenderTarget } from "./IPlatformRenderTarget";
3
4
  export type { IPlatformTexture } from "./IPlatformTexture";
4
5
  export type { IPlatformTexture2D } from "./IPlatformTexture2D";
@@ -2,15 +2,13 @@ import { Engine } from "../Engine";
2
2
  import { ShaderMacro } from "./ShaderMacro";
3
3
  import { ShaderPass } from "./ShaderPass";
4
4
  import { ShaderProperty } from "./ShaderProperty";
5
+ import { SubShader } from "./SubShader";
5
6
  /**
6
7
  * Shader for rendering.
7
8
  */
8
9
  export declare class Shader {
10
+ readonly name: string;
9
11
  private static _shaderMap;
10
- private static _propertyNameMap;
11
- private static _macroMaskMap;
12
- private static _macroCounter;
13
- private static _macroMap;
14
12
  /**
15
13
  * Create a shader.
16
14
  * @param name - Name of the shader
@@ -26,18 +24,46 @@ export declare class Shader {
26
24
  * @returns Shader
27
25
  */
28
26
  static create(name: string, shaderPasses: ShaderPass[]): Shader;
27
+ /**
28
+ * Create a shader.
29
+ * @param name - Name of the shader
30
+ * @param subShaders - Sub shaders
31
+ * @returns Shader
32
+ */
33
+ static create(name: string, subShaders: SubShader[]): Shader;
29
34
  /**
30
35
  * Find a shader by name.
31
36
  * @param name - Name of the shader
32
37
  */
33
38
  static find(name: string): Shader;
39
+ private _subShaders;
40
+ /**
41
+ * Sub shaders of the shader.
42
+ */
43
+ get subShaders(): ReadonlyArray<SubShader>;
44
+ private constructor();
45
+ /**
46
+ * Compile shader variant by macro name list.
47
+ *
48
+ * @remarks
49
+ * Usually a shader contains some macros,any combination of macros is called shader variant.
50
+ *
51
+ * @param engine - Engine to which the shader variant belongs
52
+ * @param macros - Macro name list
53
+ * @returns Is the compiled shader variant valid
54
+ */
55
+ compileVariant(engine: Engine, macros: string[]): boolean;
34
56
  /**
57
+ * @deprecated Please use `ShaderMacro.getByName` instead
58
+ *
35
59
  * Get shader macro by name.
36
60
  * @param name - Name of the shader macro
37
61
  * @returns Shader macro
38
62
  */
39
63
  static getMacroByName(name: string): ShaderMacro;
40
64
  /**
65
+ * @deprecated Please use `ShaderMacro.getByName` instead
66
+ *
41
67
  * Get shader macro by name.
42
68
  * @param name - Name of the shader macro
43
69
  * @param value - Value of the shader macro
@@ -45,28 +71,11 @@ export declare class Shader {
45
71
  */
46
72
  static getMacroByName(name: string, value: string): ShaderMacro;
47
73
  /**
74
+ * @deprecated Please use `ShaderProperty.getByName` instead
75
+ *
48
76
  * Get shader property by name.
49
77
  * @param name - Name of the shader property
50
78
  * @returns Shader property
51
79
  */
52
80
  static getPropertyByName(name: string): ShaderProperty;
53
- /** The name of shader. */
54
- readonly name: string;
55
- /**
56
- * Shader passes.
57
- */
58
- get passes(): ReadonlyArray<ShaderPass>;
59
- private _passes;
60
- private constructor();
61
- /**
62
- * Compile shader variant by macro name list.
63
- *
64
- * @remarks
65
- * Usually a shader contains some macros,any combination of macros is called shader variant.
66
- *
67
- * @param engine - Engine to which the shader variant belongs
68
- * @param macros - Macro name list
69
- * @returns Is the compiled shader variant valid
70
- */
71
- compileVariant(engine: Engine, macros: string[]): boolean;
72
81
  }