shader-art实现一个噪点混沌油画效果河流天空效果代码
代码语言:html
所属分类:动画
代码描述:shader-art实现一个噪点混沌油画效果河流天空效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <style> body { display: flex; margin:0; height: 100vh; } shader-art { display: block; width: 100%; height: 100%; } shader-art canvas { display: block; width: 100%; height: 100%; } </style> </head> <body> <shader-art autoplay> <uniform type="float" name="scale" value="0.3" min="0.1" max="4" step="0.01" /> <uniform type="float" name="ax" value="3" min="1" max="15" step=".1" /> <uniform type="float" name="ay" value="5" min="1" max="15" step=".1" /> <uniform type="float" name="az" value="7" min="1" max="15" step=".1" /> <uniform type="float" name="aw" value="13" min="1" max="15" step=".1" /> <uniform type="int" name="numOctaves" value="6" min="1" max="10" step="1" /> <uniform type="color" name="color1" value="#ffffff" /> <uniform type="color" name="color2" value="#ffafaf" /> <uniform type="color" name="color3" value="#0099ff" /> <uniform type="color" name="color4" value="#aaffff" /> <script type="buffer" name="position" data-size="2"> [-1, 1, -1,-1, 1,1, 1, 1, -1,-1, 1,-1] </script> <script type="buffer" name="uv" data-size="2"> [ 0, 0, 0, 1, 1,0, 1, 0, 0, 1, 1, 1] </script> <script type="vert"> precision highp float; attribute vec4 position; attribute vec2 uv; varying vec2 vUv; void main() { vUv = uv; gl_Position = position; } </script> <script type="frag"> precision highp float; varying vec2 vUv; uniform float time; uniform float scale; .........完整代码请登录后点击上方下载按钮下载查看
网友评论0