D
D
Dmitry2016-02-17 16:57:11
JavaScript
Dmitry, 2016-02-17 16:57:11

three.js. In the OrbitControls.js file, there is a setting "this.autoRotate = true; » How to change it by clicking on the link?

in the three.js framework there is a file OrbitControls.js
There is a parameter that includes auto-rotation of the model
THREE.OrbitControls = function ( object, domElement ) {
this.autoRotate = true;
};
I have a regular link on my site < a id="link" href="#">link < / a >
Question: What should I write in the script to change the parameter this.autoRotate = true; to false ?
Like this:
script
$("#link").click(function() {
// //some code that sets this.autoRotate = false;
});
/script
Help please.
I can't figure it out.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dark Hole, 2016-02-17
@abyrkov

Just! elem.autoRotate = false;
elem - your element

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question