Skip to the content

Buttons

  • Creating Buttons :
    Each button has an onclick attribute that triggers a corresponding JavaScript function

  • Rotate: Rotate button is used to toggleRotation() to toggle rotation of an object.
  • Start Animate: Start Animate button is used to startAnimate() to begin an animation loop.
  • Stop: Stop button is used to  stopAnimate() to halt the animation loop.
  • Shadow: Shadow button is used to showShadow() to toggle visibility of shadows.
  • AmbientLight: AmbientLight button is used to showAmbientLight() to toggle ambient light in the scene.
  • DirectionalLight: DirectionalLight button is used to showDirectionalLight() to toggle directional light settings.
  • SpotLight: SpotLight button is used to showSpotLight() to toggle spotlight effects.





    

    

     
   
        

   
   
     
  
    
 
    


   My First Three.js App
  


  
             

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.