File tree 1 file changed +9
-11
lines changed
1 file changed +9
-11
lines changed Original file line number Diff line number Diff line change @@ -16,25 +16,23 @@ THREE.SpotLightHelper = function ( light ) {
16
16
17
17
var geometry = new THREE . BufferGeometry ( ) ;
18
18
19
- var positions = [ ] ;
20
-
21
- positions . push (
19
+ var positions = [
22
20
0 , 0 , 0 , 0 , 0 , 1 ,
23
21
0 , 0 , 0 , 1 , 0 , 1 ,
24
22
0 , 0 , 0 , - 1 , 0 , 1 ,
25
23
0 , 0 , 0 , 0 , 1 , 1 ,
26
24
0 , 0 , 0 , 0 , - 1 , 1
27
- ) ;
28
-
29
- var length = 32 ;
25
+ ] ;
30
26
31
- for ( var i = 0 ; i < length ; i ++ ) {
27
+ for ( var i = 0 , j = 1 , l = 32 ; i < l ; i ++ , j ++ ) {
32
28
33
- var p1 = ( i / length ) * Math . PI * 2 ;
34
- var p2 = ( ( i + 1 ) / length ) * Math . PI * 2 ;
29
+ var p1 = ( i / l ) * Math . PI * 2 ;
30
+ var p2 = ( j / l ) * Math . PI * 2 ;
35
31
36
- positions . push ( Math . cos ( p1 ) , Math . sin ( p1 ) , 1 ) ;
37
- positions . push ( Math . cos ( p2 ) , Math . sin ( p2 ) , 1 ) ;
32
+ positions . push (
33
+ Math . cos ( p1 ) , Math . sin ( p1 ) , 1 ,
34
+ Math . cos ( p2 ) , Math . sin ( p2 ) , 1
35
+ ) ;
38
36
39
37
}
40
38
You can’t perform that action at this time.
0 commit comments