New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Step branch #1

Merged
merged 261 commits into from Jul 21, 2016
Commits
Jump to file or symbol
Failed to load files and symbols.
+4 −4
Diff settings

Always

Just for now

Viewing a subset of changes. View all

undoing the `RANDOM()` cache because it is 9 bytes as is (3 usages at…

… one byte and the cache at six bytes) but also 9 bytes if you just replace them (because RANDOM becomes 1 char). additionally you can save one semi in each call since the argument is ignored, ending it at 3 bytes profit
  • Loading branch information...
pvdz committed Feb 25, 2016
commit 0c9cf3951665cc1fa6e4562368d6d48e3dc0954d
Copy path View file
@@ -230,8 +230,8 @@ <h1>
y: M2,
};
rr = RANDOM(imageDataIndex=4*X + 4*Y * M) /2; // random speed addition (jittery)
rs=rr+mk;
imageDataIndex=4*X + 4*Y * M;
rs=RANDOM()+mk;
// if data[x+0], the space is occupied by a letter. set u so the pixel joins the moving "atom".
u = data[imageDataIndex++] ? i %600: 0;
@@ -241,8 +241,8 @@ <h1>
targetx = u ? atomx + COS(u) * fitty * (k==tp?2:k||tp) : isqfoxnl ? X + stw : X ;
targety = u ? atomy + SIN(u) * fitty * (k||2) : isqfoxnl ? Y + sth : Y;
p.x+=p.A= ~~p.A*.9 + rr - COS(dtan= O.atan2(p.y - targety, p.x - targetx)) * rs;
p.y+=p.B= ~~p.B*.9 + rr - SIN(dtan) * rs;
p.x+=p.A= ~~p.A*.9 + RANDOM() - COS(dtan= O.atan2(p.y - targety, p.x - targetx)) * rs;
p.y+=p.B= ~~p.B*.9 + RANDOM() - SIN(dtan) * rs;
c[fillStyle] = colors[u ? u % 3 : data[imageDataIndex++] ? 3 : isqfoxnl ? 4 : 5];
c.fillRect(~~p.x, ~~p.y, size = u?mk:isqfoxnl ? mk*2 :~p.A+~p.B, size);
ProTip! Use n and p to navigate between commits in a pull request.