Skip to content

Commit

Permalink
tweaks/docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ippa committed Jan 19, 2013
1 parent 1388291 commit 750327f
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 4 deletions.
2 changes: 1 addition & 1 deletion jaws-min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 11 additions & 3 deletions jaws.js
Original file line number Diff line number Diff line change
Expand Up @@ -612,6 +612,12 @@ var jaws = (function(jaws) {
/**
* @class Loads and processes assets as images, sound, video, json
* Used internally by JawsJS to create <b>jaws.assets</b>
*
* @property {bool} bust_cache Add random arguments to assets-url to bypass any cache
* @property {bool} fuchia_to_transparent Convert the color fuchia to transparent when loading .bmp-files
* @proparty {bool} image_to_canvas Convert all image assets to canvas internally
* @proparty {string} root Rootdir from where all assets are loaded
*
*/
jaws.Assets = function Assets() {
if( !(this instanceof arguments.callee) ) return new arguments.callee();
Expand Down Expand Up @@ -687,7 +693,7 @@ jaws.Assets = function Assets() {
*
* jaws.assets.add("player.png")
* jaws.assets.add(["media/bullet1.png", "media/bullet2.png"])
* jaws.loadAll({onfinish: start_game})
* jaws.assets.loadAll({onfinish: start_game})
*
*/
this.add = function(src) {
Expand Down Expand Up @@ -871,7 +877,9 @@ window.requestAnimFrame = (function(){
/**
* @class A classic game loop forever looping calls to update() / draw() with given framerate. "Field Summary" contains options for the GameLoop()-constructor.
*
* @property {int} FPS targeted frame rate
* @property {int} tick_duration duration in ms between the last 2 ticks (often called dt)
* @property {int} fps the real fps (as opposed to the target fps), smoothed out with a moving average
* @property {int} ticks total amount of ticks since game loops start
*
* @example
*
Expand All @@ -891,9 +899,9 @@ window.requestAnimFrame = (function(){
jaws.GameLoop = function GameLoop(game_object, options,game_state_setup_options) {
if( !(this instanceof arguments.callee) ) return new arguments.callee( game_object, options );

this.ticks = 0
this.tick_duration = 0
this.fps = 0
this.ticks = 0

var update_id
var paused = false
Expand Down
6 changes: 6 additions & 0 deletions src/assets.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ var jaws = (function(jaws) {
/**
* @class Loads and processes assets as images, sound, video, json
* Used internally by JawsJS to create <b>jaws.assets</b>
*
* @property {bool} bust_cache Add random arguments to assets-url to bypass any cache
* @property {bool} fuchia_to_transparent Convert the color fuchia to transparent when loading .bmp-files
* @proparty {bool} image_to_canvas Convert all image assets to canvas internally
* @proparty {string} root Rootdir from where all assets are loaded
*
*/
jaws.Assets = function Assets() {
if( !(this instanceof arguments.callee) ) return new arguments.callee();
Expand Down

0 comments on commit 750327f

Please sign in to comment.