TetrahedronBufferGeometry.js 735 B

1234567891011121314151617181920212223242526272829303132
  1. import { PolyhedronBufferGeometry } from './PolyhedronBufferGeometry';
  2. /**
  3. * @author Mugen87 / https://github.com/Mugen87
  4. */
  5. function TetrahedronBufferGeometry( radius, detail ) {
  6. var vertices = [
  7. 1, 1, 1, - 1, - 1, 1, - 1, 1, - 1, 1, - 1, - 1
  8. ];
  9. var indices = [
  10. 2, 1, 0, 0, 3, 2, 1, 3, 0, 2, 3, 1
  11. ];
  12. PolyhedronBufferGeometry.call( this, vertices, indices, radius, detail );
  13. this.type = 'TetrahedronBufferGeometry';
  14. this.parameters = {
  15. radius: radius,
  16. detail: detail
  17. };
  18. }
  19. TetrahedronBufferGeometry.prototype = Object.create( PolyhedronBufferGeometry.prototype );
  20. TetrahedronBufferGeometry.prototype.constructor = TetrahedronBufferGeometry;
  21. export { TetrahedronBufferGeometry };