bp74 / StageXL

A fast and universal 2D rendering engine for HTML5 and Dart.
http://www.stagexl.org
Other
880 stars 82 forks source link

Remove useless bounds assignments #330

Closed mnordine closed 4 years ago

bp74 commented 4 years ago

I don't think that the code does the same when you remove this line. The matrix.transformRectangle method is called, which takes the bounds rectangle and writes the new values back to the bounds rectangle. If you remove the line we actually call "this.bounds" twice. Which would look like this:

var boundsTransformed = matrix.transformRectangle(this.bounds, this.bounds);