🔧Utility functions
Extra functions
Cache
MayoGL.cache.player = playerImage
//accses the image latter with: MayoGL.cache.playerFunctions
setWidth(width: Number) -> sets the width of the canvas
setHeight(height: Number) -> sets the height of the canvas
setPixelSize(size: Number) -> sets the pixel size of the canvas
setAlpha(alpha: Boolean) -> sets if the canvas is transparent
setClearColor(color: String) -> sets the clear colour of the canvas
setCanvas(canvas: Canvas DOM Element) -> hot swap the canvas
setContext(context: Object) -> set the canvas context manually
setAntiAlias(antiAlias: Boolen) -> sets the image smoothing on or off for the canvas
image(url: String) -> create a image
loadInCache(object: Image Object, name: String) -> Save an image to this instances cache with the specified name
loadFromCache(name: String) -> load and image from cache from the specified nameStatic Variables
Name
Description
Last updated