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

Translate a rendered scene left, right, up and down #29

Open
udaydutta opened this issue Jun 19, 2017 · 3 comments
Open

Translate a rendered scene left, right, up and down #29

udaydutta opened this issue Jun 19, 2017 · 3 comments
Labels

Comments

@udaydutta
Copy link

JSModeler might have the API to shift the scene left, right or up down, but I could not find out. I have already looked into the http:/3DViewer.net page. Could you please let me know the API or the key/mouse interaction for that? I am trying to create a generalized viewer page with all sort of interaction capabilities. I do not find any You help is highly appreciated. Thank you.

@kovacsv
Copy link
Owner

kovacsv commented Jun 20, 2017

Hello!

I wouldn't transform the scene, I would move only the camera position and up vector. For an example, check the code from 3dviewer.net. Look for the SetNamedView function:

https://github.com/kovacsv/Online3DViewer/blob/master/website/include/importerviewer.js#L133

Hope it helps,
Viktor

@pavvell
Copy link

pavvell commented Nov 14, 2018

@kovacsv thanks for the link, I have the same problem with rotating an object and rotating a camera looks like a right way of doing it using
viewer.cameraMove.Set (eye, center, up);
But still I can't find right values to make a camera show a profile of my object or rotate an object along Y axis (to display right / left / back / front sides). Are there any guide of how to use eye, center and up in viewer.cameraMove.Set (eye, center, up);?

@kovacsv
Copy link
Owner

kovacsv commented Nov 17, 2018

Here is an example on how to do this:
https://rawgit.com/kovacsv/JSModeler/development/sandbox/camerapos.html

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

No branches or pull requests

3 participants