points
✓ Published0🌍 Public
11wheel
Last edited May 26, 2017
Created on May 8, 2017
One hundred thousand points render as colored particles in WebGL, smoothly morphing between different distributions—random walks, phyllotaxis spirals, sine waves, and grids—at regular intervals. The animation uses regl to draw points and interpolate between buffer states in the vertex shader, with a viridis colormap applied per point. A control panel lets viewers adjust point radius and the total number of points.
AI-generated descriptionFrom 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
});
WTFPL Licensed