Skip to content

Commit 01fc17c

Browse files
committed
...what was the purpose of light and dark? I don't remember
1 parent 6ba543b commit 01fc17c

File tree

1 file changed

+5
-16
lines changed

1 file changed

+5
-16
lines changed

src/progressed/graphics/draw3d/Fill3D.java

+5-16
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public static void quad(float x1, float y1, float z1,
4343
quad(x1, y1, z1, color, x2, y2, z2, color, x3, y3, z3, color, x4, y4, z4, color);
4444
}
4545

46-
public static void tube(float x, float y, float rad, float z2, Color baseColorLight, Color baseColorDark, Color topColorLight, Color topColorDark){
46+
public static void tube(float x, float y, float rad, float z2, Color baseColor, Color topColor){
4747
float scl = Perspective.scale(x, y, z2);
4848
if(scl < 0) return;
4949

@@ -60,26 +60,15 @@ public static void tube(float x, float y, float rad, float z2, Color baseColorLi
6060
x2 = x + rad * cos2,
6161
y2 = y + rad * sin2;
6262

63-
float cLerp1 = 1f - Angles.angleDist(a, 45f) / 180f,
64-
cLerp2 = 1f - Angles.angleDist(a + space, 45f) / 180f;
65-
Color bc1f = Tmp.c1.set(baseColorLight).lerp(baseColorDark, cLerp1),
66-
tc1f = Tmp.c2.set(topColorLight).lerp(topColorDark, cLerp1),
67-
bc2f = Tmp.c3.set(baseColorLight).lerp(baseColorDark, cLerp2),
68-
tc2f = Tmp.c4.set(topColorLight).lerp(topColorDark, cLerp2);
69-
7063
quad(
71-
x1, y1, 0, bc1f,
72-
x2, y2, 0, bc2f,
73-
x2, y2, z2, tc2f,
74-
x1, y1, z2, tc1f
64+
x1, y1, 0, baseColor,
65+
x2, y2, 0, baseColor,
66+
x2, y2, z2, topColor,
67+
x1, y1, z2, topColor
7568
);
7669
}
7770
}
7871

79-
public static void tube(float x, float y, float rad, float z2, Color baseColor, Color topColor){
80-
tube(x, y, rad, z2, baseColor, baseColor, topColor, topColor);
81-
}
82-
8372
public static void slantTube(float x1, float y1, float x2, float y2, float z2, float rad, Color baseColor, Color topColor){
8473
//Draw
8574
float scl = Perspective.scale(x2, y2, z2);

0 commit comments

Comments
 (0)