b-g / p5-matter-examples

Examples showing how to combine p5.js and matter.js.
109 stars 27 forks source link

Improve docs: document all methods of each class #9

Closed b-g closed 2 years ago

b-g commented 2 years ago

like https://github.com/liabru/matter-js/blob/master/src/body/Body.js#L109

    /**
     * Returns the next unique group index for which bodies will collide.
     * If `isNonColliding` is `true`, returns the next unique group index for which bodies will _not_ collide.
     * See `body.collisionFilter` for more information.
     * @method nextGroup
     * @param {bool} [isNonColliding=false]
     * @return {Number} Unique group index
     */
    /**
     * Creates a new rigid body model with a circle hull. 
     * The options parameter is an object that specifies any properties you wish to override the defaults.
     * See the properties section of the `Matter.Body` module for detailed information on what you can pass via the `options` object.
     * @method circle
     * @param {number} x
     * @param {number} y
     * @param {number} radius
     * @param {object} [options]
     * @param {number} [maxSides]
     * @return {body} A new circle body
     */
b-g commented 2 years ago

Done with https://github.com/b-g/p5-matter-examples/tree/a84e54f2b5cf0f53b566c1801f84fa3cd05a928a.