diff --git a/src/extras/helpers/PolarGridHelper.js b/src/extras/helpers/PolarGridHelper.js index 6b3abce781275ad7b8de18bad9e7464ea173700b..efb883db0c15bfbd0e2a175b088b97c6683f016b 100644 --- a/src/extras/helpers/PolarGridHelper.js +++ b/src/extras/helpers/PolarGridHelper.js @@ -1,10 +1,9 @@ import { LineSegments } from '../../objects/LineSegments'; import { VertexColors } from '../../constants'; import { LineBasicMaterial } from '../../materials/LineBasicMaterial'; -import { Float32Attribute } from '../../core/BufferAttribute'; +import { Float32BufferAttribute } from '../../core/BufferAttribute'; import { BufferGeometry } from '../../core/BufferGeometry'; import { Color } from '../../math/Color'; -import { _Math as Math } from '../../math/Math'; /** * @author mrdoob / http://mrdoob.com/ @@ -18,8 +17,8 @@ function PolarGridHelper( radius, radials, circles, divisions, color1, color2 ) radials = radials || 16; circles = circles || 8; 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 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; \ No newline at end of file