Reputation: 21
how to rotate a 3D object in Three.js for all three axises by using mouse and zoom in and out also should work. I don't want to move my camera here. By using mouse, I should be able to watch all the sides of the object. Since I'm new to three.js, if you can give me code example or any class name it will be great. thank you.
Upvotes: 1
Views: 3964
Reputation: 793
it might be more helpful if you provided code that better describes what you've tried and where you would like to end up.
In the meantime I can refer you to this example found on three.js's dedicated examples page that uses standard javascript mouse-events to rotate a TextGeometry about its y-axis.
You can apply the same principles to any Geometry or event that you like.
You may also find it helpful to go through the Three.js documentation. It has an easy-to-follow "Getting Started" section that introduces all the basics followed by a "References" section that explains each of the framework's main components with examples on how to use them properly.
Upvotes: 2