Skip to content

Instantly share code, notes, and snippets.

@Nazaroni
Created August 15, 2020 19:56
Show Gist options
  • Save Nazaroni/8d8d74682175756eee5d3a27b5aa294d to your computer and use it in GitHub Desktop.
Save Nazaroni/8d8d74682175756eee5d3a27b5aa294d to your computer and use it in GitHub Desktop.
Count timecode starting base on in Point of the layer. Text Source
rate = 1;
clockStart = 0;
function addZero( n ) {
if (n<10){
return "0"+n
}
else {
return ""+n
}
}
clockTime = clockStart + rate * ( time - inPoint );
t = Math.floor( clockTime );
hours = Math.floor( t/3600 );
min = Math.floor( ( t%3600 )/ 60 );
sec=Math.floor( t%60 );
addZero( hours ) + ":" + addZero( min ) + ":" + addZero( sec );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment