3 ms·
It's pretty easy to just force the browser to preload images a few early, which would eliminate all of the variable, ~2-500ms delay between frames. This would
by epivosism 5y ago
It's pretty easy to just force the browser to preload images a few early, which would eliminate all of the variable, ~2-500ms delay between frames. This would increase the impact of this presentation.
function preload(n)
var preloader = $('<img style="display:none;" />');
preloader.attr("src","img/vrg_google_doc_final_vrs03-"+n+".jpg');
$('body').prepend(preloader);
}
the js in the source of the page:
var imgNum = '1';
function increment(){
if(imgNum < 141){
imgNum++;
}else{
imgNum = 1;
}
url = "url('img/vrg_google_doc_final_vrs03-"+imgNum+".jpg')";
document.getElementById('pic').style.backgroundImage=url;
preload(imgNum+1) //PRELOADING
}