Skip to content

Commit

Permalink
SpotLightHelper clean up.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrdoob committed Apr 17, 2016
1 parent aa0f1fd commit 6988d98
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions src/extras/helpers/SpotLightHelper.js
Expand Up @@ -16,25 +16,23 @@ THREE.SpotLightHelper = function ( light ) {

var geometry = new THREE.BufferGeometry();

var positions = [];

positions.push(
var positions = [
0, 0, 0, 0, 0, 1,
0, 0, 0, 1, 0, 1,
0, 0, 0, - 1, 0, 1,
0, 0, 0, 0, 1, 1,
0, 0, 0, 0, - 1, 1
);

var length = 32;
];

for ( var i = 0; i < length; i ++ ) {
for ( var i = 0, j = 1, l = 32; i < l; i ++, j ++ ) {

var p1 = ( i / length ) * Math.PI * 2;
var p2 = ( ( i + 1 ) / length ) * Math.PI * 2;
var p1 = ( i / l ) * Math.PI * 2;
var p2 = ( j / l ) * Math.PI * 2;

positions.push( Math.cos( p1 ), Math.sin( p1 ), 1 );
positions.push( Math.cos( p2 ), Math.sin( p2 ), 1 );
positions.push(
Math.cos( p1 ), Math.sin( p1 ), 1,
Math.cos( p2 ), Math.sin( p2 ), 1
);

}

Expand Down

0 comments on commit 6988d98

Please sign in to comment.