// Create the number display for the speed of the Ball, which appears above the ball. To be positioned later.
const speedNumberDisplay = new PlayAreaNumberDisplay( ball.speedProperty, {
visibleProperty: valuesVisibleProperty,
valuePattern: StringUtils.fillIn( collisionLabStrings.pattern.vectorSymbolEqualsValueSpaceUnits, {
symbol: collisionLabStrings.symbol.velocity,
units: collisionLabStrings.units.metersPerSecond
} )
} );
// Create the number display for the momentum of the Ball, which appears below the ball. To be positioned later.
const momentumNumberDisplay = new PlayAreaNumberDisplay( ball.momentumMagnitudeProperty, {
visibleProperty: valuesVisibleProperty,
valuePattern: StringUtils.fillIn( collisionLabStrings.pattern.vectorSymbolEqualsValueSpaceUnits, {
symbol: collisionLabStrings.symbol.momentum,
units: collisionLabStrings.units.kilogramMetersPerSecond
} )
} );
Values for the units options to NumberDisplay must be in units.js. So the above will likely fail for anything other than English.
In BallNode.js:
Values for the
units
options to NumberDisplay must be in units.js. So the above will likely fail for anything other than English.