R
R
RomanSS2017-02-13 17:04:06
JavaScript
RomanSS, 2017-02-13 17:04:06

TweenMax and integers when updating how to do?

There is such a code for TweenMax codepen.io/nicolund/pen/KCwhx

var counter = { var: 0 };
var tal = document.getElementById("tal");
    
 TweenMax.to(counter, 5, {
      var: 100, 
      onUpdate: function () {
          tal.innerHTML = Math.ceil(counter.var);
      },
      ease:Circ.easeOut
  });

I can not find in the documentation, is there a standard feature (option) that makes numbers rounded to integers, with each change?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question