Cannon.Display.Line
Implements the Cannon.ChildSystem and the Cannon.DisplayObject.
Draws a line between 2 or more points. Cannon.Display.Line works with Vertex2D in thus depends on the Cannon.Math package !
This page only covers the properties and function that are particular to the Line, but the actual object will also contain all properties and functions from ChildSystem and DisplayObject.
Array containing the different points building the line.
Translates the whole line on the x axis.
Translates the whole line on the y axis.
- nodes:Array
- x:Float : optionnal, default is 0.
- y:Float : optionnal, default is 0.
Creates a new line joining every point contained inside the nodes array.
Every node in the array should be a Cannon.Math.Vertex2D. If a node isn't, Cannon will try to build a new Vertex2D using the node's x and y properties. If again it can't find x and y properties, it will fail and send an error message to the Logger.