Skip to main content

Line

Description:

  A class provides functionality for drawing lines using vertices.

Class Object: Line Class.

Inherits from: Node.

depthWrite

Type: Field.

Description:

  Whether the depth should be written. (Default is false)

Signature:

depthWrite: boolean

blendFunc

Type: Field.

Description:

  Blend function used for rendering the line.

Signature:

blendFunc: BlendFunc

add

Type: Function.

Description:

  Adds vertices to the line.

Signature:

add: function(
self: Line,
verts: {Vec2},
color?: Color --[[0xffffffff]]
)

Parameters:

ParameterTypeDescription
verts{Vec2}Table of vertices to add to the line.
colorColor[optional] Color of the line (default is opaque white).

set

Type: Function.

Description:

  Sets vertices of the line.

Signature:

set: function(
self: Line,
verts: {Vec2},
color?: Color --[[0xffffffff]]
)

Parameters:

ParameterTypeDescription
verts{Vec2}Table of vertices to set.
colorColorColor of the line (default is opaque white).

clear

Type: Function.

Description:

  Clears all the vertices of line.

Signature:

clear: function(self: Line)