Answer the question
In order to leave comments, you need to log in
Three.js - automatic rotation of the model. How to enable and disable it on demand?
In the three.js framework components there is a OrbitControls.js file.
In it, we set the model overview control parameters.
And there are lines like this:
THREE.OrbitControls = function ( object, domElement ) {
// Set to true to automatically rotate around the target
this.autoRotate = false;
this.autoRotateSpeed = 2.0; // 30 seconds per round when fps is 60
};
I want to set a condition in JS so that when hovering over with the mouse, the model stops rotating.
How to actually change on demand this.autoRotate = false; on this.autoRotate = true; and vice versa
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question