@tweenjs/tween.js
Advanced tools
Comparing version 18.2.2 to 18.3.0
@@ -126,2 +126,4 @@ define(function () { 'use strict'; | ||
TWEEN.Tween = function (object, group) { | ||
this._isPaused = false; | ||
this._pauseStart = null; | ||
this._object = object; | ||
@@ -162,2 +164,6 @@ this._valuesStart = {}; | ||
isPaused: function () { | ||
return this._isPaused; | ||
}, | ||
to: function (properties, duration) { | ||
@@ -186,2 +192,4 @@ | ||
this._isPaused = false; | ||
this._onStartCallbackFired = false; | ||
@@ -236,4 +244,7 @@ | ||
this._group.remove(this); | ||
this._isPlaying = false; | ||
this._isPaused = false; | ||
if (this._onStopCallback !== null) { | ||
@@ -255,2 +266,37 @@ this._onStopCallback(this._object); | ||
pause: function(time) { | ||
if (this._isPaused || !this._isPlaying) { | ||
return this; | ||
} | ||
this._isPaused = true; | ||
this._pauseStart = time === undefined ? TWEEN.now() : time; | ||
this._group.remove(this); | ||
return this; | ||
}, | ||
resume: function(time) { | ||
if (!this._isPaused || !this._isPlaying) { | ||
return this; | ||
} | ||
this._isPaused = false; | ||
this._startTime += (time === undefined ? TWEEN.now() : time) | ||
- this._pauseStart; | ||
this._pauseStart = 0; | ||
this._group.add(this); | ||
return this; | ||
}, | ||
stopChainedTweens: function () { | ||
@@ -257,0 +303,0 @@ |
@@ -126,2 +126,4 @@ 'use strict'; | ||
TWEEN.Tween = function (object, group) { | ||
this._isPaused = false; | ||
this._pauseStart = null; | ||
this._object = object; | ||
@@ -162,2 +164,6 @@ this._valuesStart = {}; | ||
isPaused: function () { | ||
return this._isPaused; | ||
}, | ||
to: function (properties, duration) { | ||
@@ -186,2 +192,4 @@ | ||
this._isPaused = false; | ||
this._onStartCallbackFired = false; | ||
@@ -236,4 +244,7 @@ | ||
this._group.remove(this); | ||
this._isPlaying = false; | ||
this._isPaused = false; | ||
if (this._onStopCallback !== null) { | ||
@@ -255,2 +266,37 @@ this._onStopCallback(this._object); | ||
pause: function(time) { | ||
if (this._isPaused || !this._isPlaying) { | ||
return this; | ||
} | ||
this._isPaused = true; | ||
this._pauseStart = time === undefined ? TWEEN.now() : time; | ||
this._group.remove(this); | ||
return this; | ||
}, | ||
resume: function(time) { | ||
if (!this._isPaused || !this._isPlaying) { | ||
return this; | ||
} | ||
this._isPaused = false; | ||
this._startTime += (time === undefined ? TWEEN.now() : time) | ||
- this._pauseStart; | ||
this._pauseStart = 0; | ||
this._group.add(this); | ||
return this; | ||
}, | ||
stopChainedTweens: function () { | ||
@@ -257,0 +303,0 @@ |
@@ -124,2 +124,4 @@ /** | ||
TWEEN.Tween = function (object, group) { | ||
this._isPaused = false; | ||
this._pauseStart = null; | ||
this._object = object; | ||
@@ -160,2 +162,6 @@ this._valuesStart = {}; | ||
isPaused: function () { | ||
return this._isPaused; | ||
}, | ||
to: function (properties, duration) { | ||
@@ -184,2 +190,4 @@ | ||
this._isPaused = false; | ||
this._onStartCallbackFired = false; | ||
@@ -234,4 +242,7 @@ | ||
this._group.remove(this); | ||
this._isPlaying = false; | ||
this._isPaused = false; | ||
if (this._onStopCallback !== null) { | ||
@@ -253,2 +264,37 @@ this._onStopCallback(this._object); | ||
pause: function(time) { | ||
if (this._isPaused || !this._isPlaying) { | ||
return this; | ||
} | ||
this._isPaused = true; | ||
this._pauseStart = time === undefined ? TWEEN.now() : time; | ||
this._group.remove(this); | ||
return this; | ||
}, | ||
resume: function(time) { | ||
if (!this._isPaused || !this._isPlaying) { | ||
return this; | ||
} | ||
this._isPaused = false; | ||
this._startTime += (time === undefined ? TWEEN.now() : time) | ||
- this._pauseStart; | ||
this._pauseStart = 0; | ||
this._group.add(this); | ||
return this; | ||
}, | ||
stopChainedTweens: function () { | ||
@@ -255,0 +301,0 @@ |
@@ -130,2 +130,4 @@ (function (global, factory) { | ||
TWEEN.Tween = function (object, group) { | ||
this._isPaused = false; | ||
this._pauseStart = null; | ||
this._object = object; | ||
@@ -166,2 +168,6 @@ this._valuesStart = {}; | ||
isPaused: function () { | ||
return this._isPaused; | ||
}, | ||
to: function (properties, duration) { | ||
@@ -190,2 +196,4 @@ | ||
this._isPaused = false; | ||
this._onStartCallbackFired = false; | ||
@@ -240,4 +248,7 @@ | ||
this._group.remove(this); | ||
this._isPlaying = false; | ||
this._isPaused = false; | ||
if (this._onStopCallback !== null) { | ||
@@ -259,2 +270,37 @@ this._onStopCallback(this._object); | ||
pause: function(time) { | ||
if (this._isPaused || !this._isPlaying) { | ||
return this; | ||
} | ||
this._isPaused = true; | ||
this._pauseStart = time === undefined ? TWEEN.now() : time; | ||
this._group.remove(this); | ||
return this; | ||
}, | ||
resume: function(time) { | ||
if (!this._isPaused || !this._isPlaying) { | ||
return this; | ||
} | ||
this._isPaused = false; | ||
this._startTime += (time === undefined ? TWEEN.now() : time) | ||
- this._pauseStart; | ||
this._pauseStart = 0; | ||
this._group.add(this); | ||
return this; | ||
}, | ||
stopChainedTweens: function () { | ||
@@ -261,0 +307,0 @@ |
{ | ||
"name": "@tweenjs/tween.js", | ||
"description": "Super simple, fast and easy to use tweening engine which incorporates optimised Robert Penner's equations.", | ||
"version": "18.2.2", | ||
"version": "18.3.0", | ||
"main": "dist/tween.cjs.js", | ||
@@ -6,0 +6,0 @@ "module": "dist/tween.esm.js", |
@@ -124,2 +124,4 @@ /** | ||
TWEEN.Tween = function (object, group) { | ||
this._isPaused = false; | ||
this._pauseStart = null; | ||
this._object = object; | ||
@@ -160,2 +162,6 @@ this._valuesStart = {}; | ||
isPaused: function () { | ||
return this._isPaused; | ||
}, | ||
to: function (properties, duration) { | ||
@@ -184,2 +190,4 @@ | ||
this._isPaused = false; | ||
this._onStartCallbackFired = false; | ||
@@ -234,4 +242,7 @@ | ||
this._group.remove(this); | ||
this._isPlaying = false; | ||
this._isPaused = false; | ||
if (this._onStopCallback !== null) { | ||
@@ -253,2 +264,37 @@ this._onStopCallback(this._object); | ||
pause: function(time) { | ||
if (this._isPaused || !this._isPlaying) { | ||
return this; | ||
} | ||
this._isPaused = true; | ||
this._pauseStart = time === undefined ? TWEEN.now() : time; | ||
this._group.remove(this); | ||
return this; | ||
}, | ||
resume: function(time) { | ||
if (!this._isPaused || !this._isPlaying) { | ||
return this; | ||
} | ||
this._isPaused = false; | ||
this._startTime += (time === undefined ? TWEEN.now() : time) | ||
- this._pauseStart; | ||
this._pauseStart = 0; | ||
this._group.add(this); | ||
return this; | ||
}, | ||
stopChainedTweens: function () { | ||
@@ -255,0 +301,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
108485
3162