Apply rotations in Three.js using geometric shapes

- Andrés Cruz

En español
Apply rotations in Three.js using geometric shapes

In Three.js the axes in their 3D environment to rotate 360 degrees, we have to use radians and with this we have to use PI; where a full PI equals 360 degrees; in this case, we want 180 degrees, that is, half PI:

cube.rotation.x = Math.PI * .5

In the example above, we are applying it to a cube, which was the first geometric figure in Three.js that we created earlier.

Andrés Cruz

Develop with Laravel, Django, Flask, CodeIgniter, HTML5, CSS3, MySQL, JavaScript, Vue, Android, iOS, Flutter

Andrés Cruz In Udemy

I agree to receive announcements of interest about this Blog.