mirror of
https://github.com/3b1b/manim.git
synced 2025-11-14 13:37:45 +00:00
Delete unused functions
This commit is contained in:
parent
08c02b21aa
commit
5870274adb
1 changed files with 0 additions and 24 deletions
|
|
@ -19,30 +19,6 @@ out vec4 frag_color;
|
||||||
#INSERT quadratic_bezier_distance.glsl
|
#INSERT quadratic_bezier_distance.glsl
|
||||||
|
|
||||||
|
|
||||||
float cross2d(vec2 v, vec2 w){
|
|
||||||
return v.x * w.y - w.x * v.y;
|
|
||||||
}
|
|
||||||
|
|
||||||
float modify_distance_for_endpoints(vec2 p, float dist, float t){
|
|
||||||
if (0 <= t && t <= 1) return dist;
|
|
||||||
|
|
||||||
float buff = 0.5 * uv_stroke_width - uv_anti_alias_width;
|
|
||||||
// Check the beginning of the curve
|
|
||||||
if(t < 0 && has_prev == 0) return max(dist, -p.x + buff);
|
|
||||||
|
|
||||||
if(t > 1){
|
|
||||||
// Check the end of the curve
|
|
||||||
vec2 v21 = vec2(1, 0) - uv_b2;
|
|
||||||
float len_v21 = length(v21);
|
|
||||||
if(len_v21 == 0) len_v21 = length(-uv_b2);
|
|
||||||
|
|
||||||
float perp_dist = dot(p - uv_b2, v21) / len_v21;
|
|
||||||
if(has_next == 0) return max(dist, -perp_dist + buff);
|
|
||||||
}
|
|
||||||
return dist;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
float dist_to_curve(){
|
float dist_to_curve(){
|
||||||
float dist = min_dist_to_curve(uv_coords, uv_b2, bezier_degree);
|
float dist = min_dist_to_curve(uv_coords, uv_b2, bezier_degree);
|
||||||
if(has_prev == 0 && uv_coords.x < 0){
|
if(has_prev == 0 && uv_coords.x < 0){
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue