mirror of
https://github.com/photonstorm/phaser
synced 2024-12-01 00:49:41 +00:00
1 line
No EOL
2.3 KiB
JSON
Executable file
1 line
No EOL
2.3 KiB
JSON
Executable file
{"class":{"name":"Phaser.Physics.P2.Spring","extends":"","static":false,"constructor":true,"parameters":[{"name":"world","type":["Phaser.Physics.P2"],"help":"A reference to the P2 World.","optional":false,"default":null},{"name":"bodyA","type":["p2.Body"],"help":"First connected body.","optional":false,"default":null},{"name":"bodyB","type":["p2.Body"],"help":"Second connected body.","optional":false,"default":null},{"name":"restLength","type":["number"],"help":"Rest length of the spring. A number > 0.","optional":true,"default":"1"},{"name":"stiffness","type":["number"],"help":"Stiffness of the spring. A number >= 0.","optional":true,"default":"100"},{"name":"damping","type":["number"],"help":"Damping of the spring. A number >= 0.","optional":true,"default":"1"},{"name":"worldA","type":["array"],"help":"Where to hook the spring to body A in world coordinates. This value is an array with 2 elements matching x and y, i.e: [32, 32].","optional":true,"default":null},{"name":"worldB","type":["array"],"help":"Where to hook the spring to body B in world coordinates. This value is an array with 2 elements matching x and y, i.e: [32, 32].","optional":true,"default":null},{"name":"localA","type":["array"],"help":"Where to hook the spring to body A in local body coordinates. This value is an array with 2 elements matching x and y, i.e: [32, 32].","optional":true,"default":null},{"name":"localB","type":["array"],"help":"Where to hook the spring to body B in local body coordinates. This value is an array with 2 elements matching x and y, i.e: [32, 32].","optional":true,"default":null}],"help":"Creates a linear spring, connecting two bodies. A spring can have a resting length, a stiffness and damping."},"consts":[],"methods":{"public":[],"protected":[],"private":[],"static":[]},"properties":{"public":[{"name":"data","type":["p2.LinearSpring"],"help":"","inlineHelp":"The actual p2 spring object.","line":70,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"game","type":["Phaser.Game"],"help":"","inlineHelp":"Local reference to game.","line":28,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"world","type":["Phaser.Physics.P2"],"help":"","inlineHelp":"Local reference to P2 World.","line":33,"default":null,"public":true,"protected":false,"private":false,"readOnly":false}],"protected":[],"private":[]}} |