File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -300,6 +300,32 @@ var Common = require('../core/Common');
300300 }
301301 } ;
302302
303+ /**
304+ * Returns the world-space position of `constraint.pointA`, accounting for `constraint.bodyA`.
305+ * @method pointAWorld
306+ * @param {constraint } constraint
307+ * @returns {vector } the world-space position
308+ */
309+ Constraint . pointAWorld = function ( constraint ) {
310+ return {
311+ x : ( constraint . bodyA ? constraint . bodyA . position . x : 0 ) + constraint . pointA . x ,
312+ y : ( constraint . bodyA ? constraint . bodyA . position . y : 0 ) + constraint . pointA . y
313+ } ;
314+ } ;
315+
316+ /**
317+ * Returns the world-space position of `constraint.pointB`, accounting for `constraint.bodyB`.
318+ * @method pointBWorld
319+ * @param {constraint } constraint
320+ * @returns {vector } the world-space position
321+ */
322+ Constraint . pointBWorld = function ( constraint ) {
323+ return {
324+ x : ( constraint . bodyB ? constraint . bodyB . position . x : 0 ) + constraint . pointB . x ,
325+ y : ( constraint . bodyB ? constraint . bodyB . position . y : 0 ) + constraint . pointB . y
326+ } ;
327+ } ;
328+
303329 /*
304330 *
305331 * Properties Documentation
You can’t perform that action at this time.
0 commit comments