NGL@0.10.4 Home Manual Reference Source GalleryRepository
import Annotation from 'ngl/src/component/annotation.js'
public class | source

Annotation

Annotation HTML element floating on top of a position rendered in 3d

Constructor Summary

Public Constructor
public

constructor(component: Component, position: Vector3, content: String | Element, params: Object)

Method Summary

Public Methods
public

Safely remove the annotation

public

Set HTML content of the annotation

public

Set visibility of the annotation

Public Constructors

public constructor(component: Component, position: Vector3, content: String | Element, params: Object) source

Params:

NameTypeAttributeDescription
component Component

the associated component

position Vector3

position in 3d

content String | Element

HTML content

params Object
  • optional

parameters

params.offsetX Integer

2d offset in x direction

params.offsetY Integer

2d offset in y direction

params.visible Boolean

visibility flag

Public Methods

public dispose(): undefined source

Safely remove the annotation

Return:

undefined

public setContent(value: String | Element): undefined source

Set HTML content of the annotation

Params:

NameTypeAttributeDescription
value String | Element

HTML content

Return:

undefined

public setVisibility(value: Boolean): undefined source

Set visibility of the annotation

Params:

NameTypeAttributeDescription
value Boolean

visibility flag

Return:

undefined