Hook for cross-fading between two animations.
Provides simple API for transitioning between animations with smooth blending over a specified duration.
Starting animation action
Target animation action
Cross-fade duration in seconds
function CrossFadeExample({ actions }) { const [current, setCurrent] = useState('idle'); useCrossFade( actions.idle, actions.walk, current === 'walk' ? 0.3 : 0 ); return <button onClick={() => setCurrent('walk')}>Walk</button>;} Copy
function CrossFadeExample({ actions }) { const [current, setCurrent] = useState('idle'); useCrossFade( actions.idle, actions.walk, current === 'walk' ? 0.3 : 0 ); return <button onClick={() => setCurrent('walk')}>Walk</button>;}
Hook for cross-fading between two animations.
Provides simple API for transitioning between animations with smooth blending over a specified duration.