Lines
The line graphic object can be used to draw lines using Excalibur. The Actor GraphicsComponent centers graphics by default, so it might be desireable to set the anchor to (0, 0);
typescriptconst lineActor = new ex.Actor({pos: ex.vec(100, 0),})lineActor.graphics.anchor = ex.Vector.ZerolineActor.graphics.use(new ex.Line({start: ex.vec(0, 0),end: ex.vec(200, 200),color: ex.Color.Green,thickness: 10,}))game.add(lineActor)
typescriptconst lineActor = new ex.Actor({pos: ex.vec(100, 0),})lineActor.graphics.anchor = ex.Vector.ZerolineActor.graphics.use(new ex.Line({start: ex.vec(0, 0),end: ex.vec(200, 200),color: ex.Color.Green,thickness: 10,}))game.add(lineActor)