Play part of the animation

Hi there,

i made a mesh with an animation in Blender. Loading the model and playing that animation in threejs works perfect. I havent been using the AnimationMixer at all before. I cant find a solution of playing only a part of the animation with a specified duration.
Lets say i always want the Animation to last 2 seconds. The full Animation from Blender plays in 30FPS in 2 seconds → 60FPS. What if i now want to play half of the Animation but also in 2 seconds. I know that i can set the duration to 4 then but how do i stop the animation half way in?

Here is a small codesandbox in r3f that i use for testing. Just a cube with a 120 degree rotation animation:

https://codesandbox.io/p/devbox/animationtest-9qs5zl?file=%2Fsrc%2FComponents%2FTestCube.jsx%3A7%2C56

Can somebody explain me how i can achieve that or give some hints on what methods i should dig into?

Greetings
Tom

Try AnimationUtils.subclip

Example,

Exactly what i was looking for, thanks for the hint!!

Updated the Sandbox:

https://codesandbox.io/p/devbox/animationtest-9qs5zl?file=%2Fsrc%2FComponents%2FTestCube.jsx%3A22%2C36