Browse Source

ConeGeometry: Clean up (#9917)

* ConeGeometry: Clean up

* ConeBufferGeometry: Added missing parameter

* ConeBufferGeometry: Fixed comment
Michael Herzog 8 years ago
parent
commit
fa281c33dd

+ 1 - 1
docs/api/geometries/ConeBufferGeometry.html

@@ -8,7 +8,7 @@
 		<link type="text/css" rel="stylesheet" href="page.css" />
 	</head>
 	<body>
-		[page:BufferGeometry] &rarr;
+		[page:CylinderBufferGeometry] &rarr;
 
 		<h1>[name]</h1>
 

+ 1 - 1
docs/api/geometries/ConeGeometry.html

@@ -8,7 +8,7 @@
 		<link type="text/css" rel="stylesheet" href="page.css" />
 	</head>
 	<body>
-		[page:Geometry] &rarr;
+		[page:CylinderGeometry] &rarr;
 
 		<h1>[name]</h1>
 

+ 5 - 11
src/geometries/ConeBufferGeometry.js

@@ -1,19 +1,12 @@
-import { BufferGeometry } from '../core/BufferGeometry';
 import { CylinderBufferGeometry } from './CylinderBufferGeometry';
 
-/*
+/**
  * @author: abelnation / http://github.com/abelnation
  */
 
-function ConeBufferGeometry(
-	radius, height,
-	radialSegments, heightSegments,
-	openEnded, thetaStart, thetaLength ) {
+function ConeBufferGeometry( radius, height, radialSegments, heightSegments, openEnded, thetaStart, thetaLength ) {
 
-	CylinderBufferGeometry.call( this,
-		0, radius, height,
-		radialSegments, heightSegments,
-		openEnded, thetaStart, thetaLength );
+	CylinderBufferGeometry.call( this, 0, radius, height, radialSegments, heightSegments, openEnded, thetaStart, thetaLength );
 
 	this.type = 'ConeBufferGeometry';
 
@@ -22,13 +15,14 @@ function ConeBufferGeometry(
 		height: height,
 		radialSegments: radialSegments,
 		heightSegments: heightSegments,
+		openEnded: openEnded,
 		thetaStart: thetaStart,
 		thetaLength: thetaLength
 	};
 
 }
 
-ConeBufferGeometry.prototype = Object.create( BufferGeometry.prototype );
+ConeBufferGeometry.prototype = Object.create( CylinderBufferGeometry.prototype );
 ConeBufferGeometry.prototype.constructor = ConeBufferGeometry;
 
 

+ 3 - 9
src/geometries/ConeGeometry.js

@@ -4,15 +4,9 @@ import { CylinderGeometry } from './CylinderGeometry';
  * @author abelnation / http://github.com/abelnation
  */
 
-function ConeGeometry(
-	radius, height,
-	radialSegments, heightSegments,
-	openEnded, thetaStart, thetaLength ) {
-
-	CylinderGeometry.call( this,
-		0, radius, height,
-		radialSegments, heightSegments,
-		openEnded, thetaStart, thetaLength );
+function ConeGeometry( radius, height, radialSegments, heightSegments, openEnded, thetaStart, thetaLength ) {
+
+	CylinderGeometry.call( this, 0, radius, height, radialSegments, heightSegments, openEnded, thetaStart, thetaLength );
 
 	this.type = 'ConeGeometry';