diff --git a/src/extras/geometries/CircleGeometry.js b/src/extras/geometries/CircleGeometry.js index 1c509626da999798a0bdc2f52b4d165c771d4011..b3e211f5ce685491a7335da3acdbd7acefcdeb91 100644 --- a/src/extras/geometries/CircleGeometry.js +++ b/src/extras/geometries/CircleGeometry.js @@ -5,8 +5,6 @@ THREE.CircleGeometry = function ( radius, segments, thetaStart, thetaLength ) { - THREE.BufferGeometry.call( this ); - this.parameters = { radius: radius, segments: segments, @@ -58,13 +56,10 @@ THREE.CircleGeometry = function ( radius, segments, thetaStart, thetaLength ) { } - this.attributes[ 'index' ] = { array: indices, itemSize: 1 }; - this.attributes[ 'position' ] = { array: vertices, itemSize: 3 }; - this.attributes[ 'normal' ] = { array: normals, itemSize: 3 }; - this.attributes[ 'uv' ] = { array: uvs, itemSize: 2 }; + THREE.IndexedGeometry2.call( this, indices, vertices, normals, uvs ); this.boundingSphere = new THREE.Sphere( new THREE.Vector3(), radius ); }; -THREE.CircleGeometry.prototype = Object.create( THREE.BufferGeometry.prototype ); +THREE.CircleGeometry.prototype = Object.create( THREE.IndexedGeometry2.prototype ); diff --git a/src/extras/geometries/PlaneGeometry.js b/src/extras/geometries/PlaneGeometry.js index 85480c043a27836e531aadfff582f1debc782f76..fdd767d315646dfd13b9995de645efdfd80c0c3d 100644 --- a/src/extras/geometries/PlaneGeometry.js +++ b/src/extras/geometries/PlaneGeometry.js @@ -5,8 +5,6 @@ THREE.PlaneGeometry = function ( width, height, widthSegments, heightSegments ) { - THREE.BufferGeometry.call( this ); - this.parameters = { width: width, height: height, @@ -83,11 +81,8 @@ THREE.PlaneGeometry = function ( width, height, widthSegments, heightSegments ) } - this.attributes[ 'index' ] = { array: indices, itemSize: 1 }; - this.attributes[ 'position' ] = { array: vertices, itemSize: 3 }; - this.attributes[ 'normal' ] = { array: normals, itemSize: 3 }; - this.attributes[ 'uv' ] = { array: uvs, itemSize: 2 }; + THREE.IndexedGeometry2.call( this, indices, vertices, normals, uvs ); }; -THREE.PlaneGeometry.prototype = Object.create( THREE.BufferGeometry.prototype ); +THREE.PlaneGeometry.prototype = Object.create( THREE.IndexedGeometry2.prototype );