justlib+webgl实现至上主义/马列维奇的梦想动画代码

代码语言:html

所属分类:动画

代码描述:justlib+webgl实现至上主义/马列维奇的梦想动画代码

代码标签: justlib webgl 至上主义 马列维奇 梦想 动画

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


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

<head>

  <meta charset="UTF-8">

  
  
  
<style>
* {
    margin: 0;
    overflow: hidden;
}
</style>


</head>

<body  >
  
<script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/justlib.js"></script>
      <script>
const ratio = innerWidth / innerHeight;
palette(['#dccfa3', '#9f8f65', '#44443b', '#c6110f', '#12130b']);

const canvas = createCanvasWebgl(ratio);
appendCanvas();
let t;

const redraw = webglProgram(`
    uniform vec2 resolution = [canvas.width, canvas.height];
    const float TAU = ${2 * PI}, PI = ${PI};
    uniform float time = [Date.now()%60000/1000];
    
    vec4 tunnelUV(vec2 uv) {
        float cellCount = 5.0;
        float y = -time/3. + log(length(uv));
        float a = 0.5 + at.........完整代码请登录后点击上方下载按钮下载查看

网友评论0