Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem loading on page #11

Open
GoogleCodeExporter opened this issue Jul 29, 2015 · 6 comments
Open

Problem loading on page #11

GoogleCodeExporter opened this issue Jul 29, 2015 · 6 comments

Comments

@GoogleCodeExporter
Copy link

Hi, this is less of a bug and more of an implementation problem.

I am trying to implement jsc3d in my website. I am relatively new to web and 
javascript - so the problem is probably easy to fix.

I was wondering if you could look at the page and help me?
http://daniel-creese.co.cc/Mobile/index.html

Daniel. 

Original issue reported on code.google.com by [email protected] on 3 Nov 2012 at 11:26

@GoogleCodeExporter
Copy link
Author

PLEASE DELETE - FIXED NOW!


Original comment by [email protected] on 3 Nov 2012 at 1:01

@GoogleCodeExporter
Copy link
Author

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 [email protected] on 4 Nov 2012 at 3:05

@GoogleCodeExporter
Copy link
Author

[deleted comment]

@GoogleCodeExporter
Copy link
Author

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 [email protected] on 6 Nov 2012 at 6:27

@GoogleCodeExporter
Copy link
Author

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 [email protected] on 7 Nov 2012 at 3:57

@GoogleCodeExporter
Copy link
Author

Thanks, that works perfectly.

Thanks again,
Dan.

Original comment by [email protected] on 16 Nov 2012 at 11:21

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant