Published
Edited
Apr 15, 2021
1 star
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
draw = regl({
vert: vertexShaderSrc,
frag: fragmentShaderSrc,
attributes: {
a_position: [[-1, -1, 0, 1], [1, -1, 0, 1], [1, 1, 0, 1], [-1, 1, 0, 1]]
},
uniforms: {
u_time: ({ time }) => time
},
depth: {
enable: false
},
primitive: 'triangle fan',
count: 4
})
Insert cell
{
const frame = regl.frame(() => {
regl.clear({ color: [0, 0, 0, 1] });
draw();
});
invalidation.then(frame.cancel);
return frame;
}
Insert cell
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more