Skip to content

Instantly share code, notes, and snippets.

@spite
spite / gist:8835249
Last active August 29, 2015 13:56
AudioContext playback without preloading
/*
Demo here: http://www.clicktorelease.com/tmp/fastload/
The MP3 file is 5.2MB
*/
/*
For some reason, probably because the spec has changed since the article
"Getting Started with Web Audio API" in http://www.html5rocks.com/en/tutorials/webaudio/intro/
was published, the most common way of loading a file sound is something like:
*/
@gre
gre / easing.js
Last active April 16, 2024 19:53
Simple Easing Functions in Javascript - see https://github.com/gre/bezier-easing
/*
* This work is free. You can redistribute it and/or modify it under the
* terms of the Do What The Fuck You Want To Public License, Version 2,
* as published by Sam Hocevar. See the COPYING file for more details.
*/
/*
* Easing Functions - inspired from http://gizma.com/easing/
* only considering the t value for the range [0, 1] => [0, 1]
*/
EasingFunctions = {