getSprite(layer,id) -> properties , method of scene

Get all the properties of a sprite from a layer of the world.

Parameters:
name type description
layer int layer of the world (must be >= 0)
id int identifier of the sprite (must be >= 0)
Returns

properties, an Object

// get the properties of a LineSegment with id 64
var props = UB.scene.getSprite(0,64);
{
  "ax": 649,
  "ay": 380,
  "bx": 580,
  "by": 340,
  "id": 64,
  "fill": "#F33",
  "type": "LineSegment"
 }

See all methods of the api.