I’m using Grasshopper’s Text Tag (not 3D) component to show model information. The setup is a Curve param for an arrow/marker and a Point for the position of the text. This is then fed to a Move component that feeds a Text Tag (Note: I have one Text Tag that receives Point info directly and the behaviour is the same).
When my model is viewed at https://app.shapediver.com it works as expected. When I view my model using the API through React, the positioning of the text is consistently off on the Z axis. See below:
The 2D text tags in the viewer are html elements in an overlay on top of the 3D canvas. Therefore, in order to position correctly, make sure you include the css file in your header:
If that doesn’t solve your issue, make sure your css stylesheet does not override any additional styles associated with ShapeDiver (by using !important for example).
I looked into it a bit and the issue is with the positioning of the HTML div element that contains the Text Tag info (this is being done via javascript). Looks like this:
I’ve solved the issue by adding “shapediver-viewport-flex landscape” to the class attribute of the HTML element used as the container in ReactDOM.render().