Creates a line mesh object, which constantly points to a specified HTML element.


LineHTML(color : Color, width : Float)

color — the line's color (in linear space), default is (1, 0, 0).
width — the line's width in pixels, default is 2px.


See the base Mesh class for common properties.

.elemHTML : HTMLElement

An HTMLElement object to bind the line to. Default is null.

.isLineHTML : Boolean

Used to check whether this or derived classes are LineHTML meshes. Default is true.

.offset : Integer

The gap in pixels between the line's end and the target HTMLElement. Default is 5 (px).

.onBeforeRender : Function

A callback that is executed immediately before the LineHTML is rendered. This function is called with the following parameters: renderer, scene, camera, geometry, material, group.

By default this callback updates the line's geometry based on the line's world position and the position of the HTMLElement which the line points to.


See the base Mesh class for common methods.


For more info on how to obtain the source code of this module see this page.