addPolyline(layer,{points}, -> id , method of scene

Add a new Polyline to a layer of the world.

name type description
layer int layer of the world (must be >= 0)
points array of Point sequence of x,y coordinates
properties …Object each with Sprite properties for a Polyline

the identifier (int) of the sprite

// add a new red Polyline with points (0,0),(100,100),(100,0) and (0,100) to layer zero.

UB.scene.addPolyline(0,{points:[[0,0],[100,100],[100,0],[0,100]], fill: "#F00" });

See all methods of the api.