3 votes

Dissecting A Dweet: Parallax Mountains (Analyzing a 140 byte JavaScript demo)

1 comment

  1. KilledByAPixel
    Link
    Howdy everyone, this is my 7th post where I analyze a tiny javascript program that creates art. This one is really neat because it creates the impression of watching a landscape pass by from a car...
    • Exemplary

    Howdy everyone, this is my 7th post where I analyze a tiny javascript program that creates art. This one is really neat because it creates the impression of watching a landscape pass by from a car or train window.

    Here's the entire JavaScript program...

    for(w=i=99;i--;)for(j=0;j<9;x.fillRect(i20,j++?wj+w+wC(q/9)/j+59C(q/3.9)/j:0,20,3e3))q=wj+i+tj**3,x.fillStyle=R(9+j40%w,j20,w-j*9)

    1 vote