All examples By author By category About

1wheel

regl-random-walk

From rreusser

const draw = regl({
  vert: `
    precision mediump float;
    attribute vec2 xy; 
    varying vec2 uv; 
    void main () {
      uv = 0.5 * xy + 0.5;
      gl_Position = vec4(xy, 0, 1); 
    }   
  `,  
  frag: `
    precision mediump float;
    varying vec2 uv; 
    void main () {
      gl_FragColor = vec4(uv, 0, 1);
    } 
  `,
  attributes: {
    xy: [[-4, -4], [0, 4], [4, -4]]
  },
  depth: {enable: false},
  count: 3
});