gma¶
The gma namespace holds everything
Properties¶
logger
Object for logging stuff toWe use this so that we don’t get errors when there is no console
Default
console
unitCubeInfo
Info used to create Unit cube template
Type
Object
Package
gma/utils/render
unitCube
An instantiated meshTemplate using unitCubeInfo
Type
Package
gma/utils/render
Methods¶
- insertScript (string)
Inserts a javascript script tag into the document with the specified text
Parameters
string
String
text to put inside the new script tag
- test (location, jingoName)
Inserts a javascript tag containing a preprocessed test
Parameters
location
String
Location of the test to run
jingoName
String
Name to use in the jingo.declare block that is created around the test
- instructions (hud, msg, key, display)
Convenience function for examples to show some instruction text and be able to toggle it
Parameters
hud
Hud to display message with
msg
String
The message to display
key
Number
Key to use to toggle message
display
Boolean
Specify whether to display straight away
- makeImage (manager, width, height) -> Base64-PNG
Creates a png image of the canvas
Package gma/utils/image
Parameters
manager
width
Number
Width of the png
height
Number
Height of the png
- checkImage (png, checkAgainst) -> Result from the server
Asks the server to check an image against one it already has
Package gma/utils/image
Parameters
png
Base64-PNG
Png to check
checkAgainst
string
Location of image to check