@galacean/engine-core 1.6.8 → 1.6.9
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.
- package/dist/main.js +37541 -0
- package/dist/main.js.map +1 -0
- package/dist/module.js +37259 -0
- package/dist/module.js.map +1 -0
- package/package.json +3 -3
- package/types/2d/assembler/ISpriteAssembler.d.ts +11 -0
- package/types/2d/assembler/ISpriteRenderer.d.ts +16 -0
- package/types/2d/assembler/SimpleSpriteAssembler.d.ts +13 -0
- package/types/2d/assembler/SlicedSpriteAssembler.d.ts +15 -0
- package/types/2d/assembler/TiledSpriteAssembler.d.ts +17 -0
- package/types/2d/atlas/FontAtlas.d.ts +1 -0
- package/types/2d/atlas/SpriteAtlas.d.ts +32 -0
- package/types/2d/atlas/types.d.ts +69 -0
- package/types/2d/enums/FontStyle.d.ts +11 -0
- package/types/2d/enums/SpriteDrawMode.d.ts +11 -0
- package/types/2d/enums/SpriteMaskInteraction.d.ts +11 -0
- package/types/2d/enums/SpriteModifyFlags.d.ts +23 -0
- package/types/2d/enums/SpriteTileMode.d.ts +11 -0
- package/types/2d/enums/TextAlignment.d.ts +22 -0
- package/types/2d/enums/TextOverflow.d.ts +9 -0
- package/types/2d/index.d.ts +16 -0
- package/types/2d/sprite/Sprite.d.ts +106 -0
- package/types/2d/sprite/SpriteMask.d.ts +70 -0
- package/types/2d/sprite/SpriteRenderer.d.ts +95 -0
- package/types/2d/sprite/index.d.ts +3 -0
- package/types/2d/text/CharInfo.d.ts +1 -0
- package/types/2d/text/CharRenderInfo.d.ts +1 -0
- package/types/2d/text/Font.d.ts +21 -0
- package/types/2d/text/ITextRenderer.d.ts +8 -0
- package/types/2d/text/SubFont.d.ts +1 -0
- package/types/2d/text/TextRenderer.d.ts +122 -0
- package/types/2d/text/TextUtils.d.ts +1 -0
- package/types/2d/text/index.d.ts +5 -0
- package/types/Background.d.ts +53 -0
- package/types/BasicResources.d.ts +2 -0
- package/types/BoolUpdateFlag.d.ts +12 -0
- package/types/Camera.d.ts +321 -0
- package/types/Canvas.d.ts +19 -0
- package/types/Component.d.ts +27 -0
- package/types/ComponentsDependencies.d.ts +22 -0
- package/types/ComponentsManager.d.ts +52 -0
- package/types/Engine.d.ts +150 -0
- package/types/EngineSettings.d.ts +5 -0
- package/types/Entity.d.ts +170 -0
- package/types/Layer.d.ts +73 -0
- package/types/Platform.d.ts +15 -0
- package/types/Polyfill.d.ts +1 -0
- package/types/RenderPipeline/BasicRenderPipeline.d.ts +55 -0
- package/types/RenderPipeline/BatchUtils.d.ts +1 -0
- package/types/RenderPipeline/BatcherManager.d.ts +1 -0
- package/types/RenderPipeline/Blitter.d.ts +28 -0
- package/types/RenderPipeline/CullingResults.d.ts +1 -0
- package/types/RenderPipeline/DepthOnlyPass.d.ts +1 -0
- package/types/RenderPipeline/MaskManager.d.ts +1 -0
- package/types/RenderPipeline/OpaqueTexturePass.d.ts +1 -0
- package/types/RenderPipeline/PipelinePass.d.ts +16 -0
- package/types/RenderPipeline/PipelineUtils.d.ts +1 -0
- package/types/RenderPipeline/PrimitiveChunk.d.ts +1 -0
- package/types/RenderPipeline/PrimitiveChunkManager.d.ts +1 -0
- package/types/RenderPipeline/RenderContext.d.ts +1 -0
- package/types/RenderPipeline/RenderElement.d.ts +12 -0
- package/types/RenderPipeline/RenderQueue.d.ts +1 -0
- package/types/RenderPipeline/SubPrimitiveChunk.d.ts +1 -0
- package/types/RenderPipeline/SubRenderElement.d.ts +22 -0
- package/types/RenderPipeline/VertexArea.d.ts +1 -0
- package/types/RenderPipeline/enums/PipelineStage.d.ts +11 -0
- package/types/RenderPipeline/enums/RenderQueueMaskType.d.ts +1 -0
- package/types/RenderPipeline/index.d.ts +5 -0
- package/types/Renderer.d.ts +135 -0
- package/types/Scene.d.ts +183 -0
- package/types/SceneManager.d.ts +51 -0
- package/types/Script.d.ts +144 -0
- package/types/SystemInfo.d.ts +27 -0
- package/types/Transform.d.ts +304 -0
- package/types/UpdateFlag.d.ts +20 -0
- package/types/UpdateFlagManager.d.ts +1 -0
- package/types/Utils.d.ts +37 -0
- package/types/VirtualCamera.d.ts +1 -0
- package/types/animation/AnimationClip.d.ts +87 -0
- package/types/animation/AnimationClipCurveBinding.d.ts +30 -0
- package/types/animation/AnimationEvent.d.ts +11 -0
- package/types/animation/Animator.d.ts +154 -0
- package/types/animation/AnimatorCondition.d.ts +13 -0
- package/types/animation/AnimatorController.d.ts +72 -0
- package/types/animation/AnimatorControllerLayer.d.ts +21 -0
- package/types/animation/AnimatorControllerParameter.d.ts +14 -0
- package/types/animation/AnimatorLayerMask.d.ts +45 -0
- package/types/animation/AnimatorState.d.ts +69 -0
- package/types/animation/AnimatorStateMachine.d.ts +85 -0
- package/types/animation/AnimatorStateTransition.d.ts +59 -0
- package/types/animation/AnimatorStateTransitionCollection.d.ts +1 -0
- package/types/animation/Keyframe.d.ts +20 -0
- package/types/animation/LayerPathMask.d.ts +16 -0
- package/types/animation/StateMachineScript.d.ts +32 -0
- package/types/animation/animationCurve/AnimationArrayCurve.d.ts +7 -0
- package/types/animation/animationCurve/AnimationBoolCurve.d.ts +7 -0
- package/types/animation/animationCurve/AnimationColorCurve.d.ts +8 -0
- package/types/animation/animationCurve/AnimationCurve.d.ts +39 -0
- package/types/animation/animationCurve/AnimationFloatArrayCurve.d.ts +11 -0
- package/types/animation/animationCurve/AnimationFloatCurve.d.ts +7 -0
- package/types/animation/animationCurve/AnimationQuaternionCurve.d.ts +8 -0
- package/types/animation/animationCurve/AnimationRectCurve.d.ts +8 -0
- package/types/animation/animationCurve/AnimationRefCurve.d.ts +8 -0
- package/types/animation/animationCurve/AnimationStringCurve.d.ts +7 -0
- package/types/animation/animationCurve/AnimationVector2Curve.d.ts +8 -0
- package/types/animation/animationCurve/AnimationVector3Curve.d.ts +8 -0
- package/types/animation/animationCurve/AnimationVector4Curve.d.ts +8 -0
- package/types/animation/animationCurve/index.d.ts +13 -0
- package/types/animation/animationCurve/interfaces/IAnimationCurveCalculator.d.ts +1 -0
- package/types/animation/enums/AnimatorConditionMode.d.ts +17 -0
- package/types/animation/enums/AnimatorCullingMode.d.ts +9 -0
- package/types/animation/enums/AnimatorLayerBlendingMode.d.ts +4 -0
- package/types/animation/enums/AnimatorStatePlayState.d.ts +1 -0
- package/types/animation/enums/InterpolationType.d.ts +13 -0
- package/types/animation/enums/LayerState.d.ts +15 -0
- package/types/animation/enums/PlayState.d.ts +13 -0
- package/types/animation/enums/WrapMode.d.ts +9 -0
- package/types/animation/index.d.ts +25 -0
- package/types/animation/internal/AnimationCurveLayerOwner.d.ts +1 -0
- package/types/animation/internal/AnimationEventHandler.d.ts +1 -0
- package/types/animation/internal/AnimatorLayerData.d.ts +1 -0
- package/types/animation/internal/AnimatorStateData.d.ts +1 -0
- package/types/animation/internal/AnimatorStatePlayData.d.ts +1 -0
- package/types/animation/internal/AnimatorTempValue.d.ts +1 -0
- package/types/animation/internal/animationCurveOwner/AnimationCurveOwner.d.ts +5 -0
- package/types/animation/internal/animationCurveOwner/assembler/BlendShapeWeightsAnimationCurveOwnerAssembler.d.ts +1 -0
- package/types/animation/internal/animationCurveOwner/assembler/IAnimationCurveOwnerAssembler.d.ts +1 -0
- package/types/animation/internal/animationCurveOwner/assembler/PositionAnimationCurveOwnerAssembler.d.ts +1 -0
- package/types/animation/internal/animationCurveOwner/assembler/RotationAnimationCurveOwnerAssembler.d.ts +1 -0
- package/types/animation/internal/animationCurveOwner/assembler/ScaleAnimationCurveOwnerAssembler.d.ts +1 -0
- package/types/animation/internal/animationCurveOwner/assembler/UniversalAnimationCurveOwnerAssembler.d.ts +1 -0
- package/types/asset/AssetPromise.d.ts +88 -0
- package/types/asset/AssetType.d.ts +66 -0
- package/types/asset/ContentRestorer.d.ts +17 -0
- package/types/asset/GraphicsResource.d.ts +9 -0
- package/types/asset/IReferable.d.ts +2 -0
- package/types/asset/LoadItem.d.ts +40 -0
- package/types/asset/Loader.d.ts +37 -0
- package/types/asset/ReferResource.d.ts +23 -0
- package/types/asset/ResourceManager.d.ts +121 -0
- package/types/asset/request.d.ts +36 -0
- package/types/audio/AudioClip.d.ts +24 -0
- package/types/audio/AudioManager.d.ts +1 -0
- package/types/audio/AudioSource.d.ts +72 -0
- package/types/audio/index.d.ts +3 -0
- package/types/base/Constant.d.ts +116 -0
- package/types/base/EngineObject.d.ts +25 -0
- package/types/base/EventDispatcher.d.ts +66 -0
- package/types/base/Logger.d.ts +11 -0
- package/types/base/StaticInterfaceImplement.d.ts +5 -0
- package/types/base/Time.d.ts +44 -0
- package/types/base/index.d.ts +5 -0
- package/types/clone/CloneManager.d.ts +31 -0
- package/types/clone/ComponentCloner.d.ts +17 -0
- package/types/clone/enums/CloneMode.d.ts +13 -0
- package/types/enums/ActiveChangeFlag.d.ts +6 -0
- package/types/enums/AntiAliasing.d.ts +7 -0
- package/types/enums/BackgroundMode.d.ts +9 -0
- package/types/enums/BackgroundTextureFillMode.d.ts +8 -0
- package/types/enums/CameraClearFlags.d.ts +13 -0
- package/types/enums/CameraModifyFlags.d.ts +17 -0
- package/types/enums/CameraType.d.ts +1 -0
- package/types/enums/DepthTextureMode.d.ts +7 -0
- package/types/enums/Downsampling.d.ts +11 -0
- package/types/enums/EntityModifyFlags.d.ts +9 -0
- package/types/enums/FogMode.d.ts +13 -0
- package/types/enums/MSAASamples.d.ts +13 -0
- package/types/enums/ReplacementFailureStrategy.d.ts +9 -0
- package/types/enums/SpriteMaskLayer.d.ts +73 -0
- package/types/env-probe/CubeProbe.d.ts +27 -0
- package/types/env-probe/Probe.d.ts +52 -0
- package/types/env-probe/index.d.ts +2 -0
- package/types/graphic/Buffer.d.ts +114 -0
- package/types/graphic/BufferUtil.d.ts +12 -0
- package/types/graphic/IndexBufferBinding.d.ts +21 -0
- package/types/graphic/Mesh.d.ts +58 -0
- package/types/graphic/Primitive.d.ts +1 -0
- package/types/graphic/SubMesh.d.ts +8 -0
- package/types/graphic/SubPrimitive.d.ts +19 -0
- package/types/graphic/VertexBufferBinding.d.ts +20 -0
- package/types/graphic/VertexElement.d.ts +48 -0
- package/types/graphic/enums/BufferBindFlag.d.ts +9 -0
- package/types/graphic/enums/BufferUsage.d.ts +11 -0
- package/types/graphic/enums/IndexFormat.d.ts +11 -0
- package/types/graphic/enums/MeshTopology.d.ts +19 -0
- package/types/graphic/enums/SetDataOptions.d.ts +9 -0
- package/types/graphic/enums/VertexElementFormat.d.ts +37 -0
- package/types/graphic/index.d.ts +15 -0
- package/types/index.d.ts +68 -0
- package/types/input/InputManager.d.ts +65 -0
- package/types/input/enums/Keys.d.ts +398 -0
- package/types/input/enums/PointerButton.d.ts +33 -0
- package/types/input/enums/PointerPhase.d.ts +15 -0
- package/types/input/index.d.ts +8 -0
- package/types/input/interface/IInput.d.ts +10 -0
- package/types/input/keyboard/KeyboardManager.d.ts +1 -0
- package/types/input/pointer/Pointer.d.ts +31 -0
- package/types/input/pointer/PointerEventData.d.ts +12 -0
- package/types/input/pointer/PointerManager.d.ts +9 -0
- package/types/input/pointer/emitter/IHitResult.d.ts +1 -0
- package/types/input/pointer/emitter/PhysicsPointerEventEmitter.d.ts +1 -0
- package/types/input/pointer/emitter/PointerEventEmitter.d.ts +30 -0
- package/types/input/wheel/WheelManager.d.ts +1 -0
- package/types/lighting/AmbientLight.d.ts +70 -0
- package/types/lighting/DirectLight.d.ts +32 -0
- package/types/lighting/KHR_lights.d.ts +4 -0
- package/types/lighting/Light.d.ts +45 -0
- package/types/lighting/LightManager.d.ts +12 -0
- package/types/lighting/PointLight.d.ts +26 -0
- package/types/lighting/SpotLight.d.ts +45 -0
- package/types/lighting/ambientOcclusion/AmbientOcclusion.d.ts +79 -0
- package/types/lighting/ambientOcclusion/ScalableAmbientObscurancePass.d.ts +1 -0
- package/types/lighting/ambientOcclusion/index.d.ts +2 -0
- package/types/lighting/enums/AmbientOcclusionQuality.d.ts +11 -0
- package/types/lighting/enums/DiffuseMode.d.ts +13 -0
- package/types/lighting/index.d.ts +7 -0
- package/types/material/BaseMaterial.d.ts +88 -0
- package/types/material/BlinnPhongMaterial.d.ts +68 -0
- package/types/material/Material.d.ts +52 -0
- package/types/material/PBRMaterial.d.ts +311 -0
- package/types/material/UnlitMaterial.d.ts +33 -0
- package/types/material/enums/BlendMode.d.ts +9 -0
- package/types/material/enums/Refraction.d.ts +9 -0
- package/types/material/enums/RenderFace.d.ts +11 -0
- package/types/material/enums/TextureCoordinate.d.ts +13 -0
- package/types/material/index.d.ts +9 -0
- package/types/material/utils/PrefilteredDFG.d.ts +7 -0
- package/types/mesh/BlendShape.d.ts +39 -0
- package/types/mesh/BlendShapeFrame.d.ts +44 -0
- package/types/mesh/BlendShapeManager.d.ts +1 -0
- package/types/mesh/BufferMesh.d.ts +59 -0
- package/types/mesh/MeshRenderer.d.ts +25 -0
- package/types/mesh/ModelMesh.d.ts +254 -0
- package/types/mesh/PrimitiveMesh.d.ts +112 -0
- package/types/mesh/PrimitiveMeshRestorer.d.ts +1 -0
- package/types/mesh/Skin.d.ts +35 -0
- package/types/mesh/SkinnedMeshRenderer.d.ts +50 -0
- package/types/mesh/enums/VertexAttribute.d.ts +33 -0
- package/types/mesh/index.d.ts +9 -0
- package/types/particle/ParticleBufferUtils.d.ts +1 -0
- package/types/particle/ParticleGenerator.d.ts +94 -0
- package/types/particle/ParticleMaterial.d.ts +38 -0
- package/types/particle/ParticleRenderer.d.ts +47 -0
- package/types/particle/enums/ParticleCurveMode.d.ts +9 -0
- package/types/particle/enums/ParticleGradientMode.d.ts +9 -0
- package/types/particle/enums/ParticleRandomSubSeeds.d.ts +1 -0
- package/types/particle/enums/ParticleRenderMode.d.ts +17 -0
- package/types/particle/enums/ParticleScaleMode.d.ts +11 -0
- package/types/particle/enums/ParticleSimulationSpace.d.ts +9 -0
- package/types/particle/enums/ParticleStopMode.d.ts +6 -0
- package/types/particle/enums/attributes/BillboardParticleVertexAttribute.d.ts +1 -0
- package/types/particle/enums/attributes/MeshParticleVertexAttribute.d.ts +5 -0
- package/types/particle/enums/attributes/ParticleInstanceVertexAttribute.d.ts +1 -0
- package/types/particle/index.d.ts +22 -0
- package/types/particle/modules/Burst.d.ts +14 -0
- package/types/particle/modules/ColorOverLifetimeModule.d.ts +20 -0
- package/types/particle/modules/EmissionModule.d.ts +48 -0
- package/types/particle/modules/ForceOverLifetimeModule.d.ts +51 -0
- package/types/particle/modules/MainModule.d.ts +104 -0
- package/types/particle/modules/ParticleCompositeCurve.d.ts +81 -0
- package/types/particle/modules/ParticleCompositeGradient.d.ts +55 -0
- package/types/particle/modules/ParticleCurve.d.ts +63 -0
- package/types/particle/modules/ParticleGeneratorModule.d.ts +17 -0
- package/types/particle/modules/ParticleGradient.d.ts +114 -0
- package/types/particle/modules/RotationOverLifetimeModule.d.ts +34 -0
- package/types/particle/modules/SizeOverLifetimeModule.d.ts +52 -0
- package/types/particle/modules/TextureSheetAnimationModule.d.ts +39 -0
- package/types/particle/modules/VelocityOverLifetimeModule.d.ts +54 -0
- package/types/particle/modules/shape/BaseShape.d.ts +22 -0
- package/types/particle/modules/shape/BoxShape.d.ts +17 -0
- package/types/particle/modules/shape/CircleShape.d.ts +35 -0
- package/types/particle/modules/shape/ConeShape.d.ts +45 -0
- package/types/particle/modules/shape/HemisphereShape.d.ts +14 -0
- package/types/particle/modules/shape/MeshShape.d.ts +21 -0
- package/types/particle/modules/shape/ShapeUtils.d.ts +1 -0
- package/types/particle/modules/shape/SphereShape.d.ts +14 -0
- package/types/particle/modules/shape/enums/ParticleShapeArcMode.d.ts +9 -0
- package/types/particle/modules/shape/enums/ParticleShapeType.d.ts +17 -0
- package/types/particle/modules/shape/index.d.ts +8 -0
- package/types/physics/CharacterController.d.ts +51 -0
- package/types/physics/Collider.d.ts +43 -0
- package/types/physics/Collision.d.ts +22 -0
- package/types/physics/ContactPoint.d.ts +14 -0
- package/types/physics/DynamicCollider.d.ts +192 -0
- package/types/physics/HitResult.d.ts +18 -0
- package/types/physics/PhysicsMaterial.d.ts +42 -0
- package/types/physics/PhysicsScene.d.ts +276 -0
- package/types/physics/StaticCollider.d.ts +7 -0
- package/types/physics/enums/ColliderShapeChangeFlag.d.ts +1 -0
- package/types/physics/enums/ColliderShapeUpAxis.d.ts +11 -0
- package/types/physics/enums/ControllerCollisionFlag.d.ts +11 -0
- package/types/physics/enums/ControllerNonWalkableMode.d.ts +9 -0
- package/types/physics/enums/HingeJointFlag.d.ts +1 -0
- package/types/physics/enums/PhysicsMaterialCombineMode.d.ts +13 -0
- package/types/physics/enums/index.d.ts +4 -0
- package/types/physics/index.d.ts +12 -0
- package/types/physics/joint/FixedJoint.d.ts +4 -0
- package/types/physics/joint/HingeJoint.d.ts +61 -0
- package/types/physics/joint/Joint.d.ts +81 -0
- package/types/physics/joint/JointLimits.d.ts +39 -0
- package/types/physics/joint/JointMotor.d.ts +32 -0
- package/types/physics/joint/SpringJoint.d.ts +38 -0
- package/types/physics/joint/index.d.ts +6 -0
- package/types/physics/shape/BoxColliderShape.d.ts +16 -0
- package/types/physics/shape/CapsuleColliderShape.d.ts +27 -0
- package/types/physics/shape/ColliderShape.d.ts +61 -0
- package/types/physics/shape/PlaneColliderShape.d.ts +9 -0
- package/types/physics/shape/SphereColliderShape.d.ts +14 -0
- package/types/physics/shape/index.d.ts +5 -0
- package/types/postProcess/FinalPass.d.ts +1 -0
- package/types/postProcess/PostProcess.d.ts +64 -0
- package/types/postProcess/PostProcessEffect.d.ts +26 -0
- package/types/postProcess/PostProcessEffectParameter.d.ts +119 -0
- package/types/postProcess/PostProcessManager.d.ts +38 -0
- package/types/postProcess/PostProcessPass.d.ts +50 -0
- package/types/postProcess/PostProcessUberPass.d.ts +25 -0
- package/types/postProcess/effects/BloomEffect.d.ts +50 -0
- package/types/postProcess/effects/TonemappingEffect.d.ts +25 -0
- package/types/postProcess/effects/index.d.ts +2 -0
- package/types/postProcess/index.d.ts +8 -0
- package/types/renderingHardwareInterface/IPlatformBuffer.d.ts +7 -0
- package/types/renderingHardwareInterface/IPlatformRenderTarget.d.ts +20 -0
- package/types/renderingHardwareInterface/IPlatformTexture.d.ts +36 -0
- package/types/renderingHardwareInterface/IPlatformTexture2D.d.ts +37 -0
- package/types/renderingHardwareInterface/IPlatformTexture2DArray.d.ts +40 -0
- package/types/renderingHardwareInterface/IPlatformTextureCube.d.ts +41 -0
- package/types/renderingHardwareInterface/index.d.ts +6 -0
- package/types/shader/Shader.d.ts +119 -0
- package/types/shader/ShaderData.d.ts +350 -0
- package/types/shader/ShaderMacro.d.ts +26 -0
- package/types/shader/ShaderMacroCollection.d.ts +1 -0
- package/types/shader/ShaderPart.d.ts +46 -0
- package/types/shader/ShaderPass.d.ts +25 -0
- package/types/shader/ShaderPool.d.ts +1 -0
- package/types/shader/ShaderProgram.d.ts +1 -0
- package/types/shader/ShaderProgramPool.d.ts +1 -0
- package/types/shader/ShaderProperty.d.ts +20 -0
- package/types/shader/ShaderTagKey.d.ts +16 -0
- package/types/shader/ShaderUniform.d.ts +1 -0
- package/types/shader/ShaderUniformBlock.d.ts +1 -0
- package/types/shader/SubShader.d.ts +18 -0
- package/types/shader/enums/BlendFactor.d.ts +32 -0
- package/types/shader/enums/BlendOperation.d.ts +16 -0
- package/types/shader/enums/ColorWriteMask.d.ts +18 -0
- package/types/shader/enums/CompareFunction.d.ts +22 -0
- package/types/shader/enums/CullMode.d.ts +12 -0
- package/types/shader/enums/RenderQueueType.d.ts +11 -0
- package/types/shader/enums/RenderStateElementKey.d.ts +60 -0
- package/types/shader/enums/ShaderDataGroup.d.ts +15 -0
- package/types/shader/enums/ShaderLanguage.d.ts +9 -0
- package/types/shader/enums/ShaderPropertyType.d.ts +27 -0
- package/types/shader/enums/StencilOperation.d.ts +22 -0
- package/types/shader/index.d.ts +19 -0
- package/types/shader/state/BlendState.d.ts +16 -0
- package/types/shader/state/DepthState.d.ts +14 -0
- package/types/shader/state/RasterState.d.ts +13 -0
- package/types/shader/state/RenderState.d.ts +21 -0
- package/types/shader/state/RenderTargetBlendState.d.ts +24 -0
- package/types/shader/state/StencilState.d.ts +34 -0
- package/types/shader/state/index.d.ts +6 -0
- package/types/shaderlib/ShaderFactory.d.ts +20 -0
- package/types/shaderlib/ShaderLib.d.ts +73 -0
- package/types/shaderlib/index.d.ts +1 -0
- package/types/shaderlib/particle/index.d.ts +15 -0
- package/types/shaderlib/pbr/index.d.ts +11 -0
- package/types/shaderlib/shadow/index.d.ts +8 -0
- package/types/shadow/CascadedShadowCasterPass.d.ts +45 -0
- package/types/shadow/ShadowSliceData.d.ts +1 -0
- package/types/shadow/ShadowUtils.d.ts +1 -0
- package/types/shadow/enum/ShadowCascadesMode.d.ts +11 -0
- package/types/shadow/enum/ShadowResolution.d.ts +13 -0
- package/types/shadow/enum/ShadowType.d.ts +13 -0
- package/types/shadow/index.d.ts +3 -0
- package/types/sky/Sky.d.ts +22 -0
- package/types/sky/SkyBoxMaterial.d.ts +43 -0
- package/types/sky/SkyProceduralMaterial.d.ts +72 -0
- package/types/sky/index.d.ts +3 -0
- package/types/texture/RenderTarget.d.ts +91 -0
- package/types/texture/Texture.d.ts +87 -0
- package/types/texture/Texture2D.d.ts +71 -0
- package/types/texture/Texture2DArray.d.ts +82 -0
- package/types/texture/TextureCube.d.ts +71 -0
- package/types/texture/TextureUtils.d.ts +1 -0
- package/types/texture/enums/RenderBufferDepthFormat.d.ts +23 -0
- package/types/texture/enums/TextureCubeFace.d.ts +17 -0
- package/types/texture/enums/TextureDepthCompareFunction.d.ts +21 -0
- package/types/texture/enums/TextureFilterMode.d.ts +11 -0
- package/types/texture/enums/TextureFormat.d.ts +87 -0
- package/types/texture/enums/TextureUsage.d.ts +9 -0
- package/types/texture/enums/TextureWrapMode.d.ts +11 -0
- package/types/texture/index.d.ts +13 -0
- package/types/trail/TrailMaterial.d.ts +5 -0
- package/types/trail/TrailRenderer.d.ts +35 -0
- package/types/trail/index.d.ts +2 -0
- package/types/ui/IUICanvas.d.ts +1 -0
- package/types/ui/UIUtils.d.ts +12 -0
- package/types/utils/ClearableObjectPool.d.ts +16 -0
- package/types/utils/DisorderedArray.d.ts +70 -0
- package/types/utils/ObjectPool.d.ts +16 -0
- package/types/utils/ReturnableObjectPool.d.ts +16 -0
- package/types/utils/SafeLoopArray.d.ts +46 -0
- package/types/utils/index.d.ts +4 -0
- package/types/xr/XRManager.d.ts +5 -0
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
import { Quaternion, Vector3 } from "@galacean/engine-math";
|
|
2
|
+
import { Collider } from "./Collider";
|
|
3
|
+
/**
|
|
4
|
+
* A dynamic collider can act with self-defined movement or physical force.
|
|
5
|
+
*/
|
|
6
|
+
export declare class DynamicCollider extends Collider {
|
|
7
|
+
private static _tempVector3;
|
|
8
|
+
private static _tempQuat;
|
|
9
|
+
private _linearDamping;
|
|
10
|
+
private _angularDamping;
|
|
11
|
+
private _linearVelocity;
|
|
12
|
+
private _angularVelocity;
|
|
13
|
+
private _mass;
|
|
14
|
+
private _centerOfMass;
|
|
15
|
+
private _inertiaTensor;
|
|
16
|
+
private _maxAngularVelocity;
|
|
17
|
+
private _maxDepenetrationVelocity;
|
|
18
|
+
private _solverIterations;
|
|
19
|
+
private _useGravity;
|
|
20
|
+
private _isKinematic;
|
|
21
|
+
private _constraints;
|
|
22
|
+
private _collisionDetectionMode;
|
|
23
|
+
private _sleepThreshold;
|
|
24
|
+
private _automaticCenterOfMass;
|
|
25
|
+
private _automaticInertiaTensor;
|
|
26
|
+
/**
|
|
27
|
+
* The linear damping of the dynamic collider.
|
|
28
|
+
*/
|
|
29
|
+
get linearDamping(): number;
|
|
30
|
+
set linearDamping(value: number);
|
|
31
|
+
/**
|
|
32
|
+
* The angular damping of the dynamic collider.
|
|
33
|
+
*/
|
|
34
|
+
get angularDamping(): number;
|
|
35
|
+
set angularDamping(value: number);
|
|
36
|
+
/**
|
|
37
|
+
* The linear velocity vector of the dynamic collider measured in world unit per second.
|
|
38
|
+
*/
|
|
39
|
+
get linearVelocity(): Vector3;
|
|
40
|
+
set linearVelocity(value: Vector3);
|
|
41
|
+
/**
|
|
42
|
+
* The angular velocity vector of the dynamic collider measured in degrees per second.
|
|
43
|
+
*/
|
|
44
|
+
get angularVelocity(): Vector3;
|
|
45
|
+
set angularVelocity(value: Vector3);
|
|
46
|
+
/**
|
|
47
|
+
* The mass of the dynamic collider.
|
|
48
|
+
*/
|
|
49
|
+
get mass(): number;
|
|
50
|
+
set mass(value: number);
|
|
51
|
+
/**
|
|
52
|
+
* Whether or not to calculate the center of mass automatically, if true, the center of mass will be calculated based on the associated shapes.
|
|
53
|
+
* @remarks Affected by the position, rotation of the shapes.
|
|
54
|
+
*/
|
|
55
|
+
get automaticCenterOfMass(): boolean;
|
|
56
|
+
set automaticCenterOfMass(value: boolean);
|
|
57
|
+
/**
|
|
58
|
+
* The center of mass relative to the transform's origin.
|
|
59
|
+
* @remarks The center of mass is automatically calculated, if you want to set it manually, please set automaticCenterOfMass to false.
|
|
60
|
+
*/
|
|
61
|
+
get centerOfMass(): Vector3;
|
|
62
|
+
set centerOfMass(value: Vector3);
|
|
63
|
+
/**
|
|
64
|
+
* Whether or not to calculate the inertia tensor automatically, if true, the inertia tensor will be calculated based on the associated shapes and mass.
|
|
65
|
+
* @remarks Affected by the position, rotation of the shapes and the mass of the collider.
|
|
66
|
+
*/
|
|
67
|
+
get automaticInertiaTensor(): boolean;
|
|
68
|
+
set automaticInertiaTensor(value: boolean);
|
|
69
|
+
/**
|
|
70
|
+
* The diagonal inertia tensor of mass relative to the center of mass.
|
|
71
|
+
* @remarks The inertia tensor is automatically calculated, if you want to set it manually, please set automaticInertiaTensor to false.
|
|
72
|
+
*/
|
|
73
|
+
get inertiaTensor(): Vector3;
|
|
74
|
+
set inertiaTensor(value: Vector3);
|
|
75
|
+
/**
|
|
76
|
+
* The maximum angular velocity of the collider measured in degrees per second.
|
|
77
|
+
*/
|
|
78
|
+
get maxAngularVelocity(): number;
|
|
79
|
+
set maxAngularVelocity(value: number);
|
|
80
|
+
/**
|
|
81
|
+
* Maximum velocity of a collider when moving out of penetrating state.
|
|
82
|
+
*/
|
|
83
|
+
get maxDepenetrationVelocity(): number;
|
|
84
|
+
set maxDepenetrationVelocity(value: number);
|
|
85
|
+
/**
|
|
86
|
+
* The mass-normalized energy threshold, below which objects start going to sleep.
|
|
87
|
+
*/
|
|
88
|
+
get sleepThreshold(): number;
|
|
89
|
+
set sleepThreshold(value: number);
|
|
90
|
+
/**
|
|
91
|
+
* The solverIterations determines how accurately collider joints and collision contacts are resolved.
|
|
92
|
+
*/
|
|
93
|
+
get solverIterations(): number;
|
|
94
|
+
set solverIterations(value: number);
|
|
95
|
+
/**
|
|
96
|
+
* Controls whether gravity affects the dynamic collider.
|
|
97
|
+
*/
|
|
98
|
+
get useGravity(): boolean;
|
|
99
|
+
set useGravity(value: boolean);
|
|
100
|
+
/**
|
|
101
|
+
* Controls whether physics affects the dynamic collider.
|
|
102
|
+
*/
|
|
103
|
+
get isKinematic(): boolean;
|
|
104
|
+
set isKinematic(value: boolean);
|
|
105
|
+
/**
|
|
106
|
+
* The particular rigid dynamic lock flag.
|
|
107
|
+
*/
|
|
108
|
+
get constraints(): DynamicColliderConstraints;
|
|
109
|
+
set constraints(value: DynamicColliderConstraints);
|
|
110
|
+
/**
|
|
111
|
+
* The colliders' collision detection mode.
|
|
112
|
+
*/
|
|
113
|
+
get collisionDetectionMode(): CollisionDetectionMode;
|
|
114
|
+
set collisionDetectionMode(value: CollisionDetectionMode);
|
|
115
|
+
/**
|
|
116
|
+
* Apply a force to the DynamicCollider.
|
|
117
|
+
* @param force - The force make the collider move
|
|
118
|
+
*/
|
|
119
|
+
applyForce(force: Vector3): void;
|
|
120
|
+
/**
|
|
121
|
+
* Apply a torque to the DynamicCollider.
|
|
122
|
+
* @param torque - The force make the collider rotate
|
|
123
|
+
*/
|
|
124
|
+
applyTorque(torque: Vector3): void;
|
|
125
|
+
/**
|
|
126
|
+
* Moves kinematically controlled dynamic actors through the game world.
|
|
127
|
+
* @param position - The desired position for the kinematic actor
|
|
128
|
+
*/
|
|
129
|
+
move(position: Vector3): void;
|
|
130
|
+
/**
|
|
131
|
+
* Moves kinematically controlled dynamic actors through the game world.
|
|
132
|
+
* @param rotation - The desired rotation for the kinematic actor
|
|
133
|
+
*/
|
|
134
|
+
move(rotation: Quaternion): void;
|
|
135
|
+
/**
|
|
136
|
+
* Moves kinematically controlled dynamic actors through the game world.
|
|
137
|
+
* @param position - The desired position for the kinematic actor
|
|
138
|
+
* @param rotation - The desired rotation for the kinematic actor
|
|
139
|
+
*/
|
|
140
|
+
move(position: Vector3, rotation: Quaternion): void;
|
|
141
|
+
/**
|
|
142
|
+
* Forces a collider to sleep at least one frame.
|
|
143
|
+
*/
|
|
144
|
+
sleep(): void;
|
|
145
|
+
/**
|
|
146
|
+
* Returns whether the collider is sleeping.
|
|
147
|
+
* @returns True if the collider is sleeping, false otherwise.
|
|
148
|
+
*/
|
|
149
|
+
isSleeping(): boolean;
|
|
150
|
+
/**
|
|
151
|
+
* Forces a collider to wake up.
|
|
152
|
+
*/
|
|
153
|
+
wakeUp(): void;
|
|
154
|
+
protected _syncNative(): void;
|
|
155
|
+
private _setMassAndUpdateInertia;
|
|
156
|
+
private _setLinearVelocity;
|
|
157
|
+
private _setAngularVelocity;
|
|
158
|
+
private _handleCenterOfMassChanged;
|
|
159
|
+
private _handleInertiaTensorChanged;
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* The collision detection mode constants.
|
|
163
|
+
*/
|
|
164
|
+
export declare enum CollisionDetectionMode {
|
|
165
|
+
/** Continuous collision detection is off for this dynamic collider. */
|
|
166
|
+
Discrete = 0,
|
|
167
|
+
/** Continuous collision detection is on for colliding with static mesh geometry. */
|
|
168
|
+
Continuous = 1,
|
|
169
|
+
/** Continuous collision detection is on for colliding with static and dynamic geometry. */
|
|
170
|
+
ContinuousDynamic = 2,
|
|
171
|
+
/** Speculative continuous collision detection is on for static and dynamic geometries */
|
|
172
|
+
ContinuousSpeculative = 3
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* Use these flags to constrain motion of dynamic collider.
|
|
176
|
+
*/
|
|
177
|
+
export declare enum DynamicColliderConstraints {
|
|
178
|
+
/** Not Freeze. */
|
|
179
|
+
None = 0,
|
|
180
|
+
/** Freeze motion along the X-axis. */
|
|
181
|
+
FreezePositionX = 1,
|
|
182
|
+
/** Freeze motion along the Y-axis. */
|
|
183
|
+
FreezePositionY = 2,
|
|
184
|
+
/** Freeze motion along the Z-axis. */
|
|
185
|
+
FreezePositionZ = 4,
|
|
186
|
+
/** Freeze rotation along the X-axis. */
|
|
187
|
+
FreezeRotationX = 8,
|
|
188
|
+
/** Freeze rotation along the Y-axis. */
|
|
189
|
+
FreezeRotationY = 16,
|
|
190
|
+
/** Freeze rotation along the Z-axis. */
|
|
191
|
+
FreezeRotationZ = 32
|
|
192
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Vector3 } from "@galacean/engine-math";
|
|
2
|
+
import { Entity } from "../Entity";
|
|
3
|
+
import { ColliderShape } from "./shape";
|
|
4
|
+
/**
|
|
5
|
+
* Structure used to get information back from a raycast or a sweep.
|
|
6
|
+
*/
|
|
7
|
+
export declare class HitResult {
|
|
8
|
+
/** The entity that was hit. */
|
|
9
|
+
entity: Entity;
|
|
10
|
+
/** The distance from the ray's origin to the impact point. */
|
|
11
|
+
distance: number;
|
|
12
|
+
/** The impact point in world space where the ray hit the collider. */
|
|
13
|
+
point: Vector3;
|
|
14
|
+
/** The normal of the surface the ray hit. */
|
|
15
|
+
normal: Vector3;
|
|
16
|
+
/** The shape of the collider that was hit. */
|
|
17
|
+
shape: ColliderShape;
|
|
18
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { PhysicsMaterialCombineMode } from "./enums/PhysicsMaterialCombineMode";
|
|
2
|
+
/**
|
|
3
|
+
* Material class to represent a set of surface properties.
|
|
4
|
+
*/
|
|
5
|
+
export declare class PhysicsMaterial {
|
|
6
|
+
private _bounciness;
|
|
7
|
+
private _dynamicFriction;
|
|
8
|
+
private _staticFriction;
|
|
9
|
+
private _bounceCombine;
|
|
10
|
+
private _frictionCombine;
|
|
11
|
+
private _destroyed;
|
|
12
|
+
constructor();
|
|
13
|
+
/**
|
|
14
|
+
* The coefficient of bounciness, ranging from 0 to 1.
|
|
15
|
+
*/
|
|
16
|
+
get bounciness(): number;
|
|
17
|
+
set bounciness(value: number);
|
|
18
|
+
/**
|
|
19
|
+
* The DynamicFriction value.
|
|
20
|
+
*/
|
|
21
|
+
get dynamicFriction(): number;
|
|
22
|
+
set dynamicFriction(value: number);
|
|
23
|
+
/**
|
|
24
|
+
* The coefficient of static friction.
|
|
25
|
+
*/
|
|
26
|
+
get staticFriction(): number;
|
|
27
|
+
set staticFriction(value: number);
|
|
28
|
+
/**
|
|
29
|
+
* The restitution combine mode.
|
|
30
|
+
*/
|
|
31
|
+
get bounceCombine(): PhysicsMaterialCombineMode;
|
|
32
|
+
set bounceCombine(value: PhysicsMaterialCombineMode);
|
|
33
|
+
/**
|
|
34
|
+
* The friction combine mode.
|
|
35
|
+
*/
|
|
36
|
+
get frictionCombine(): PhysicsMaterialCombineMode;
|
|
37
|
+
set frictionCombine(value: PhysicsMaterialCombineMode);
|
|
38
|
+
/**
|
|
39
|
+
* Destroy the material when the material is no be used by any shape.
|
|
40
|
+
*/
|
|
41
|
+
destroy(): void;
|
|
42
|
+
}
|
|
@@ -0,0 +1,276 @@
|
|
|
1
|
+
import { Ray, Vector3, Quaternion } from "@galacean/engine-math";
|
|
2
|
+
import { Layer } from "../Layer";
|
|
3
|
+
import { Scene } from "../Scene";
|
|
4
|
+
import { HitResult } from "./HitResult";
|
|
5
|
+
import { ColliderShape } from "./shape";
|
|
6
|
+
/**
|
|
7
|
+
* A physics scene is a collection of colliders and constraints which can interact.
|
|
8
|
+
*/
|
|
9
|
+
export declare class PhysicsScene {
|
|
10
|
+
private static _collision;
|
|
11
|
+
private static _identityQuaternion;
|
|
12
|
+
private _scene;
|
|
13
|
+
private _restTime;
|
|
14
|
+
private _fixedTimeStep;
|
|
15
|
+
private _colliders;
|
|
16
|
+
private _gravity;
|
|
17
|
+
private _nativePhysicsScene;
|
|
18
|
+
private _onContactEnter;
|
|
19
|
+
private _onContactExit;
|
|
20
|
+
private _onContactStay;
|
|
21
|
+
private _onTriggerEnter;
|
|
22
|
+
private _onTriggerExit;
|
|
23
|
+
private _onTriggerStay;
|
|
24
|
+
/**
|
|
25
|
+
* The gravity of physics scene.
|
|
26
|
+
*/
|
|
27
|
+
get gravity(): Vector3;
|
|
28
|
+
set gravity(value: Vector3);
|
|
29
|
+
/**
|
|
30
|
+
* The fixed time step in seconds at which physics are performed.
|
|
31
|
+
*/
|
|
32
|
+
get fixedTimeStep(): number;
|
|
33
|
+
set fixedTimeStep(value: number);
|
|
34
|
+
constructor(scene: Scene);
|
|
35
|
+
/**
|
|
36
|
+
* Get whether two colliders can collide with each other.
|
|
37
|
+
* @param layer1 - The first collision layer
|
|
38
|
+
* @param layer2 - The second collision layer
|
|
39
|
+
* @returns Whether the colliders should collide
|
|
40
|
+
*/
|
|
41
|
+
getColliderLayerCollision(layer1: Layer, layer2: Layer): boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Set whether two colliders can collide with each other.
|
|
44
|
+
* @param layer1 - The first collision layer
|
|
45
|
+
* @param layer2 - The second collision layer
|
|
46
|
+
* @param isCollide - Whether the colliders should collide
|
|
47
|
+
*/
|
|
48
|
+
setColliderLayerCollision(layer1: Layer, layer2: Layer, isCollide: boolean): void;
|
|
49
|
+
/**
|
|
50
|
+
* Casts a ray through the Scene and returns the first hit.
|
|
51
|
+
* @param ray - The ray
|
|
52
|
+
* @returns Returns True if the ray intersects with a collider, otherwise false
|
|
53
|
+
*/
|
|
54
|
+
raycast(ray: Ray): boolean;
|
|
55
|
+
/**
|
|
56
|
+
* Casts a ray through the Scene and returns the first hit.
|
|
57
|
+
* @param ray - The ray
|
|
58
|
+
* @param outHitResult - If true is returned, outHitResult will contain more detailed collision information
|
|
59
|
+
* @returns Returns True if the ray intersects with a collider, otherwise false
|
|
60
|
+
*/
|
|
61
|
+
raycast(ray: Ray, outHitResult: HitResult): boolean;
|
|
62
|
+
/**
|
|
63
|
+
* Casts a ray through the Scene and returns the first hit.
|
|
64
|
+
* @param ray - The ray
|
|
65
|
+
* @param distance - The max distance the ray should check
|
|
66
|
+
* @returns Returns True if the ray intersects with a collider, otherwise false
|
|
67
|
+
*/
|
|
68
|
+
raycast(ray: Ray, distance: number): 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 outHitResult - If true is returned, outHitResult will contain more detailed collision information
|
|
74
|
+
* @returns Returns True if the ray intersects with a collider, otherwise false
|
|
75
|
+
*/
|
|
76
|
+
raycast(ray: Ray, distance: number, outHitResult: HitResult): boolean;
|
|
77
|
+
/**
|
|
78
|
+
* Casts a ray through the Scene and returns the first hit.
|
|
79
|
+
* @param ray - The ray
|
|
80
|
+
* @param distance - The max distance the ray should check
|
|
81
|
+
* @param layerMask - Layer mask that is used to selectively ignore Colliders when casting
|
|
82
|
+
* @returns Returns True if the ray intersects with a collider, otherwise false
|
|
83
|
+
*/
|
|
84
|
+
raycast(ray: Ray, distance: number, layerMask: Layer): boolean;
|
|
85
|
+
/**
|
|
86
|
+
* Casts a ray through the Scene and returns the first hit.
|
|
87
|
+
* @param ray - The ray
|
|
88
|
+
* @param distance - The max distance the ray should check
|
|
89
|
+
* @param layerMask - Layer mask that is used to selectively ignore Colliders when casting
|
|
90
|
+
* @param outHitResult - If true is returned, outHitResult will contain more detailed collision information
|
|
91
|
+
* @returns Returns True if the ray intersects with a collider, otherwise false.
|
|
92
|
+
*/
|
|
93
|
+
raycast(ray: Ray, distance: number, layerMask: Layer, outHitResult: HitResult): boolean;
|
|
94
|
+
/**
|
|
95
|
+
* Casts a box through the Scene and returns true if there is any hit.
|
|
96
|
+
* @param center - The center of the box
|
|
97
|
+
* @param halfExtents - Half the size of the box in each dimension
|
|
98
|
+
* @param direction - The direction to sweep along
|
|
99
|
+
* @returns Returns true if the box intersects with any collider, otherwise false
|
|
100
|
+
*/
|
|
101
|
+
boxCast(center: Vector3, halfExtents: Vector3, direction: Vector3): boolean;
|
|
102
|
+
/**
|
|
103
|
+
* Casts a box through the Scene and returns true if there is any hit.
|
|
104
|
+
* @param center - The center of the box
|
|
105
|
+
* @param halfExtents - Half the size of the box in each dimension
|
|
106
|
+
* @param direction - The direction to sweep along
|
|
107
|
+
* @param outHitResult - If true is returned, outHitResult will contain more detailed collision information
|
|
108
|
+
* @returns Returns true if the box intersects with any collider, otherwise false
|
|
109
|
+
*/
|
|
110
|
+
boxCast(center: Vector3, halfExtents: Vector3, direction: Vector3, outHitResult: HitResult): boolean;
|
|
111
|
+
/**
|
|
112
|
+
* Casts a box through the Scene and returns true if there is any hit.
|
|
113
|
+
* @param center - The center of the box
|
|
114
|
+
* @param halfExtents - Half the size of the box in each dimension
|
|
115
|
+
* @param direction - The direction to sweep along
|
|
116
|
+
* @param distance - The max distance to sweep
|
|
117
|
+
* @returns Returns true if the box intersects with any collider, otherwise false
|
|
118
|
+
*/
|
|
119
|
+
boxCast(center: Vector3, halfExtents: Vector3, direction: Vector3, distance: number): boolean;
|
|
120
|
+
/**
|
|
121
|
+
* Casts a box through the Scene and returns true if there is any hit.
|
|
122
|
+
* @param center - The center of the box
|
|
123
|
+
* @param halfExtents - Half the size of the box in each dimension
|
|
124
|
+
* @param direction - The direction to sweep along
|
|
125
|
+
* @param distance - The max distance to sweep
|
|
126
|
+
* @param outHitResult - If true is returned, outHitResult will contain more detailed collision information
|
|
127
|
+
* @returns Returns true if the box intersects with any collider, otherwise false
|
|
128
|
+
*/
|
|
129
|
+
boxCast(center: Vector3, halfExtents: Vector3, direction: Vector3, distance: number, outHitResult: HitResult): boolean;
|
|
130
|
+
/**
|
|
131
|
+
* Casts a box through the Scene and returns true if there is any hit.
|
|
132
|
+
* @param center - The center of the box
|
|
133
|
+
* @param halfExtents - Half the size of the box in each dimension
|
|
134
|
+
* @param direction - The direction to sweep along
|
|
135
|
+
* @param orientation - The rotation of the box. @defaultValue `Quaternion(0, 0, 0, 1)`
|
|
136
|
+
* @param distance - The max distance to sweep. @defaultValue `Number.MAX_VALUE`
|
|
137
|
+
* @param layerMask - Layer mask that is used to selectively ignore Colliders when sweeping. @defaultValue `Layer.Everything`
|
|
138
|
+
* @param outHitResult - Optional HitResult object to store detailed hit information
|
|
139
|
+
* @returns Returns true if the box intersects with any collider, otherwise false
|
|
140
|
+
*/
|
|
141
|
+
boxCast(center: Vector3, halfExtents: Vector3, direction: Vector3, orientation: Quaternion, distance: number, layerMask: Layer, outHitResult?: HitResult): boolean;
|
|
142
|
+
/**
|
|
143
|
+
* Casts a sphere through the Scene and returns true if there is any hit.
|
|
144
|
+
* @param center - The center of the sphere
|
|
145
|
+
* @param radius - The radius of the sphere
|
|
146
|
+
* @param direction - The direction to sweep along
|
|
147
|
+
* @returns Returns true if the sphere intersects with any collider, otherwise false
|
|
148
|
+
*/
|
|
149
|
+
sphereCast(center: Vector3, radius: number, direction: Vector3): boolean;
|
|
150
|
+
/**
|
|
151
|
+
* Casts a sphere through the Scene and returns true if there is any hit.
|
|
152
|
+
* @param center - The center of the sphere
|
|
153
|
+
* @param radius - The radius of the sphere
|
|
154
|
+
* @param direction - The direction to sweep along
|
|
155
|
+
* @param outHitResult - If true is returned, outHitResult will contain more detailed collision information
|
|
156
|
+
* @returns Returns true if the sphere intersects with any collider, otherwise false
|
|
157
|
+
*/
|
|
158
|
+
sphereCast(center: Vector3, radius: number, direction: Vector3, outHitResult: HitResult): boolean;
|
|
159
|
+
/**
|
|
160
|
+
* Casts a sphere through the Scene and returns true if there is any hit.
|
|
161
|
+
* @param center - The center of the sphere
|
|
162
|
+
* @param radius - The radius of the sphere
|
|
163
|
+
* @param direction - The direction to sweep along
|
|
164
|
+
* @param distance - The max distance to sweep
|
|
165
|
+
* @returns Returns true if the sphere intersects with any collider, otherwise false
|
|
166
|
+
*/
|
|
167
|
+
sphereCast(center: Vector3, radius: number, direction: Vector3, distance: number): boolean;
|
|
168
|
+
/**
|
|
169
|
+
* Casts a sphere through the Scene and returns true if there is any hit.
|
|
170
|
+
* @param center - The center of the sphere
|
|
171
|
+
* @param radius - The radius of the sphere
|
|
172
|
+
* @param direction - The direction to sweep along
|
|
173
|
+
* @param distance - The max distance to sweep
|
|
174
|
+
* @param outHitResult - If true is returned, outHitResult will contain more detailed collision information
|
|
175
|
+
* @returns Returns true if the sphere intersects with any collider, otherwise false
|
|
176
|
+
*/
|
|
177
|
+
sphereCast(center: Vector3, radius: number, direction: Vector3, distance: number, outHitResult: HitResult): boolean;
|
|
178
|
+
/**
|
|
179
|
+
* Casts a sphere through the Scene and returns true if there is any hit.
|
|
180
|
+
* @param center - The center of the sphere
|
|
181
|
+
* @param radius - The radius of the sphere
|
|
182
|
+
* @param direction - The direction to sweep along
|
|
183
|
+
* @param distance - The max distance to sweep. @defaultValue `Number.MAX_VALUE`
|
|
184
|
+
* @param layerMask - Layer mask that is used to selectively ignore Colliders when sweeping. @defaultValue `Layer.Everything`
|
|
185
|
+
* @param outHitResult - If true is returned, outHitResult will contain more detailed collision information
|
|
186
|
+
* @returns Returns true if the sphere intersects with any collider, otherwise false
|
|
187
|
+
*/
|
|
188
|
+
sphereCast(center: Vector3, radius: number, direction: Vector3, distance: number, layerMask: Layer, outHitResult?: HitResult): boolean;
|
|
189
|
+
/**
|
|
190
|
+
* Casts a capsule through the Scene and returns true if there is any hit.
|
|
191
|
+
* @param center - The center of the capsule
|
|
192
|
+
* @param radius - The radius of the capsule
|
|
193
|
+
* @param height - The height of the capsule
|
|
194
|
+
* @param direction - The direction to sweep along
|
|
195
|
+
* @returns Returns true if the capsule intersects with any collider, otherwise false
|
|
196
|
+
*/
|
|
197
|
+
capsuleCast(center: Vector3, radius: number, height: number, direction: Vector3): boolean;
|
|
198
|
+
/**
|
|
199
|
+
* Casts a capsule through the Scene and returns true if there is any hit.
|
|
200
|
+
* @param center - The center of the capsule
|
|
201
|
+
* @param radius - The radius of the capsule
|
|
202
|
+
* @param height - The height of the capsule
|
|
203
|
+
* @param direction - The direction to sweep along
|
|
204
|
+
* @param outHitResult - If true is returned, outHitResult will contain more detailed collision information
|
|
205
|
+
* @returns Returns true if the capsule intersects with any collider, otherwise false
|
|
206
|
+
*/
|
|
207
|
+
capsuleCast(center: Vector3, radius: number, height: number, direction: Vector3, outHitResult: HitResult): boolean;
|
|
208
|
+
/**
|
|
209
|
+
* Casts a capsule through the Scene and returns true if there is any hit.
|
|
210
|
+
* @param center - The center of the capsule
|
|
211
|
+
* @param radius - The radius of the capsule
|
|
212
|
+
* @param height - The height of the capsule
|
|
213
|
+
* @param direction - The direction to sweep along
|
|
214
|
+
* @param distance - The max distance to sweep
|
|
215
|
+
* @returns Returns true if the capsule intersects with any collider, otherwise false
|
|
216
|
+
*/
|
|
217
|
+
capsuleCast(center: Vector3, radius: number, height: number, direction: Vector3, distance: number): boolean;
|
|
218
|
+
/**
|
|
219
|
+
* Casts a capsule through the Scene and returns true if there is any hit.
|
|
220
|
+
* @param center - The center of the capsule
|
|
221
|
+
* @param radius - The radius of the capsule
|
|
222
|
+
* @param height - The height of the capsule
|
|
223
|
+
* @param direction - The direction to sweep along
|
|
224
|
+
* @param distance - The max distance to sweep
|
|
225
|
+
* @param outHitResult - If true is returned, outHitResult will contain more detailed collision information
|
|
226
|
+
* @returns Returns true if the capsule intersects with any collider, otherwise false
|
|
227
|
+
*/
|
|
228
|
+
capsuleCast(center: Vector3, radius: number, height: number, direction: Vector3, distance: number, outHitResult: HitResult): boolean;
|
|
229
|
+
/**
|
|
230
|
+
* Casts a capsule through the Scene and returns true if there is any hit.
|
|
231
|
+
* @param center - The center of the capsule
|
|
232
|
+
* @param radius - The radius of the capsule
|
|
233
|
+
* @param height - The height of the capsule
|
|
234
|
+
* @param direction - The direction to sweep along
|
|
235
|
+
* @param orientation - The rotation of the capsule. @defaultValue `Quaternion(0, 0, 0, 1)`
|
|
236
|
+
* @param distance - The max distance to sweep. @defaultValue `Number.MAX_VALUE`
|
|
237
|
+
* @param layerMask - Layer mask that is used to selectively ignore Colliders when sweeping. @defaultValue `Layer.Everything`
|
|
238
|
+
* @param outHitResult - If true is returned, outHitResult will contain more detailed collision information
|
|
239
|
+
* @returns Returns True if the capsule intersects with any collider, otherwise false
|
|
240
|
+
*/
|
|
241
|
+
capsuleCast(center: Vector3, radius: number, height: number, direction: Vector3, orientation: Quaternion, distance: number, layerMask: Layer, outHitResult?: HitResult): boolean;
|
|
242
|
+
/**
|
|
243
|
+
* Get all colliders that overlap with a box in the scene.
|
|
244
|
+
* @param center - The center of the box
|
|
245
|
+
* @param halfExtents - Half the size of the box in each dimension
|
|
246
|
+
* @param orientation - The rotation of the box. @defaultValue `Quaternion(0, 0, 0, 1)`
|
|
247
|
+
* @param layerMask - Layer mask that is used to selectively filter colliders. @defaultValue `Layer.Everything`
|
|
248
|
+
* @param shapes - Array to store overlapping collider shapes. @defaultValue `[]`
|
|
249
|
+
* @returns The collider shapes overlapping with the box
|
|
250
|
+
*/
|
|
251
|
+
overlapBoxAll(center: Vector3, halfExtents: Vector3, orientation?: Quaternion, layerMask?: Layer, shapes?: ColliderShape[]): ColliderShape[];
|
|
252
|
+
/**
|
|
253
|
+
* Get all colliders that overlap with a sphere in the scene.
|
|
254
|
+
* @param center - The center of the sphere
|
|
255
|
+
* @param radius - The radius of the sphere
|
|
256
|
+
* @param layerMask - Layer mask that is used to selectively filter colliders. @defaultValue `Layer.Everything`
|
|
257
|
+
* @param shapes - Array to store overlapping collider shapes. @defaultValue `[]`
|
|
258
|
+
* @returns The collider shapes overlapping with the sphere
|
|
259
|
+
*/
|
|
260
|
+
overlapSphereAll(center: Vector3, radius: number, layerMask?: Layer, shapes?: ColliderShape[]): ColliderShape[];
|
|
261
|
+
/**
|
|
262
|
+
* Get all colliders that overlap with a capsule in the scene.
|
|
263
|
+
* @param center - The center of the capsule
|
|
264
|
+
* @param radius - The radius of the capsule
|
|
265
|
+
* @param height - The height of the capsule
|
|
266
|
+
* @param orientation - The rotation of the capsule. @defaultValue `Quaternion(0, 0, 0, 1)`
|
|
267
|
+
* @param layerMask - Layer mask that is used to selectively filter colliders. @defaultValue `Layer.Everything`
|
|
268
|
+
* @param shapes - Array to store overlapping collider shapes. @defaultValue `[]`
|
|
269
|
+
* @returns The collider shapes overlapping with the capsule
|
|
270
|
+
*/
|
|
271
|
+
overlapCapsuleAll(center: Vector3, radius: number, height: number, orientation?: Quaternion, layerMask?: Layer, shapes?: ColliderShape[]): ColliderShape[];
|
|
272
|
+
private _setGravity;
|
|
273
|
+
private _createPreFilter;
|
|
274
|
+
private _createHitCallback;
|
|
275
|
+
private _clearHitResult;
|
|
276
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The up axis of the collider shape.
|
|
3
|
+
*/
|
|
4
|
+
export declare enum ControllerCollisionFlag {
|
|
5
|
+
/** Character is colliding to the sides. */
|
|
6
|
+
Sides = 1,
|
|
7
|
+
/** Character has collision above. */
|
|
8
|
+
Up = 2,
|
|
9
|
+
/** Character has collision below. */
|
|
10
|
+
Down = 4
|
|
11
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The up axis of the collider shape.
|
|
3
|
+
*/
|
|
4
|
+
export declare enum ControllerNonWalkableMode {
|
|
5
|
+
/** Stops character from climbing up non-walkable slopes, but doesn't move it otherwise. */
|
|
6
|
+
PreventClimbing = 0,
|
|
7
|
+
/** Stops character from climbing up non-walkable slopes, and forces it to slide down those slopes. */
|
|
8
|
+
PreventClimbingAndForceSliding = 1
|
|
9
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Describes how physics materials of the colliding objects are combined.
|
|
3
|
+
*/
|
|
4
|
+
export declare enum PhysicsMaterialCombineMode {
|
|
5
|
+
/** Averages the friction/bounce of the two colliding materials. */
|
|
6
|
+
Average = 0,
|
|
7
|
+
/** Uses the smaller friction/bounce of the two colliding materials. */
|
|
8
|
+
Minimum = 1,
|
|
9
|
+
/** Multiplies the friction/bounce of the two colliding materials. */
|
|
10
|
+
Multiply = 2,
|
|
11
|
+
/** Uses the larger friction/bounce of the two colliding materials. */
|
|
12
|
+
Maximum = 3
|
|
13
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export { CharacterController } from "./CharacterController";
|
|
2
|
+
export { Collider } from "./Collider";
|
|
3
|
+
export { CollisionDetectionMode, DynamicCollider, DynamicColliderConstraints } from "./DynamicCollider";
|
|
4
|
+
export { HitResult } from "./HitResult";
|
|
5
|
+
export { PhysicsMaterial } from "./PhysicsMaterial";
|
|
6
|
+
export { PhysicsScene } from "./PhysicsScene";
|
|
7
|
+
export { StaticCollider } from "./StaticCollider";
|
|
8
|
+
export { Collision } from "./Collision";
|
|
9
|
+
export { ContactPoint } from "./ContactPoint";
|
|
10
|
+
export * from "./enums";
|
|
11
|
+
export * from "./joint";
|
|
12
|
+
export * from "./shape";
|