Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <input id="spin"> <label for="spin">
- input#spin:hover + div.spin { }
- input#spin {
- width: 0;
- height: 0;
- border: none;
- position: absolute;
- }
- vec3 paintCircle (vec2 uv, vec2 center, float rad, float width) {
- // координаты пикселя относительно центра "круга"
- vec2 diff = center - uv;
- // расстояние до этой точки
- float len = length(diff);
- // расстояние до "круга"
- float circle = smoothstep(rad - width, rad, len) -
- smoothstep(rad, rad + width, len);
- // поворот текстурных координат относительно центра "круга"
- vec2 at = atan(uv-center) * rotate2d(rotation);
- // вырезание 2 частей окружности
- if (at.x - 0.05 < 0. && at.x + 0.05 > 0.)
- circle -= 1.0;
- return vec3(circle);
- }
Add Comment
Please, Sign In to add comment