-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathapp.js
20 lines (16 loc) · 870 Bytes
/
app.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
;(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
window.main = function(data) {
var girth = data.map(function(row) {return 1 * row.girth})
var max = Math.max.apply(Math,girth)
var min = Math.min.apply(Math,girth)
girthScaled = girth.map(function(x){return (x - min)/(max - min) })
window.girthScaled = girthScaled
}
window.playSound = function(audio, time) {
setTimeout(function() {
audio.currentTime = 0
audio.play()
}, time)
}
},{}]},{},[1])
;