Phaser.Physics.P2.RotationalSpring = function (world, bodyA, bodyB, restAngle, stiffness, damping){ this.game = world.game; this.world = world; if (restAngle === undefined) { restAngle = null ; } if (stiffness === undefined) { stiffness = 100; } if (damping === undefined) { damping = 1; } if (restAngle) { restAngle = world.pxm(restAngle); } var options = { restAngle: restAngle, stiffness: stiffness, damping: damping} ; this.data = new p2.RotationalSpring(bodyA, bodyB, options); this.data.parent = this; } ; Phaser.Physics.P2.Spring.prototype.constructor = Phaser.Physics.P2.Spring;