This commit is contained in:
Anuken
2021-02-28 17:33:08 -05:00
parent 01f7b1c9a6
commit 4c9cda7e40

View File

@@ -135,19 +135,14 @@ public class OverdriveProjector extends Block{
Draw.rect(topRegion, x, y);
Draw.alpha(1f);
Lines.stroke((2f * f + 0.1f) * heat);
//float hype = 1.414f * size * tilesize / 2f; // hypotenuse
float r = Math.max(0f, Mathf.clamp(2f - f * 2f) * size * tilesize / 2f - f - 0.2f);
float w = Mathf.clamp(0.5f - f) * size * tilesize;
float r = Math.max(0f, Mathf.clamp(2f - f * 2f) * size * tilesize / 2f - f - 0.2f), w = Mathf.clamp(0.5f - f) * size * tilesize;
Lines.beginLine();
for(int i = 0; i < 4; i++){
Lines.linePoint(x + Geometry.d4(i).x * r + Geometry.d4(i).y * w, y + Geometry.d4(i).y * r - Geometry.d4(i).x * w);
if(f < 0.5f) Lines.linePoint(x + Geometry.d4(i).x * r - Geometry.d4(i).y * w, y + Geometry.d4(i).y * r + Geometry.d4(i).x * w);
//Lines.lineAngleCenter(x + Geometry.d8edge(i).x * size * tilesize / 2f * (1f - f), y + Geometry.d8edge(i).y * size * tilesize / 2f * (1f - f), 135f + 90f * i, hype * (0.5f - Math.abs(f - 0.5f)) * 2f);
//if(f < 0.5f) Lines.lineAngleCenter(x + Geometry.d4(i).x * size * tilesize / 2f - Geometry.d4(i).x * f, y + Geometry.d4(i).y * size * tilesize / 2f - Geometry.d4(i).y * f, 90f + 90f * i, (0.5f - f) * 2f * size * tilesize);
}
Lines.endLine(true);
//Lines.square(x, y, Math.min(1f + (1f - f) * size * tilesize / 2f, size * tilesize/2f));
Draw.reset();
}