Pixel-Composer/scripts/d3d_cube_faces/d3d_cube_faces.gml

67 lines
2.7 KiB
Text
Raw Normal View History

2023-08-17 16:56:54 +02:00
function __3dCubeFaces() : __3dObject() constructor {
VF = global.VF_POS_NORM_TEX_COL;
render_type = pr_trianglelist;
object_counts = 6;
2023-08-17 16:56:54 +02:00
2024-10-20 09:05:33 +02:00
static initModel = function() {
2023-08-17 16:56:54 +02:00
vertex = [
[
2024-10-20 09:05:33 +02:00
new __vertex(-.5, -.5, .5).setNormal(0, 0, 1).setUV(1, 1),
new __vertex( .5, .5, .5).setNormal(0, 0, 1).setUV(0, 0),
new __vertex( .5, -.5, .5).setNormal(0, 0, 1).setUV(0, 1),
2023-08-29 19:26:18 +02:00
2024-10-20 09:05:33 +02:00
new __vertex(-.5, -.5, .5).setNormal(0, 0, 1).setUV(1, 1),
new __vertex(-.5, .5, .5).setNormal(0, 0, 1).setUV(1, 0),
new __vertex( .5, .5, .5).setNormal(0, 0, 1).setUV(0, 0),
2023-08-29 19:26:18 +02:00
],
[
2024-10-20 09:05:33 +02:00
new __vertex(-.5, -.5, -.5).setNormal(0, 0, -1).setUV(1, 1),
new __vertex( .5, -.5, -.5).setNormal(0, 0, -1).setUV(0, 1),
new __vertex( .5, .5, -.5).setNormal(0, 0, -1).setUV(0, 0),
2023-08-29 19:26:18 +02:00
2024-10-20 09:05:33 +02:00
new __vertex(-.5, -.5, -.5).setNormal(0, 0, -1).setUV(1, 1),
new __vertex( .5, .5, -.5).setNormal(0, 0, -1).setUV(0, 0),
new __vertex(-.5, .5, -.5).setNormal(0, 0, -1).setUV(1, 0),
2023-08-29 19:26:18 +02:00
],
[
2024-10-20 09:05:33 +02:00
new __vertex(-.5, -.5, .5).setNormal(-1, 0, 0).setUV(1, 0),
new __vertex(-.5, .5, -.5).setNormal(-1, 0, 0).setUV(0, 1),
new __vertex(-.5, .5, .5).setNormal(-1, 0, 0).setUV(0, 0),
2023-08-29 19:26:18 +02:00
2024-10-20 09:05:33 +02:00
new __vertex(-.5, -.5, .5).setNormal(-1, 0, 0).setUV(1, 0),
new __vertex(-.5, -.5, -.5).setNormal(-1, 0, 0).setUV(1, 1),
new __vertex(-.5, .5, -.5).setNormal(-1, 0, 0).setUV(0, 1),
2023-08-29 19:26:18 +02:00
],
[
2024-10-20 09:05:33 +02:00
new __vertex( .5, -.5, .5).setNormal(1, 0, 0).setUV(0, 0),
new __vertex( .5, .5, .5).setNormal(1, 0, 0).setUV(1, 0),
new __vertex( .5, .5, -.5).setNormal(1, 0, 0).setUV(1, 1),
2023-08-29 19:26:18 +02:00
2024-10-20 09:05:33 +02:00
new __vertex( .5, -.5, .5).setNormal(1, 0, 0).setUV(0, 0),
new __vertex( .5, .5, -.5).setNormal(1, 0, 0).setUV(1, 1),
new __vertex( .5, -.5, -.5).setNormal(1, 0, 0).setUV(0, 1),
2023-08-29 19:26:18 +02:00
],
[
2024-10-20 09:05:33 +02:00
new __vertex(-.5, .5, .5).setNormal(0, 1, 0).setUV(1, 0),
new __vertex( .5, .5, -.5).setNormal(0, 1, 0).setUV(0, 1),
new __vertex( .5, .5, .5).setNormal(0, 1, 0).setUV(0, 0),
2023-08-29 19:26:18 +02:00
2024-10-20 09:05:33 +02:00
new __vertex(-.5, .5, .5).setNormal(0, 1, 0).setUV(1, 0),
new __vertex(-.5, .5, -.5).setNormal(0, 1, 0).setUV(1, 1),
new __vertex( .5, .5, -.5).setNormal(0, 1, 0).setUV(0, 1),
2023-08-29 19:26:18 +02:00
],
[
2024-10-20 09:05:33 +02:00
new __vertex(-.5, -.5, .5).setNormal(0, -1, 0).setUV(0, 0),
new __vertex( .5, -.5, .5).setNormal(0, -1, 0).setUV(1, 0),
new __vertex( .5, -.5, -.5).setNormal(0, -1, 0).setUV(1, 1),
2023-08-29 19:26:18 +02:00
2024-10-20 09:05:33 +02:00
new __vertex(-.5, -.5, .5).setNormal(0, -1, 0).setUV(0, 0),
new __vertex( .5, -.5, -.5).setNormal(0, -1, 0).setUV(1, 1),
new __vertex(-.5, -.5, -.5).setNormal(0, -1, 0).setUV(0, 1),
2023-08-17 16:56:54 +02:00
]
];
2023-08-17 16:56:54 +02:00
VB = build();
2024-10-20 09:05:33 +02:00
} initModel();
2023-08-17 16:56:54 +02:00
}