Warning: session_start(): open(/var/lib/php/sessions/sess_0aj8p2spghnpavodeddd8s2h5c, O_RDWR) failed: No space left on device (28) in /var/www/tb-usercake/models/config.php on line 51
Warning: session_start(): Failed to read session data: files (path: /var/lib/php/sessions) in /var/www/tb-usercake/models/config.php on line 51
// requires JQuery
sS hjs_humWithFade() {
ret hjs_playHum()
+ hjs([[
humSound.volume = 0;
var humVolume = 0.25; // level when on
var humShouldBeOn = false;
$.extend($.easing, {
easeOutExpo: function(x, t, b, c, d) {
return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b;
},
easeInOutQuint: function (x, t, b, c, d) {
if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b;
return c/2*((t-=2)*t*t*t*t + 2) + b;
}
});
function humOn() {
if (humShouldBeOn) return;
humShouldBeOn = true;
console.log("hum on (vol=" + humVolume + ")");
fadeHumTo(humVolume);
}
// TODO: actually turn off in the end
function humOff() {
if (!humShouldBeOn) return;
humShouldBeOn = false;
console.log("hum off");
fadeHumTo(0);
}
function fadeHumTo(vol) {
$(humSound).animate({ volume: vol }, {
duration: vol < humSound.volume ? 250 : 500,
//easing: vol < humSound.volume ? 'easeOutExpo' : 'easeInOutQuint',
});
}
]]);
}