diff --git a/package-lock.json b/package-lock.json index b94cacd8..ae41054d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@tweenjs/tween.js", - "version": "17.3.5", + "version": "17.6.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index faee2a19..e46559a5 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@tweenjs/tween.js", "description": "Super simple, fast and easy to use tweening engine which incorporates optimised Robert Penner's equations.", - "version": "17.3.5", + "version": "17.6.0", "main": "src/Tween.js", "homepage": "https://github.com/tweenjs/tween.js", "repository": { diff --git a/src/Tween.js b/src/Tween.js index 0c200a79..d1082bba 100644 --- a/src/Tween.js +++ b/src/Tween.js @@ -157,7 +157,7 @@ TWEEN.Tween.prototype = { to: function (properties, duration) { - this._valuesEnd = Object.create(properties); + this._valuesEnd = properties; if (duration !== undefined) { this._duration = duration; diff --git a/test/unit/tests.js b/test/unit/tests.js index 605538a3..afbe043c 100644 --- a/test/unit/tests.js +++ b/test/unit/tests.js @@ -1380,20 +1380,27 @@ }, - 'Arrays in the object passed to to() are not modified by start().': - function(test) { - - var start = {x: 10, y: 20}; - var end = {x: 100, y: 200, values: ['a', 'b']}; - var valuesArray = end.values; - new TWEEN.Tween(start).to(end).start(); - test.equal(valuesArray, end.values); - test.equal(end.values.length, 2); - test.equal(end.values[0], 'a'); - test.equal(end.values[1], 'b'); - test.done(); - - }, + /* + * This test covered a feature that was a breaking change from + * v17.3.0 to v17.3.2 (v17.3.1 was never released). It has been + * reverted and published in v17.6.0 so that v17 can be considered + * fixed. v18 contains the new behavior. v19 will provide a new + * `dynamic` option to `to()` for choosing the desired behavior. + */ + // 'Arrays in the object passed to to() are not modified by start().': + // function(test) { + + // var start = {x: 10, y: 20}; + // var end = {x: 100, y: 200, values: ['a', 'b']}; + // var valuesArray = end.values; + // new TWEEN.Tween(start).to(end).start(); + // test.equal(valuesArray, end.values); + // test.equal(end.values.length, 2); + // test.equal(end.values[0], 'a'); + // test.equal(end.values[1], 'b'); + // test.done(); + + // }, };