Hacker News new | past | comments | ask | show | jobs | submit login
Show HN: A DOOM style renderer with textures in 140 chars of JavaScript (dwitter.net)
8 points by tomxor on Nov 1, 2020 | hide | past | favorite | 1 comment



    A=S(t); B=C(t);
    for (c.width=X=128; X--;) {
        for (Z=1, R=T(X/81-.8); a=20+(R*B-A)*Z, b=132+(R*A+B)*Z, (a^b)%7>1;)
            Z+=.1;
        for (Y=-48; Y++<48; x.fillRect(X, 36-Y/Z, z%7<6?Z/8:z+t*6&a&&-1, 1))
            z=(a+b)*8<<a%2, z=z-Y^Y+z
    }




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

Search: