Files
METH_Transcendence/site/node_modules/three/src/geometries/TetrahedronGeometry.js
Kum1ta 57c261c689 Site
- starting pong game 3d
2024-07-30 01:08:32 +02:00

35 lines
590 B
JavaScript

import { PolyhedronGeometry } from './PolyhedronGeometry.js';
class TetrahedronGeometry extends PolyhedronGeometry {
constructor( radius = 1, detail = 0 ) {
const vertices = [
1, 1, 1, - 1, - 1, 1, - 1, 1, - 1, 1, - 1, - 1
];
const indices = [
2, 1, 0, 0, 3, 2, 1, 3, 0, 2, 3, 1
];
super( vertices, indices, radius, detail );
this.type = 'TetrahedronGeometry';
this.parameters = {
radius: radius,
detail: detail
};
}
static fromJSON( data ) {
return new TetrahedronGeometry( data.radius, data.detail );
}
}
export { TetrahedronGeometry };