Hello ShapeDiver Team,
I’m trying to figure out how I control the display settings that the user will see when the GH file I write uploads to the site, so these display settings are dynamic and change based on the data changing parameters that the code creates in each renewed data update:
How many viewports (windows) will the display?
What geometry will I display in each window?
From what 3D angle will the camera adjust in each window? (2 points? Vector? Where + where does the camera adjust…)
To what zoom factor will the camera adjust each window?
| Internal Documentation | Question # 1 |
The viewport of the online viewer has nothing to do with the Rhino viewports. At the moment, there is no way to control the online viewport from the Grasshopper definition, only via the Camera settings or the API after you upload the model.
Hi Mathieu Huard,
I may not have been clear: I don’t need the original rhino viewport. I’m trying to figure out how to dynamically determine the view the user sees according to the data what I want to convey to him at any moment.
- Is there anything in the “zoom selected” style?
- No way to determine where the camera is? According to the code data?
Yes, this is the api.scene.camera.zoomAsync() function, which takes as input the path of any object in the scene.
Yes, you can get the camera position and target at any time using the api.scene.camera.get() function.
Is it python commands?
No component for that, & I need to programe my self?
Thanks for this fastest respond!