Skip to content

Commit

Permalink
correct
Browse files Browse the repository at this point in the history
  • Loading branch information
范丞德 committed Oct 18, 2024
1 parent b04800b commit 6e5b988
Showing 1 changed file with 6 additions and 18 deletions.
24 changes: 6 additions & 18 deletions spectromotion/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -148,16 +148,9 @@ <h2 class="title is-4">Results and comparisons</h2>
const methods = ['NeRF-DS', 'Deformable 3DGS', '4DGS', 'GaussianShader', 'GS-IR', 'HyperNeRF'];
const views = ['RGB', 'Depth', 'Normal'];

// State object to store selections for each scene
const state = {};
scenes.forEach(scene => {
state[scene] = {
method: methods[0],
view: views[0]
};
});

let currentScene = scenes[0];
let currentMethod = methods[0];
let currentView = views[0];

function createTabs(containerId, items, clickHandler) {
const container = document.getElementById(containerId);
Expand All @@ -182,9 +175,6 @@ <h2 class="title is-4">Results and comparisons</h2>
const container = document.getElementById('video-container');
container.innerHTML = ''; // Clear existing content

const currentMethod = state[currentScene].method;
const currentView = state[currentScene].view;

const videoComparison = document.createElement('div');
videoComparison.className = 'video-comparison';
videoComparison.setAttribute('data-label', currentMethod);
Expand All @@ -208,19 +198,17 @@ <h2 class="title is-4">Results and comparisons</h2>
function switchScene(scene) {
currentScene = scene;
updateActiveTab('scene-tabs', scene);
updateActiveTab('method-tabs', state[scene].method);
updateActiveTab('view-tabs', state[scene].view);
createVideoComparison();
}

function switchMethod(method) {
state[currentScene].method = method;
currentMethod = method;
updateActiveTab('method-tabs', method);
createVideoComparison();
}

function switchView(view) {
state[currentScene].view = view;
currentView = view;
updateActiveTab('view-tabs', view);
createVideoComparison();
}
Expand All @@ -232,8 +220,8 @@ <h2 class="title is-4">Results and comparisons</h2>

// Set initial active tabs
updateActiveTab('scene-tabs', currentScene);
updateActiveTab('method-tabs', state[currentScene].method);
updateActiveTab('view-tabs', state[currentScene].view);
updateActiveTab('method-tabs', currentMethod);
updateActiveTab('view-tabs', currentView);

// Create initial video comparison
createVideoComparison();
Expand Down

0 comments on commit 6e5b988

Please sign in to comment.