doodle制作多彩形状动画效果代码
代码语言:html
所属分类:动画
代码描述:doodle制作多彩形状动画效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <style> body { margin: 0; background: black; } shader-doodle { display: block; width: 100vw; height: 100vh; position: fixed; top: 50%; left: 50%; -webkit-transform: translate3d(-50%, -50%, 0); transform: translate3d(-50%, -50%, 0); } </style> </head> <body translate="no" > <shader-doodle> <script type="x-shader/x-fragment"> mat2 rotate(float a) { float s = sin(a); float c = cos(a); return mat2(c, -s, s, c); } void main() { float scl = mix(3.5, 6.5, cos(u_time) * 0.5 + 0.5); vec2 uv = scl * (gl_FragCoord.xy - 0.5 * u_resolution.xy) / u_resolution.y; uv *= cos(uv) * sin(uv.yx); uv *= ro.........完整代码请登录后点击上方下载按钮下载查看
网友评论0