Allow AnnotationsPlugin to be configured with an amount to offset each Annotation from its Entity surface, with 0.3 being the offset's default value.
This is useful when the Annotation is occludable, which is when it is hidden when occluded by other objects. When occludable, there is potential for the Annotation#worldPos to become visually embedded within the surface of its Entity when viewed from a distance. This happens as a result of limited GPU accuracy GPU accuracy, especially when the near and far view-space clipping planes, specified by Perspective#near and Perspective#far, or Ortho#near and Perspective#far, are far away from each other.
Offsetting the Annotation may ensure that it does become visually embedded within the surface of its Entity. We may also prevent this by keeping the distance between the view-space clipping planes to a minimum. In general, a good default value for Perspective#far and Ortho#far is around 2.000.
const annotations = new AnnotationsPlugin(viewer, {
//...
surfaceOffset: 0.3 // Or greater, if the Annotation gets obscurred by its surface
});
Allow AnnotationsPlugin to be configured with an amount to offset each Annotation from its Entity surface, with
0.3
being the offset's default value.This is useful when the
Annotation
is occludable, which is when it is hidden when occluded by other objects. When occludable, there is potential for theAnnotation#worldPos
to become visually embedded within the surface of its Entity when viewed from a distance. This happens as a result of limited GPU accuracy GPU accuracy, especially when the near and far view-space clipping planes, specified byPerspective#near
andPerspective#far
, orOrtho#near
andPerspective#far
, are far away from each other.Offsetting the
Annotation
may ensure that it does become visually embedded within the surface of itsEntity
. We may also prevent this by keeping the distance between the view-space clipping planes to a minimum. In general, a good default value forPerspective#far
andOrtho#far
is around2.000
.