diff --git a/src/body/Body.js b/src/body/Body.js index 576c899..b0217a2 100644 --- a/src/body/Body.js +++ b/src/body/Body.js @@ -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. * @@ -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. diff --git a/src/collision/Query.js b/src/collision/Query.js index 3b1ab20..15bd0c7 100644 --- a/src/collision/Query.js +++ b/src/collision/Query.js @@ -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 diff --git a/src/geometry/Svg.js b/src/geometry/Svg.js index e4fccc9..49c2b63 100644 --- a/src/geometry/Svg.js +++ b/src/geometry/Svg.js @@ -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