@@ -12,6 +12,7 @@ import { Component } from '../component.js';
12
12
* @augments Component
13
13
* @classdesc The JointComponent adds a physics joint constraint linking two rigid bodies.
14
14
* @param {JointComponentSystem } system - The ComponentSystem that created this Component.
15
+ * @param {Entity } entity - The Entity that this Component is attached to.
15
16
*/
16
17
class JointComponent extends Component {
17
18
constructor ( system , entity ) {
@@ -262,11 +263,11 @@ class JointComponent extends Component {
262
263
const axis = [ 'X' , 'Y' , 'Z' , 'X' , 'Y' , 'Z' ] ;
263
264
264
265
for ( let i = 0 ; i < 6 ; i ++ ) {
265
- const type = i < 3 ? 'linear ' : 'angular ' ;
266
- this . _constraint . enableSpring ( i , this [ '_' + type + 'Spring' + axis [ i ] ] ) ;
267
- this . _constraint . setDamping ( i , this [ '_' + type + 'Damping' + axis [ i ] ] ) ;
268
- this . _constraint . setEquilibriumPoint ( i , this [ '_' + type + 'Equilibrium' + axis [ i ] ] ) ;
269
- this . _constraint . setStiffness ( i , this [ '_' + type + 'Stiffness' + axis [ i ] ] ) ;
266
+ const type = i < 3 ? '_linear ' : '_angular ' ;
267
+ this . _constraint . enableSpring ( i , this [ type + 'Spring' + axis [ i ] ] ) ;
268
+ this . _constraint . setDamping ( i , this [ type + 'Damping' + axis [ i ] ] ) ;
269
+ this . _constraint . setEquilibriumPoint ( i , this [ type + 'Equilibrium' + axis [ i ] ] ) ;
270
+ this . _constraint . setStiffness ( i , this [ type + 'Stiffness' + axis [ i ] ] ) ;
270
271
}
271
272
272
273
this . _constraint . setBreakingImpulseThreshold ( this . _breakForce ) ;
0 commit comments