HTML and CSS Reference
In-Depth Information
Let's create the last file, game.js, which will have several generic methods to speed up pro-
gramming. These methods will slim down your run.js file and make it easier to maintain.
Populate the game.js file in the engine directory with the following listing.
Listing 9.8. game.js—Entity helper methods [ 1 ] , [ 2 ]
1 John Resig blog, “Partial Application in JavaScript,” last updated February 2008, http://mng.bz/6SU0 .
2 “Animating objects with WebGL,” Mozilla Developer Network, last updated Aug 7, 2012, http://mng.bz/O5Z2 .
 
 
Search WWH ::




Custom Search