addPolyline(layer, -> id , method of controller

Add a new Polyline on the controller of a player.

name type description
layer int layer of the world (must be >= 0)
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.controller(playerID).addPolyline(0,{points:[[0,0],[100,100],[100,0],[0,100]], fill: "#F00" });

See all methods of the api.