Skip to content

Latest commit

 

History

History
18 lines (13 loc) · 457 Bytes

README.md

File metadata and controls

18 lines (13 loc) · 457 Bytes

snowflake

A random snowflake generator using 190 bytes of HTML and JavaScript.

Demo: https://codegolf.github.io/snowflake

image

Source

<canvas id=b><svg onload='with(Math
)for(I=Y=0;Y++<70;I=random()-1.9&I+
1)for(i=12;i--;C=X=>b.getContext`2d
`.fillRect(70+X,s*j+c*Y+70,1,1)||X,
C(-C((c=cos(a=PI/3*i))*j-(s=sin(a))
*Y)))j=i>5&&I'>