Skip to content

Instantly share code, notes, and snippets.

View pthrasher's full-sized avatar

Philip Thrasher pthrasher

View GitHub Profile

Keybase proof

I hereby claim:

  • I am pthrasher on github.
  • I am pthrasher (https://keybase.io/pthrasher) on keybase.
  • I have the public key with fingerprint F8C3 CF8A 6713 1401 2E2C  BE6E 7DFE C26E A859 BFB8

To claim this, I am signing this object:

@pthrasher
pthrasher / no-ie8.mkd
Created May 6, 2014 18:53
Why not to support IE8

Stolen from: http://github.hubspot.com/tether/overview/why_we_dont_support_ie_8/

Why we don't support IE 8

We've been living in 2007 for a while now, pretending that new browser features don't exist because they aren't in IE8. You might not even know about some of these features, or think they are only enabled by jQuery or underscore, simply because it hasn't been an option to rely upon them.

Here is the list of features you don't have if you choose to support IE 8:

@pthrasher
pthrasher / gen-keys-button.png
Last active August 29, 2015 14:06
How-To: Sign-up, and generate sharing keys for lastpass.com
gen-keys-button.png
@pthrasher
pthrasher / fridays_of.py
Created December 12, 2014 15:12
Usage: python fridays_of.py <date> <num days to count back>
# Find all friday the 13th's of the last 1000 days
# python fridays_of.py 13 1000
import datetime
import sys
one_day = datetime.timedelta(days=1)
def is_fri(dt):
return dt.weekday() == 4
@pthrasher
pthrasher / undulating burn out.glsl
Last active August 29, 2015 14:11 — forked from glslioadmin/TEMPLATE.glsl
GLSL.io Transition (v1)
#ifdef GL_ES
precision highp float;
#endif
#define M_PI 3.14159265358979323846 /* pi */
// General parameters
uniform sampler2D from;
uniform sampler2D to;
uniform float progress;
@pthrasher
pthrasher / crosshatch.glsl
Last active August 29, 2015 14:11 — forked from glslioadmin/TEMPLATE.glsl
GLSL.io Transition (v1)
#ifdef GL_ES
precision highp float;
#endif
// General parameters
uniform sampler2D from;
uniform sampler2D to;
uniform float progress;
uniform vec2 resolution;
@pthrasher
pthrasher / TEMPLATE.glsl
Created December 23, 2014 20:31 — forked from glslioadmin/TEMPLATE.glsl
GLSL.io Transition (v1)
#ifdef GL_ES
precision highp float;
#endif
uniform sampler2D from, to;
uniform float progress;
uniform vec2 resolution;
float snoise(vec3 uv, float res) // by trisomie21
{
const vec3 s = vec3(1e0, 1e2, 1e4);
/*********************************************************************
* Both of these examples use state *
*********************************************************************/
var StatusParent = React.createClass({
render: function() {
return (
<Status/>
);
},

Interesting part (unmounting & API) is at the end if you're not interested in the rest =).

Stress Tests

This animation proposal is just an attempt. In case it doesn't work out, I've gathered a few examples that can test the power of a future animation system.

  1. Parent is an infinitely spinning ball, and has a child ball that is also spinning. Clicking on the parent causes child to reverse spinning direction. This tests the ability of the animation system to compose animation, not in the sense of applying multiple interpolations to one or more variables passed onto the child (this should be trivial), but in the sense that the parent's constantly updating at the same time as the child, and has to ensure that it passes the animation commands correctly to it. This also tests that we can still intercept these animations (the clicking) and immediately change their configuration instead of queueing them.

  2. Typing letters and let them fly in concurrently. This tests concurrency, coordination of an array of ch

While I was experimenting with animation, I had to make a few basic prototypes for a layout system and see how they intertwine. Here's the API in conjunction with React:

var MyComp = React.createClass({
  registerLayoutValues: function() {
    return {
      self: {
        width: 30,
        left: (get('parent', 'width') - get('self', 'width')) / 2 // Center.
 }