update
This commit is contained in:
18
src/main.jai
18
src/main.jai
@@ -52,20 +52,32 @@ cool_demo_1 :: (screen: *Screen, offset: s64, theta: s64) {
|
||||
};
|
||||
|
||||
scale(.{0.5, 0.8}, *t1);
|
||||
translate(.{0, 20}, *t1);
|
||||
translate(.{50, 5}, *t1);
|
||||
translate(.{50, 20}, *t1);
|
||||
rotate(theta, get_triangle_centroid(t1), *t1);
|
||||
|
||||
draw_triangle(screen, t1, #char "%");
|
||||
|
||||
t2 := t1;
|
||||
|
||||
scale(.{0.5, 0.5}, *t1);
|
||||
scale(.{0.2, 0.2}, *t1);
|
||||
draw_triangle(screen, t1, #char "%");
|
||||
|
||||
// draw centroid lines
|
||||
// draw_line(screen, get_triangle_centroid(t1), get_triangle_centroid(t2), #char ".");
|
||||
|
||||
// draw_line(screen, get_triangle_centroid(t1), t1.p1, #char ".");
|
||||
// draw_line(screen, get_triangle_centroid(t1), t1.p2, #char ".");
|
||||
// draw_line(screen, get_triangle_centroid(t1), t1.p3, #char ".");
|
||||
|
||||
// draw_line(screen, get_triangle_centroid(t2), t2.p1, #char ".");
|
||||
// draw_line(screen, get_triangle_centroid(t2), t2.p2, #char ".");
|
||||
// draw_line(screen, get_triangle_centroid(t2), t2.p3, #char ".");
|
||||
|
||||
// connect triangles to eachother for fake 3d effect
|
||||
draw_line(screen, t1.p1, t2.p1, #char "%");
|
||||
draw_line(screen, t1.p2, t2.p2, #char "%");
|
||||
draw_line(screen, t1.p3, t2.p3, #char "%");
|
||||
|
||||
}
|
||||
|
||||
cool_demo_2 :: (screen: *Screen, offset: s64, theta: s64) {
|
||||
|
||||
Reference in New Issue
Block a user