PageSourceSearch

https://vidpanos.github.io/static/js/index.js

js vidpanos.github.io collected 2026-10-03 10:08:23 UTC 3,120 bytes, 102 lines download raw bytes

1window.HELP_IMPROVE_VIDEOJS = false;
2
3// When the user clicks on the button, scroll to the top of the document
4function topFunction() {
5  document.body.scrollTop = 0; // For Safari
6  document.documentElement.scrollTop = 0; // For Chrome, Firefox, IE and Opera
7} 
8
9var INTERP_BASE = "https://homes.cs.washington.edu/~kpar/nerfies/interpolation/stacked";
10var NUM_INTERP_FRAMES = 240;
11
12var interp_images = [];
13function preloadInterpolationImages() {
14  for (var i = 0; i < NUM_INTERP_FRAMES; i++) {
15    var path = INTERP_BASE + '/' + String(i).padStart(6, '0') + '.jpg';
16    interp_images[i] = new Image();
17    interp_images[i].src = path;
18  }
19}
20
21function setInterpolationImage(i) {
22  var image = interp_images[i];
23  image.ondragstart = function() { return false; };
24  image.oncontextmenu = function() { return false; };
25  $('#interpolation-image-wrapper').empty().append(image);
26}
27
28
29$(document).ready(function() {
30
31    // Get the button:
32    let mybutton = document.getElementById("myBtn");
33
34    function scrollFunction() {
35      console.log(document.body.scrollTop)
36      if (document.body.scrollTop > 20 || document.documentElement.scrollTop > 20) {
37        mybutton.style.display = "block";
38      } else {
39        mybutton.style.display = "none";
40      }
41    }
42
43    // When the user scrolls down 20px from the top of the document, show the button
44    window.onscroll = function() {scrollFunction()};
45
46    // Check for click events on the navbar burger icon
47    $(".navbar-burger").click(function() {
48      // Toggle the "is-active" class on both the "navbar-burger" and the "navbar-menu"
49      $(".navbar-burger").toggleClass("is-active");
50      $(".navbar-menu").toggleClass("is-active");
51
52    });
53
54    var options = {
55			slidesToScroll: 1,
56			slidesToShow: 3,
57			loop: true,
58			infinite: true,
59			autoplay: false,
60			autoplaySpeed: 3000,
61    }
62
63		// Initialize all div with carousel class
64    var carousels = bulmaCarousel.attach('.carousel', options);
65
66    // Loop on each carousel initialized
67    for(var i = 0; i < carousels.length; i++) {
68    	// Add listener to  event
69    	carousels[i].on('before:show', state => {
70    		console.log(state);
71    	});
72    }
73
74    // Access to bulmaCarousel instance of an element
75    var element = document.querySelector('#my-element');
76    if (element && element.bulmaCarousel) {
77    	// bulmaCarousel instance is available as element.bulmaCarousel
78    	element.bulmaCarousel.on('before-show', function(state) {
79    		console.log(state);
80    	});
81    }
82
83    /*var player = document.getElementById('interpolation-video');
84    player.addEventListener('loadedmetadata', function() {
85      $('#interpolation-slider').on('input', function(event) {
86        console.log(this.value, player.duration);
87        player.currentTime = player.duration / 100 * this.value;
88      })
89    }, false);*/
90    // preloadInterpolationImages();
91
92    // $('#interpolation-slider').on('input', function(event) {
93    //   setInterpolationImage(this.value);
94    // });
95    // setInterpolationImage(0);
96    // $('#interpolation-slider').prop('max', NUM_INTERP_FRAMES - 1);
97
98    // bulmaSlider.attach();
99
100})
101
102

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.