Namespace: Sprites

PhSim. Sprites

Sprites namespace

Source:

Classes

spriteImgObj

Methods


<static> spriteImgObj#addSprite(src [, onload])

Add sprite to the Sprite Image Array.

This:
  • Sprites.spriteImgObj
Parameters:
Name Type Argument Description
src string | Object

Source of sprite. If src is a string representing a url, then the image added has its source as src. If src is an object, then the source is src.src. This means that any object with an src property can be added.

onload function <optional>

a function that is executed when the image loads.

Source:
Returns:
Type
Image