Physics.P2.Spring#Spring

new Spring(world, bodyA, bodyB, restLength, stiffness, damping, worldA, worldB, localA, localB) Creates a linear spring, connecting two bodies. A spring can have a resting length, a stiffness and damping. Parameters Name Type Argument Default Description world Phaser.Physics.P2 A reference to the P2 World. bodyA p2.Body First connected body. bodyB p2.Body Second connected body. restLength number <optional> 1 Rest length of the spring. A number > 0. stiffness

Physics.P2.Spring#game

game : Phaser.Game Local reference to game. Source code: physics/p2/Spring.js (Line 28)

Physics.P2.Spring#data

data :p2.LinearSpring The actual p2 spring object. Source code: physics/p2/Spring.js (Line 70)

Physics.P2.RotationalSpring#world

world : Phaser.Physics.P2 Local reference to P2 World. Source code: physics/p2/RotationalSpring.js (Line 29)

Physics.P2.RotationalSpring#RotationalSpring

new RotationalSpring(world, bodyA, bodyB, restAngle, stiffness, damping) Creates a rotational spring, connecting two bodies. A spring can have a resting length, a stiffness and damping. Parameters Name Type Argument Default Description world Phaser.Physics.P2 A reference to the P2 World. bodyA p2.Body First connected body. bodyB p2.Body Second connected body. restAngle number <optional> The relative angle of bodies at which the spring is at rest. If not given, it

Physics.P2.RotationalSpring#game

game : Phaser.Game Local reference to game. Source code: physics/p2/RotationalSpring.js (Line 24)

Physics.P2.RotationalSpring#data

data :p2.RotationalSpring The actual p2 spring object. Source code: physics/p2/RotationalSpring.js (Line 49)

Physics.P2.RevoluteConstraint#world

world : Phaser.Physics.P2 Local reference to P2 World. Source code: physics/p2/RevoluteConstraint.js (Line 34)

Physics.P2.RevoluteConstraint#RevoluteConstraint

new RevoluteConstraint(world, bodyA, pivotA, bodyB, pivotB, maxForce, worldPivot) Connects two bodies at given offset points, letting them rotate relative to each other around this point.The pivot points are given in world (pixel) coordinates. Parameters Name Type Argument Default Description world Phaser.Physics.P2 A reference to the P2 World. bodyA p2.Body First connected body. pivotA Float32Array The point relative to the center of mass of bodyA which bodyA is constraine

Physics.P2.RevoluteConstraint#game

game : Phaser.Game Local reference to game. Source code: physics/p2/RevoluteConstraint.js (Line 29)