mirror of
https://github.com/wassname/phaser.git
synced 2026-07-08 00:10:32 +08:00
Do not invert (physics) shape size data for circle, rectangle, capsuel & line #445
This commit is contained in:
+31
-1
@@ -1299,7 +1299,9 @@ Phaser.Math = {
|
||||
* @return {number} The scaled value.
|
||||
*/
|
||||
p2px: function (v) {
|
||||
return v *= -20;
|
||||
|
||||
return v *= 20;
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -1310,7 +1312,35 @@ Phaser.Math = {
|
||||
* @return {number} The scaled value.
|
||||
*/
|
||||
px2p: function (v) {
|
||||
|
||||
return v * 0.05;
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Convert p2 physics value (meters) to pixel scale and inverses it.
|
||||
*
|
||||
* @method Phaser.Math#p2pxi
|
||||
* @param {number} v - The value to convert.
|
||||
* @return {number} The scaled value.
|
||||
*/
|
||||
p2pxi: function (v) {
|
||||
|
||||
return v *= -20;
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Convert pixel value to p2 physics scale (meters) and inverses it.
|
||||
*
|
||||
* @method Phaser.Math#px2pi
|
||||
* @param {number} v - The value to convert.
|
||||
* @return {number} The scaled value.
|
||||
*/
|
||||
px2pi: function (v) {
|
||||
|
||||
return v * -0.05;
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user