BJ Patel is an expert user of Umbraco. Always keen to share hints and tips on getting the best out of Umbraco.
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;
}
comments powered by Disqus
Join Our Community
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
Latest Blog Posts