function animate() 
{
    const now = Date.now();
    const deltat = now - currentTime;
    currentTime = now;
    const fract = deltat / duration;
    const angle = Math.PI * 2 * fract;

    // Rotate the cube about its Y axis
    cube.rotation.y += angle;

    // Rotate the sphere group about its Y axis
    sphereGroup.rotation.y -= angle / 2;
    sphere.rotation.x += angle * 2;

    // Rotate the cone about its X axis (tumble forward)
    cone.rotation.z += angle;
}
/**
 * Updates the rotation of the objects in the scene
 */
Updates the rotation of the objects in the scene
Updates the rotation of the objects in the scene
function animate() 
{
    const now = Date.now();
    const deltat = now - currentTime;
    currentTime = now;
    const fract = deltat / duration;
    const angle = Math.PI * 2 * fract;
    cube.rotation.y += angle;
    sphereGroup.rotation.y -= angle / 2;
    sphere.rotation.x += angle * 2;
    cone.rotation.z += angle;
}
function animate ( ) { const now = Date . now ( ) ; const deltat = now - currentTime ; currentTime = now ; const fract = deltat / duration ; const angle = Math . PI * 2 * fract ; cube . rotation . y += angle ; sphereGroup . rotation . y -= angle / 2 ; sphere . rotation . x += angle * 2 ; cone . rotation . z += angle ; }
Updates the rotation of the objects in the scene
Updates the rotation of the objects in the scene
// Rotate the cube about its Y axis // Rotate the sphere group about its Y axis // Rotate the cone about its X axis (tumble forward)