From 5054c9717c9566f22d49ae5c6470c1918a4e904c Mon Sep 17 00:00:00 2001 From: Mikko Rantanen Date: Sat, 2 Apr 2016 13:49:43 +0300 Subject: [PATCH] Document World bounds and Grid bucket size. Added jsdoc comments for the following properties: - `world.bounds` - `grid.bucketWidth` - `grid.bucketHeight` --- src/body/World.js | 8 ++++++++ src/collision/Grid.js | 16 ++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/src/body/World.js b/src/body/World.js index c1c9dbd..0cd3171 100644 --- a/src/body/World.js +++ b/src/body/World.js @@ -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: diff --git a/src/collision/Grid.js b/src/collision/Grid.js index 300649b..b9d9b79 100644 --- a/src/collision/Grid.js +++ b/src/collision/Grid.js @@ -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