Integrating p2.js.

This commit is contained in:
photonstorm
2014-02-10 16:01:30 +00:00
parent 6f835d7696
commit 47e23096bd
12 changed files with 11071 additions and 18 deletions
+22
View File
@@ -1280,6 +1280,28 @@ Phaser.Math = {
},
/**
* Convert p2 physics value to pixel scale.
*
* @method Phaser.Math#p2px
* @param {number} v - The value to convert.
* @return {number} The scaled value.
*/
p2px: function (v) {
return v *= -20;
},
/**
* Convert pixel value to p2 physics scale.
*
* @method Phaser.Math#px2p
* @param {number} v - The value to convert.
* @return {number} The scaled value.
*/
px2p: function (v) {
return v * -0.05;
},
/**
* Convert degrees to radians.
*