Event-based viewport update in ShapeDiver viewer

Just wondering, if it is possible to update a viewing angle of an object in Shapediver viewer when invoking a specific function? For instance, if I want to rotate my object in Shapediver around X-axis using the slider number input parameter and the Rotate component, is it possible to change/update the default perspective view to a specific view (sort of a named view) on the YZ plane in order to focus on the rotate operation?

If so, can it be realised with Grasshopper components (or using any plug-ins compatible with ShapeDiver)? Or it is only possible via the API?

A very good example of updating views in the viewer is here: https://munsonfurniture.com/configurator/customize-configuration/fe78be01-f5d7-42ff-8779-8d64ba509072/

However, it is realised by manually clicking on those two buttons highlighted with the red rectangle on the figure.

Please let me know what do you think.

Thank you

At the moment, this is only possible with the API, either using promises or by setting up event listeners when parameters change. Unruh Furniture make use of this type of updates for all their configurators, for example.

It is in our plans to make this type of behaviour available through Grasshopper components, along with animations and other viewer features. This should happen later this year.

1 Like

Thank you very much for your reply. Yes, the event-based configuration of the viewing angles on the Unruh Furniture is exactly what I would like to do. I look forward to trying those new functions which will roll out in the future ShapeDiver updates :slight_smile:

Wow, I had no idea that the ShapeDiver viewer could be so responsive to parameter changes. In this model, it appears to be as fast when moving sliders as what I expect from Grasshopper directly. Amazing.

The Munson website is not a standard ShapeDiver model, it contains a layer of custom javascript to allow the live interactions. The Grasshopper model in the back is mostly used to export pricing, fabrication data and cut files.

Thanks for providing this information @mathieu1 since I’ve been really curious about the responsiveness of Munson’s website comparing to other shapeDiver client’s website.
For the live interaction aspect of shapeDiver, are there any methods to eliminate the processing time delay when user adjust the parameters?
and regarding Munson’s custom layer of live javascript, is the interactive presentation and smooth transition built upon three.js or other webGL applications?

The rendering loop in the Munson configurator simply recreates the logic directly using three.js. Solutions are only recomputed when geometry and data need to be exported (i.e at checkout). Therefore, there are no specific methods to eliminate the processing time except to just not process solutions. The logic is not tied to Grasshopper or the ShapeDiver API in particular, it is pure three.js manipulation.

1 Like