Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@tweenjs/tween.js

Package Overview
Dependencies
Maintainers
4
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tweenjs/tween.js - npm Package Compare versions

Comparing version 18.6.1 to 18.6.2

23

dist/tween.amd.js

@@ -265,3 +265,3 @@ define(['exports'], function (exports) { 'use strict';

var tween = this._tweens[tweenIds[i]];
if (tween && tween.update(time) === false && !preserve) {
if (tween && tween.update(time, preserve) === false && !preserve) {
delete this._tweens[tweenIds[i]];

@@ -404,2 +404,3 @@ }

this._isChainStopped = false;
this._goToEnd = false;
}

@@ -530,2 +531,3 @@ Tween.prototype.getId = function () {

Tween.prototype.end = function () {
this._goToEnd = true;
this.update(Infinity);

@@ -620,14 +622,15 @@ return this;

};
Tween.prototype.update = function (time) {
Tween.prototype.update = function (time, preserve) {
if (time === void 0) { time = now$1(); }
if (preserve === void 0) { preserve = false; }
var property;
var elapsed;
time = time !== undefined ? time : now$1();
var endTime = this._startTime + this._duration;
if (time > endTime && !this._isPlaying) {
return false;
if (!this._goToEnd && !this._isPlaying) {
if (time > endTime)
return false;
if (!preserve)
this.start(time);
}
// If the tween was already finished,
if (!this.isPlaying) {
this.start(time);
}
this._goToEnd = false;
if (time < this._startTime) {

@@ -754,3 +757,3 @@ return true;

var VERSION = '18.6.1';
var VERSION = '18.6.2';

@@ -757,0 +760,0 @@ /**

@@ -267,3 +267,3 @@ 'use strict';

var tween = this._tweens[tweenIds[i]];
if (tween && tween.update(time) === false && !preserve) {
if (tween && tween.update(time, preserve) === false && !preserve) {
delete this._tweens[tweenIds[i]];

@@ -406,2 +406,3 @@ }

this._isChainStopped = false;
this._goToEnd = false;
}

@@ -532,2 +533,3 @@ Tween.prototype.getId = function () {

Tween.prototype.end = function () {
this._goToEnd = true;
this.update(Infinity);

@@ -622,14 +624,15 @@ return this;

};
Tween.prototype.update = function (time) {
Tween.prototype.update = function (time, preserve) {
if (time === void 0) { time = now$1(); }
if (preserve === void 0) { preserve = false; }
var property;
var elapsed;
time = time !== undefined ? time : now$1();
var endTime = this._startTime + this._duration;
if (time > endTime && !this._isPlaying) {
return false;
if (!this._goToEnd && !this._isPlaying) {
if (time > endTime)
return false;
if (!preserve)
this.start(time);
}
// If the tween was already finished,
if (!this.isPlaying) {
this.start(time);
}
this._goToEnd = false;
if (time < this._startTime) {

@@ -756,3 +759,3 @@ return true;

var VERSION = '18.6.1';
var VERSION = '18.6.2';

@@ -759,0 +762,0 @@ /**

@@ -134,3 +134,4 @@ declare type EasingFunction = (amount: number) => number;

onStop(callback: (object: T) => void): this;
update(time?: number): boolean;
private _goToEnd;
update(time?: number, preserve?: boolean): boolean;
private _updateProperties;

@@ -168,3 +169,3 @@ private _handleRelativeValue;

declare const VERSION = "18.6.1";
declare const VERSION = "18.6.2";

@@ -171,0 +172,0 @@ declare const nextId: typeof Sequence.nextId;

@@ -263,3 +263,3 @@ /**

var tween = this._tweens[tweenIds[i]];
if (tween && tween.update(time) === false && !preserve) {
if (tween && tween.update(time, preserve) === false && !preserve) {
delete this._tweens[tweenIds[i]];

@@ -402,2 +402,3 @@ }

this._isChainStopped = false;
this._goToEnd = false;
}

@@ -528,2 +529,3 @@ Tween.prototype.getId = function () {

Tween.prototype.end = function () {
this._goToEnd = true;
this.update(Infinity);

@@ -618,14 +620,15 @@ return this;

};
Tween.prototype.update = function (time) {
Tween.prototype.update = function (time, preserve) {
if (time === void 0) { time = now$1(); }
if (preserve === void 0) { preserve = false; }
var property;
var elapsed;
time = time !== undefined ? time : now$1();
var endTime = this._startTime + this._duration;
if (time > endTime && !this._isPlaying) {
return false;
if (!this._goToEnd && !this._isPlaying) {
if (time > endTime)
return false;
if (!preserve)
this.start(time);
}
// If the tween was already finished,
if (!this.isPlaying) {
this.start(time);
}
this._goToEnd = false;
if (time < this._startTime) {

@@ -752,3 +755,3 @@ return true;

var VERSION = '18.6.1';
var VERSION = '18.6.2';

@@ -755,0 +758,0 @@ /**

@@ -269,3 +269,3 @@ (function (global, factory) {

var tween = this._tweens[tweenIds[i]];
if (tween && tween.update(time) === false && !preserve) {
if (tween && tween.update(time, preserve) === false && !preserve) {
delete this._tweens[tweenIds[i]];

@@ -408,2 +408,3 @@ }

this._isChainStopped = false;
this._goToEnd = false;
}

@@ -534,2 +535,3 @@ Tween.prototype.getId = function () {

Tween.prototype.end = function () {
this._goToEnd = true;
this.update(Infinity);

@@ -624,14 +626,15 @@ return this;

};
Tween.prototype.update = function (time) {
Tween.prototype.update = function (time, preserve) {
if (time === void 0) { time = now$1(); }
if (preserve === void 0) { preserve = false; }
var property;
var elapsed;
time = time !== undefined ? time : now$1();
var endTime = this._startTime + this._duration;
if (time > endTime && !this._isPlaying) {
return false;
if (!this._goToEnd && !this._isPlaying) {
if (time > endTime)
return false;
if (!preserve)
this.start(time);
}
// If the tween was already finished,
if (!this.isPlaying) {
this.start(time);
}
this._goToEnd = false;
if (time < this._startTime) {

@@ -758,3 +761,3 @@ return true;

var VERSION = '18.6.1';
var VERSION = '18.6.2';

@@ -761,0 +764,0 @@ /**

{
"name": "@tweenjs/tween.js",
"description": "Super simple, fast and easy to use tweening engine which incorporates optimised Robert Penner's equations.",
"version": "18.6.1",
"version": "18.6.2",
"main": "dist/tween.cjs.js",

@@ -32,2 +32,3 @@ "types": "dist/tween.d.ts",

"tsc-watch": "tsc --watch",
"examples": "npx serve .",
"test": "npm run build && npm run test-unit && npm run test-lint",

@@ -34,0 +35,0 @@ "test-unit": "nodeunit test/unit/nodeunitheadless.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc