javascript - Rotating a simple cube twice -


I have some experience on Blender 3D, but there is almost no one on 3D programming and I with three I'm trying to work .js now.

My question is this: I have a simple cube and I have rotated it around y-axis ; So I need to rotate it around y-axis , but as if the axis was rotated I would press RKEY twice on Blender.

The first time I used to rotate: cube.rotation.y + = Math.PI * .5;

How can I do this in three.js? I also tried some matrix changes, but I could have.

-

@Myoumota help me with a puzzle, so I am completing my explanation below:

Thanks @Myoomota, this example will help me Explain what I am trying to do! Here is a more explicit description: The cube has been rotated twice (y and z) and then will be rotated unlimited at y axis . What I am trying to do is to always turn parallels in his face - just like the first rotating faces have similarities.

If you rotate cubic 90 degrees every frame, it will look the same and you feel that it does not rotate (But it did).

Here is an example:

  function render () {// rotates 90 degrees every frame is viewing the same mesh. Illuminating. Y + = Math.PI / 2; Renderer Render (view, camera); }  

Comments

Popular posts from this blog

winforms - C# Form - Property Change -

java - Messages from .properties file do not display UTF-8 characters -

javascript - amcharts makechart not working -