Namespace: rat

rat

Define the core RAT engine object
Source:

Classes

Angle
BasicStorage
FirebaseStorage
InputMap
LocalCookieStore
LocalStore
Matrix
Messenger
NodeGraph
Offscreen
Position
RectList
timer
Vector
Win8AppStorage
Win8SessionStorage

Namespaces

console
graphics
live
math
modules
system
ui
utils

Members

(static) collision2D

Collision module
Source:

(static) cycleUpdate

CycleUpdate module
Source:

(static) timerUpdater

Tracks which timers to automatically update.
Source:

Methods

(static) addEventListener()

Register a new event listener
Source:

(static) addOSEventListener(captureopt)

util to use the proper event handling for IE and other browsers
Parameters:
Name Type Attributes Description
capture boolean <optional>
optional
Source:

(static) addOSKeyEventListener(captureopt)

add key event listener, and standardize some values in event
Parameters:
Name Type Attributes Description
capture boolean <optional>
optional
Source:

(static) detectPlatform()

detect platform and capabilities this accesses variables to determine if they exist, but this throws warnings in JSLint.
Source:

(static) getGlobalApp()

Get the global app Rat uses this method to get the global app objects (if it exists) in some rare cases. Internally, rat uses this to pass the app object to code module load functions, in case it's needed, but I suspect nobody uses this.
Source:

(static) init(canvasIDopt)

Parameters:
Name Type Attributes Description
canvasID string <optional>
optional
Source:

(static) removeEventListener()

UnRegister an event listener
Source:

(static) removeOSEventListener(captureopt)

util to remove the proper event handling for IE and other browsers
Parameters:
Name Type Attributes Description
capture boolean <optional>
optional If an event listener retains any data (such as inside a closure), use this function to remove that data reference. Called with the same parameters as rat.addOSEventListener that added it.
Source:

(static) setInterval(func, delay, param2) → {rat.timer}

Sets a function to be called repeatedly with a fixed time between calls.
Parameters:
Name Type Description
func function the function to call. The first argument is the timer that went off. The second is param2 provided here.
delay number fixed time between calls.
param2 ? the second parameter of the function to call.
Source:
Returns:
timer to handle the calls.
Type
rat.timer

(static) setTimeout(func, delay, param2) → {rat.timer}

Sets a function to be called after the delay.
Parameters:
Name Type Description
func function the function to call. The first argument is the timer that went off. The second is param2 provided here.
delay number when, from now, will the function be called.
param2 ? the second parameter of the function to call.
Source:
Returns:
timer to handle the delayed call.
Type
rat.timer

(static) simpleLoad(doneFunc)

Sync loading utility wrapper
Parameters:
Name Type Description
doneFunc ?
Source: