Tween.js from tweenjs#21
Conversation
| while (tweenIds.length > 0) { | ||
| this._tweensAddedDuringUpdate = {}; | ||
|
|
||
| for (var i = 0; i < tweenIds.length; i++) { |
There was a problem hiding this comment.
| for (var i = 0; i < tweenIds.length; i++) { | |
| for (var i = 0; i < tweenIds.length; i += 1) { |
This comment was generated with the following checker: FixMyJS
| TWEEN.Group = _Group; | ||
| TWEEN._nextId = 0; | ||
| TWEEN.nextId = function () { | ||
| return TWEEN._nextId++; |
There was a problem hiding this comment.
| return TWEEN._nextId++; | |
| return TWEEN._nextId += 1; |
This comment was generated with the following checker: FixMyJS
|
|
||
| stopChainedTweens: function () { | ||
|
|
||
| for (var i = 0, numChainedTweens = this._chainedTweens.length; i < numChainedTweens; i++) { |
There was a problem hiding this comment.
| for (var i = 0, numChainedTweens = this._chainedTweens.length; i < numChainedTweens; i++) { | |
| for (var i = 0, numChainedTweens = this._chainedTweens.length; i < numChainedTweens; i += 1) { |
This comment was generated with the following checker: FixMyJS
| if (this._repeat > 0) { | ||
|
|
||
| if (isFinite(this._repeat)) { | ||
| this._repeat--; |
There was a problem hiding this comment.
| this._repeat--; | |
| this._repeat -= 1; |
This comment was generated with the following checker: FixMyJS
| this._onCompleteCallback(this._object); | ||
| } | ||
|
|
||
| for (var i = 0, numChainedTweens = this._chainedTweens.length; i < numChainedTweens; i++) { |
There was a problem hiding this comment.
| for (var i = 0, numChainedTweens = this._chainedTweens.length; i < numChainedTweens; i++) { | |
| for (var i = 0, numChainedTweens = this._chainedTweens.length; i < numChainedTweens; i += 1) { |
This comment was generated with the following checker: FixMyJS
| var pw = Math.pow; | ||
| var bn = TWEEN.Interpolation.Utils.Bernstein; | ||
|
|
||
| for (var i = 0; i <= n; i++) { |
There was a problem hiding this comment.
| for (var i = 0; i <= n; i++) { | |
| for (var i = 0; i <= n; i += 1) { |
This comment was generated with the following checker: FixMyJS
| return a[n]; | ||
| } | ||
|
|
||
| for (var i = n; i > 1; i--) { |
There was a problem hiding this comment.
| for (var i = n; i > 1; i--) { | |
| for (var i = n; i > 1; i -= 1) { |
This comment was generated with the following checker: FixMyJS
|
|
||
| }, | ||
|
|
||
| update: function (time) { |
There was a problem hiding this comment.
The function is too long
update ( time ) now spans 80 lines.
Corresponding modifications started here.
Keep your functions' length within 50 lines to improve readability.
This comment was generated with the following checker: long_method
|
|
||
| }, | ||
|
|
||
| update: function (time) { |
There was a problem hiding this comment.
The function is too complicated
update ( time ) now has cyclomatic complexity of 26.
Corresponding modifications started here.
Split your routines to keep cyclomatic complexity below 10 to improve their maintainability.
This comment was generated with the following checker: high_cyclomatic_complexity
|
|
||
| }, | ||
|
|
||
| interpolation: function (interpolationFunction) { |
There was a problem hiding this comment.
The parameter name is too long
Parameter name interpolationFunction is now 21 characters long.
Keep length of your parameter names within 20 characters to improve readability.
This comment was generated with the following checker: naming_analysis
src/Tween.js from https://github.com/tweenjs/tween.js/blob/bc8d79a/src/Tween.js