Mini Two3D
February 2019
A demake of Two3D rendered in CSS3D, made in 1Kb for JS1k 2019.
Draw a 3D shape layer by layer with the mouse.
- Github
- Demo
<body id=b><canvas id=a width=380 height=380></canvas>
<script>
c = a.getContext(`2d`);
d = document;
for(_="te6inF11Nonjbuttjq(${2*z`#fffQtransP);_em;^4+i%NKc.fillJem)IPla6WIWZ(VightU20Drota6CPformB0%_B:CAp[i][$]valuetylefor(-a.offset+1,18,18)i=S;i--;)></div~~((e.page8+~~(i/N)^heU:s.FnerHTMLjmouseJRect(o.,D*,D*0deg) s=B-s:preserve-3d;positij:fixed;width:4040^> <q jclick=0101 JS=YTop)/D)XLeft)/D)=(e,t)=><div22^background:${};>fil6r:brUness(AY(9WX(1VB:WZ(-DICX(4CZ(i F d.wri6`<divbottom:0;rU:5^perspective:70em><p id=s3><p><Fput type=color id=o =#0080ffg()>GO</q='';E=0;r(_r()>x<s>#b{margF:1%}#s{animatij:a Ds FfFi6;border:5px solid}@keyframes a{50%{-3`,p=[],S=D,E=m=0,(r{Qc`,0,0SS),`#ccc`,0i-1S,2),D*i-1,0,2S),p[i]=[]})(),Z=` 1 00 0 0 0N0N0N 01`)+Z[i]&&(p[][K]=(K)+1()_a.downG(e,0,m=1_a.movem&&G(e_upm=0;a.jcj6xtmenu!!G(e,1_G{t?Qf`:+1,p[][]=t||o.};(g{$=S;$--;)&&(+=`B:WYzi}IWXz$}V${E+2}I9-1I81INAX(9CZ(18WY(1V-1I>`_e||r(E+=2)})(1)";G=/[-A-DU-WI-K^_PQzqjNF6]/.exec(_);)with(_.split(G))_=join(shift());eval(_)
</script>