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.
+8 −8
Diff settings

Always

Just for now

Viewing a subset of changes. View all

1.28 / 1208 / 1110; rename local function to `H` to make it look like…

… "helium" in the element string and make regpack reduce it. could use a longer name but it doesnt matter
  • Loading branch information...
pvdz committed Feb 26, 2016
commit a0890da53529925967f5f98dff82f3745765361a
View
@@ -127,7 +127,7 @@ <h1>
// https://closure-compiler.appspot.com/home
// http://siorki.github.io/regPack.html
// 1.28 / 1209 / 1111 (closure compiler / regpacked, with / without wrappers and vars decls)
// 1.28 / 1208 / 1110 (closure compiler / regpacked, with / without wrappers and vars decls)
var a; // canvas element (passed on)
@@ -160,7 +160,6 @@ <h1>
Y, // default target y for pixel
K, // pixel distance between pixels
R, // anonymous function name
v, // draw text or clear screen (depends on whether fourth param is present)
// math constants
O,
@@ -173,6 +172,7 @@ <h1>
C,
F,
H, // draw text or clear screen (depends on whether fourth param is present)
// to cover local function arg names
e,
g,
@@ -197,16 +197,16 @@ <h1>
V = 5;
W = 3;
function v(e,g,h,b){b?c.fillText(b,N,N*g,M,c.font=M/e+F,c[f='fillStyle']=C[h]):c.clearRect(X=Y=i=0,0,M,M)}
function H(e,g,h,b){b?c.fillText(b,N,N*g,M,c.font=M/e+F,c[f='fillStyle']=C[h]):c.clearRect(X=Y=i=0,0,M,M)}
!function R(){
v(Z++%150 ? I : I = c.getImageData(0, 0, M, M,
H(Z++%150 ? I : I = c.getImageData(0, 0, M, M,
// this changes the current symbol
v(s = E[S= ~~(r() * 118)]),
v(1, 1, 2, S+1),
H(s = E[S= ~~(r() * 118)]),
H(1, 1, 2, S+1),
// note: using `'='` and `'('` here to use as explicit minifier hack later
v(1, 1, 0, '(' == s[1] ? s[0] : s[0] == '=' ? 'Uu' + s[1] : s),
v(9, 1.8, 1, 'qfox.nl')
H(1, 1, 0, '(' == s[1] ? s[0] : s[0] == '=' ? 'Uu' + s[1] : s),
H(9, 1.8, 1, 'qfox.nl')
).data);
// TODO: this should be shorter but ends, at the moment, with +3 bytes after regpack
ProTip! Use n and p to navigate between commits in a pull request.