From 4eff8b74bb0a306bf531b989c9e60daf525979d9 Mon Sep 17 00:00:00 2001 From: "Mr.doob" Date: Wed, 12 Mar 2014 20:15:51 -0400 Subject: [PATCH] Updated CircleGeometry and PlaneGeometry. --- src/extras/geometries/CircleGeometry.js | 9 ++------- src/extras/geometries/PlaneGeometry.js | 9 ++------- 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/src/extras/geometries/CircleGeometry.js b/src/extras/geometries/CircleGeometry.js index 1c509626da..b3e211f5ce 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 85480c043a..fdd767d315 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 ); -- GitLab