Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
イージングアウト
// 目標値
var t = 100;
// 現在値
var val = 0;
function update() {
val += (t - val) * 0.5;
if(Math.abs(t - val) < 0.5) {
val = t;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment