Fix setting Infinity to direction (#612)

* Create rendered-target.js

* Update math-util.js

* Update rendered-target.js

* Update math-util.js

* Update rendered-target.js
This commit is contained in:
TheBrokenRail 2017-07-26 17:44:02 -04:00 committed by Ray Schamp
parent f2bd32a81a
commit 936ff04b0f

View file

@ -231,6 +231,9 @@ class RenderedTarget extends Target {
if (this.isStage) {
return;
}
if (!isFinite(direction)) {
return;
}
// Keep direction between -179 and +180.
this.direction = MathUtil.wrapClamp(direction, -179, 180);
if (this.renderer) {