slash-forwardLine

Renders a line segment with customizable length, position, rotation, color, and width. Can be defined by two points or by length and rotation. Its two endpoints can be used to create instancing groups of other shapes.

Property name
Description
Compatible datatype

length

Length of the line

number

start

Coordinates of the first vertex

point

end

Coordinates of the second vertex

point

x

Horizontal position

number

y

Vertical position

number

rot

Rotation

number

color

Line color

color

strokeWidth

Line width

number

origin

Center point of the shape. Defaults to (0, 0). Changing it moves the shape’s pivot without affecting its x and y position.

point

zindex

Controls which element appears on top when elements overlap; higher values sit above lower ones.

number

instance

Instancing target

figure

instanceIndex

Displays the instance with the given index number

number

circle-info
  • When both start and end properties are used to define a line, the x, y, length and rot properties are ignored.

  • The strokeWidth property is available when a Color node is connected to the outline

  • The zindex increases automatically, unless there's a connection to it.

  • The instanceIndex property is available when a Source node is connected as an instancing target. Instancing index value cycles back when the provided value exceeds the available number of instances.

Example Projects

Pixel Visualaarrow-up-right There are a lot going on this project. Have a closer look to the bottom-right corner of the graph and you'll notice that there are 2 Point nodes connected to the Line node. This makes it possible to keep the start of the pink line going around in circles while the end of the line is matching the position of the green glowing elements as they are being generated.

Last updated