mirror of
https://github.com/jiawanlong/Cesium-Examples.git
synced 2025-07-07 00:37:30 +00:00
32 lines
810 B
JavaScript
32 lines
810 B
JavaScript
import { CylinderGeometry } from './CylinderGeometry.js';
|
|
|
|
class ConeGeometry extends CylinderGeometry {
|
|
|
|
constructor( radius = 1, height = 1, radialSegments = 32, heightSegments = 1, openEnded = false, thetaStart = 0, thetaLength = Math.PI * 2 ) {
|
|
|
|
super( 0, radius, height, radialSegments, heightSegments, openEnded, thetaStart, thetaLength );
|
|
|
|
this.type = 'ConeGeometry';
|
|
|
|
this.parameters = {
|
|
radius: radius,
|
|
height: height,
|
|
radialSegments: radialSegments,
|
|
heightSegments: heightSegments,
|
|
openEnded: openEnded,
|
|
thetaStart: thetaStart,
|
|
thetaLength: thetaLength
|
|
};
|
|
|
|
}
|
|
|
|
static fromJSON( data ) {
|
|
|
|
return new ConeGeometry( data.radius, data.height, data.radialSegments, data.heightSegments, data.openEnded, data.thetaStart, data.thetaLength );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
export { ConeGeometry };
|