addTrapezium(layer, -> id , method of scene

Add a new Trapezium to this layer of the world.

name type description
layer int layer of the world (must be >= 0)
properties …Object each with Sprite properties for a Trapezium

the identifier (int) of the sprite

// a new Trapezium with its left bottom corner at 200,300.

UB.scene.addTrapezium(0,{x:200, y:300, height: 60});

See all methods of the api.