-
Notifications
You must be signed in to change notification settings - Fork 2
Line
Joel Martinez edited this page Jul 1, 2013
·
3 revisions
You can create lines by calling the sprite manager's addLine
method, and supplying the start and end vectors.
var line = engineInstance.SpriteManager.addLine(0,0, 20,20);
The points are in world space, and can be controlled independently.
-
start
- A PositionedObject -
end
- A PositionedObject -
lineColor
- The color of the line. -
lineWidth
- The width of the line.
##Sample
A few simple examples of lines: http://joelmartinez.github.io/flatredball-js/#line
Using lines to render a rain effect: http://joelmartinez.github.io/flatredball-js/#rain