jscad / OpenJSCAD.org

JSCAD is an open source set of modular, browser and command line tools for creating parametric 2D and 3D designs with JavaScript code. It provides a quick, precise and reproducible method for generating 3D models, and is especially useful for 3D printing applications.
https://openjscad.xyz/
MIT License
2.64k stars 512 forks source link

World center and Autorotate #326

Closed loelkes closed 6 years ago

loelkes commented 6 years ago

It is a lot of code and I tried to figure it out myself but without success.

Question: the world center 0,0,0 is at the center of the viewer. I would like to shit it so that it is in the bottom left (for example). Moving the object is not an option, since i want the camera to move around it.

Question2: where in the code would I need to look if I want to add an z-axis-autorotate feature?

For both questions i would know how to do it with THREE.js but can't figure my way through this, sorry and thank you!

kaosat-dev commented 6 years ago

hi @loelkes ! Neither is trivial to do with the current 3D viewer, but in a week or so I will release a new , written from scratch 3D viewer (using regl) that will support

you can see it in action in a preview video for the upcoming Jscad desktop app : both the web & desktop version will use the same 3D viewer

loelkes commented 6 years ago

Oh, OK. Thanks for the update.