-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tween.js from tweenjs #21
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is autogenerated code-style review, new suggestions: 16
while (tweenIds.length > 0) { | ||
this._tweensAddedDuringUpdate = {}; | ||
|
||
for (var i = 0; i < tweenIds.length; i++) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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