From ad033f525527ecb9b7a7d5546881b656f510be99 Mon Sep 17 00:00:00 2001 From: liabru Date: Sat, 25 Jun 2016 18:02:06 +0100 Subject: [PATCH] added note in docs about vertices order --- src/body/Body.js | 1 + src/geometry/Vertices.js | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/body/Body.js b/src/body/Body.js index 2190968..36a8c81 100644 --- a/src/body/Body.js +++ b/src/body/Body.js @@ -30,6 +30,7 @@ var Axes = require('../geometry/Axes'); /** * Creates a new rigid body model. The options parameter is an object that specifies any properties you wish to override the defaults. * All properties have default values, and many are pre-calculated automatically based on other properties. + * Vertices must be specified in clockwise order. * See the properties section below for detailed information on what you can pass via the `options` object. * @method create * @param {} options diff --git a/src/geometry/Vertices.js b/src/geometry/Vertices.js index 6ece9ab..e35e50e 100644 --- a/src/geometry/Vertices.js +++ b/src/geometry/Vertices.js @@ -26,6 +26,8 @@ var Common = require('../core/Common'); * The `Vertices.create` method returns a new array of vertices, which are similar to Matter.Vector objects, * but with some additional references required for efficient collision detection routines. * + * Vertices must be specified in clockwise order. + * * Note that the `body` argument is not optional, a `Matter.Body` reference must be provided. * * @method create