Skip to content

Commit

Permalink
added docs
Browse files Browse the repository at this point in the history
  • Loading branch information
liabru committed May 20, 2015
1 parent 95eddb0 commit 200fcbe
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 2 deletions.
32 changes: 32 additions & 0 deletions src/body/Body.js
Original file line number Diff line number Diff line change
Expand Up @@ -633,6 +633,27 @@ var Body = {};
* @default "Body"
*/

/**
* An array of bodies that make up this body.
* The first body in the array must always be a self reference to the current body instance.
* All bodies in the `parts` array together form a single rigid compound body.
* Parts are allowed to overlap, have gaps or holes or even form concave bodies.
* Parts themselves should never be added to a `World`, only the parent body should be.
* Use `Body.setParts` when setting parts to ensure correct updates of all properties.
*
* @property parts
* @type body[]
*/

/**
* A self reference if the body is _not_ a part of another body.
* Otherwise this is a reference to the body that this is a part of.
* See `body.parts`.
*
* @property parent
* @type body
*/

/**
* A `Number` specifying the angle of the body, in radians.
*
Expand Down Expand Up @@ -828,6 +849,17 @@ var Body = {};
* @default 0.1
*/

/**
* A `Number` that defines the static friction of the body (in the Coulomb friction model).
* A value of `0` means the body will never 'stick' when it is nearly stationary and only dynamic `friction` is used.
* The higher the value (e.g. `10`), the more force it will take to initially get the body moving when nearly stationary.
* This value is multiplied with the `friction` property to make it easier to change `friction` and maintain an appropriate amount of static friction.
*
* @property frictionStatic
* @type number
* @default 0.5
*/

/**
* A `Number` that defines the air friction of the body (air resistance).
* A value of `0` means the body will never slow as it moves through space.
Expand Down
2 changes: 1 addition & 1 deletion src/collision/Query.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ var Query = {};

/**
* Returns all bodies whose vertices contain the given point, from the given set of bodies.
* @method ray
* @method point
* @param {body[]} bodies
* @param {vector} point
* @return {body[]} The bodies matching the query
Expand Down
2 changes: 1 addition & 1 deletion src/geometry/Svg.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ var Svg = {};
* @method pathToVertices
* @param {SVGPathElement} path
* @param {Number} [sampleLength=15]
* @return {Vector} points
* @return {Vector[]} points
*/
Svg.pathToVertices = function(path, sampleLength) {
// https://github.com/wout/svg.topoly.js/blob/master/svg.topoly.js
Expand Down

0 comments on commit 200fcbe

Please sign in to comment.