mcneel / rhino3dm

Libraries based on OpenNURBS with a RhinoCommon style
MIT License
593 stars 134 forks source link

Obtain Camera Information from View? #411

Closed jjsolly closed 3 years ago

jjsolly commented 3 years ago

More of a query than an issue.

Looking at how I can access specific Rhino view information in order to use that to setup a three,js camera. It seems that "views" and "namedViews" are both accessible and return a list of ViewInfo objects (https://mcneel.github.io/rhino3dm/javascript/api/ViewInfo.html)

In RhinoCommon each ViewInfo object contains a ViewPort property that is of ViewPortInfo type. ViewPortInfo contains the information I think I want.

Looking in the Rhino3dm.js API it seems that the ViewPortInfo class does exist (https://mcneel.github.io/rhino3dm/javascript/api/ViewportInfo.html) but I can't work out how to access this information from the ViewInfo objects.

Any help much appreciated.