paintSprite(layer,id, ...properties) , method of scene

Change the appearance of a sprite.

Parameters:
name type description
layer int layer of the world (must be >= 0)
id int identifier of the sprite (must be >= 0)
properties …Object appearance parameter values, see Sprite properties
//  change the texture of a sprite

UB.scene.paintSprite(0,1,{texture:"images/rose.png"});

See all methods of the api.