remcoder / gcode-preview

A simple GCode parser & previewer with 3D printing in mind. Written in Typescript.
https://gcode-preview.web.app/
MIT License
151 stars 31 forks source link

Control the camera position #146

Open sophiedeziel opened 2 months ago

sophiedeziel commented 2 months ago

It would be nice to offer an API for the camera. An app using the library could offer some controls, for example

I don't have a particular design in mind, but it would be nice to have a layer of abstraction over three.js that hides the complexity of calculating position relative to the build volume and part dimensions.

remcoder commented 1 month ago

maybe we can add these buttons for restoring the camera position in this change? https://github.com/remcoder/gcode-preview/pull/139/commits/d44c38efa58576152bdfdf9510ffbfaff7aaa57a

sophiedeziel commented 1 month ago

Yes!