Skip to content

Commit 79fa57e

Browse files
committed
Merge pull request #232 from Rantanen/docs
Document World bounds and Grid bucket size.
2 parents b6f6a03 + 5054c97 commit 79fa57e

2 files changed

Lines changed: 24 additions & 0 deletions

File tree

src/body/World.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,14 @@ var Common = require('../core/Common');
8585
* @default 0.001
8686
*/
8787

88+
/**
89+
* A `Bounds` object that defines the world bounds for collision detection.
90+
*
91+
* @property bounds
92+
* @type bounds
93+
* @default { min: { x: -Infinity, y: -Infinity }, max: { x: Infinity, y: Infinity } }
94+
*/
95+
8896
// World is a Composite body
8997
// see src/module/Outro.js for these aliases:
9098

src/collision/Grid.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,22 @@ var Common = require('../core/Common');
3434
return Common.extend(defaults, options);
3535
};
3636

37+
/**
38+
* The width of a single grid bucket.
39+
*
40+
* @property bucketWidth
41+
* @type number
42+
* @default 48
43+
*/
44+
45+
/**
46+
* The height of a single grid bucket.
47+
*
48+
* @property bucketHeight
49+
* @type number
50+
* @default 48
51+
*/
52+
3753
/**
3854
* Updates the grid.
3955
* @method update

0 commit comments

Comments
 (0)