Skip to content

Commit

Permalink
fix lint errors in joist, phetsims/chipper#736
Browse files Browse the repository at this point in the history
  • Loading branch information
zepumph committed Jan 18, 2019
1 parent fa65cb1 commit 0f1967c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 4 additions & 2 deletions js/Profiler.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ define( function( require ) {
// modules
var inherit = require( 'PHET_CORE/inherit' );
var joist = require( 'JOIST/joist' );
var Util = require( 'DOT/Util' );


// constants
var FIELD_SEPARATOR = ' \u2014 '; // em dash, a long horizontal dash
Expand Down Expand Up @@ -81,11 +83,11 @@ define( function( require ) {
}

// FPS
var averageFPS = Math.round( 1000 / (totalTime / this.allTimes.length) );
var averageFPS = Util.roundSymmetric( 1000 / (totalTime / this.allTimes.length) );
var text = '' + averageFPS + ' FPS';

// ms/frame
var averageFrameTime = Math.round( totalTime / this.allTimes.length );
var averageFrameTime = Util.roundSymmetric( totalTime / this.allTimes.length );
text = text + FIELD_SEPARATOR + averageFrameTime + 'ms/frame';

// histogram
Expand Down
4 changes: 4 additions & 0 deletions js/splash.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright 2016-2018, University of Colorado Boulder
/* eslint-disable bad-sim-text */

/**
* Shows the splash screen and loading progress bar.
Expand Down Expand Up @@ -42,6 +43,7 @@

var scale = Math.min( scaleX, scaleY ) * SCALE_FACTOR;

// use Math.round because this is a preload
var translationX = Math.round( ( availableWidth - currentWidth * scale ) / 2 );
var translationY = Math.round( ( availableHeight - currentHeight * scale ) * POSITION_Y );

Expand Down Expand Up @@ -127,6 +129,8 @@

// fade/glow the background of the loading bar
var phetSplashScreenAnimationInterval = setInterval( function() {

// use browser toFixed because this is a preload
progressBarBackground.style[ 'stroke-width' ] = ( Math.sin( Date.now() / 1000 * 4 ) * 0.55 + 1 ).toFixed( 2 );
}, 16 );

Expand Down

0 comments on commit 0f1967c

Please sign in to comment.