Skip to content

Instantly share code, notes, and snippets.

@Gerjo
Created August 27, 2013 13:42
Show Gist options
  • Save Gerjo/6353684 to your computer and use it in GitHub Desktop.
Save Gerjo/6353684 to your computer and use it in GitHub Desktop.
Optimising a HTML particle system, when suddenly everything must be stringly typed.
color = "rgba(" + lerpInt(particle.colorA[0], particle.colorB[0], t) + ", " +
lerpInt(particle.colorA[1], particle.colorB[1], t) + ", " +
lerpInt(particle.colorA[2], particle.colorB[2], t) + ", " +
lerpFloat(particle.colorA[3], particle.colorB[3], t) + ")";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment