From 46550a258f2689ef7bbf10df2b41183954a52689 Mon Sep 17 00:00:00 2001 From: Valentina0127 Date: Mon, 25 Nov 2024 17:46:17 +0800 Subject: [PATCH] 1125 --- index.html | 106 ++++++++++++++++++++++++++++++----------------------- 1 file changed, 60 insertions(+), 46 deletions(-) diff --git a/index.html b/index.html index 55537a9..3c232ae 100644 --- a/index.html +++ b/index.html @@ -242,7 +242,7 @@

Takeaway

--> - + @@ -292,7 +292,6 @@

@@ -308,10 +307,10 @@

Dataset Visualization

- + --> + -
@@ -325,24 +324,60 @@

Baseline Comparison

@@ -353,7 +388,7 @@

Baseline Comparison

@@ -361,56 +396,34 @@

Baseline Comparison

// Initialize: Show Level 1 sub-buttons and set active states document.getElementById('level1_sub_buttons').style.display = 'block'; document.getElementById('level1_button').classList.add('active'); - document.getElementById('level1_train_button').classList.add('active'); - // Level descriptions const levelDescriptions = { level1: "Translation-only experiment uses train and test traversal on different lanes.", level2: "Rotation-only uses the first three and the last three cameras for training, and two side cameras for testing.", level3: "Translation + rotation experiment uses train and test traversals with significantly different trajectories." }; + function switchLevel(level) { - // Update level description const descriptionDiv = document.getElementById('levelDescription'); descriptionDiv.innerHTML = `

${levelDescriptions[level]}

`; - // Hide all sub-buttons - document.querySelectorAll('.sub-buttons').forEach(function(subButtons) { - subButtons.style.display = 'none'; - }); - // Remove 'active' class from all level buttons - document.querySelectorAll('.level-btn').forEach(function(btn) { - btn.classList.remove('active'); - }); - // Add 'active' class to the selected level button + document.querySelectorAll('.sub-buttons').forEach(subButtons => subButtons.style.display = 'none'); + document.querySelectorAll('.level-btn').forEach(btn => btn.classList.remove('active')); document.getElementById(level + '_button').classList.add('active'); - // Show sub-buttons for the selected level document.getElementById(level + '_sub_buttons').style.display = 'block'; - // Reset sub-button active states - document.querySelectorAll('.sub-btn').forEach(function(btn) { - btn.classList.remove('active'); - }); - // Set default sub-button as active - var defaultSubBtn = document.getElementById(level + '_train_button'); - defaultSubBtn.classList.add('active'); - // Switch to the default video - switchVideo(level, 'train'); + + switchVideoWithLocation(level); } - function switchVideo(level, type) { - // Remove 'active' class from all sub-buttons - document.querySelectorAll('.sub-btn').forEach(function(btn) { - btn.classList.remove('active'); - }); - // Add 'active' class to the selected sub-button - document.getElementById(level + '_' + type + '_button').classList.add('active'); - // Update video source + function switchVideoWithLocation(level) { + const trainTest = document.getElementById(level + '_train_test').value; + const location = document.getElementById(level + '_location').value; const videoPlayer = document.getElementById('videoPlayer'); - videoPlayer.src = './static/videos/' + level + '_' + type + '.mp4'; + videoPlayer.src = `./static/videos/${level}_${trainTest}_${location}.mp4`; videoPlayer.play(); } - +