diff --git a/js/common/model/CollisionEngine.js b/js/common/model/CollisionEngine.js index 9e88a777..553b91ee 100644 --- a/js/common/model/CollisionEngine.js +++ b/js/common/model/CollisionEngine.js @@ -332,7 +332,7 @@ class CollisionEngine { detectBallToBorderCollisions( elapsedTime ) { assert && assert( typeof elapsedTime === 'number' && elapsedTime >= 0, `invalid elapsedTime: ${elapsedTime}` ); - this.playArea.reflectsBorder && this.ballSystem.balls.forEach( ball => { + this.playArea.reflectingBorder && this.ballSystem.balls.forEach( ball => { // Only detect new ball-border collisions if it hasn't already been detected. if ( !CollisionLabUtils.any( this.collisions, collision => collision.includesBodies( ball, this.playArea ) ) ) { diff --git a/js/common/model/PlayArea.js b/js/common/model/PlayArea.js index 4bdd8662..37993755 100644 --- a/js/common/model/PlayArea.js +++ b/js/common/model/PlayArea.js @@ -49,7 +49,7 @@ class PlayArea { isGridVisibleInitially: false, // {boolean} - indicates if the PlayArea's borders reflect initially (and after resetting). - reflectsBorderInitially: true, + reflectingBorderInitially: true, // {number} - the initial elasticity of the PlayArea (and after resetting), as a percentage. initialElasticityPercent: ELASTICITY_PERCENT_RANGE.max @@ -66,7 +66,7 @@ class PlayArea { // @public {Property.} - indicates if the Balls reflect at the Border of the PlayArea bounds. This Property // is manipulated in the view. - this.reflectingBorderProperty = new BooleanProperty( options.reflectsBorderInitially ); + this.reflectingBorderProperty = new BooleanProperty( options.reflectingBorderInitially ); // @public {Property.} - indicates if the grid of the PlayArea is visible. This is placed inside of the model // since the visibility of the grid affects the drag-snapping of Balls. @@ -99,7 +99,7 @@ class PlayArea { * * @returns {boolean} */ - get reflectsBorder() { + get reflectingBorder() { return this.reflectingBorderProperty.value; } diff --git a/js/inelastic/model/InelasticCollisionEngine.js b/js/inelastic/model/InelasticCollisionEngine.js index 2d9f13a2..499b9c52 100644 --- a/js/inelastic/model/InelasticCollisionEngine.js +++ b/js/inelastic/model/InelasticCollisionEngine.js @@ -229,7 +229,7 @@ class InelasticCollisionEngine extends CollisionEngine { assert && assert( this.rotatingBallCluster, 'cannot call detectBallClusterToBorderCollision' ); // No-op if the PlayArea's border doesn't reflect or the cluster-to-border collision has already been detected. - if ( !this.playArea.reflectsBorder || + if ( !this.playArea.reflectingBorder || CollisionLabUtils.any( this.collisions, collision => collision.includes( this.rotatingBallCluster ) ) ) { return; /** do nothing **/ } @@ -282,7 +282,7 @@ class InelasticCollisionEngine extends CollisionEngine { willBallClusterCollideWithBorderIn( dt ) { assert && assert( typeof dt === 'number', `invalid dt: ${dt}` ); assert && assert( this.rotatingBallCluster, 'cannot call willBallClusterCollideWithBorderIn' ); - assert && assert( this.playArea.reflectsBorder, 'cannot call willBallClusterCollideWithBorderIn' ); + assert && assert( this.playArea.reflectingBorder, 'cannot call willBallClusterCollideWithBorderIn' ); // Get the states of the Balls after the time-delta. const rotationStates = this.rotatingBallCluster.getSteppedRotationStates( dt ); diff --git a/js/intro/model/IntroPlayArea.js b/js/intro/model/IntroPlayArea.js index 84cf9e95..e20bb560 100644 --- a/js/intro/model/IntroPlayArea.js +++ b/js/intro/model/IntroPlayArea.js @@ -26,7 +26,7 @@ class IntroPlayArea extends PlayArea { options = merge( { isGridVisibleInitially: true, - reflectsBorderInitially: false, + reflectingBorderInitially: false, bounds: new Bounds2( PlayArea.DEFAULT_BOUNDS.left, -CollisionLabConstants.PLAY_AREA_1D_HEIGHT / 2, @@ -46,8 +46,8 @@ class IntroPlayArea extends PlayArea { } ); // Verify that the border never reflects for the 'Intro' screen. - assert && this.reflectingBorderProperty.link( reflectsBorder => { - assert( reflectsBorder === false, 'No reflecting borders for the Intro screen.' ); + assert && this.reflectingBorderProperty.link( reflectingBorder => { + assert( reflectingBorder === false, 'No reflecting borders for the Intro screen.' ); } ); } }