Viewport text overlay & data visualisation

Hey,

Love the plugin. Was playing with setting up some models and came across a limitation/feature request.

Can there be a viewport text overlay to visualise/expose metrics of the Shapediver model?

Example: I want to change model parameters and show the number of particular elements or the total cost of buying those elements, in Shapediver’s viewport. Effectively, an option to toggle a text data overlay over the 3D viewport or as a side pane.

I came across some solutions here but they are not exactly the feature I am looking for but more of a hack to fix the lack of thereof: Display Text in ShapeDiver Viewport

If I understand correctly, the option to use 2D or 3D text tags is not what you are looking for.

If you are planning to create your own application by using the API, this will be the only way to do what you want, by grabbing the values in Direct Data Output components and displaying them on your website, either on top of the viewer or in a different container on the page.

If you are planning to work only in the ShapeDiver platform or using iframes, it is currently not possible to do what you are after, but we are planning to soon display data outputs in a side panel (similar to the parameters and exports panels) out of the box. I will let you know when progress is made regarding that feature.

1 Like

Hi Mathieu

Do you have any examples of the code that does that? I found a Clickable 3d Objects example but wondering if there are some examples that display numerical values fetched from Shapediver API as well?

Thanks for keeping me in the loop - I think this functionality would open up some really interesting use cases for Shapediver!

There is no example for doing that yet with the version 3 of the viewer API, which I would recommend to start working with. But you can check an example of all basic calls here: https://codepen.io/ShapeDiver/pen/gOOaXzM
The “Get Data” button does exactly what you want.
Afterwards, you can check our migration guide to see how to reproduce this example in version 3.