phetsims / gene-expression-essentials

An educational simulation about how genes work to create proteins.
GNU General Public License v3.0
4 stars 6 forks source link

sim fails to start in requirejs mode with assertions enabled #7

Closed pixelzoom closed 9 years ago

pixelzoom commented 9 years ago

Noted when running build-server. Here's the console error in requirejs mode, with assertions enabled:

screenshot_577

pixelzoom commented 9 years ago

This is still a problem as of 8/25/15 run of test-server.

AshrafSharf commented 9 years ago

The getScaleVector method of Matrix3 always returns positive value for the scales, even though the mvt uses inverted scaling for Y, so changing the assertion statement to check for absolute values. Please see the snippet from Matrix3

getScaleVector: function() {
      return new dot.Vector2(
        Math.sqrt( this.m00() * this.m00() + this.m10() * this.m10() ),
        Math.sqrt( this.m01() * this.m01() + this.m11() * this.m11() ) );
    }

After changing the assertion statement, the sim now starts.
pixelzoom commented 9 years ago

:+1: Closing.