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


LineHTML(color, width)

The parameters are:


See the base Mesh class for common properties.

.elemHTML undefined : HTMLElement

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

.isLineHTML undefined : Boolean

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

.offset undefined : Integer

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

.onBeforeRender undefined : 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.