UNPKG

1.5 kBJavaScriptView Raw
1/**
2 * @author abelnation / http://github.com/abelnation
3 */
4
5import { CylinderGeometry } from './CylinderGeometry.js';
6import { CylinderBufferGeometry } from './CylinderGeometry.js';
7
8// ConeGeometry
9
10function ConeGeometry( radius, height, radialSegments, heightSegments, openEnded, thetaStart, thetaLength ) {
11
12 CylinderGeometry.call( this, 0, radius, height, radialSegments, heightSegments, openEnded, thetaStart, thetaLength );
13
14 this.type = 'ConeGeometry';
15
16 this.parameters = {
17 radius: radius,
18 height: height,
19 radialSegments: radialSegments,
20 heightSegments: heightSegments,
21 openEnded: openEnded,
22 thetaStart: thetaStart,
23 thetaLength: thetaLength
24 };
25
26}
27
28ConeGeometry.prototype = Object.create( CylinderGeometry.prototype );
29ConeGeometry.prototype.constructor = ConeGeometry;
30
31// ConeBufferGeometry
32
33function ConeBufferGeometry( radius, height, radialSegments, heightSegments, openEnded, thetaStart, thetaLength ) {
34
35 CylinderBufferGeometry.call( this, 0, radius, height, radialSegments, heightSegments, openEnded, thetaStart, thetaLength );
36
37 this.type = 'ConeBufferGeometry';
38
39 this.parameters = {
40 radius: radius,
41 height: height,
42 radialSegments: radialSegments,
43 heightSegments: heightSegments,
44 openEnded: openEnded,
45 thetaStart: thetaStart,
46 thetaLength: thetaLength
47 };
48
49}
50
51ConeBufferGeometry.prototype = Object.create( CylinderBufferGeometry.prototype );
52ConeBufferGeometry.prototype.constructor = ConeBufferGeometry;
53
54
55export { ConeGeometry, ConeBufferGeometry };