Skip to content

Instantly share code, notes, and snippets.

@jhorikawa
Created November 13, 2017 23:24
Show Gist options
  • Save jhorikawa/06a3f8a310726e1fd3e1f0d23d76f2a6 to your computer and use it in GitHub Desktop.
Save jhorikawa/06a3f8a310726e1fd3e1f0d23d76f2a6 to your computer and use it in GitHub Desktop.
After Effect expression for text to create a text counter using time value.
var startFrame = 60.0;
var totalFrame = 240.0;
var totalTime = 10.0;
var t = Math.round((timeToFrames(time)-startFrame)/totalFrame*totalTime);
if(t <0){
"0 時間"
}else if(t <= totalTime){
t + " 時間"
}else{
Math.round(totalTime) + " 時間"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment