addTriangle(layer, -> id , method of controller

Add a new Triangle 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 Triangle

the identifier (int) of the sprite

// a new Triangle with its center at 200,300 and radius (center to each corner) of 60.

UB.controller(playerID).addTriangle(0, {x:200, y:300, radius: 60});

See all methods of the api.