const g_cube = (function () {
const points = [const g_cube = (function () {
const points = [front face
0.5,
-0.5,
-0.5,
-0.5,
-0.5,
-0.5,
0.5,
0.5,
-0.5,
0.5,
0.5,
-0.5,
-0.5,
-0.5,
-0.5,
-0.5,
0.5,
-0.5,right face
0.5,
-0.5,
0.5,
0.5,
-0.5,
-0.5,
0.5,
0.5,
-0.5,
0.5,
-0.5,
0.5,
0.5,
0.5,
-0.5,
0.5,
0.5,
0.5,back face
-0.5,
-0.5,
0.5,
0.5,
-0.5,
0.5,
0.5,
0.5,
0.5,
-0.5,
-0.5,
0.5,
0.5,
0.5,
0.5,
-0.5,
0.5,
0.5,left face
-0.5,
0.5,
-0.5,
-0.5,
-0.5,
-0.5,
-0.5,
-0.5,
0.5,
-0.5,
0.5,
-0.5,
-0.5,
-0.5,
0.5,
-0.5,
0.5,
0.5,top
0.5,
0.5,
-0.5,
-0.5,
0.5,
-0.5,
-0.5,
0.5,
0.5,
0.5,
0.5,
-0.5,
-0.5,
0.5,
0.5,
0.5,
0.5,
0.5,bottom
-0.5,
-0.5,
-0.5,
0.5,
-0.5,
-0.5,
0.5,
-0.5,
0.5,
0.5,
-0.5,
0.5,
-0.5,
-0.5,
0.5,
-0.5,
-0.5,
-0.5,
].map((p) => (p * 3.2) + 5.1);
const triangles = [];
for (let i = 0; i < points.length; i += 9) {
triangles.push({
type: 'triangle',
material: 5,
points: [
[points[i + 0], points[i + 1], points[i + 2]],
[points[i + 3], points[i + 4], points[i + 5]],
[points[i + 6], points[i + 7], points[i + 8]],
],
});
}
return triangles;
}());