Random Snowflakes Generator Using <200 Bytes of HTML and JavaScript.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
README.md
index.html
tweet.js

README.md

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'>