@@ -766,28 +766,31 @@ var World = new Class({
766766
767767 graphics . closePath ( ) ;
768768
769- if ( this . defaults . debugShowJoint )
769+ if ( this . defaults . debugShowJoint )
770770 {
771771 graphics . lineStyle ( 2 , this . defaults . jointDebugColor ) ;
772772
773773 // Render constraints
774774 var constraints = Composite . allConstraints ( this . localWorld ) ;
775+
775776 for ( i = 0 ; i < constraints . length ; i ++ )
776777 {
777778 var constraint = constraints [ i ] ;
778779
779780 if ( ! constraint . render . visible || ! constraint . pointA || ! constraint . pointB )
780- { continue ; }
781+ {
782+ continue ;
783+ }
781784
782785 if ( constraint . render . lineWidth )
783786 {
784787 graphics . lineStyle ( constraint . render . lineWidth , Common . colorToNumber ( constraint . render . strokeStyle ) ) ;
785788 }
786789
787- var bodyA = constraint . bodyA ,
788- bodyB = constraint . bodyB ,
789- start ,
790- end ;
790+ var bodyA = constraint . bodyA ;
791+ var bodyB = constraint . bodyB ;
792+ var start ;
793+ var end ;
791794
792795 if ( bodyA )
793796 {
@@ -820,14 +823,14 @@ var World = new Class({
820823
821824 if ( constraint . render . type === 'spring' )
822825 {
823- var delta = Vector . sub ( end , start ) ,
824- normal = Vector . perp ( Vector . normalise ( delta ) ) ,
825- coils = Math . ceil ( Common . clamp ( constraint . length / 5 , 12 , 20 ) ) ,
826- offset ;
826+ var delta = Vector . sub ( end , start ) ;
827+ var normal = Vector . perp ( Vector . normalise ( delta ) ) ;
828+ var coils = Math . ceil ( Common . clamp ( constraint . length / 5 , 12 , 20 ) ) ;
829+ var offset ;
827830
828831 for ( j = 1 ; j < coils ; j += 1 )
829832 {
830- offset = j % 2 === 0 ? 1 : - 1 ;
833+ offset = ( j % 2 === 0 ) ? 1 : - 1 ;
831834
832835 graphics . lineTo (
833836 start . x + delta . x * ( j / coils ) + normal . x * offset * 4 ,
0 commit comments