Open kamicut opened 9 years ago
Did a quick pen on this here: http://codepen.io/drewbo/pen/EaKEYo
Doesn't use D3 but does the MoveTo/LineTo canvas method you mentioned above. Still buggy and not as cool as hint.fm
It expects a vector field of format [[x,y,u,v,mag],...]
From
vectors.js
we have a structure that can be used to look up wind direction within the vector field using interpolation. Next step is to animate particles along the vector field similar to http://earth.nullschool.net/ and http://hint.fm/wind/One way to do it is to randomize the location of some particles, get the vector and update their position every frame using MoveTo and LineTo in canvas.