From c89b12dd9c565fdca58ff5f508073a08723c3220 Mon Sep 17 00:00:00 2001 From: Stanislav Panev Date: Mon, 6 Nov 2023 16:48:35 -0500 Subject: [PATCH] Delete index.js --- static/js/index.js | 78 ---------------------------------------------- 1 file changed, 78 deletions(-) delete mode 100644 static/js/index.js diff --git a/static/js/index.js b/static/js/index.js deleted file mode 100644 index f7bbfb6..0000000 --- a/static/js/index.js +++ /dev/null @@ -1,78 +0,0 @@ -window.HELP_IMPROVE_VIDEOJS = false; - -var INTERP_BASE = "https://storage.googleapis.com/nerfies-public/interpolation/stacked"; -var NUM_INTERP_FRAMES = 240; - -var interp_images = []; -function preloadInterpolationImages() { - for (var i = 0; i < NUM_INTERP_FRAMES; i++) { - var path = INTERP_BASE + '/' + String(i).padStart(6, '0') + '.jpg'; - interp_images[i] = new Image(); - interp_images[i].src = path; - } -} - -function setInterpolationImage(i) { - var image = interp_images[i]; - image.ondragstart = function() { return false; }; - image.oncontextmenu = function() { return false; }; - $('#interpolation-image-wrapper').empty().append(image); -} - - -$(document).ready(function() { - // Check for click events on the navbar burger icon - $(".navbar-burger").click(function() { - // Toggle the "is-active" class on both the "navbar-burger" and the "navbar-menu" - $(".navbar-burger").toggleClass("is-active"); - $(".navbar-menu").toggleClass("is-active"); - - }); - - var options = { - slidesToScroll: 1, - slidesToShow: 3, - loop: true, - infinite: true, - autoplay: false, - autoplaySpeed: 3000, - } - - // Initialize all div with carousel class - var carousels = bulmaCarousel.attach('.carousel', options); - - // Loop on each carousel initialized - for(var i = 0; i < carousels.length; i++) { - // Add listener to event - carousels[i].on('before:show', state => { - console.log(state); - }); - } - - // Access to bulmaCarousel instance of an element - var element = document.querySelector('#my-element'); - if (element && element.bulmaCarousel) { - // bulmaCarousel instance is available as element.bulmaCarousel - element.bulmaCarousel.on('before-show', function(state) { - console.log(state); - }); - } - - /*var player = document.getElementById('interpolation-video'); - player.addEventListener('loadedmetadata', function() { - $('#interpolation-slider').on('input', function(event) { - console.log(this.value, player.duration); - player.currentTime = player.duration / 100 * this.value; - }) - }, false);*/ - preloadInterpolationImages(); - - $('#interpolation-slider').on('input', function(event) { - setInterpolationImage(this.value); - }); - setInterpolationImage(0); - $('#interpolation-slider').prop('max', NUM_INTERP_FRAMES - 1); - - bulmaSlider.attach(); - -})