Open GoogleCodeExporter opened 9 years ago
Override viewer.onloadingcomplete
(http://jsc3d.googlecode.com/svn/trunk/jsc3d/docs/symbols/JSC3D.Viewer.html#onlo
adingcomplete) which will be called immediately as the model is loaded. In this
callback function, set a timer to rotate the model a fixed angle around an axis
using viewer.rotate() method
(http://jsc3d.googlecode.com/svn/trunk/jsc3d/docs/symbols/JSC3D.Viewer.html#rota
te) at an expected frequency. The implementation would be like this:
viewer.onloadingcomplete = function() {
setInterval( function() {
// rotate the model around an axis
viewer.rotate(...);
// tell the viewer to render a new frame
viewer.update();
}, an_expected_interval_in_millisecs);
};
There's a live example demonstrating how to achieve this:
http://jsc3d.googlecode.com/svn/trunk/jsc3d/demos/earth.html.
Original comment by Humu2...@gmail.com
on 14 Dec 2014 at 3:08
Original issue reported on code.google.com by
nando1...@gmail.com
on 14 Dec 2014 at 1:25