Skip to main content

EnclosureBuilder

EnclosureBuilder: object

Defines a closed shape (cloud, rectangle, circle, etc.) that forms the body of a callout annotation.

Type declaration​

buildGeometry()​

buildGeometry: (center, halfW, halfH) => number[]

Returns flat XYZ line-segment pairs forming the enclosure outline.

Parameters​

ParameterType
centerTHREE.Vector3
halfWnumber
halfHnumber

Returns​

number[]

getAttachmentPoint()​

getAttachmentPoint: (center, halfW, halfH, dir) => THREE.Vector3

Returns the point on the enclosure boundary in the direction dir from center. dir is a unit vector in the XZ plane.

Parameters​

ParameterType
centerTHREE.Vector3
halfWnumber
halfHnumber
dirTHREE.Vector3

Returns​

THREE.Vector3