You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* @param {Phaser.Physics.P2} world - A reference to the P2 World.
15
+
* @param {p2.Body} bodyA - First connected body.
16
+
* @param {Float32Array} pivotA - The point relative to the center of mass of bodyA which bodyA is constrained to. The value is an array with 2 elements matching x and y, i.e: [32, 32].
17
+
* @param {p2.Body} bodyB - Second connected body.
18
+
* @param {Float32Array} pivotB - The point relative to the center of mass of bodyB which bodyB is constrained to. The value is an array with 2 elements matching x and y, i.e: [32, 32].
19
+
* @param {number} [maxForce=0] - The maximum force that should be applied to constrain the bodies.
Copy file name to clipboardExpand all lines: src/physics/p2/Spring.js
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -16,10 +16,10 @@
16
16
* @param {number} [restLength=1] - Rest length of the spring. A number > 0.
17
17
* @param {number} [stiffness=100] - Stiffness of the spring. A number >= 0.
18
18
* @param {number} [damping=1] - Damping of the spring. A number >= 0.
19
-
* @param {Array} [worldA] - Where to hook the spring to body A in world coordinates. This value is an array by 2 elements, x and y, i.e: [32, 32].
20
-
* @param {Array} [worldB] - Where to hook the spring to body B in world coordinates. This value is an array by 2 elements, x and y, i.e: [32, 32].
21
-
* @param {Array} [localA] - Where to hook the spring to body A in local body coordinates. This value is an array by 2 elements, x and y, i.e: [32, 32].
22
-
* @param {Array} [localB] - Where to hook the spring to body B in local body coordinates. This value is an array by 2 elements, x and y, i.e: [32, 32].
19
+
* @param {Array} [worldA] - 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].
20
+
* @param {Array} [worldB] - 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].
21
+
* @param {Array} [localA] - 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].
22
+
* @param {Array} [localB] - 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].
* @param {Float32Array} pivotA - The point relative to the center of mass of bodyA which bodyA is constrained to. The value is an array with 2 elements matching x and y, i.e: [32, 32].
757
+
* @param {p2.Body} bodyB - Second connected body.
758
+
* @param {Float32Array} pivotB - The point relative to the center of mass of bodyB which bodyB is constrained to. The value is an array with 2 elements matching x and y, i.e: [32, 32].
759
+
* @param {number} [maxForce=0] - The maximum force that should be applied to constrain the bodies.
760
+
* @return {Phaser.Physics.P2.RevoluteConstraint} The constraint
0 commit comments