Skip to the content

Creating function to stop cube animation

  • Create function to stop animation :
    This function stopAnimate() stops the cube from spinning and isRotating and isAnimating is set to false to it stops rotating and animating , and makes sure the cube still casts shadows in the scene.


// Function to stop animation
  function stopAnimate() {

  isRotating = false;
  isAnimating = false; 
  cube.castShadow = true;
   
  }

About the author

BJ Patel

BJ Patel is an expert user of Umbraco. Always keen to share hints and tips on getting the best out of Umbraco.

comments powered by Disqus

Join Our Community

This is a promo pod

Join Our Community Become a part of our developer community. Share your projects, get feedback, and collaborate with like-minded individuals.

Your contributions help us continue creating valuable content. Consider supporting us by sharing our content.

Junagadh, Gujarat

Support Us.