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

push the viewport stuff together

  • Loading branch information...
pvdz committed Feb 19, 2016
commit e8ec035e3527a775390bf6f001bb65de97239977
View
@@ -138,19 +138,19 @@ <h1>
var
FLOOR = floor,
MIN = min,
MAX = max,
RANDOM = random,
SIN = sin,
COS = cos,
PI = PI,
SQRT = sqrt,
ABS = abs,
ATAN2 = atan2;
var K = 200; // particle count wide and high (so total num of particles is K*K)
var W = a.width;
var H = a.height;
var M = MIN(W, H); // get smallest dimension, serves as view dimensions (a square)
var W;
var H;
var M = MIN(W= a.width, H= a.height); // get smallest dimension, serves as view dimensions (a square)
var M2 = FLOOR(M/2); // mid of view
var OX = FLOOR(W/2 - M2);
var OY = FLOOR(H/2 - M2);
ProTip! Use n and p to navigate between commits in a pull request.