Wes Mantooth - HTML5 Canvas Game Engine - Version 2.x - by Jeremy Heminger

Classes organised alphabetically

Loader

init -> {Void}

creates and instance of an object and canvas, initializes it and returns an ID

Name Type Description
$t Object DOM node target to add loader to
i Number O.loader[i] loader image or text
c String a class overide
callback Function

load -> {Void}

loads MIME type assets
.jpg, .gif, .png, .svg, .bmp, .js, .json, .txt, .css, .ogg, .mp3

Name Type Description
a Object list of assets to load
callback Function

complete -> {Void}

removes asset loader animation

Name Type Description
callback Function

load_images -> {Void}

loads images and appends them to the assets object

Name Type Description
img String image path
key String object key to reference the image in the $w.assets object

load_audio -> {Void}

loads audio files and appends them to the assets object

Name Type Description
au String image path
key String object key to reference the audio in the $w.assets object

load_script -> {Boolean}

this does not currently contain an onload for external libraries
either load them with the script tag as normal or check if the
class/function etc exists in your own code

Name Type Description
l Object
Name Type Description
src String path to file
type String file type
integrity String
crossorigin String
key String object key to reference the script in the $w.assets object

set_error -> {Void}

sets an error message in a local array

Name Type Description
e String the error message

has_error -> {Boolean}

if the local variable error has errors they will be dumped to the console if logs are on

setO_val -> {Void}

sets the local object O[k] with value v

Name Type Description
k String object key
v Mixed value