mirror of
https://github.com/tweenjs/tween.js.git
synced 2026-02-01 17:27:10 +00:00
Replaced new Date().getTime() with Date.now()
It's faster: http://jsperf.com/date-now-vs-date-gettime Although it's now supported on <= ie8, not sure if we should care either...
This commit is contained in:
parent
f7ab15869b
commit
334914eda5
@ -59,7 +59,7 @@ var TWEEN = TWEEN || ( function () {
|
||||
update: function (_time) {
|
||||
|
||||
i = 0; tl = tweens.length;
|
||||
var time = _time || new Date().getTime();
|
||||
var time = _time || Date.now();
|
||||
|
||||
while ( i < tl ) {
|
||||
|
||||
@ -127,7 +127,7 @@ TWEEN.Tween = function ( object ) {
|
||||
|
||||
TWEEN.add( this );
|
||||
|
||||
_startTime = _time ? _time + _delayTime : new Date().getTime() + _delayTime;
|
||||
_startTime = _time ? _time + _delayTime : Date.now() + _delayTime;
|
||||
|
||||
for ( var property in _valuesEnd ) {
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user