提交 4eff8b74 编写于 作者: M Mr.doob

Updated CircleGeometry and PlaneGeometry.

上级 590bc8fd
...@@ -5,8 +5,6 @@ ...@@ -5,8 +5,6 @@
THREE.CircleGeometry = function ( radius, segments, thetaStart, thetaLength ) { THREE.CircleGeometry = function ( radius, segments, thetaStart, thetaLength ) {
THREE.BufferGeometry.call( this );
this.parameters = { this.parameters = {
radius: radius, radius: radius,
segments: segments, segments: segments,
...@@ -58,13 +56,10 @@ THREE.CircleGeometry = function ( radius, segments, thetaStart, thetaLength ) { ...@@ -58,13 +56,10 @@ THREE.CircleGeometry = function ( radius, segments, thetaStart, thetaLength ) {
} }
this.attributes[ 'index' ] = { array: indices, itemSize: 1 }; THREE.IndexedGeometry2.call( this, indices, vertices, normals, uvs );
this.attributes[ 'position' ] = { array: vertices, itemSize: 3 };
this.attributes[ 'normal' ] = { array: normals, itemSize: 3 };
this.attributes[ 'uv' ] = { array: uvs, itemSize: 2 };
this.boundingSphere = new THREE.Sphere( new THREE.Vector3(), radius ); 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 );
...@@ -5,8 +5,6 @@ ...@@ -5,8 +5,6 @@
THREE.PlaneGeometry = function ( width, height, widthSegments, heightSegments ) { THREE.PlaneGeometry = function ( width, height, widthSegments, heightSegments ) {
THREE.BufferGeometry.call( this );
this.parameters = { this.parameters = {
width: width, width: width,
height: height, height: height,
...@@ -83,11 +81,8 @@ THREE.PlaneGeometry = function ( width, height, widthSegments, heightSegments ) ...@@ -83,11 +81,8 @@ THREE.PlaneGeometry = function ( width, height, widthSegments, heightSegments )
} }
this.attributes[ 'index' ] = { array: indices, itemSize: 1 }; THREE.IndexedGeometry2.call( this, indices, vertices, normals, uvs );
this.attributes[ 'position' ] = { array: vertices, itemSize: 3 };
this.attributes[ 'normal' ] = { array: normals, itemSize: 3 };
this.attributes[ 'uv' ] = { array: uvs, itemSize: 2 };
}; };
THREE.PlaneGeometry.prototype = Object.create( THREE.BufferGeometry.prototype ); THREE.PlaneGeometry.prototype = Object.create( THREE.IndexedGeometry2.prototype );
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册