@galacean/engine-core 0.9.0-beta.80

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 (314) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +1 -0
  3. package/dist/main.js +24255 -0
  4. package/dist/main.js.map +1 -0
  5. package/dist/miniprogram.js +24255 -0
  6. package/dist/module.js +24138 -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/assembler/TiledSpriteAssembler.d.ts +1 -0
  13. package/types/2d/atlas/FontAtlas.d.ts +1 -0
  14. package/types/2d/atlas/SpriteAtlas.d.ts +36 -0
  15. package/types/2d/atlas/types.d.ts +53 -0
  16. package/types/2d/data/RenderData2D.d.ts +1 -0
  17. package/types/2d/data/VertexData2D.d.ts +1 -0
  18. package/types/2d/enums/FontStyle.d.ts +11 -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/SpriteTileMode.d.ts +11 -0
  24. package/types/2d/enums/TextAlignment.d.ts +22 -0
  25. package/types/2d/enums/TextOverflow.d.ts +9 -0
  26. package/types/2d/index.d.ts +9 -0
  27. package/types/2d/sprite/Sprite.d.ts +97 -0
  28. package/types/2d/sprite/SpriteMask.d.ts +63 -0
  29. package/types/2d/sprite/SpriteRenderer.d.ts +77 -0
  30. package/types/2d/sprite/index.d.ts +3 -0
  31. package/types/2d/text/CharInfo.d.ts +1 -0
  32. package/types/2d/text/CharRenderData.d.ts +1 -0
  33. package/types/2d/text/CharRenderDataPool.d.ts +1 -0
  34. package/types/2d/text/Font.d.ts +26 -0
  35. package/types/2d/text/SubFont.d.ts +1 -0
  36. package/types/2d/text/TextRenderer.d.ts +123 -0
  37. package/types/2d/text/TextUtils.d.ts +1 -0
  38. package/types/2d/text/index.d.ts +2 -0
  39. package/types/Background.d.ts +43 -0
  40. package/types/BoolUpdateFlag.d.ts +12 -0
  41. package/types/Camera.d.ts +206 -0
  42. package/types/Canvas.d.ts +9 -0
  43. package/types/Component.d.ts +32 -0
  44. package/types/ComponentsDependencies.d.ts +17 -0
  45. package/types/ComponentsManager.d.ts +46 -0
  46. package/types/DisorderedArray.d.ts +18 -0
  47. package/types/Engine.d.ts +140 -0
  48. package/types/EngineSettings.d.ts +8 -0
  49. package/types/Entity.d.ts +151 -0
  50. package/types/Layer.d.ts +73 -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/AnimatorTransition.d.ts +14 -0
  92. package/types/animation/Keyframe.d.ts +19 -0
  93. package/types/animation/StateMachineScript.d.ts +32 -0
  94. package/types/animation/animationCurve/AnimationArrayCurve.d.ts +7 -0
  95. package/types/animation/animationCurve/AnimationBoolCurve.d.ts +7 -0
  96. package/types/animation/animationCurve/AnimationColorCurve.d.ts +8 -0
  97. package/types/animation/animationCurve/AnimationCurve.d.ts +39 -0
  98. package/types/animation/animationCurve/AnimationFloatArrayCurve.d.ts +12 -0
  99. package/types/animation/animationCurve/AnimationFloatCurve.d.ts +7 -0
  100. package/types/animation/animationCurve/AnimationQuaternionCurve.d.ts +8 -0
  101. package/types/animation/animationCurve/AnimationVector2Curve.d.ts +8 -0
  102. package/types/animation/animationCurve/AnimationVector3Curve.d.ts +8 -0
  103. package/types/animation/animationCurve/AnimationVector4Curve.d.ts +8 -0
  104. package/types/animation/animationCurve/index.d.ts +10 -0
  105. package/types/animation/animationCurve/interfaces/IAnimationCurveCalculator.d.ts +1 -0
  106. package/types/animation/enums/AnimatorConditionMode.d.ts +8 -0
  107. package/types/animation/enums/AnimatorCullingMode.d.ts +9 -0
  108. package/types/animation/enums/AnimatorLayerBlendingMode.d.ts +4 -0
  109. package/types/animation/enums/AnimatorStatePlayState.d.ts +1 -0
  110. package/types/animation/enums/InterpolationType.d.ts +13 -0
  111. package/types/animation/enums/LayerState.d.ts +13 -0
  112. package/types/animation/enums/PlayState.d.ts +13 -0
  113. package/types/animation/enums/WrapMode.d.ts +9 -0
  114. package/types/animation/index.d.ts +21 -0
  115. package/types/animation/internal/AnimationEventHandler.d.ts +1 -0
  116. package/types/animation/internal/AnimatorLayerData.d.ts +1 -0
  117. package/types/animation/internal/AnimatorStateData.d.ts +1 -0
  118. package/types/animation/internal/AnimatorStatePlayData.d.ts +1 -0
  119. package/types/animation/internal/AnimatorTempValue.d.ts +1 -0
  120. package/types/animation/internal/animationCurveOwner/AnimationCurveOwner.d.ts +5 -0
  121. package/types/animation/internal/animationCurveOwner/assembler/BlendShapeWeightsAnimationCurveOwnerAssembler.d.ts +1 -0
  122. package/types/animation/internal/animationCurveOwner/assembler/IAnimationCurveOwnerAssembler.d.ts +1 -0
  123. package/types/animation/internal/animationCurveOwner/assembler/PositionAnimationCurveOwnerAssembler.d.ts +1 -0
  124. package/types/animation/internal/animationCurveOwner/assembler/RotationAnimationCurveOwnerAssembler.d.ts +1 -0
  125. package/types/animation/internal/animationCurveOwner/assembler/ScaleAnimationCurveOwnerAssembler.d.ts +1 -0
  126. package/types/animation/internal/animationCurveOwner/assembler/UniversalAnimationCurveOwnerAssembler.d.ts +1 -0
  127. package/types/asset/AssetPromise.d.ts +56 -0
  128. package/types/asset/AssetType.d.ts +52 -0
  129. package/types/asset/ContentRestorer.d.ts +17 -0
  130. package/types/asset/GraphicsResource.d.ts +9 -0
  131. package/types/asset/IRefObject.d.ts +2 -0
  132. package/types/asset/IReferable.d.ts +2 -0
  133. package/types/asset/LoadItem.d.ts +33 -0
  134. package/types/asset/Loader.d.ts +30 -0
  135. package/types/asset/RefObject.d.ts +27 -0
  136. package/types/asset/ReferResource.d.ts +27 -0
  137. package/types/asset/ResourceManager.d.ts +95 -0
  138. package/types/asset/request.d.ts +25 -0
  139. package/types/base/Constant.d.ts +110 -0
  140. package/types/base/EngineObject.d.ts +24 -0
  141. package/types/base/Event.d.ts +24 -0
  142. package/types/base/EventDispatcher.d.ts +79 -0
  143. package/types/base/Logger.d.ts +11 -0
  144. package/types/base/StaticInterfaceImplement.d.ts +5 -0
  145. package/types/base/Time.d.ts +41 -0
  146. package/types/base/Util.d.ts +14 -0
  147. package/types/base/index.d.ts +7 -0
  148. package/types/clone/CloneManager.d.ts +31 -0
  149. package/types/clone/ComponentCloner.d.ts +14 -0
  150. package/types/clone/enums/CloneMode.d.ts +13 -0
  151. package/types/enums/BackgroundMode.d.ts +9 -0
  152. package/types/enums/BackgroundTextureFillMode.d.ts +8 -0
  153. package/types/enums/CameraClearFlags.d.ts +13 -0
  154. package/types/enums/ColorSpace.d.ts +9 -0
  155. package/types/enums/FogMode.d.ts +13 -0
  156. package/types/env-probe/CubeProbe.d.ts +34 -0
  157. package/types/env-probe/Probe.d.ts +58 -0
  158. package/types/env-probe/index.d.ts +2 -0
  159. package/types/graphic/Buffer.d.ts +105 -0
  160. package/types/graphic/BufferUtil.d.ts +11 -0
  161. package/types/graphic/IndexBufferBinding.d.ts +21 -0
  162. package/types/graphic/Mesh.d.ts +70 -0
  163. package/types/graphic/SubMesh.d.ts +19 -0
  164. package/types/graphic/VertexBufferBinding.d.ts +20 -0
  165. package/types/graphic/VertexElement.d.ts +44 -0
  166. package/types/graphic/enums/BufferBindFlag.d.ts +9 -0
  167. package/types/graphic/enums/BufferUsage.d.ts +11 -0
  168. package/types/graphic/enums/IndexFormat.d.ts +11 -0
  169. package/types/graphic/enums/MeshTopology.d.ts +19 -0
  170. package/types/graphic/enums/SetDataOptions.d.ts +9 -0
  171. package/types/graphic/enums/VertexElementFormat.d.ts +37 -0
  172. package/types/graphic/index.d.ts +13 -0
  173. package/types/index.d.ts +53 -0
  174. package/types/input/InputManager.d.ts +67 -0
  175. package/types/input/enums/Keys.d.ts +398 -0
  176. package/types/input/enums/PointerButton.d.ts +33 -0
  177. package/types/input/enums/PointerPhase.d.ts +15 -0
  178. package/types/input/index.d.ts +5 -0
  179. package/types/input/interface/IInput.d.ts +18 -0
  180. package/types/input/keyboard/KeyboardManager.d.ts +1 -0
  181. package/types/input/pointer/Pointer.d.ts +25 -0
  182. package/types/input/pointer/PointerManager.d.ts +1 -0
  183. package/types/input/wheel/WheelManager.d.ts +1 -0
  184. package/types/lighting/AmbientLight.d.ts +67 -0
  185. package/types/lighting/DirectLight.d.ts +21 -0
  186. package/types/lighting/KHR_lights.d.ts +4 -0
  187. package/types/lighting/Light.d.ts +48 -0
  188. package/types/lighting/LightManager.d.ts +5 -0
  189. package/types/lighting/PointLight.d.ts +18 -0
  190. package/types/lighting/SpotLight.d.ts +36 -0
  191. package/types/lighting/enums/DiffuseMode.d.ts +13 -0
  192. package/types/lighting/index.d.ts +6 -0
  193. package/types/material/BaseMaterial.d.ts +88 -0
  194. package/types/material/BlinnPhongMaterial.d.ts +71 -0
  195. package/types/material/Material.d.ts +51 -0
  196. package/types/material/PBRBaseMaterial.d.ts +101 -0
  197. package/types/material/PBRMaterial.d.ts +36 -0
  198. package/types/material/PBRSpecularMaterial.d.ts +38 -0
  199. package/types/material/UnlitMaterial.d.ts +33 -0
  200. package/types/material/enums/BlendMode.d.ts +9 -0
  201. package/types/material/enums/RenderFace.d.ts +11 -0
  202. package/types/material/enums/TextureCoordinate.d.ts +13 -0
  203. package/types/material/index.d.ts +10 -0
  204. package/types/mesh/BlendShape.d.ts +39 -0
  205. package/types/mesh/BlendShapeFrame.d.ts +22 -0
  206. package/types/mesh/BlendShapeManager.d.ts +1 -0
  207. package/types/mesh/BufferMesh.d.ts +59 -0
  208. package/types/mesh/MeshRenderer.d.ts +30 -0
  209. package/types/mesh/ModelMesh.d.ts +226 -0
  210. package/types/mesh/PrimitiveMesh.d.ts +86 -0
  211. package/types/mesh/PrimitiveMeshRestorer.d.ts +1 -0
  212. package/types/mesh/Skin.d.ts +16 -0
  213. package/types/mesh/SkinnedMeshRenderer.d.ts +62 -0
  214. package/types/mesh/enums/VertexAttribute.d.ts +33 -0
  215. package/types/mesh/index.d.ts +8 -0
  216. package/types/particle/ParticleRenderer.d.ts +235 -0
  217. package/types/particle/index.d.ts +1 -0
  218. package/types/physics/CharacterController.d.ts +53 -0
  219. package/types/physics/Collider.d.ts +29 -0
  220. package/types/physics/Collision.d.ts +4 -0
  221. package/types/physics/DynamicCollider.d.ts +161 -0
  222. package/types/physics/HitResult.d.ts +15 -0
  223. package/types/physics/PhysicsManager.d.ts +95 -0
  224. package/types/physics/PhysicsMaterial.d.ts +37 -0
  225. package/types/physics/StaticCollider.d.ts +7 -0
  226. package/types/physics/enums/ColliderShapeUpAxis.d.ts +11 -0
  227. package/types/physics/enums/ControllerCollisionFlag.d.ts +11 -0
  228. package/types/physics/enums/ControllerNonWalkableMode.d.ts +9 -0
  229. package/types/physics/enums/HingeJointFlag.d.ts +1 -0
  230. package/types/physics/enums/PhysicsMaterialCombineMode.d.ts +13 -0
  231. package/types/physics/enums/index.d.ts +4 -0
  232. package/types/physics/index.d.ts +10 -0
  233. package/types/physics/joint/FixedJoint.d.ts +3 -0
  234. package/types/physics/joint/HingeJoint.d.ts +57 -0
  235. package/types/physics/joint/Joint.d.ts +58 -0
  236. package/types/physics/joint/JointLimits.d.ts +15 -0
  237. package/types/physics/joint/JointMotor.d.ts +13 -0
  238. package/types/physics/joint/SpringJoint.d.ts +42 -0
  239. package/types/physics/joint/index.d.ts +6 -0
  240. package/types/physics/shape/BoxColliderShape.d.ts +15 -0
  241. package/types/physics/shape/CapsuleColliderShape.d.ts +26 -0
  242. package/types/physics/shape/ColliderShape.d.ts +51 -0
  243. package/types/physics/shape/PlaneColliderShape.d.ts +7 -0
  244. package/types/physics/shape/SphereColliderShape.d.ts +13 -0
  245. package/types/physics/shape/index.d.ts +5 -0
  246. package/types/renderingHardwareInterface/IHardwareRenderer.d.ts +6 -0
  247. package/types/renderingHardwareInterface/IPlatformBuffer.d.ts +8 -0
  248. package/types/renderingHardwareInterface/IPlatformRenderTarget.d.ts +20 -0
  249. package/types/renderingHardwareInterface/IPlatformTexture.d.ts +36 -0
  250. package/types/renderingHardwareInterface/IPlatformTexture2D.d.ts +37 -0
  251. package/types/renderingHardwareInterface/IPlatformTexture2DArray.d.ts +40 -0
  252. package/types/renderingHardwareInterface/IPlatformTextureCube.d.ts +41 -0
  253. package/types/renderingHardwareInterface/index.d.ts +6 -0
  254. package/types/shader/Shader.d.ts +72 -0
  255. package/types/shader/ShaderData.d.ts +350 -0
  256. package/types/shader/ShaderMacro.d.ts +10 -0
  257. package/types/shader/ShaderMacroCollection.d.ts +1 -0
  258. package/types/shader/ShaderPart.d.ts +41 -0
  259. package/types/shader/ShaderPass.d.ts +9 -0
  260. package/types/shader/ShaderPool.d.ts +1 -0
  261. package/types/shader/ShaderProgram.d.ts +1 -0
  262. package/types/shader/ShaderProgramPool.d.ts +1 -0
  263. package/types/shader/ShaderProperty.d.ts +13 -0
  264. package/types/shader/ShaderTagKey.d.ts +16 -0
  265. package/types/shader/ShaderUniform.d.ts +1 -0
  266. package/types/shader/ShaderUniformBlock.d.ts +1 -0
  267. package/types/shader/SubShader.d.ts +19 -0
  268. package/types/shader/enums/BlendFactor.d.ts +32 -0
  269. package/types/shader/enums/BlendOperation.d.ts +16 -0
  270. package/types/shader/enums/ColorWriteMask.d.ts +18 -0
  271. package/types/shader/enums/CompareFunction.d.ts +22 -0
  272. package/types/shader/enums/CullMode.d.ts +12 -0
  273. package/types/shader/enums/RenderQueueType.d.ts +11 -0
  274. package/types/shader/enums/ShaderDataGroup.d.ts +13 -0
  275. package/types/shader/enums/ShaderPropertyType.d.ts +27 -0
  276. package/types/shader/enums/StencilOperation.d.ts +22 -0
  277. package/types/shader/index.d.ts +12 -0
  278. package/types/shader/state/BlendState.d.ts +16 -0
  279. package/types/shader/state/DepthState.d.ts +14 -0
  280. package/types/shader/state/RasterState.d.ts +13 -0
  281. package/types/shader/state/RenderState.d.ts +20 -0
  282. package/types/shader/state/RenderTargetBlendState.d.ts +24 -0
  283. package/types/shader/state/StencilState.d.ts +34 -0
  284. package/types/shaderlib/ShaderFactory.d.ts +17 -0
  285. package/types/shaderlib/ShaderLib.d.ts +58 -0
  286. package/types/shaderlib/index.d.ts +1 -0
  287. package/types/shaderlib/pbr/index.d.ts +9 -0
  288. package/types/shaderlib/shadow/index.d.ts +8 -0
  289. package/types/shadow/CascadedShadowCasterPass.d.ts +47 -0
  290. package/types/shadow/ShadowSliceData.d.ts +1 -0
  291. package/types/shadow/ShadowUtils.d.ts +1 -0
  292. package/types/shadow/enum/ShadowCascadesMode.d.ts +11 -0
  293. package/types/shadow/enum/ShadowResolution.d.ts +13 -0
  294. package/types/shadow/enum/ShadowType.d.ts +13 -0
  295. package/types/shadow/index.d.ts +3 -0
  296. package/types/sky/Sky.d.ts +14 -0
  297. package/types/sky/SkyBoxMaterial.d.ts +25 -0
  298. package/types/sky/SkyProceduralMaterial.d.ts +72 -0
  299. package/types/sky/index.d.ts +2 -0
  300. package/types/texture/RenderTarget.d.ts +95 -0
  301. package/types/texture/Texture.d.ts +77 -0
  302. package/types/texture/Texture2D.d.ts +68 -0
  303. package/types/texture/Texture2DArray.d.ts +81 -0
  304. package/types/texture/TextureCube.d.ts +70 -0
  305. package/types/texture/enums/RenderBufferDepthFormat.d.ts +21 -0
  306. package/types/texture/enums/TextureCubeFace.d.ts +17 -0
  307. package/types/texture/enums/TextureDepthCompareFunction.d.ts +21 -0
  308. package/types/texture/enums/TextureFilterMode.d.ts +11 -0
  309. package/types/texture/enums/TextureFormat.d.ts +69 -0
  310. package/types/texture/enums/TextureWrapMode.d.ts +11 -0
  311. package/types/texture/index.d.ts +11 -0
  312. package/types/trail/TrailMaterial.d.ts +5 -0
  313. package/types/trail/TrailRenderer.d.ts +40 -0
  314. package/types/trail/index.d.ts +2 -0
@@ -0,0 +1,12 @@
1
+ export { RenderQueueType } from "./enums/RenderQueueType";
2
+ export { BlendFactor } from "./enums/BlendFactor";
3
+ export { BlendOperation } from "./enums/BlendOperation";
4
+ export { ColorWriteMask } from "./enums/ColorWriteMask";
5
+ export { CompareFunction } from "./enums/CompareFunction";
6
+ export { CullMode } from "./enums/CullMode";
7
+ export { ShaderPropertyType } from "./enums/ShaderPropertyType";
8
+ export { StencilOperation } from "./enums/StencilOperation";
9
+ export { Shader } from "./Shader";
10
+ export { ShaderData } from "./ShaderData";
11
+ export { ShaderPass } from "./ShaderPass";
12
+ export { ShaderProperty } from "./ShaderProperty";
@@ -0,0 +1,16 @@
1
+ import { Color } from "@galacean/engine-math";
2
+ import { RenderTargetBlendState } from "./RenderTargetBlendState";
3
+ /**
4
+ * Blend state.
5
+ */
6
+ export declare class BlendState {
7
+ private static _getGLBlendFactor;
8
+ private static _getGLBlendOperation;
9
+ /** The blend state of the render target. */
10
+ readonly targetBlendState: RenderTargetBlendState;
11
+ /** Constant blend color. */
12
+ readonly blendColor: Color;
13
+ /** Whether to use (Alpha-to-Coverage) technology. */
14
+ alphaToCoverage: boolean;
15
+ private _platformApply;
16
+ }
@@ -0,0 +1,14 @@
1
+ import { CompareFunction } from "../enums/CompareFunction";
2
+ /**
3
+ * Depth state.
4
+ */
5
+ export declare class DepthState {
6
+ private static _getGLCompareFunction;
7
+ /** Whether to enable the depth test. */
8
+ enabled: boolean;
9
+ /** Whether the depth value can be written.*/
10
+ writeEnabled: boolean;
11
+ /** Depth comparison function. */
12
+ compareFunction: CompareFunction;
13
+ private _platformApply;
14
+ }
@@ -0,0 +1,13 @@
1
+ import { CullMode } from "../enums/CullMode";
2
+ /**
3
+ * Raster state.
4
+ */
5
+ export declare class RasterState {
6
+ /** Specifies whether or not front- and/or back-facing polygons can be culled. */
7
+ cullMode: CullMode;
8
+ /** The multiplier by which an implementation-specific value is multiplied with to create a constant depth offset. */
9
+ depthBias: number;
10
+ /** The scale factor for the variable depth offset for each polygon. */
11
+ slopeScaledDepthBias: number;
12
+ private _platformApply;
13
+ }
@@ -0,0 +1,20 @@
1
+ import { RenderQueueType } from "../enums/RenderQueueType";
2
+ import { BlendState } from "./BlendState";
3
+ import { DepthState } from "./DepthState";
4
+ import { RasterState } from "./RasterState";
5
+ import { StencilState } from "./StencilState";
6
+ /**
7
+ * Render state.
8
+ */
9
+ export declare class RenderState {
10
+ /** Blend state. */
11
+ readonly blendState: BlendState;
12
+ /** Depth state. */
13
+ readonly depthState: DepthState;
14
+ /** Stencil state. */
15
+ readonly stencilState: StencilState;
16
+ /** Raster state. */
17
+ readonly rasterState: RasterState;
18
+ /** Render queue type. */
19
+ renderQueueType: RenderQueueType;
20
+ }
@@ -0,0 +1,24 @@
1
+ import { BlendOperation } from "../enums/BlendOperation";
2
+ import { BlendFactor } from "../enums/BlendFactor";
3
+ import { ColorWriteMask } from "../enums/ColorWriteMask";
4
+ /**
5
+ * The blend state of the render target.
6
+ */
7
+ export declare class RenderTargetBlendState {
8
+ /** Whether to enable blend. */
9
+ enabled: boolean;
10
+ /** color (RGB) blend operation. */
11
+ colorBlendOperation: BlendOperation;
12
+ /** alpha (A) blend operation. */
13
+ alphaBlendOperation: BlendOperation;
14
+ /** color blend factor (RGB) for source. */
15
+ sourceColorBlendFactor: BlendFactor;
16
+ /** alpha blend factor (A) for source. */
17
+ sourceAlphaBlendFactor: BlendFactor;
18
+ /** color blend factor (RGB) for destination. */
19
+ destinationColorBlendFactor: BlendFactor;
20
+ /** alpha blend factor (A) for destination. */
21
+ destinationAlphaBlendFactor: BlendFactor;
22
+ /** color mask. */
23
+ colorWriteMask: ColorWriteMask;
24
+ }
@@ -0,0 +1,34 @@
1
+ import { CompareFunction } from "../enums/CompareFunction";
2
+ import { StencilOperation } from "../enums/StencilOperation";
3
+ /**
4
+ * Stencil state.
5
+ */
6
+ export declare class StencilState {
7
+ private static _getGLCompareFunction;
8
+ private static _getGLStencilOperation;
9
+ /** Whether to enable stencil test. */
10
+ enabled: boolean;
11
+ /** Write the reference value of the stencil buffer. */
12
+ referenceValue: number;
13
+ /** Specifying a bit-wise mask that is used to AND the reference value and the stored stencil value when the test is done. */
14
+ mask: number;
15
+ /** Specifying a bit mask to enable or disable writing of individual bits in the stencil planes. */
16
+ writeMask: number;
17
+ /** The comparison function of the reference value of the front face of the geometry and the current buffer storage value. */
18
+ compareFunctionFront: CompareFunction;
19
+ /** The comparison function of the reference value of the back of the geometry and the current buffer storage value. */
20
+ compareFunctionBack: CompareFunction;
21
+ /** specifying the function to use for front face when both the stencil test and the depth test pass. */
22
+ passOperationFront: StencilOperation;
23
+ /** specifying the function to use for back face when both the stencil test and the depth test pass. */
24
+ passOperationBack: StencilOperation;
25
+ /** specifying the function to use for front face when the stencil test fails. */
26
+ failOperationFront: StencilOperation;
27
+ /** specifying the function to use for back face when the stencil test fails. */
28
+ failOperationBack: StencilOperation;
29
+ /** specifying the function to use for front face when the stencil test passes, but the depth test fails. */
30
+ zFailOperationFront: StencilOperation;
31
+ /** specifying the function to use for back face when the stencil test passes, but the depth test fails. */
32
+ zFailOperationBack: StencilOperation;
33
+ private _platformApply;
34
+ }
@@ -0,0 +1,17 @@
1
+ declare class ShaderFactory {
2
+ static parseCustomMacros(macros: string[]): string;
3
+ static parseIncludes(src: string): string;
4
+ /**
5
+ * GLSL extension.
6
+ * @param extensions - such as ["GL_EXT_shader_texture_lod"]
7
+ * */
8
+ static parseExtension(extensions: string[]): string;
9
+ /**
10
+ * Convert lower GLSL version to GLSL 300 es.
11
+ * @param shader - code
12
+ * @param isFrag - Whether it is a fragment shader.
13
+ * */
14
+ static convertTo300(shader: string, isFrag?: boolean): string;
15
+ private static _replaceMRTShader;
16
+ }
17
+ export { ShaderFactory };
@@ -0,0 +1,58 @@
1
+ export declare const ShaderLib: {
2
+ normal_get: string;
3
+ pbr_frag_define: string;
4
+ pbr_helper: string;
5
+ brdf: string;
6
+ direct_irradiance_frag_define: string;
7
+ ibl_frag_define: string;
8
+ pbr_frag: string;
9
+ ShadowCoord: string;
10
+ ShadowFragmentDeclaration: string;
11
+ shadow_sample_tent: string;
12
+ ShadowVertexDeclaration: string;
13
+ ShadowVertex: string;
14
+ common: string;
15
+ common_vert: string;
16
+ transform_declare: string;
17
+ camera_declare: string;
18
+ color_share: string;
19
+ normal_share: string;
20
+ uv_share: string;
21
+ worldpos_share: string;
22
+ RendererFragmentDeclaration: string;
23
+ FogVertexDeclaration: string;
24
+ FogFragmentDeclaration: string;
25
+ begin_normal_vert: string;
26
+ begin_position_vert: string;
27
+ position_vert: string;
28
+ color_vert: string;
29
+ normal_vert: string;
30
+ skinning_vert: string;
31
+ blendShape_input: string;
32
+ blendShape_vert: string;
33
+ uv_vert: string;
34
+ worldpos_vert: string;
35
+ FogVertex: string;
36
+ light_frag_define: string;
37
+ mobile_material_frag: string;
38
+ FogFragment: string;
39
+ begin_mobile_frag: string;
40
+ begin_viewdir_frag: string;
41
+ mobile_blinnphong_frag: string;
42
+ noise_common: string;
43
+ noise_cellular_2D: string;
44
+ noise_cellular_2x2: string;
45
+ noise_cellular_2x2x2: string;
46
+ noise_cellular_3D: string;
47
+ noise_cellular: string;
48
+ noise_perlin_2D: string;
49
+ noise_perlin_3D: string;
50
+ noise_perlin_4D: string;
51
+ noise_perlin: string;
52
+ noise_psrd_2D: string;
53
+ noise_simplex_2D: string;
54
+ noise_simplex_3D_grad: string;
55
+ noise_simplex_3D: string;
56
+ noise_simplex_4D: string;
57
+ noise_simplex: string;
58
+ };
@@ -0,0 +1 @@
1
+ export { ShaderFactory } from "./ShaderFactory";
@@ -0,0 +1,9 @@
1
+ declare const _default: {
2
+ pbr_frag_define: string;
3
+ pbr_helper: string;
4
+ brdf: string;
5
+ direct_irradiance_frag_define: string;
6
+ ibl_frag_define: string;
7
+ pbr_frag: string;
8
+ };
9
+ export default _default;
@@ -0,0 +1,8 @@
1
+ declare const _default: {
2
+ ShadowCoord: string;
3
+ ShadowFragmentDeclaration: string;
4
+ shadow_sample_tent: string;
5
+ ShadowVertexDeclaration: string;
6
+ ShadowVertex: string;
7
+ };
8
+ export default _default;
@@ -0,0 +1,47 @@
1
+ import { Camera } from "../Camera";
2
+ /**
3
+ * Cascade shadow caster.
4
+ */
5
+ export declare class CascadedShadowCasterPass {
6
+ private static _lightShadowBiasProperty;
7
+ private static _lightDirectionProperty;
8
+ private static _shadowMatricesProperty;
9
+ private static _shadowMapSize;
10
+ private static _shadowInfosProperty;
11
+ private static _shadowMapsProperty;
12
+ private static _shadowSplitSpheresProperty;
13
+ private static _maxCascades;
14
+ private static _cascadesSplitDistance;
15
+ private static _clearColor;
16
+ private static _tempVector;
17
+ private static _tempMatrix0;
18
+ private readonly _camera;
19
+ private readonly _engine;
20
+ private readonly _shadowCasterShader;
21
+ private readonly _supportDepthTexture;
22
+ private _shadowMapResolution;
23
+ private _shadowMapSize;
24
+ private _shadowTileResolution;
25
+ private _shadowBias;
26
+ private _shadowMapFormat;
27
+ private _shadowCascadeMode;
28
+ private _shadowSliceData;
29
+ private _lightUp;
30
+ private _lightSide;
31
+ private _existShadowMap;
32
+ private _splitBoundSpheres;
33
+ /** The end is project prcision problem in shader. */
34
+ private _shadowMatrices;
35
+ private _shadowInfos;
36
+ private _depthTexture;
37
+ private _renderTargets;
38
+ private _viewportOffsets;
39
+ constructor(camera: Camera);
40
+ private _renderDirectShadowMap;
41
+ private _updateReceiversShaderData;
42
+ private _getCascadesSplitDistance;
43
+ private _getFarWithRadius;
44
+ private _getAvailableRenderTarget;
45
+ private _updateShadowSettings;
46
+ private _updateSingleShadowCasterShaderData;
47
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Number of cascades to use for directional light shadows.
3
+ */
4
+ export declare enum ShadowCascadesMode {
5
+ /** No cascades */
6
+ NoCascades = 1,
7
+ /** Two cascades */
8
+ TwoCascades = 2,
9
+ /** Four cascades */
10
+ FourCascades = 4
11
+ }
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Default shadow resolution.
3
+ */
4
+ export declare enum ShadowResolution {
5
+ /** Low shadow map resolution. */
6
+ Low = 0,
7
+ /** Medium shadow map resolution. */
8
+ Medium = 1,
9
+ /** High shadow map resolution. */
10
+ High = 2,
11
+ /** Very high shadow map resolution. */
12
+ VeryHigh = 3
13
+ }
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Determines which type of shadows should be used.
3
+ */
4
+ export declare enum ShadowType {
5
+ /** Disable Shadows. */
6
+ None = 0,
7
+ /** Hard Shadows Only. */
8
+ Hard = 1,
9
+ /** Cast "soft" shadows with low range. */
10
+ SoftLow = 2,
11
+ /** Cast "soft" shadows with large range. */
12
+ SoftHigh = 3
13
+ }
@@ -0,0 +1,3 @@
1
+ export { ShadowCascadesMode } from "./enum/ShadowCascadesMode";
2
+ export { ShadowResolution } from "./enum/ShadowResolution";
3
+ export { ShadowType } from "./enum/ShadowType";
@@ -0,0 +1,14 @@
1
+ import { Mesh } from "../graphic/Mesh";
2
+ import { Material } from "../material";
3
+ /**
4
+ * Sky.
5
+ */
6
+ export declare class Sky {
7
+ private static _epsilon;
8
+ private static _viewProjMatrix;
9
+ private static _projectionMatrix;
10
+ /** Material of the sky. */
11
+ material: Material;
12
+ /** Mesh of the sky. */
13
+ mesh: Mesh;
14
+ }
@@ -0,0 +1,25 @@
1
+ import { Engine } from "../Engine";
2
+ import { Material } from "../material/Material";
3
+ import { TextureCube } from "../texture";
4
+ /**
5
+ * SkyboxMaterial
6
+ */
7
+ export declare class SkyBoxMaterial extends Material {
8
+ private _decodeParam;
9
+ /**
10
+ * Whether to decode from texture with RGBM format.
11
+ */
12
+ get textureDecodeRGBM(): boolean;
13
+ set textureDecodeRGBM(value: boolean);
14
+ /**
15
+ * RGBM decode factor, default 5.0.
16
+ */
17
+ get RGBMDecodeFactor(): number;
18
+ set RGBMDecodeFactor(value: number);
19
+ /**
20
+ * Texture cube map of the sky box material.
21
+ */
22
+ get textureCubeMap(): TextureCube;
23
+ set textureCubeMap(v: TextureCube);
24
+ constructor(engine: Engine);
25
+ }
@@ -0,0 +1,72 @@
1
+ import { Color } from "@oasis-engine/math";
2
+ import { Engine } from "../Engine";
3
+ import { Material } from "../material/Material";
4
+ /**
5
+ * Sun mode.
6
+ */
7
+ export declare enum SunMode {
8
+ /** None */
9
+ None = 0,
10
+ /** Simple sun. */
11
+ Simple = 1,
12
+ /** High quality sun. */
13
+ HighQuality = 2
14
+ }
15
+ /**
16
+ * Sky procedural material.
17
+ */
18
+ export declare class SkyProceduralMaterial extends Material {
19
+ private static _sunSizeProp;
20
+ private static _sunSizeConvergenceProp;
21
+ private static _atmosphereThicknessProp;
22
+ private static _skyTintProp;
23
+ private static _groundTintProp;
24
+ private static _exposureProp;
25
+ private static _sunHighQualityMacro;
26
+ private static _sunSimpleMacro;
27
+ private _sunDisk;
28
+ /**
29
+ * Sun mode.
30
+ */
31
+ get sunMode(): SunMode;
32
+ set sunMode(value: SunMode);
33
+ /**
34
+ * Sun size, range is 0 to 1.
35
+ */
36
+ get sunSize(): number;
37
+ set sunSize(value: number);
38
+ /**
39
+ * Sun size convergence, range is 0 to 20.
40
+ */
41
+ get sunSizeConvergence(): number;
42
+ set sunSizeConvergence(value: number);
43
+ /**
44
+ * Atmosphere thickness, range is 0 to 5.
45
+ */
46
+ get atmosphereThickness(): number;
47
+ set atmosphereThickness(value: number);
48
+ /**
49
+ * Sky tint.
50
+ */
51
+ get skyTint(): Color;
52
+ set skyTint(value: Color);
53
+ /**
54
+ * Ground tint.
55
+ */
56
+ get groundTint(): Color;
57
+ set groundTint(value: Color);
58
+ /**
59
+ * Exposure, range is 0 to 8.
60
+ */
61
+ get exposure(): number;
62
+ set exposure(value: number);
63
+ /**
64
+ * Constructor a SkyBoxProceduralMaterial instance.
65
+ * @param engine - Engine to which the material belongs
66
+ */
67
+ constructor(engine: Engine);
68
+ /**
69
+ * @override
70
+ */
71
+ clone(): SkyProceduralMaterial;
72
+ }
@@ -0,0 +1,2 @@
1
+ export { Sky } from "./Sky";
2
+ export { SkyBoxMaterial } from "./SkyBoxMaterial";
@@ -0,0 +1,95 @@
1
+ import { EngineObject } from "../base";
2
+ import { Engine } from "../Engine";
3
+ import { RenderBufferDepthFormat } from "./enums/RenderBufferDepthFormat";
4
+ import { Texture } from "./Texture";
5
+ /**
6
+ * The render target used for off-screen rendering.
7
+ */
8
+ export declare class RenderTarget extends EngineObject {
9
+ private _autoGenerateMipmaps;
10
+ private _width;
11
+ private _height;
12
+ private _colorTextures;
13
+ private _depthTexture;
14
+ /**
15
+ * Whether to automatically generate multi-level textures.
16
+ */
17
+ get autoGenerateMipmaps(): boolean;
18
+ set autoGenerateMipmaps(value: boolean);
19
+ /**
20
+ * Render target width.
21
+ */
22
+ get width(): number;
23
+ /**
24
+ * Render target height.
25
+ */
26
+ get height(): number;
27
+ /**
28
+ * Render color texture count.
29
+ */
30
+ get colorTextureCount(): number;
31
+ /**
32
+ * Depth texture.
33
+ */
34
+ get depthTexture(): Texture | null;
35
+ /**
36
+ * Anti-aliasing level.
37
+ * @remarks If the anti-aliasing level set is greater than the maximum level supported by the hardware, the maximum level of the hardware will be used.
38
+ */
39
+ get antiAliasing(): number;
40
+ /**
41
+ * Create a render target through color texture and depth format.
42
+ * @param engine - Define the engine to use for this off-screen rendering
43
+ * @param width - Render target width
44
+ * @param height - Render target height
45
+ * @param colorTexture - Render color texture
46
+ * @param depthFormat - Depth format. default RenderBufferDepthFormat.Depth, engine will automatically select the supported precision
47
+ * @param antiAliasing - Anti-aliasing level, default is 1
48
+ */
49
+ constructor(engine: Engine, width: number, height: number, colorTexture: Texture, depthFormat?: RenderBufferDepthFormat | null, antiAliasing?: number);
50
+ /**
51
+ * Create a render target through color texture and depth format.
52
+ * @remarks If the color texture is not transmitted, only the depth texture is generated.
53
+ * @param engine - Define the engine to use for this off-screen rendering
54
+ * @param width - Render target width
55
+ * @param height - Render target height
56
+ * @param colorTexture - Render color texture
57
+ * @param depthTexture - Render depth texture
58
+ * @param antiAliasing - Anti-aliasing level, default is 1
59
+ */
60
+ constructor(engine: Engine, width: number, height: number, colorTexture: Texture | null, depthTexture: Texture, antiAliasing?: number);
61
+ /**
62
+ * Create a render target with color texture array and depth format.
63
+ * @param engine - Define the engine to use for this off-screen rendering
64
+ * @param width - Render target width
65
+ * @param height - Render target height
66
+ * @param colorTextures - Render color texture array
67
+ * @param depthFormat - Depth format. default RenderBufferDepthFormat.Depth,engine will automatically select the supported precision
68
+ * @param antiAliasing - Anti-aliasing level, default is 1
69
+ */
70
+ constructor(engine: Engine, width: number, height: number, colorTextures: Texture[], depthFormat?: RenderBufferDepthFormat | null, antiAliasing?: number);
71
+ /**
72
+ * Create a render target with color texture array and depth texture.
73
+ * @param engine - Define the engine to use for this off-screen rendering
74
+ * @param width - Render target width
75
+ * @param height - Render target height
76
+ * @param colorTextures - Render color texture array
77
+ * @param depthTexture - Depth texture
78
+ * @param antiAliasing - Anti-aliasing level, default is 1
79
+ */
80
+ constructor(engine: Engine, width: number, height: number, colorTextures: Texture[], depthTexture: Texture, antiAliasing?: number);
81
+ /**
82
+ *
83
+ * Get the render color texture by index.
84
+ * @param index
85
+ */
86
+ getColorTexture(index?: number): Texture | null;
87
+ /**
88
+ * Generate the mipmap of each attachment texture of the renderTarget according to the configuration.
89
+ */
90
+ generateMipmaps(): void;
91
+ /**
92
+ * Destroy render target.
93
+ */
94
+ destroy(): void;
95
+ }
@@ -0,0 +1,77 @@
1
+ import { RefObject } from "../asset/RefObject";
2
+ import { TextureDepthCompareFunction } from "./enums/TextureDepthCompareFunction";
3
+ import { TextureFilterMode } from "./enums/TextureFilterMode";
4
+ import { TextureFormat } from "./enums/TextureFormat";
5
+ import { TextureWrapMode } from "./enums/TextureWrapMode";
6
+ /**
7
+ * The base class of texture, contains some common functions of texture-related classes.
8
+ */
9
+ export declare abstract class Texture extends RefObject {
10
+ name: string;
11
+ protected _format: TextureFormat;
12
+ protected _width: number;
13
+ protected _height: number;
14
+ protected _mipmapCount: number;
15
+ private _wrapModeU;
16
+ private _wrapModeV;
17
+ private _filterMode;
18
+ private _anisoLevel;
19
+ private _depthCompareFunction;
20
+ private _useDepthCompareMode;
21
+ /**
22
+ * Texture format.
23
+ */
24
+ get format(): TextureFormat;
25
+ /**
26
+ * The width of the texture.
27
+ */
28
+ get width(): number;
29
+ /**
30
+ * The height of the texture.
31
+ */
32
+ get height(): number;
33
+ /**
34
+ * Wrapping mode for texture coordinate S.
35
+ */
36
+ get wrapModeU(): TextureWrapMode;
37
+ set wrapModeU(value: TextureWrapMode);
38
+ /**
39
+ * Wrapping mode for texture coordinate T.
40
+ */
41
+ get wrapModeV(): TextureWrapMode;
42
+ set wrapModeV(value: TextureWrapMode);
43
+ /**
44
+ * Texture mipmapping count.
45
+ */
46
+ get mipmapCount(): number;
47
+ /**
48
+ * Filter mode for texture.
49
+ */
50
+ get filterMode(): TextureFilterMode;
51
+ set filterMode(value: TextureFilterMode);
52
+ /**
53
+ * Anisotropic level for texture.
54
+ */
55
+ get anisoLevel(): number;
56
+ set anisoLevel(value: number);
57
+ /**
58
+ * Filter mode when texture as depth Texture.
59
+ * @remarks Only depth-related formats take effect.
60
+ */
61
+ get depthCompareFunction(): TextureDepthCompareFunction;
62
+ set depthCompareFunction(value: TextureDepthCompareFunction);
63
+ /**
64
+ * Generate multi-level textures based on the 0th level data.
65
+ */
66
+ generateMipmaps(): void;
67
+ /**
68
+ * @override
69
+ */
70
+ _onDestroy(): void;
71
+ /**
72
+ * Get the maximum mip level of the corresponding size:rounding down.
73
+ * @remarks http://download.nvidia.com/developer/Papers/2005/NP2_Mipmapping/NP2_Mipmap_Creation.pdf
74
+ */
75
+ protected _getMaxMiplevel(size: number): number;
76
+ protected _getMipmapCount(): number;
77
+ }