ena-system-core / timeline.js
unknown
Update timeline logic + ena-glow animation
95d6e23
raw
history blame contribute delete
516 Bytes
// Basic timeline navigator
let current = 1;
const totalScenes = 3;
function nextScene() {
// Hide all scenes
document.querySelectorAll('.scene').forEach(scene => {
scene.style.display = 'none';
});
// Show current scene
const next = document.getElementById(`scene${current}`);
if (next) next.style.display = 'block';
// Update index
current = current < totalScenes ? current + 1 : 1;
}
window.onload = () => {
nextScene(); // Initial show
setInterval(nextScene, 4000); // Every 4 sec
};