Spaces:
Paused
Paused
Download node_modules/@plotly/mapbox-gl/src/shaders/collision_box.fragment.glsl from Leon4gr45/UserSyncFrontend: direct link, hf CLI and curl.
- Browser
- Download file 418 Bytes
-
https://huggingface.co/spaces/Leon4gr45/UserSyncFrontend/resolve/main/node_modules/%40plotly/mapbox-gl/src/shaders/collision_box.fragment.glsl
- Command line
-
hf download hf://spaces/Leon4gr45/UserSyncFrontend/node_modules/@plotly/mapbox-gl/src/shaders/collision_box.fragment.glsl
-
curl -L -o collision_box.fragment.glsl https://huggingface.co/spaces/Leon4gr45/UserSyncFrontend/resolve/main/node_modules/%40plotly/mapbox-gl/src/shaders/collision_box.fragment.glsl
418 Bytes
| varying float v_placed; | |
| varying float v_notUsed; | |
| void main() { | |
| float alpha = 0.5; | |
| // Red = collision, hide label | |
| gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0) * alpha; | |
| // Blue = no collision, label is showing | |
| if (v_placed > 0.5) { | |
| gl_FragColor = vec4(0.0, 0.0, 1.0, 0.5) * alpha; | |
| } | |
| if (v_notUsed > 0.5) { | |
| // This box not used, fade it out | |
| gl_FragColor *= .1; | |
| } | |
| } |