Skip to content

Instantly share code, notes, and snippets.

@jwagner
jwagner / audio.js
Created January 13, 2011 09:53
some hacky audio code
(function(){
var audio = provides('audio');
audio.Sound = Class({
src: '',
position: null,
init: function(src, position){
this.src = src;
this.position = position;
}
var abs = Math.abs;
var sqrt = Math.sqrt;
var floor = Math.floor;
var min = Math.min;
var V3 = function(x, y, z) {
this.x = x;
this.y = y;
this.z = z;
}