Ngl: Set Z-offset for TextBuffer

Created on 11 May 2016  路  3Comments  路  Source: nglviewer/ngl

It would be nice to be able to offset a TextBuffer towards the camera. I would like to label some SphereBuffers while making sure that the label always falls in front of the labelled object.

enhancement

Most helpful comment

Added parameters xOffset, yOffset, zOffset for LabelRepresentation and TextBuffer, see b71040a46bca386e7bf3c0ea14522f1a4649a522. They move the label in screen space.

screenshot 72

All 3 comments

Added parameters xOffset, yOffset, zOffset for LabelRepresentation and TextBuffer, see b71040a46bca386e7bf3c0ea14522f1a4649a522. They move the label in screen space.

screenshot 72

It seems that label offsets behave differently in perspective and orthorgonal cameras.
In perspective camera, it moves the labels with respect to the camera,
but in orthorgonal camera, it moves the labels in the real space. (tested in the webapp)

@yqshao can you try again with the ts2 branch, was fixed in 7a7d030d1512ae9a29032c7b5cec8034f9dd0be0

Was this page helpful?
0 / 5 - 0 ratings