Invert sharpness now scales [-1:0]

This commit is contained in:
Quinn
2022-01-08 17:17:04 -08:00
parent 0d34171184
commit 3505cd2339
+3 -2
View File
@@ -57,7 +57,8 @@ function throw_faces(points) = let(length = len(points), half = len(points) / 2)
function lerp(a,b,t) = a + (b - a) * t; function lerp(a,b,t) = a + (b - a) * t;
module shape_gate (shape, throw, shaft_r, sharpness = 0) { module shape_gate (shape, throw, shaft_r, sharpness = 0) {
sharpness = lerp(1, shaft_r, sharpness); normalized_sharpness = sharpness >= 0 ? sharpness : sharpness;
sharpness = lerp(1, shaft_r, normalized_sharpness);
corner_r = shaft_r / abs(sharpness); corner_r = shaft_r / abs(sharpness);
corner_offset = corner_r * (sharpness - 1); corner_offset = corner_r * (sharpness - 1);
@@ -69,7 +70,7 @@ module shape_gate (shape, throw, shaft_r, sharpness = 0) {
} }
} }
sharpness = lerp(-1, -0.6, $t); sharpness = lerp(0, -0.19, $t);
echo(sharpness); echo(sharpness);
shape_gate(octn_poly, 10, 9 / 2, sharpness); shape_gate(octn_poly, 10, 9 / 2, sharpness);