@galacean/engine-core 0.0.0-experimental-animator-additive.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 (325) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +1 -0
  3. package/dist/main.js +24671 -0
  4. package/dist/main.js.map +1 -0
  5. package/dist/miniprogram.js +24671 -0
  6. package/dist/module.js +24554 -0
  7. package/dist/module.js.map +1 -0
  8. package/package.json +26 -0
  9. package/types/2d/assembler/IAssembler.d.ts +1 -0
  10. package/types/2d/assembler/SimpleSpriteAssembler.d.ts +1 -0
  11. package/types/2d/assembler/SlicedSpriteAssembler.d.ts +1 -0
  12. package/types/2d/atlas/FontAtlas.d.ts +1 -0
  13. package/types/2d/atlas/SpriteAtlas.d.ts +36 -0
  14. package/types/2d/atlas/types.d.ts +64 -0
  15. package/types/2d/data/RenderData2D.d.ts +1 -0
  16. package/types/2d/data/VertexData2D.d.ts +1 -0
  17. package/types/2d/enums/FontStyle.d.ts +11 -0
  18. package/types/2d/enums/SpriteDirtyFlag.d.ts +13 -0
  19. package/types/2d/enums/SpriteDrawMode.d.ts +9 -0
  20. package/types/2d/enums/SpriteMaskInteraction.d.ts +11 -0
  21. package/types/2d/enums/SpriteMaskLayer.d.ts +71 -0
  22. package/types/2d/enums/SpriteModifyFlags.d.ts +13 -0
  23. package/types/2d/enums/TextAlignment.d.ts +22 -0
  24. package/types/2d/enums/TextOverflow.d.ts +9 -0
  25. package/types/2d/index.d.ts +9 -0
  26. package/types/2d/sprite/Sprite.d.ts +97 -0
  27. package/types/2d/sprite/SpriteMask.d.ts +63 -0
  28. package/types/2d/sprite/SpriteRenderer.d.ts +77 -0
  29. package/types/2d/sprite/index.d.ts +3 -0
  30. package/types/2d/text/CharInfo.d.ts +1 -0
  31. package/types/2d/text/CharRenderData.d.ts +1 -0
  32. package/types/2d/text/CharRenderDataPool.d.ts +1 -0
  33. package/types/2d/text/Font.d.ts +26 -0
  34. package/types/2d/text/SubFont.d.ts +1 -0
  35. package/types/2d/text/TextRenderer.d.ts +123 -0
  36. package/types/2d/text/TextUtils.d.ts +1 -0
  37. package/types/2d/text/index.d.ts +2 -0
  38. package/types/Background.d.ts +43 -0
  39. package/types/BoolUpdateFlag.d.ts +12 -0
  40. package/types/Camera.d.ts +206 -0
  41. package/types/Canvas.d.ts +9 -0
  42. package/types/Component.d.ts +32 -0
  43. package/types/ComponentsDependencies.d.ts +17 -0
  44. package/types/ComponentsManager.d.ts +46 -0
  45. package/types/DisorderedArray.d.ts +18 -0
  46. package/types/Engine.d.ts +140 -0
  47. package/types/EngineSettings.d.ts +8 -0
  48. package/types/Entity.d.ts +151 -0
  49. package/types/Layer.d.ts +73 -0
  50. package/types/ListenerUpdateFlag.d.ts +12 -0
  51. package/types/Platform.d.ts +15 -0
  52. package/types/RenderPipeline/Basic2DBatcher.d.ts +20 -0
  53. package/types/RenderPipeline/BasicRenderPipeline.d.ts +66 -0
  54. package/types/RenderPipeline/ClassPool.d.ts +17 -0
  55. package/types/RenderPipeline/MeshRenderData.d.ts +15 -0
  56. package/types/RenderPipeline/MeshRenderElement.d.ts +17 -0
  57. package/types/RenderPipeline/RenderContext.d.ts +1 -0
  58. package/types/RenderPipeline/RenderData.d.ts +7 -0
  59. package/types/RenderPipeline/RenderElement.d.ts +11 -0
  60. package/types/RenderPipeline/RenderPass.d.ts +55 -0
  61. package/types/RenderPipeline/RenderQueue.d.ts +38 -0
  62. package/types/RenderPipeline/SpriteBatcher.d.ts +1 -0
  63. package/types/RenderPipeline/SpriteElement.d.ts +13 -0
  64. package/types/RenderPipeline/SpriteMaskBatcher.d.ts +10 -0
  65. package/types/RenderPipeline/SpriteMaskElement.d.ts +10 -0
  66. package/types/RenderPipeline/SpriteMaskManager.d.ts +1 -0
  67. package/types/RenderPipeline/SpriteMaskRenderData.d.ts +10 -0
  68. package/types/RenderPipeline/SpriteRenderData.d.ts +12 -0
  69. package/types/RenderPipeline/TextRenderData.d.ts +6 -0
  70. package/types/RenderPipeline/TextRenderElement.d.ts +6 -0
  71. package/types/RenderPipeline/enums/PipelineStage.d.ts +9 -0
  72. package/types/RenderPipeline/index.d.ts +4 -0
  73. package/types/Renderer.d.ts +119 -0
  74. package/types/Scene.d.ts +142 -0
  75. package/types/SceneManager.d.ts +28 -0
  76. package/types/Script.d.ts +118 -0
  77. package/types/SystemInfo.d.ts +14 -0
  78. package/types/Transform.d.ts +258 -0
  79. package/types/UpdateFlag.d.ts +20 -0
  80. package/types/UpdateFlagManager.d.ts +1 -0
  81. package/types/Utils.d.ts +3 -0
  82. package/types/VirtualCamera.d.ts +1 -0
  83. package/types/animation/AnimationClip.d.ts +58 -0
  84. package/types/animation/AnimationClipCurveBinding.d.ts +21 -0
  85. package/types/animation/AnimationEvent.d.ts +11 -0
  86. package/types/animation/Animator.d.ts +86 -0
  87. package/types/animation/AnimatorController.d.ts +32 -0
  88. package/types/animation/AnimatorControllerLayer.d.ts +18 -0
  89. package/types/animation/AnimatorState.d.ts +60 -0
  90. package/types/animation/AnimatorStateMachine.d.ts +37 -0
  91. package/types/animation/AnimatorStatePlayData.d.ts +1 -0
  92. package/types/animation/AnimatorStateTransition.d.ts +12 -0
  93. package/types/animation/AnimatorTransition.d.ts +14 -0
  94. package/types/animation/AnimatorTransitionBase.d.ts +10 -0
  95. package/types/animation/Keyframe.d.ts +19 -0
  96. package/types/animation/StateMachineScript.d.ts +32 -0
  97. package/types/animation/animationCurve/AnimationArrayCurve.d.ts +7 -0
  98. package/types/animation/animationCurve/AnimationBoolCurve.d.ts +7 -0
  99. package/types/animation/animationCurve/AnimationColorCurve.d.ts +8 -0
  100. package/types/animation/animationCurve/AnimationCurve.d.ts +39 -0
  101. package/types/animation/animationCurve/AnimationFloatArrayCurve.d.ts +12 -0
  102. package/types/animation/animationCurve/AnimationFloatCurve.d.ts +7 -0
  103. package/types/animation/animationCurve/AnimationQuaternionCurve.d.ts +8 -0
  104. package/types/animation/animationCurve/AnimationVector2Curve.d.ts +8 -0
  105. package/types/animation/animationCurve/AnimationVector3Curve.d.ts +8 -0
  106. package/types/animation/animationCurve/AnimationVector4Curve.d.ts +8 -0
  107. package/types/animation/animationCurve/index.d.ts +10 -0
  108. package/types/animation/animationCurve/interfaces/IAnimationCurveCalculator.d.ts +1 -0
  109. package/types/animation/enums/AnimatorConditionMode.d.ts +8 -0
  110. package/types/animation/enums/AnimatorCullingMode.d.ts +9 -0
  111. package/types/animation/enums/AnimatorLayerBlendingMode.d.ts +4 -0
  112. package/types/animation/enums/AnimatorStatePlayState.d.ts +1 -0
  113. package/types/animation/enums/InterpolationType.d.ts +13 -0
  114. package/types/animation/enums/LayerState.d.ts +13 -0
  115. package/types/animation/enums/PlayState.d.ts +13 -0
  116. package/types/animation/enums/StateMachineState.d.ts +13 -0
  117. package/types/animation/enums/WrapMode.d.ts +9 -0
  118. package/types/animation/index.d.ts +21 -0
  119. package/types/animation/internal/AnimationEventHandler.d.ts +1 -0
  120. package/types/animation/internal/AnimatorLayerData.d.ts +1 -0
  121. package/types/animation/internal/AnimatorPlayableObject.d.ts +23 -0
  122. package/types/animation/internal/AnimatorStateData.d.ts +1 -0
  123. package/types/animation/internal/AnimatorStateInfo.d.ts +1 -0
  124. package/types/animation/internal/AnimatorStateMachineData.d.ts +1 -0
  125. package/types/animation/internal/AnimatorStatePlayData.d.ts +1 -0
  126. package/types/animation/internal/AnimatorTempValue.d.ts +1 -0
  127. package/types/animation/internal/CrossCurveData.d.ts +1 -0
  128. package/types/animation/internal/animationCurveOwner/AnimationCurveOwner.d.ts +5 -0
  129. package/types/animation/internal/animationCurveOwner/Assembler/BlendShapeWeightsAnimationCurveOwnerAssembler.d.ts +1 -0
  130. package/types/animation/internal/animationCurveOwner/Assembler/IAnimationCurveOwnerAssembler.d.ts +1 -0
  131. package/types/animation/internal/animationCurveOwner/Assembler/PositionAnimationCurveOwnerAssembler.d.ts +1 -0
  132. package/types/animation/internal/animationCurveOwner/Assembler/RotationAnimationCurveOwnerAssembler.d.ts +1 -0
  133. package/types/animation/internal/animationCurveOwner/Assembler/ScaleAnimationCurveOwnerAssembler.d.ts +1 -0
  134. package/types/animation/internal/animationCurveOwner/Assembler/UniversalAnimationCurveOwnerAssembler.d.ts +1 -0
  135. package/types/asset/AssetPromise.d.ts +56 -0
  136. package/types/asset/AssetType.d.ts +52 -0
  137. package/types/asset/ContentRestorer.d.ts +17 -0
  138. package/types/asset/GraphicsResource.d.ts +9 -0
  139. package/types/asset/IRefObject.d.ts +2 -0
  140. package/types/asset/IReferable.d.ts +2 -0
  141. package/types/asset/LoadItem.d.ts +33 -0
  142. package/types/asset/Loader.d.ts +30 -0
  143. package/types/asset/RefObject.d.ts +27 -0
  144. package/types/asset/ReferResource.d.ts +27 -0
  145. package/types/asset/ResourceManager.d.ts +101 -0
  146. package/types/asset/request.d.ts +25 -0
  147. package/types/base/Constant.d.ts +110 -0
  148. package/types/base/EngineObject.d.ts +24 -0
  149. package/types/base/Event.d.ts +24 -0
  150. package/types/base/EventDispatcher.d.ts +79 -0
  151. package/types/base/Logger.d.ts +11 -0
  152. package/types/base/StaticInterfaceImplement.d.ts +5 -0
  153. package/types/base/Time.d.ts +41 -0
  154. package/types/base/Util.d.ts +14 -0
  155. package/types/base/index.d.ts +7 -0
  156. package/types/clone/CloneManager.d.ts +31 -0
  157. package/types/clone/ComponentCloner.d.ts +14 -0
  158. package/types/clone/enums/CloneMode.d.ts +13 -0
  159. package/types/enums/BackgroundMode.d.ts +9 -0
  160. package/types/enums/BackgroundTextureFillMode.d.ts +8 -0
  161. package/types/enums/CameraClearFlags.d.ts +13 -0
  162. package/types/enums/ColorSpace.d.ts +9 -0
  163. package/types/enums/FogMode.d.ts +13 -0
  164. package/types/env-probe/CubeProbe.d.ts +34 -0
  165. package/types/env-probe/Probe.d.ts +58 -0
  166. package/types/env-probe/index.d.ts +2 -0
  167. package/types/fog/EXP2Fog.d.ts +15 -0
  168. package/types/fog/Fog.d.ts +14 -0
  169. package/types/fog/LinearFog.d.ts +22 -0
  170. package/types/fog/index.d.ts +3 -0
  171. package/types/graphic/Buffer.d.ts +105 -0
  172. package/types/graphic/BufferUtil.d.ts +11 -0
  173. package/types/graphic/IndexBufferBinding.d.ts +21 -0
  174. package/types/graphic/Mesh.d.ts +70 -0
  175. package/types/graphic/SubMesh.d.ts +19 -0
  176. package/types/graphic/VertexBufferBinding.d.ts +20 -0
  177. package/types/graphic/VertexElement.d.ts +44 -0
  178. package/types/graphic/enums/BufferBindFlag.d.ts +9 -0
  179. package/types/graphic/enums/BufferUsage.d.ts +11 -0
  180. package/types/graphic/enums/IndexFormat.d.ts +11 -0
  181. package/types/graphic/enums/MeshTopology.d.ts +19 -0
  182. package/types/graphic/enums/SetDataOptions.d.ts +9 -0
  183. package/types/graphic/enums/VertexElementFormat.d.ts +37 -0
  184. package/types/graphic/index.d.ts +13 -0
  185. package/types/index.d.ts +53 -0
  186. package/types/input/InputManager.d.ts +67 -0
  187. package/types/input/enums/Keys.d.ts +398 -0
  188. package/types/input/enums/PointerButton.d.ts +33 -0
  189. package/types/input/enums/PointerPhase.d.ts +15 -0
  190. package/types/input/index.d.ts +5 -0
  191. package/types/input/interface/IInput.d.ts +18 -0
  192. package/types/input/keyboard/KeyboardManager.d.ts +1 -0
  193. package/types/input/pointer/Pointer.d.ts +25 -0
  194. package/types/input/pointer/PointerManager.d.ts +1 -0
  195. package/types/input/wheel/WheelManager.d.ts +1 -0
  196. package/types/lighting/AmbientLight.d.ts +67 -0
  197. package/types/lighting/DirectLight.d.ts +21 -0
  198. package/types/lighting/KHR_lights.d.ts +4 -0
  199. package/types/lighting/Light.d.ts +48 -0
  200. package/types/lighting/LightManager.d.ts +5 -0
  201. package/types/lighting/PointLight.d.ts +18 -0
  202. package/types/lighting/SpotLight.d.ts +36 -0
  203. package/types/lighting/enums/DiffuseMode.d.ts +13 -0
  204. package/types/lighting/index.d.ts +6 -0
  205. package/types/material/BaseMaterial.d.ts +88 -0
  206. package/types/material/BlinnPhongMaterial.d.ts +71 -0
  207. package/types/material/Material.d.ts +51 -0
  208. package/types/material/PBRBaseMaterial.d.ts +101 -0
  209. package/types/material/PBRMaterial.d.ts +36 -0
  210. package/types/material/PBRSpecularMaterial.d.ts +38 -0
  211. package/types/material/UnlitMaterial.d.ts +33 -0
  212. package/types/material/enums/BlendMode.d.ts +9 -0
  213. package/types/material/enums/RenderFace.d.ts +11 -0
  214. package/types/material/enums/TextureCoordinate.d.ts +13 -0
  215. package/types/material/index.d.ts +10 -0
  216. package/types/mesh/BlendShape.d.ts +39 -0
  217. package/types/mesh/BlendShapeFrame.d.ts +22 -0
  218. package/types/mesh/BlendShapeManager.d.ts +1 -0
  219. package/types/mesh/BufferMesh.d.ts +59 -0
  220. package/types/mesh/MeshRenderer.d.ts +30 -0
  221. package/types/mesh/ModelMesh.d.ts +226 -0
  222. package/types/mesh/PrimitiveMesh.d.ts +86 -0
  223. package/types/mesh/PrimitiveMeshRestorer.d.ts +1 -0
  224. package/types/mesh/Skin.d.ts +16 -0
  225. package/types/mesh/SkinnedMeshRenderer.d.ts +62 -0
  226. package/types/mesh/enums/VertexAttribute.d.ts +33 -0
  227. package/types/mesh/index.d.ts +8 -0
  228. package/types/particle/ParticleRenderer.d.ts +235 -0
  229. package/types/particle/index.d.ts +1 -0
  230. package/types/physics/CharacterController.d.ts +53 -0
  231. package/types/physics/Collider.d.ts +29 -0
  232. package/types/physics/DynamicCollider.d.ts +161 -0
  233. package/types/physics/HitResult.d.ts +15 -0
  234. package/types/physics/PhysicsManager.d.ts +95 -0
  235. package/types/physics/PhysicsMaterial.d.ts +37 -0
  236. package/types/physics/StaticCollider.d.ts +7 -0
  237. package/types/physics/enums/ColliderShapeUpAxis.d.ts +11 -0
  238. package/types/physics/enums/ControllerCollisionFlag.d.ts +11 -0
  239. package/types/physics/enums/ControllerNonWalkableMode.d.ts +9 -0
  240. package/types/physics/enums/HingeJointFlag.d.ts +1 -0
  241. package/types/physics/enums/PhysicsMaterialCombineMode.d.ts +13 -0
  242. package/types/physics/enums/index.d.ts +4 -0
  243. package/types/physics/index.d.ts +10 -0
  244. package/types/physics/joint/FixedJoint.d.ts +3 -0
  245. package/types/physics/joint/HingeJoint.d.ts +57 -0
  246. package/types/physics/joint/Joint.d.ts +58 -0
  247. package/types/physics/joint/JointLimits.d.ts +15 -0
  248. package/types/physics/joint/JointMotor.d.ts +13 -0
  249. package/types/physics/joint/SpringJoint.d.ts +42 -0
  250. package/types/physics/joint/index.d.ts +6 -0
  251. package/types/physics/shape/BoxColliderShape.d.ts +15 -0
  252. package/types/physics/shape/CapsuleColliderShape.d.ts +26 -0
  253. package/types/physics/shape/ColliderShape.d.ts +51 -0
  254. package/types/physics/shape/PlaneColliderShape.d.ts +7 -0
  255. package/types/physics/shape/SphereColliderShape.d.ts +13 -0
  256. package/types/physics/shape/index.d.ts +5 -0
  257. package/types/renderingHardwareInterface/IHardwareRenderer.d.ts +6 -0
  258. package/types/renderingHardwareInterface/IPlatformBuffer.d.ts +8 -0
  259. package/types/renderingHardwareInterface/IPlatformRenderTarget.d.ts +20 -0
  260. package/types/renderingHardwareInterface/IPlatformTexture.d.ts +36 -0
  261. package/types/renderingHardwareInterface/IPlatformTexture2D.d.ts +37 -0
  262. package/types/renderingHardwareInterface/IPlatformTexture2DArray.d.ts +40 -0
  263. package/types/renderingHardwareInterface/IPlatformTextureCube.d.ts +41 -0
  264. package/types/renderingHardwareInterface/index.d.ts +6 -0
  265. package/types/shader/Shader.d.ts +72 -0
  266. package/types/shader/ShaderData.d.ts +350 -0
  267. package/types/shader/ShaderMacro.d.ts +10 -0
  268. package/types/shader/ShaderMacroCollection.d.ts +1 -0
  269. package/types/shader/ShaderPart.d.ts +41 -0
  270. package/types/shader/ShaderPass.d.ts +9 -0
  271. package/types/shader/ShaderPool.d.ts +1 -0
  272. package/types/shader/ShaderProgram.d.ts +1 -0
  273. package/types/shader/ShaderProgramPool.d.ts +1 -0
  274. package/types/shader/ShaderProperty.d.ts +13 -0
  275. package/types/shader/ShaderTagKey.d.ts +16 -0
  276. package/types/shader/ShaderUniform.d.ts +1 -0
  277. package/types/shader/ShaderUniformBlock.d.ts +1 -0
  278. package/types/shader/SubShader.d.ts +19 -0
  279. package/types/shader/enums/BlendFactor.d.ts +32 -0
  280. package/types/shader/enums/BlendOperation.d.ts +16 -0
  281. package/types/shader/enums/ColorWriteMask.d.ts +18 -0
  282. package/types/shader/enums/CompareFunction.d.ts +22 -0
  283. package/types/shader/enums/CullMode.d.ts +12 -0
  284. package/types/shader/enums/RenderQueueType.d.ts +11 -0
  285. package/types/shader/enums/ShaderDataGroup.d.ts +13 -0
  286. package/types/shader/enums/ShaderPropertyType.d.ts +27 -0
  287. package/types/shader/enums/StencilOperation.d.ts +22 -0
  288. package/types/shader/index.d.ts +12 -0
  289. package/types/shader/state/BlendState.d.ts +16 -0
  290. package/types/shader/state/DepthState.d.ts +14 -0
  291. package/types/shader/state/RasterState.d.ts +13 -0
  292. package/types/shader/state/RenderState.d.ts +20 -0
  293. package/types/shader/state/RenderTargetBlendState.d.ts +24 -0
  294. package/types/shader/state/StencilState.d.ts +34 -0
  295. package/types/shaderlib/ShaderFactory.d.ts +17 -0
  296. package/types/shaderlib/ShaderLib.d.ts +57 -0
  297. package/types/shaderlib/index.d.ts +1 -0
  298. package/types/shaderlib/pbr/index.d.ts +9 -0
  299. package/types/shaderlib/shadow/index.d.ts +8 -0
  300. package/types/shadow/CascadedShadowCasterPass.d.ts +47 -0
  301. package/types/shadow/ShadowSliceData.d.ts +1 -0
  302. package/types/shadow/ShadowUtils.d.ts +1 -0
  303. package/types/shadow/enum/ShadowCascadesMode.d.ts +11 -0
  304. package/types/shadow/enum/ShadowMode.d.ts +13 -0
  305. package/types/shadow/enum/ShadowResolution.d.ts +13 -0
  306. package/types/shadow/enum/ShadowType.d.ts +13 -0
  307. package/types/shadow/index.d.ts +3 -0
  308. package/types/sky/Sky.d.ts +14 -0
  309. package/types/sky/SkyBoxMaterial.d.ts +25 -0
  310. package/types/sky/index.d.ts +2 -0
  311. package/types/texture/RenderTarget.d.ts +95 -0
  312. package/types/texture/Texture.d.ts +77 -0
  313. package/types/texture/Texture2D.d.ts +68 -0
  314. package/types/texture/Texture2DArray.d.ts +81 -0
  315. package/types/texture/TextureCube.d.ts +70 -0
  316. package/types/texture/enums/RenderBufferDepthFormat.d.ts +21 -0
  317. package/types/texture/enums/TextureCubeFace.d.ts +17 -0
  318. package/types/texture/enums/TextureDepthCompareFunction.d.ts +21 -0
  319. package/types/texture/enums/TextureFilterMode.d.ts +11 -0
  320. package/types/texture/enums/TextureFormat.d.ts +69 -0
  321. package/types/texture/enums/TextureWrapMode.d.ts +11 -0
  322. package/types/texture/index.d.ts +11 -0
  323. package/types/trail/TrailMaterial.d.ts +5 -0
  324. package/types/trail/TrailRenderer.d.ts +40 -0
  325. package/types/trail/index.d.ts +2 -0
@@ -0,0 +1,226 @@
1
+ import { Color, Vector2, Vector3, Vector4 } from "@galacean/engine-math";
2
+ import { Engine } from "../Engine";
3
+ import { Buffer } from "../graphic/Buffer";
4
+ import { Mesh } from "../graphic/Mesh";
5
+ import { VertexBufferBinding } from "../graphic/VertexBufferBinding";
6
+ import { VertexElement } from "../graphic/VertexElement";
7
+ import { BlendShape } from "./BlendShape";
8
+ /**
9
+ * Mesh containing common vertex elements of the model.
10
+ */
11
+ export declare class ModelMesh extends Mesh {
12
+ private static _tempVec0;
13
+ private static _tempVec1;
14
+ private static _tempVec2;
15
+ private static _tempVec3;
16
+ private static _tempVec4;
17
+ private _vertexCount;
18
+ private _accessible;
19
+ private _verticesFloat32;
20
+ private _verticesUint8;
21
+ private _indices;
22
+ private _indicesFormat;
23
+ private _indicesChangeFlag;
24
+ private _positions;
25
+ private _normals;
26
+ private _colors;
27
+ private _tangents;
28
+ private _uv;
29
+ private _uv1;
30
+ private _uv2;
31
+ private _uv3;
32
+ private _uv4;
33
+ private _uv5;
34
+ private _uv6;
35
+ private _uv7;
36
+ private _boneWeights;
37
+ private _boneIndices;
38
+ private _bufferStrides;
39
+ private _vertexBufferUpdateFlag;
40
+ private _vertexDataUpdateFlag;
41
+ private _vertexElementsUpdate;
42
+ private _customVertexElements;
43
+ private _vertexCountChanged;
44
+ /**
45
+ * Whether to access data of the mesh.
46
+ */
47
+ get accessible(): boolean;
48
+ /**
49
+ * Vertex count of current mesh.
50
+ */
51
+ get vertexCount(): number;
52
+ /**
53
+ * Vertex element collection.
54
+ */
55
+ get vertexElements(): Readonly<VertexElement[]>;
56
+ /**
57
+ * Vertex buffer binding collection.
58
+ */
59
+ get vertexBufferBindings(): Readonly<VertexBufferBinding[]>;
60
+ /**
61
+ * BlendShapes of this ModelMesh.
62
+ */
63
+ get blendShapes(): Readonly<BlendShape[]>;
64
+ /**
65
+ * BlendShape count of this ModelMesh.
66
+ */
67
+ get blendShapeCount(): number;
68
+ /**
69
+ * Create a model mesh.
70
+ * @param engine - Engine to which the mesh belongs
71
+ * @param name - Mesh name
72
+ */
73
+ constructor(engine: Engine, name?: string);
74
+ /**
75
+ * Set positions for the mesh.
76
+ * @param positions - The positions for the mesh.
77
+ */
78
+ setPositions(positions: Vector3[] | null): void;
79
+ /**
80
+ * Get positions for the mesh.
81
+ * @remarks Please call the setPositions() method after modification to ensure that the modification takes effect.
82
+ */
83
+ getPositions(): Vector3[] | null;
84
+ /**
85
+ * Set per-vertex normals for the mesh.
86
+ * @param normals - The normals for the mesh.
87
+ */
88
+ setNormals(normals: Vector3[] | null): void;
89
+ /**
90
+ * Get normals for the mesh.
91
+ * @remarks Please call the setNormals() method after modification to ensure that the modification takes effect.
92
+ */
93
+ getNormals(): Vector3[] | null;
94
+ /**
95
+ * Set per-vertex colors for the mesh.
96
+ * @param colors - The colors for the mesh.
97
+ */
98
+ setColors(colors: Color[] | null): void;
99
+ /**
100
+ * Get colors for the mesh.
101
+ * @remarks Please call the setColors() method after modification to ensure that the modification takes effect.
102
+ */
103
+ getColors(): Color[] | null;
104
+ /**
105
+ * Set per-vertex bone weights for the mesh.
106
+ * @param boneWeights - The bone weights for the mesh.
107
+ */
108
+ setBoneWeights(boneWeights: Vector4[] | null): void;
109
+ /**
110
+ * Get weights for the mesh.
111
+ * @remarks Please call the setWeights() method after modification to ensure that the modification takes effect.
112
+ */
113
+ getBoneWeights(): Vector4[] | null;
114
+ /**
115
+ * Set per-vertex bone indices for the mesh.
116
+ * @param boneIndices - The bone indices for the mesh.
117
+ */
118
+ setBoneIndices(boneIndices: Vector4[] | null): void;
119
+ /**
120
+ * Get joints for the mesh.
121
+ * @remarks Please call the setBoneIndices() method after modification to ensure that the modification takes effect.
122
+ */
123
+ getBoneIndices(): Vector4[] | null;
124
+ /**
125
+ * Set per-vertex tangents for the mesh.
126
+ * @param tangents - The tangents for the mesh.
127
+ */
128
+ setTangents(tangents: Vector4[] | null): void;
129
+ /**
130
+ * Get tangents for the mesh.
131
+ * @remarks Please call the setTangents() method after modification to ensure that the modification takes effect.
132
+ */
133
+ getTangents(): Vector4[] | null;
134
+ /**
135
+ * Set per-vertex uv for the mesh.
136
+ * @param uv - The uv for the mesh.
137
+ */
138
+ setUVs(uv: Vector2[] | null): void;
139
+ /**
140
+ * Set per-vertex uv for the mesh by channelIndex.
141
+ * @param uv - The uv for the mesh.
142
+ * @param channelIndex - The index of uv channels, in [0 ~ 7] range.
143
+ */
144
+ setUVs(uv: Vector2[] | null, channelIndex: number): void;
145
+ /**
146
+ * Get uv for the mesh.
147
+ * @remarks Please call the setUV() method after modification to ensure that the modification takes effect.
148
+ */
149
+ getUVs(): Vector2[] | null;
150
+ /**
151
+ * Get uv for the mesh by channelIndex.
152
+ * @param channelIndex - The index of uv channels, in [0 ~ 7] range.
153
+ * @remarks Please call the setUV() method after modification to ensure that the modification takes effect.
154
+ */
155
+ getUVs(channelIndex: number): Vector2[] | null;
156
+ /**
157
+ * Set indices for the mesh.
158
+ * @param indices - The indices for the mesh.
159
+ */
160
+ setIndices(indices: Uint8Array | Uint16Array | Uint32Array): void;
161
+ /**
162
+ * Get indices for the mesh.
163
+ */
164
+ getIndices(): Uint8Array | Uint16Array | Uint32Array;
165
+ /**
166
+ * @beta
167
+ * @todo Update buffer should support custom vertex elements.
168
+ * Set vertex elements.
169
+ * @param elements - Vertex element collection
170
+ */
171
+ setVertexElements(elements: VertexElement[]): void;
172
+ /**
173
+ * @beta
174
+ * Set vertex buffer binding.
175
+ * @param vertexBufferBindings - Vertex buffer binding
176
+ * @param index - Vertex buffer index, the default value is 0
177
+ */
178
+ setVertexBufferBinding(vertexBufferBindings: VertexBufferBinding, index?: number): void;
179
+ /**
180
+ * @beta
181
+ * Set vertex buffer binding.
182
+ * @param vertexBuffer - Vertex buffer
183
+ * @param stride - Vertex buffer data stride
184
+ * @param index - Vertex buffer index, the default value is 0
185
+ */
186
+ setVertexBufferBinding(vertexBuffer: Buffer, stride: number, index?: number): void;
187
+ /**
188
+ * Set vertex buffer binding.
189
+ * @param vertexBufferBindings - Vertex buffer binding
190
+ * @param firstIndex - First vertex buffer index, the default value is 0
191
+ */
192
+ setVertexBufferBindings(vertexBufferBindings: VertexBufferBinding[], firstIndex?: number): void;
193
+ /**
194
+ * Add a BlendShape for this ModelMesh.
195
+ * @param blendShape - The BlendShape
196
+ */
197
+ addBlendShape(blendShape: BlendShape): void;
198
+ /**
199
+ * Clear all BlendShapes.
200
+ */
201
+ clearBlendShapes(): void;
202
+ /**
203
+ * Get name of BlendShape by given index.
204
+ * @param index - The index of BlendShape
205
+ * @returns The name of BlendShape
206
+ */
207
+ getBlendShapeName(index: number): string;
208
+ /**
209
+ * Upload Mesh Data to GPU.
210
+ * @param noLongerAccessible - Whether to access data later. If true, you'll never access data anymore (free memory cache)
211
+ */
212
+ uploadData(noLongerAccessible: boolean): void;
213
+ /**
214
+ * Calculate mesh tangent.
215
+ * @remark need to set positions(with or not with indices), normals, uv before calculation.
216
+ * @remark based on http://foundationsofgameenginedev.com/FGED2-sample.pdf
217
+ */
218
+ calculateTangents(): void;
219
+ private _supplementaryVertexElements;
220
+ private _updateVertexElements;
221
+ private _updateVertices;
222
+ private _insertVertexAttribute;
223
+ private _getAttributeFormat;
224
+ private _getAttributeByteLength;
225
+ private _releaseCache;
226
+ }
@@ -0,0 +1,86 @@
1
+ import { Engine } from "../Engine";
2
+ import { ModelMesh } from "./ModelMesh";
3
+ /**
4
+ * Used to generate common primitive meshes.
5
+ */
6
+ export declare class PrimitiveMesh {
7
+ /**
8
+ * Create a sphere mesh.
9
+ * @param engine - Engine
10
+ * @param radius - Sphere radius
11
+ * @param segments - Number of segments
12
+ * @param noLongerAccessible - No longer access the vertices of the mesh after creation
13
+ * @returns Sphere model mesh
14
+ */
15
+ static createSphere(engine: Engine, radius?: number, segments?: number, noLongerAccessible?: boolean): ModelMesh;
16
+ /**
17
+ * Create a cuboid mesh.
18
+ * @param engine - Engine
19
+ * @param width - Cuboid width
20
+ * @param height - Cuboid height
21
+ * @param depth - Cuboid depth
22
+ * @param noLongerAccessible - No longer access the vertices of the mesh after creation
23
+ * @returns Cuboid model mesh
24
+ */
25
+ static createCuboid(engine: Engine, width?: number, height?: number, depth?: number, noLongerAccessible?: boolean): ModelMesh;
26
+ /**
27
+ * Create a plane mesh.
28
+ * @param engine - Engine
29
+ * @param width - Plane width
30
+ * @param height - Plane height
31
+ * @param horizontalSegments - Plane horizontal segments
32
+ * @param verticalSegments - Plane vertical segments
33
+ * @param noLongerAccessible - No longer access the vertices of the mesh after creation
34
+ * @returns Plane model mesh
35
+ */
36
+ static createPlane(engine: Engine, width?: number, height?: number, horizontalSegments?: number, verticalSegments?: number, noLongerAccessible?: boolean): ModelMesh;
37
+ /**
38
+ * Create a cylinder mesh.
39
+ * @param engine - Engine
40
+ * @param radiusTop - The radius of top cap
41
+ * @param radiusBottom - The radius of bottom cap
42
+ * @param height - The height of torso
43
+ * @param radialSegments - Cylinder radial segments
44
+ * @param heightSegments - Cylinder height segments
45
+ * @param noLongerAccessible - No longer access the vertices of the mesh after creation
46
+ * @returns Cylinder model mesh
47
+ */
48
+ static createCylinder(engine: Engine, radiusTop?: number, radiusBottom?: number, height?: number, radialSegments?: number, heightSegments?: number, noLongerAccessible?: boolean): ModelMesh;
49
+ /**
50
+ * Create a torus mesh.
51
+ * @param engine - Engine
52
+ * @param radius - Torus radius
53
+ * @param tubeRadius - Torus tube
54
+ * @param radialSegments - Torus radial segments
55
+ * @param tubularSegments - Torus tubular segments
56
+ * @param arc - Central angle
57
+ * @param noLongerAccessible - No longer access the vertices of the mesh after creation
58
+ * @returns Torus model mesh
59
+ */
60
+ static createTorus(engine: Engine, radius?: number, tubeRadius?: number, radialSegments?: number, tubularSegments?: number, arc?: number, noLongerAccessible?: boolean): ModelMesh;
61
+ /**
62
+ * Create a cone mesh.
63
+ * @param engine - Engine
64
+ * @param radius - The radius of cap
65
+ * @param height - The height of torso
66
+ * @param radialSegments - Cylinder radial segments
67
+ * @param heightSegments - Cylinder height segments
68
+ * @param noLongerAccessible - No longer access the vertices of the mesh after creation
69
+ * @returns Cone model mesh
70
+ */
71
+ static createCone(engine: Engine, radius?: number, height?: number, radialSegments?: number, heightSegments?: number, noLongerAccessible?: boolean): ModelMesh;
72
+ /**
73
+ * Create a capsule mesh.
74
+ * @param engine - Engine
75
+ * @param radius - The radius of the two hemispherical ends
76
+ * @param height - The height of the cylindrical part, measured between the centers of the hemispherical ends
77
+ * @param radialSegments - Hemispherical end radial segments
78
+ * @param heightSegments - Cylindrical part height segments
79
+ * @param noLongerAccessible - No longer access the vertices of the mesh after creation
80
+ * @returns Capsule model mesh
81
+ */
82
+ static createCapsule(engine: Engine, radius?: number, height?: number, radialSegments?: number, heightSegments?: number, noLongerAccessible?: boolean): ModelMesh;
83
+ private static _initialize;
84
+ private static _generateIndices;
85
+ private static _createCapsuleCap;
86
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,16 @@
1
+ import { Matrix } from "@galacean/engine-math";
2
+ import { EngineObject } from "../base/EngineObject";
3
+ /**
4
+ * Mesh skin data, equal glTF skins define
5
+ */
6
+ export declare class Skin extends EngineObject {
7
+ name: string;
8
+ inverseBindMatrices: Matrix[];
9
+ joints: string[];
10
+ skeleton: string;
11
+ /**
12
+ * Constructor of skin
13
+ * @param name - name
14
+ */
15
+ constructor(name: string);
16
+ }
@@ -0,0 +1,62 @@
1
+ import { BoundingBox } from "@galacean/engine-math";
2
+ import { Entity } from "../Entity";
3
+ import { RenderContext } from "../RenderPipeline/RenderContext";
4
+ import { MeshRenderer } from "./MeshRenderer";
5
+ import { Skin } from "./Skin";
6
+ /**
7
+ * SkinnedMeshRenderer.
8
+ */
9
+ export declare class SkinnedMeshRenderer extends MeshRenderer {
10
+ private static _tempMatrix;
11
+ private static _jointCountProperty;
12
+ private static _jointSamplerProperty;
13
+ private static _jointMatrixProperty;
14
+ private _hasInitSkin;
15
+ private _jointDataCreateCache;
16
+ private _skin;
17
+ private _blendShapeWeights;
18
+ private _maxVertexUniformVectors;
19
+ private _rootBone;
20
+ private _localBounds;
21
+ private _jointMatrices;
22
+ private _jointTexture;
23
+ private _jointEntities;
24
+ /**
25
+ * The weights of the BlendShapes.
26
+ * @remarks Array index is BlendShape index.
27
+ */
28
+ get blendShapeWeights(): Float32Array;
29
+ set blendShapeWeights(value: Float32Array);
30
+ /**
31
+ * Skin Object.
32
+ */
33
+ get skin(): Skin;
34
+ set skin(value: Skin);
35
+ /**
36
+ * Local bounds.
37
+ */
38
+ get localBounds(): BoundingBox;
39
+ set localBounds(value: BoundingBox);
40
+ /**
41
+ * Root bone.
42
+ */
43
+ get rootBone(): Entity;
44
+ set rootBone(value: Entity);
45
+ /**
46
+ * @override
47
+ */
48
+ protected _updateShaderData(context: RenderContext): void;
49
+ /**
50
+ * @override
51
+ */
52
+ protected _registerEntityTransformListener(): void;
53
+ /**
54
+ * @override
55
+ */
56
+ protected _updateBounds(worldBounds: BoundingBox): void;
57
+ private _initSkin;
58
+ private _computeApproximateBindMatrix;
59
+ private _findByEntityName;
60
+ private _checkBlendShapeWeightLength;
61
+ private _onLocalBoundsChanged;
62
+ }
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Vertex attribute types of a vertex in a ModelMesh.
3
+ */
4
+ export declare enum VertexAttribute {
5
+ /** Vertex position. */
6
+ Position = "POSITION",
7
+ /** Vertex normal. */
8
+ Normal = "NORMAL",
9
+ /** Vertex color. */
10
+ Color = "COLOR_0",
11
+ /** Vertex tangent. */
12
+ Tangent = "TANGENT",
13
+ /** Vertex bone weight. */
14
+ BoneWeight = "WEIGHTS_0",
15
+ /** Vertex bone index. */
16
+ BoneIndex = "JOINTS_0",
17
+ /** Vertex UV. */
18
+ UV = "TEXCOORD_0",
19
+ /** Vertex UV1. */
20
+ UV1 = "TEXCOORD_1",
21
+ /** Vertex UV2. */
22
+ UV2 = "TEXCOORD_2",
23
+ /** Vertex UV3. */
24
+ UV3 = "TEXCOORD_3",
25
+ /** Vertex UV4. */
26
+ UV4 = "TEXCOORD_4",
27
+ /** Vertex UV5. */
28
+ UV5 = "TEXCOORD_5",
29
+ /** Vertex UV6. */
30
+ UV6 = "TEXCOORD_6",
31
+ /** Vertex UV7. */
32
+ UV7 = "TEXCOORD_7"
33
+ }
@@ -0,0 +1,8 @@
1
+ export { ModelMesh } from "./ModelMesh";
2
+ export { Skin } from "./Skin";
3
+ export { MeshRenderer } from "./MeshRenderer";
4
+ export { SkinnedMeshRenderer } from "./SkinnedMeshRenderer";
5
+ export { PrimitiveMesh } from "./PrimitiveMesh";
6
+ export { BufferMesh } from "./BufferMesh";
7
+ export { BlendShape } from "./BlendShape";
8
+ export { BlendShapeFrame } from "./BlendShapeFrame";
@@ -0,0 +1,235 @@
1
+ import { Vector3, Color } from "@galacean/engine-math";
2
+ import { Texture } from "../texture";
3
+ import { MeshRenderer } from "../mesh/MeshRenderer";
4
+ /**
5
+ * Blend mode enums of the particle renderer's material.
6
+ */
7
+ export declare enum ParticleRendererBlendMode {
8
+ Transparent = 0,
9
+ Additive = 1
10
+ }
11
+ /**
12
+ * Particle Renderer Component.
13
+ */
14
+ export declare class ParticleRenderer extends MeshRenderer {
15
+ /** The max number of indices that Uint16Array can support. */
16
+ private static _uint16VertexLimit;
17
+ private static _getRandom;
18
+ private _vertexStride;
19
+ private _vertices;
20
+ private _vertexBuffer;
21
+ private _maxCount;
22
+ private _position;
23
+ private _positionRandomness;
24
+ private _positionArray;
25
+ private _velocity;
26
+ private _velocityRandomness;
27
+ private _acceleration;
28
+ private _accelerationRandomness;
29
+ private _color;
30
+ private _colorRandomness;
31
+ private _size;
32
+ private _sizeRandomness;
33
+ private _alpha;
34
+ private _alphaRandomness;
35
+ private _startAngle;
36
+ private _startAngleRandomness;
37
+ private _rotateVelocity;
38
+ private _rotateVelocityRandomness;
39
+ private _lifetime;
40
+ private _startTimeRandomness;
41
+ private _scale;
42
+ private _isOnce;
43
+ private _onceTime;
44
+ private _time;
45
+ private _isInit;
46
+ private _isStart;
47
+ private _updateDirtyFlag;
48
+ private _isRotateToVelocity;
49
+ private _isUseOriginColor;
50
+ private _isScaleByLifetime;
51
+ private _is2d;
52
+ private _isFadeIn;
53
+ private _isFadeOut;
54
+ private _playOnEnable;
55
+ private _blendMode;
56
+ /**
57
+ * Sprite sheet of texture.
58
+ */
59
+ spriteSheet: {
60
+ x: number;
61
+ y: number;
62
+ w: number;
63
+ h: number;
64
+ }[];
65
+ /**
66
+ * Texture of particle.
67
+ */
68
+ get texture(): Texture;
69
+ set texture(texture: Texture);
70
+ /**
71
+ * Position of particles.
72
+ */
73
+ get position(): Vector3;
74
+ set position(value: Vector3);
75
+ /**
76
+ * Random range of positions.
77
+ */
78
+ get positionRandomness(): Vector3;
79
+ set positionRandomness(value: Vector3);
80
+ /**
81
+ * Array of fixed positions.
82
+ */
83
+ get positionArray(): Vector3[];
84
+ set positionArray(value: Vector3[]);
85
+ /**
86
+ * Velocity of particles.
87
+ */
88
+ get velocity(): Vector3;
89
+ set velocity(value: Vector3);
90
+ /**
91
+ * Random range of velocity.
92
+ */
93
+ get velocityRandomness(): Vector3;
94
+ set velocityRandomness(value: Vector3);
95
+ /**
96
+ * Acceleration of particles.
97
+ */
98
+ get acceleration(): Vector3;
99
+ set acceleration(value: Vector3);
100
+ /**
101
+ * Random range of acceleration.
102
+ */
103
+ get accelerationRandomness(): Vector3;
104
+ set accelerationRandomness(value: Vector3);
105
+ /**
106
+ * Color of particles.
107
+ */
108
+ get color(): Color;
109
+ set color(value: Color);
110
+ /**
111
+ * Random range of color.
112
+ */
113
+ get colorRandomness(): number;
114
+ set colorRandomness(value: number);
115
+ /**
116
+ * Size of particles.
117
+ */
118
+ get size(): number;
119
+ set size(value: number);
120
+ /**
121
+ * Random range of size.
122
+ */
123
+ get sizeRandomness(): number;
124
+ set sizeRandomness(value: number);
125
+ /**
126
+ * Alpha of particles.
127
+ */
128
+ get alpha(): number;
129
+ set alpha(value: number);
130
+ /**
131
+ * Random range of alpha.
132
+ */
133
+ get alphaRandomness(): number;
134
+ set alphaRandomness(value: number);
135
+ /**
136
+ * Angle of particles.
137
+ */
138
+ get angle(): number;
139
+ set angle(value: number);
140
+ /**
141
+ * Random range of angle.
142
+ */
143
+ get angleRandomness(): number;
144
+ set angleRandomness(value: number);
145
+ /**
146
+ * Rotate velocity of particles.
147
+ */
148
+ get rotateVelocity(): number;
149
+ set rotateVelocity(value: number);
150
+ /**
151
+ * Random range of rotate velocity.
152
+ */
153
+ get rotateVelocityRandomness(): number;
154
+ set rotateVelocityRandomness(value: number);
155
+ /**
156
+ * Lifetime of particles.
157
+ */
158
+ get lifetime(): number;
159
+ set lifetime(value: number);
160
+ /**
161
+ * Random range of start time.
162
+ */
163
+ get startTimeRandomness(): number;
164
+ set startTimeRandomness(value: number);
165
+ /**
166
+ * Scale factor of particles.
167
+ */
168
+ get scale(): number;
169
+ set scale(value: number);
170
+ /**
171
+ * Max count of particles.
172
+ */
173
+ get maxCount(): number;
174
+ set maxCount(value: number);
175
+ /**
176
+ * Whether play once.
177
+ */
178
+ get isOnce(): boolean;
179
+ set isOnce(value: boolean);
180
+ /**
181
+ * Whether follow the direction of velocity.
182
+ */
183
+ get isRotateToVelocity(): boolean;
184
+ set isRotateToVelocity(value: boolean);
185
+ /**
186
+ * Whether use origin color.
187
+ */
188
+ get isUseOriginColor(): boolean;
189
+ set isUseOriginColor(value: boolean);
190
+ /**
191
+ * Whether scale by lifetime.
192
+ */
193
+ get isScaleByLifetime(): boolean;
194
+ set isScaleByLifetime(value: boolean);
195
+ /**
196
+ * Whether 2D rendering.
197
+ */
198
+ get is2d(): boolean;
199
+ set is2d(value: boolean);
200
+ /**
201
+ * Whether fade in.
202
+ */
203
+ get isFadeIn(): boolean;
204
+ set isFadeIn(value: boolean);
205
+ /**
206
+ * Whether fade out.
207
+ */
208
+ get isFadeOut(): boolean;
209
+ set isFadeOut(value: boolean);
210
+ /**
211
+ * Whether play on enable.
212
+ */
213
+ get playOnEnable(): boolean;
214
+ set playOnEnable(value: boolean);
215
+ /**
216
+ * Blend mode of the particle renderer's material.
217
+ */
218
+ get blendMode(): ParticleRendererBlendMode;
219
+ set blendMode(value: ParticleRendererBlendMode);
220
+ constructor(props: any);
221
+ /**
222
+ * Start emitting.
223
+ */
224
+ start(): void;
225
+ /**
226
+ * Stop emitting.
227
+ */
228
+ stop(): void;
229
+ private _createMaterial;
230
+ private _createMesh;
231
+ private _updateBuffer;
232
+ private _updateSingleBuffer;
233
+ private _updateSingleUv;
234
+ private _onColorChanged;
235
+ }
@@ -0,0 +1 @@
1
+ export { ParticleRenderer, ParticleRendererBlendMode } from "./ParticleRenderer";