block by 1wheel 0a58f8bf5a14f6a534b9043a9c63dd1d

regl-ladder

Full Screen

Rough draft of this chart.

We started out with a SVG animation, tried out Elijah’s canvas sankey particles and ended up rewriting in regl to get more dots on the screen.

The final version gets better performance by passing in array of attibutes to the vertex shader - I’m not sure why that is.

Update: Ricky Reusser points out that I was creating a new array of points every frame with:

attributes: {x: () => data.map(d => d.x)}

This is faster:

attributes: {x: => data.map(d => d.x)}

Also! pow is undefined for negative numbers, so the points take a different path on different devices.

_script.js

index.html