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

Desarrollo con Laravel, Django, Flask, CodeIgniter, HTML5, CSS3, MySQL, JavaScript, Vue, Android, iOS, Flutter

Andrés Cruz en Udemy

Acepto recibir anuncios de interes sobre este Blog.