webgl实现超现实动画代码

代码语言:html

所属分类:动画

代码描述:webgl实现超现实动画代码

代码标签: webgl 超现实 动画 代码

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<!DOCTYPE html>
<html lang="en" >

<head>
  <meta charset="UTF-8">

  
  
  
<style>
body {
  height: 100vh;
  margin: 0;
}
body,
html {
  overflow: hidden;
}
</style>


  
</head>

<body translate="no">
  <canvas id="glcanvas"></canvas>
  <script id="vertex-shader" type="x-shader/x-vertex">
    attribute vec2 a_position;
    void main() {
      gl_Position = vec4(a_position, 0.0, 1.0);
    }
  </script>
<script id="fragment-shader" type="x-shader/x-fragment">
#ifdef GL_ES
precision mediump float;
#endif

uniform vec2 u_resolution;
uniform vec2 u_mouse;
uniform float u_time;

vec3 palette2(float t, float factor) {
    vec3 a = vec3(0.500,0.464,0.473) + 0.3 * sin(vec3(0.1, 0.3, 0.5) * factor);
    vec3 b =.........完整代码请登录后点击上方下载按钮下载查看

网友评论0