Last active
August 11, 2020 06:08
-
-
Save felipeblazing/aa4ac252a7d62ac15820559883318da1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function set_image(time){{ | |
document.getElementById("time").innerHTML = "From " + time.toString() + " to " + (time+{duration}).toString() + "ms"; | |
document.getElementById("image-show").src = "{home_dir}/" + time.toString() + "_" + (time+{duration}).toString() + ".png"; | |
}} | |
i = 0; | |
tick = {duration}; | |
function prev_image(){{ | |
i = i - (tick * 2); | |
next_image(0); | |
}} | |
function next_image(play){{ | |
set_image(i); | |
i = i + tick; | |
if ( i < {duration} && play == 1){{ | |
window.setTimeout(function(){{ | |
next_image(1); | |
}},1000); | |
}} | |
}} | |
next_image(0); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment