Reference Source Test
public class | source

WTF

Launch the WTF client application and start the game

Test:

Constructor Summary

Public Constructor
public

Keep track of the instance of the app, document body, chat input and the game

Member Summary

Public Members
public

app: App

Instance of the client application

public

Instance of the DOM $('body') element

public

Instance of the DOM $('#chatInput') DOM element

public

Instance of the game class running on the HTML5 Canvas

Method Summary

Public Methods
public

Add classes to the body element after detecting the user's browser or device

public

Adds event listeners for a resize check

public

Document in jQuery is ready to go

public

Initialize the game once the client application is ready

public

load()

Initialize the application and the game as soon as the DOM is ready

Public Constructors

public constructor() source

Keep track of the instance of the app, document body, chat input and the game

Test:

Public Members

public app: App source

Instance of the client application

public body: Object source

Instance of the DOM $('body') element

public chatInput: Object source

Instance of the DOM $('#chatInput') DOM element

public game: Game source

Instance of the game class running on the HTML5 Canvas

Public Methods

public addClasses() source

Add classes to the body element after detecting the user's browser or device

Test:

public addResizeListeners() source

Adds event listeners for a resize check

Listen:

touchstart

touching start

touchmove

touching move/drag

transitionend

transition ends

webkitTransitionEnd

webkit transition ends

oTransitionEnd

opera transition ends

orientationchange

device orientation change

Test:

public documentReady() source

Document in jQuery is ready to go

Test:

public initGame() source

Initialize the game once the client application is ready

Listen:

onReady

when App is done loading

Test:

public load() source

Initialize the application and the game as soon as the DOM is ready

Test: