@tweenjs/tween.js 23.0.0 → 23.1.1
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/tween.amd.js +6 -3
- package/dist/tween.cjs +6 -3
- package/dist/tween.d.ts +2 -1
- package/dist/tween.esm.js +6 -3
- package/dist/tween.umd.js +6 -3
- package/package.json +1 -1
package/dist/tween.amd.js
CHANGED
@@ -415,18 +415,21 @@ define(['exports'], (function (exports) { 'use strict';
|
|
415
415
|
Tween.prototype.isPaused = function () {
|
416
416
|
return this._isPaused;
|
417
417
|
};
|
418
|
+
Tween.prototype.getDuration = function () {
|
419
|
+
return this._duration;
|
420
|
+
};
|
418
421
|
Tween.prototype.to = function (target, duration) {
|
419
422
|
if (duration === void 0) { duration = 1000; }
|
420
423
|
if (this._isPlaying)
|
421
424
|
throw new Error('Can not call Tween.to() while Tween is already started or paused. Stop the Tween first.');
|
422
425
|
this._valuesEnd = target;
|
423
426
|
this._propertiesAreSetUp = false;
|
424
|
-
this._duration = duration;
|
427
|
+
this._duration = duration < 0 ? 0 : duration;
|
425
428
|
return this;
|
426
429
|
};
|
427
430
|
Tween.prototype.duration = function (duration) {
|
428
431
|
if (duration === void 0) { duration = 1000; }
|
429
|
-
this._duration = duration;
|
432
|
+
this._duration = duration < 0 ? 0 : duration;
|
430
433
|
return this;
|
431
434
|
};
|
432
435
|
Tween.prototype.dynamic = function (dynamic) {
|
@@ -829,7 +832,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
829
832
|
return Tween;
|
830
833
|
}());
|
831
834
|
|
832
|
-
var VERSION = '23.
|
835
|
+
var VERSION = '23.1.1';
|
833
836
|
|
834
837
|
/**
|
835
838
|
* Tween.js - Licensed under the MIT license
|
package/dist/tween.cjs
CHANGED
@@ -417,18 +417,21 @@ var Tween = /** @class */ (function () {
|
|
417
417
|
Tween.prototype.isPaused = function () {
|
418
418
|
return this._isPaused;
|
419
419
|
};
|
420
|
+
Tween.prototype.getDuration = function () {
|
421
|
+
return this._duration;
|
422
|
+
};
|
420
423
|
Tween.prototype.to = function (target, duration) {
|
421
424
|
if (duration === void 0) { duration = 1000; }
|
422
425
|
if (this._isPlaying)
|
423
426
|
throw new Error('Can not call Tween.to() while Tween is already started or paused. Stop the Tween first.');
|
424
427
|
this._valuesEnd = target;
|
425
428
|
this._propertiesAreSetUp = false;
|
426
|
-
this._duration = duration;
|
429
|
+
this._duration = duration < 0 ? 0 : duration;
|
427
430
|
return this;
|
428
431
|
};
|
429
432
|
Tween.prototype.duration = function (duration) {
|
430
433
|
if (duration === void 0) { duration = 1000; }
|
431
|
-
this._duration = duration;
|
434
|
+
this._duration = duration < 0 ? 0 : duration;
|
432
435
|
return this;
|
433
436
|
};
|
434
437
|
Tween.prototype.dynamic = function (dynamic) {
|
@@ -831,7 +834,7 @@ var Tween = /** @class */ (function () {
|
|
831
834
|
return Tween;
|
832
835
|
}());
|
833
836
|
|
834
|
-
var VERSION = '23.
|
837
|
+
var VERSION = '23.1.1';
|
835
838
|
|
836
839
|
/**
|
837
840
|
* Tween.js - Licensed under the MIT license
|
package/dist/tween.d.ts
CHANGED
@@ -104,6 +104,7 @@ declare class Tween<T extends UnknownProps> {
|
|
104
104
|
getId(): number;
|
105
105
|
isPlaying(): boolean;
|
106
106
|
isPaused(): boolean;
|
107
|
+
getDuration(): number;
|
107
108
|
to(target: UnknownProps, duration?: number): this;
|
108
109
|
duration(duration?: number): this;
|
109
110
|
dynamic(dynamic?: boolean): this;
|
@@ -152,7 +153,7 @@ declare class Sequence {
|
|
152
153
|
static nextId(): number;
|
153
154
|
}
|
154
155
|
|
155
|
-
declare const VERSION = "23.
|
156
|
+
declare const VERSION = "23.1.1";
|
156
157
|
|
157
158
|
declare const nextId: typeof Sequence.nextId;
|
158
159
|
declare const getAll: () => Tween<UnknownProps>[];
|
package/dist/tween.esm.js
CHANGED
@@ -413,18 +413,21 @@ var Tween = /** @class */ (function () {
|
|
413
413
|
Tween.prototype.isPaused = function () {
|
414
414
|
return this._isPaused;
|
415
415
|
};
|
416
|
+
Tween.prototype.getDuration = function () {
|
417
|
+
return this._duration;
|
418
|
+
};
|
416
419
|
Tween.prototype.to = function (target, duration) {
|
417
420
|
if (duration === void 0) { duration = 1000; }
|
418
421
|
if (this._isPlaying)
|
419
422
|
throw new Error('Can not call Tween.to() while Tween is already started or paused. Stop the Tween first.');
|
420
423
|
this._valuesEnd = target;
|
421
424
|
this._propertiesAreSetUp = false;
|
422
|
-
this._duration = duration;
|
425
|
+
this._duration = duration < 0 ? 0 : duration;
|
423
426
|
return this;
|
424
427
|
};
|
425
428
|
Tween.prototype.duration = function (duration) {
|
426
429
|
if (duration === void 0) { duration = 1000; }
|
427
|
-
this._duration = duration;
|
430
|
+
this._duration = duration < 0 ? 0 : duration;
|
428
431
|
return this;
|
429
432
|
};
|
430
433
|
Tween.prototype.dynamic = function (dynamic) {
|
@@ -827,7 +830,7 @@ var Tween = /** @class */ (function () {
|
|
827
830
|
return Tween;
|
828
831
|
}());
|
829
832
|
|
830
|
-
var VERSION = '23.
|
833
|
+
var VERSION = '23.1.1';
|
831
834
|
|
832
835
|
/**
|
833
836
|
* Tween.js - Licensed under the MIT license
|
package/dist/tween.umd.js
CHANGED
@@ -419,18 +419,21 @@
|
|
419
419
|
Tween.prototype.isPaused = function () {
|
420
420
|
return this._isPaused;
|
421
421
|
};
|
422
|
+
Tween.prototype.getDuration = function () {
|
423
|
+
return this._duration;
|
424
|
+
};
|
422
425
|
Tween.prototype.to = function (target, duration) {
|
423
426
|
if (duration === void 0) { duration = 1000; }
|
424
427
|
if (this._isPlaying)
|
425
428
|
throw new Error('Can not call Tween.to() while Tween is already started or paused. Stop the Tween first.');
|
426
429
|
this._valuesEnd = target;
|
427
430
|
this._propertiesAreSetUp = false;
|
428
|
-
this._duration = duration;
|
431
|
+
this._duration = duration < 0 ? 0 : duration;
|
429
432
|
return this;
|
430
433
|
};
|
431
434
|
Tween.prototype.duration = function (duration) {
|
432
435
|
if (duration === void 0) { duration = 1000; }
|
433
|
-
this._duration = duration;
|
436
|
+
this._duration = duration < 0 ? 0 : duration;
|
434
437
|
return this;
|
435
438
|
};
|
436
439
|
Tween.prototype.dynamic = function (dynamic) {
|
@@ -833,7 +836,7 @@
|
|
833
836
|
return Tween;
|
834
837
|
}());
|
835
838
|
|
836
|
-
var VERSION = '23.
|
839
|
+
var VERSION = '23.1.1';
|
837
840
|
|
838
841
|
/**
|
839
842
|
* Tween.js - Licensed under the MIT license
|
package/package.json
CHANGED