Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Nice! I like how you can see the brush state before planting it on the page.

Shameless plug: I made a similar but far more rudimentary particle based calligraphic brush in 140 chars of javascript: https://www.dwitter.net/d/17780 Or, drop this in an empty browser console:

  document.body.innerHTML='<canvas id=c>';x=c.getContext('2d');c.width=1920;c.height=1080;C=S=t=0;setInterval('n=t++?n.map(([X,Y,A,B])=>(x.beginPath(x.moveTo(X,Y),x.lineTo(X+=A,Y+=B),x.lineWidth=(A*B)**.5,x.stroke()),[X,Y,A*.7+(C-X)/9,B*.7+(S-Y)/9])):[];onmousemove=({x,y})=>n[t&63]=[C=x,S=y,0,0]',16)


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: