Skip to content

Commit

Permalink
Document World bounds and Grid bucket size.
Browse files Browse the repository at this point in the history
Added jsdoc comments for the following properties:

- `world.bounds`
- `grid.bucketWidth`
- `grid.bucketHeight`
  • Loading branch information
Rantanen committed Apr 2, 2016
1 parent a5b535d commit 5054c97
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/body/World.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,14 @@ var Common = require('../core/Common');
* @default 0.001
*/

/**
* A `Bounds` object that defines the world bounds for collision detection.
*
* @property bounds
* @type bounds
* @default { min: { x: -Infinity, y: -Infinity }, max: { x: Infinity, y: Infinity } }
*/

// World is a Composite body
// see src/module/Outro.js for these aliases:

Expand Down
16 changes: 16 additions & 0 deletions src/collision/Grid.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,22 @@ var Common = require('../core/Common');
return Common.extend(defaults, options);
};

/**
* The width of a single grid bucket.
*
* @property bucketWidth
* @type number
* @default 48
*/

/**
* The height of a single grid bucket.
*
* @property bucketHeight
* @type number
* @default 48
*/

/**
* Updates the grid.
* @method update
Expand Down

0 comments on commit 5054c97

Please sign in to comment.