|
window.HELP_IMPROVE_VIDEOJS = false; |
|
|
|
var INTERP_BASE = "./static/images/adaptive"; |
|
var NUM_INTERP_FRAMES = 7; |
|
|
|
var c10_images = []; |
|
var c100_images = []; |
|
var imgnet_images = []; |
|
|
|
function preloadInterpolationImages() { |
|
for (var i = 0; i < NUM_INTERP_FRAMES; i++) { |
|
var c10_path = INTERP_BASE + '/c10_' + String(i) + '.png'; |
|
|
|
var imgnet_path = INTERP_BASE + '/imgnet_' + String(i) + '.png'; |
|
|
|
c10_images[i] = new Image(); |
|
c10_images[i].src = c10_path; |
|
|
|
|
|
|
|
|
|
imgnet_images[i] = new Image(); |
|
imgnet_images[i].src = imgnet_path; |
|
} |
|
} |
|
|
|
function setInterpolationImage(name, value) { |
|
|
|
if (name == "c10"){ |
|
var image = c10_images[value] |
|
} |
|
else if (name == "c100"){ |
|
var image = c100_images[value] |
|
} |
|
else if (name == "imgnet"){ |
|
var image = imgnet_images[value] |
|
} |
|
else { |
|
var image = c10_images[value] |
|
} |
|
image.ondragstart = function() { return false; }; |
|
image.oncontextmenu = function() { return false; }; |
|
$('#'+name+'-image-wrapper').empty().append(image); |
|
} |
|
|
|
|
|
$(document).ready(function() { |
|
|
|
$(".navbar-burger").click(function() { |
|
|
|
$(".navbar-burger").toggleClass("is-active"); |
|
$(".navbar-menu").toggleClass("is-active"); |
|
|
|
}); |
|
|
|
var options = { |
|
slidesToScroll: 1, |
|
slidesToShow: 3, |
|
loop: true, |
|
infinite: true, |
|
autoplay: false, |
|
autoplaySpeed: 3000, |
|
} |
|
|
|
|
|
var carousels = bulmaCarousel.attach('.carousel', options); |
|
|
|
|
|
for(var i = 0; i < carousels.length; i++) { |
|
|
|
carousels[i].on('before:show', state => { |
|
console.log(state); |
|
}); |
|
} |
|
|
|
|
|
var element = document.querySelector('#my-element'); |
|
if (element && element.bulmaCarousel) { |
|
|
|
element.bulmaCarousel.on('before-show', function(state) { |
|
console.log(state); |
|
}); |
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
preloadInterpolationImages(); |
|
|
|
$('.interpolation-slider').on('input', function(event) { |
|
setInterpolationImage(this.name, this.value); |
|
}); |
|
setInterpolationImage('c10', 0); |
|
|
|
setInterpolationImage('imgnet', 0); |
|
|
|
$('.interpolation-slider').prop('max', NUM_INTERP_FRAMES - 1); |
|
|
|
bulmaSlider.attach(); |
|
|
|
}) |
|
|