@@ -43,7 +43,7 @@ public static void quad(float x1, float y1, float z1,
43
43
quad (x1 , y1 , z1 , color , x2 , y2 , z2 , color , x3 , y3 , z3 , color , x4 , y4 , z4 , color );
44
44
}
45
45
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 ){
47
47
float scl = Perspective .scale (x , y , z2 );
48
48
if (scl < 0 ) return ;
49
49
@@ -60,26 +60,15 @@ public static void tube(float x, float y, float rad, float z2, Color baseColorLi
60
60
x2 = x + rad * cos2 ,
61
61
y2 = y + rad * sin2 ;
62
62
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
-
70
63
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
75
68
);
76
69
}
77
70
}
78
71
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
-
83
72
public static void slantTube (float x1 , float y1 , float x2 , float y2 , float z2 , float rad , Color baseColor , Color topColor ){
84
73
//Draw
85
74
float scl = Perspective .scale (x2 , y2 , z2 );
0 commit comments