|
@@ -1,10 +1,9 @@
|
|
import { LineSegments } from '../../objects/LineSegments';
|
|
import { LineSegments } from '../../objects/LineSegments';
|
|
import { VertexColors } from '../../constants';
|
|
import { VertexColors } from '../../constants';
|
|
import { LineBasicMaterial } from '../../materials/LineBasicMaterial';
|
|
import { LineBasicMaterial } from '../../materials/LineBasicMaterial';
|
|
-import { Float32Attribute } from '../../core/BufferAttribute';
|
|
|
|
|
|
+import { Float32BufferAttribute } from '../../core/BufferAttribute';
|
|
import { BufferGeometry } from '../../core/BufferGeometry';
|
|
import { BufferGeometry } from '../../core/BufferGeometry';
|
|
import { Color } from '../../math/Color';
|
|
import { Color } from '../../math/Color';
|
|
-import { _Math as Math } from '../../math/Math';
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
* @author mrdoob / http://mrdoob.com/
|
|
* @author mrdoob / http://mrdoob.com/
|
|
@@ -18,8 +17,8 @@ function PolarGridHelper( radius, radials, circles, divisions, color1, color2 )
|
|
radials = radials || 16;
|
|
radials = radials || 16;
|
|
circles = circles || 8;
|
|
circles = circles || 8;
|
|
divisions = divisions || 50;
|
|
divisions = divisions || 50;
|
|
- color1 = new THREE.Color( color1 !== undefined ? color1 : 0x444444 );
|
|
|
|
- color2 = new THREE.Color( color2 !== undefined ? color2 : 0x888888 );
|
|
|
|
|
|
+ color1 = new Color( color1 !== undefined ? color1 : 0x444444 );
|
|
|
|
+ color2 = new Color( color2 !== undefined ? color2 : 0x888888 );
|
|
|
|
|
|
var vertices = [];
|
|
var vertices = [];
|
|
var colors = [];
|
|
var colors = [];
|
|
@@ -80,15 +79,15 @@ function PolarGridHelper( radius, radials, circles, divisions, color1, color2 )
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
- var geometry = new THREE.BufferGeometry();
|
|
|
|
- geometry.addAttribute( 'position', new THREE.Float32Attribute( vertices, 3 ) );
|
|
|
|
- geometry.addAttribute( 'color', new THREE.Float32Attribute( colors, 3 ) );
|
|
|
|
|
|
+ var geometry = new BufferGeometry();
|
|
|
|
+ geometry.addAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) );
|
|
|
|
+ geometry.addAttribute( 'color', new Float32BufferAttribute( colors, 3 ) );
|
|
|
|
|
|
- var material = new THREE.LineBasicMaterial( { vertexColors: THREE.VertexColors } );
|
|
|
|
|
|
+ var material = new LineBasicMaterial( { vertexColors: VertexColors } );
|
|
|
|
|
|
- THREE.LineSegments.call( this, geometry, material );
|
|
|
|
|
|
+ LineSegments.call( this, geometry, material );
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
-PolarGridHelper.prototype = Object.create( THREE.LineSegments.prototype );
|
|
|
|
|
|
+PolarGridHelper.prototype = Object.create( LineSegments.prototype );
|
|
PolarGridHelper.prototype.constructor = PolarGridHelper;
|
|
PolarGridHelper.prototype.constructor = PolarGridHelper;
|