BufferGeometry
Object3D
Raycaster
Camera
CubeCamera
PerspectiveCamera
OrthographicCamera
StereoCamera
Clock
Curve
CurvePath
Path
Shape
ShapePath
ArrowHelper
AxesHelper
BoxHelper
Box3Helper
CameraHelper
DirectionalLightHelper
GridHelper
PolarGridHelper
HemisphereLightHelper
PlaneHelper
PointLightHelper
SkeletonHelper
SpotLightHelper
Light
PointLight
RectAreaLight
SpotLight
DirectionalLight
HemisphereLight
LightShadow
PointLightShadow
AnimationLoader
AudioLoader
BufferGeometryLoader
CompressedTextureLoader
CubeTextureLoader
DataTextureLoader
FileLoader
ImageBitmapLoader
ImageLoader
Loader
LoaderUtils
MaterialLoader
ObjectLoader
TextureLoader
LoadingManager
Material
Box2
Box3
Color
Cylindrical
Euler
Frustum
Interpolant
Line3
MathUtils
Matrix3
Matrix4
Plane
Quaternion
AnimationAction
AnimationClip
AnimationMixer
AnimationObjectGroup
AnimationUtils
keyframeTrack
PropertyBinding
PropertyMixer
BooleanKeyframeTrack
QuaternionKeyframeTrack
StringKeyframeTrack
Audio
AudioAnalyser
AudioContext
AudioListener
PositionalAudio

AnimationAction.getEffectiveWeight()

描述

AnimationAction.getEffectiveWeight()是Three.js动画系统中的方法之一,用于返回动画动作的有效权重。

有效权重是根据动画混合器当前设置的权重和动作自身设置的权重值计算出来的。当动画混合器的权重为0时,动作的有效权重总是为0。当动画混合器的权重为1时,动作的有效权重等同于动作自身设置的权重值。

语法

animationAction.getEffectiveWeight();

返回值

  • 返回值类型:Number
  • 描述:动画动作的有效权重。

示例

// 在调用getEffectiveWeight之前,请确保你已经对动画对象进行了实例化,例如:

const mixer = new THREE.AnimationMixer();
const action = mixer.clipAction( animationClip );

// 获取动画动作的有效权重值
const effectiveWeight = action.getEffectiveWeight();

参考链接

AnimationAction.getEffectiveWeight() - Three.js文档