Open GoogleCodeExporter opened 8 years ago
PLEASE DELETE - FIXED NOW!
Original comment by TheRealR...@gmail.com
on 3 Nov 2012 at 1:01
Nice robin model!
It is recommended to use the latest code from svn repository.
jsc3d.0.7.2.min.js is very outdated.
Original comment by Humu2...@gmail.com
on 4 Nov 2012 at 3:05
[deleted comment]
Yeah, thanks. I was just trying to get it to work. Is there a way to make it
auto rotate until the user interacts with it?
thanks again, Dan.
Original comment by TheRealR...@gmail.com
on 6 Nov 2012 at 6:27
To implement that, you need to set a timer to rotate your model at a given time
interval, and then clear it when any input event is detected.
Following snippet demonstrates this:
...
var timerID = 0;
...
// setup event handlers to detect interactions
viewer.onmousedown = viewer.onmouseup = function() {
// stop animation if any
if(timerID > 0) {
clearInterval(timerID);
timerID = 0;
}
};
...
// start to rotate model horizontally at increment of 3 degrees per 60 millisecs
timerID = setInterval(function(){viewer.rotate(0, 3, 0); viewer.update();}, 60);
...
That's it.
You can refer to http://jsc3d.googlecode.com/svn/trunk/jsc3d/demos/earth.html
for a detailed demo.
Original comment by Humu2...@gmail.com
on 7 Nov 2012 at 3:57
Thanks, that works perfectly.
Thanks again,
Dan.
Original comment by TheRealR...@gmail.com
on 16 Nov 2012 at 11:21
Original issue reported on code.google.com by
TheRealR...@gmail.com
on 3 Nov 2012 at 11:26