ConeGeometry.js 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /**
  2. * @author abelnation / http://github.com/abelnation
  3. */
  4. import { CylinderGeometry } from './CylinderGeometry.js';
  5. import { CylinderBufferGeometry } from './CylinderGeometry.js';
  6. // ConeGeometry
  7. function ConeGeometry( radius, height, radialSegments, heightSegments, openEnded, thetaStart, thetaLength ) {
  8. CylinderGeometry.call( this, 0, radius, height, radialSegments, heightSegments, openEnded, thetaStart, thetaLength );
  9. this.type = 'ConeGeometry';
  10. this.parameters = {
  11. radius: radius,
  12. height: height,
  13. radialSegments: radialSegments,
  14. heightSegments: heightSegments,
  15. openEnded: openEnded,
  16. thetaStart: thetaStart,
  17. thetaLength: thetaLength
  18. };
  19. }
  20. ConeGeometry.prototype = Object.create( CylinderGeometry.prototype );
  21. ConeGeometry.prototype.constructor = ConeGeometry;
  22. // ConeBufferGeometry
  23. function ConeBufferGeometry( radius, height, radialSegments, heightSegments, openEnded, thetaStart, thetaLength ) {
  24. CylinderBufferGeometry.call( this, 0, radius, height, radialSegments, heightSegments, openEnded, thetaStart, thetaLength );
  25. this.type = 'ConeBufferGeometry';
  26. this.parameters = {
  27. radius: radius,
  28. height: height,
  29. radialSegments: radialSegments,
  30. heightSegments: heightSegments,
  31. openEnded: openEnded,
  32. thetaStart: thetaStart,
  33. thetaLength: thetaLength
  34. };
  35. }
  36. ConeBufferGeometry.prototype = Object.create( CylinderBufferGeometry.prototype );
  37. ConeBufferGeometry.prototype.constructor = ConeBufferGeometry;
  38. export { ConeGeometry, ConeBufferGeometry };
粤ICP备19079148号