PageSourceSearch

https://caiyuanhao1998.github.io/project/OmniVCus/static/js/index.js

js caiyuanhao1998.github.io collected 2026-10-03 08:45:05 UTC 2,391 bytes, 79 lines download raw bytes

1window.HELP_IMPROVE_VIDEOJS = false;
2
3var INTERP_BASE = "./static/interpolation/stacked";
4var NUM_INTERP_FRAMES = 240;
5
6var interp_images = [];
7function preloadInterpolationImages() {
8  for (var i = 0; i < NUM_INTERP_FRAMES; i++) {
9    var path = INTERP_BASE + '/' + String(i).padStart(6, '0') + '.jpg';
10    interp_images[i] = new Image();
11    interp_images[i].src = path;
12  }
13}
14
15function setInterpolationImage(i) {
16  var image = interp_images[i];
17  image.ondragstart = function() { return false; };
18  image.oncontextmenu = function() { return false; };
19  $('#interpolation-image-wrapper').empty().append(image);
20}
21
22
23$(document).ready(function() {
24    // Check for click events on the navbar burger icon
25    $(".navbar-burger").click(function() {
26      // Toggle the "is-active" class on both the "navbar-burger" and the "navbar-menu"
27      $(".navbar-burger").toggleClass("is-active");
28      $(".navbar-menu").toggleClass("is-active");
29
30    });
31
32    var options = {
33    slidesToScroll: 1,
34    slidesToShow: 2,
35    centerMode: true, // Enable center mode
36    loop: true,
37    infinite: true,
38    autoplay: false,
39    autoplaySpeed: 3000,
40};
41
42		// Initialize all div with carousel class
43    var carousels = bulmaCarousel.attach('.carousel', options);
44
45    // Loop on each carousel initialized
46    for(var i = 0; i < carousels.length; i++) {
47    	// Add listener to  event
48    	carousels[i].on('before:show', state => {
49    		console.log(state);
50    	});
51    }
52
53    // Access to bulmaCarousel instance of an element
54    var element = document.querySelector('#my-element');
55    if (element && element.bulmaCarousel) {
56    	// bulmaCarousel instance is available as element.bulmaCarousel
57    	element.bulmaCarousel.on('before-show', function(state) {
58    		console.log(state);
59    	});
60    }
61
62    /*var player = document.getElementById('interpolation-video');
63    player.addEventListener('loadedmetadata', function() {
64      $('#interpolation-slider').on('input', function(event) {
65        console.log(this.value, player.duration);
66        player.currentTime = player.duration / 100 * this.value;
67      })
68    }, false);*/
69    preloadInterpolationImages();
70
71    $('#interpolation-slider').on('input', function(event) {
72      setInterpolationImage(this.value);
73    });
74    setInterpolationImage(0);
75    $('#interpolation-slider').prop('max', NUM_INTERP_FRAMES - 1);
76
77    bulmaSlider.attach();
78
79})

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.