Skip to content

Instantly share code, notes, and snippets.

View chrisrobison's full-sized avatar
🤔
Open for business and now accepting proposals

Christopher Robison chrisrobison

🤔
Open for business and now accepting proposals
View GitHub Profile
@chrisrobison
chrisrobison / README.md
Created November 12, 2021 15:20 — forked from gre/README.md
Boilerplate of a JS1K submission + JSCrush & uglify tools

JS1K Boilerplate

Build tools

Install tools

npm install
function Track(src, spriteLength, audioLead) {
var track = this,
audio = document.createElement('audio');
audio.src = src;
audio.autobuffer = true;
audio.load();
audio.muted = true; // makes no difference on iOS :(
/* This is the magic. Since we can't preload, and loading requires a user's
input. So we bind a touch event to the body, and fingers crossed, the