Skip to content

Commit

Permalink
var -> const in require statements, use arrow function in define requ…
Browse files Browse the repository at this point in the history
…ire call, phetsims/tasks#1010
  • Loading branch information
zepumph committed Sep 19, 2019
1 parent c3fdab2 commit 586ffd2
Show file tree
Hide file tree
Showing 37 changed files with 453 additions and 453 deletions.
4 changes: 2 additions & 2 deletions js/common/ForcesAndMotionBasicsQueryParameters.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
*
* @author Chris Malley (PixelZoom, Inc.)
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var forcesAndMotionBasics = require( 'FORCES_AND_MOTION_BASICS/forcesAndMotionBasics' );
const forcesAndMotionBasics = require( 'FORCES_AND_MOTION_BASICS/forcesAndMotionBasics' );

var ForcesAndMotionBasicsQueryParameters = QueryStringMachine.getAll( {

Expand Down
14 changes: 7 additions & 7 deletions js/common/view/ForcesAndMotionBasicsIconFactory.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@
*
* @author John Blanco
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var forcesAndMotionBasics = require( 'FORCES_AND_MOTION_BASICS/forcesAndMotionBasics' );
var GaugeNode = require( 'SCENERY_PHET/GaugeNode' );
var MotionConstants = require( 'FORCES_AND_MOTION_BASICS/motion/MotionConstants' );
var Property = require( 'AXON/Property' );
var Range = require( 'DOT/Range' );
const forcesAndMotionBasics = require( 'FORCES_AND_MOTION_BASICS/forcesAndMotionBasics' );
const GaugeNode = require( 'SCENERY_PHET/GaugeNode' );
const MotionConstants = require( 'FORCES_AND_MOTION_BASICS/motion/MotionConstants' );
const Property = require( 'AXON/Property' );
const Range = require( 'DOT/Range' );

// strings
var speedString = require( 'string!FORCES_AND_MOTION_BASICS/speed' );
const speedString = require( 'string!FORCES_AND_MOTION_BASICS/speed' );

/**
* Static object, not meant to be instantiated.
Expand Down
6 changes: 3 additions & 3 deletions js/common/view/ForcesAndMotionBasicsLayoutBounds.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
*
* @author Sam Reid (PhET Interactive Simulations)
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var Bounds2 = require( 'DOT/Bounds2' );
var forcesAndMotionBasics = require( 'FORCES_AND_MOTION_BASICS/forcesAndMotionBasics' );
const Bounds2 = require( 'DOT/Bounds2' );
const forcesAndMotionBasics = require( 'FORCES_AND_MOTION_BASICS/forcesAndMotionBasics' );

var ForcesAndMotionBasicsLayoutBounds = new Bounds2( 0, 0, 981, 604 );

Expand Down
22 changes: 11 additions & 11 deletions js/common/view/ReadoutArrow.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,22 @@
*
* @author Sam Reid
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var ArrowShape = require( 'SCENERY_PHET/ArrowShape' );
var forcesAndMotionBasics = require( 'FORCES_AND_MOTION_BASICS/forcesAndMotionBasics' );
var inherit = require( 'PHET_CORE/inherit' );
var Node = require( 'SCENERY/nodes/Node' );
var Path = require( 'SCENERY/nodes/Path' );
var PhetFont = require( 'SCENERY_PHET/PhetFont' );
var StringUtils = require( 'PHETCOMMON/util/StringUtils' );
var Text = require( 'SCENERY/nodes/Text' );
var Util = require( 'DOT/Util' );
const ArrowShape = require( 'SCENERY_PHET/ArrowShape' );
const forcesAndMotionBasics = require( 'FORCES_AND_MOTION_BASICS/forcesAndMotionBasics' );
const inherit = require( 'PHET_CORE/inherit' );
const Node = require( 'SCENERY/nodes/Node' );
const Path = require( 'SCENERY/nodes/Path' );
const PhetFont = require( 'SCENERY_PHET/PhetFont' );
const StringUtils = require( 'PHETCOMMON/util/StringUtils' );
const Text = require( 'SCENERY/nodes/Text' );
const Util = require( 'DOT/Util' );

// strings
var pattern0ValueUnitsNString = require( 'string!FORCES_AND_MOTION_BASICS/pattern.0valueUnitsN' );
const pattern0ValueUnitsNString = require( 'string!FORCES_AND_MOTION_BASICS/pattern.0valueUnitsN' );

// constants
var ARROW_HEAD_WIDTH = 50;
Expand Down
16 changes: 8 additions & 8 deletions js/common/view/SliderKnob.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@
*
* @author Sam Reid
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var BooleanProperty = require( 'AXON/BooleanProperty' );
var Circle = require( 'SCENERY/nodes/Circle' );
var forcesAndMotionBasics = require( 'FORCES_AND_MOTION_BASICS/forcesAndMotionBasics' );
var inherit = require( 'PHET_CORE/inherit' );
var LinearGradient = require( 'SCENERY/util/LinearGradient' );
var Node = require( 'SCENERY/nodes/Node' );
var Rectangle = require( 'SCENERY/nodes/Rectangle' );
const BooleanProperty = require( 'AXON/BooleanProperty' );
const Circle = require( 'SCENERY/nodes/Circle' );
const forcesAndMotionBasics = require( 'FORCES_AND_MOTION_BASICS/forcesAndMotionBasics' );
const inherit = require( 'PHET_CORE/inherit' );
const LinearGradient = require( 'SCENERY/util/LinearGradient' );
const Node = require( 'SCENERY/nodes/Node' );
const Rectangle = require( 'SCENERY/nodes/Rectangle' );

/**
* Constructor.
Expand Down
36 changes: 18 additions & 18 deletions js/forces-and-motion-basics-main.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,31 +5,31 @@
*
* @author Sam Reid
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var Image = require( 'SCENERY/nodes/Image' );
var MotionScreen = require( 'FORCES_AND_MOTION_BASICS/motion/MotionScreen' );
var NetForceModel = require( 'FORCES_AND_MOTION_BASICS/netforce/model/NetForceModel' );
var NetForceScreenView = require( 'FORCES_AND_MOTION_BASICS/netforce/view/NetForceScreenView' );
var Screen = require( 'JOIST/Screen' );
var Sim = require( 'JOIST/Sim' );
var SimLauncher = require( 'JOIST/SimLauncher' );
var Tandem = require( 'TANDEM/Tandem' );
const Image = require( 'SCENERY/nodes/Image' );
const MotionScreen = require( 'FORCES_AND_MOTION_BASICS/motion/MotionScreen' );
const NetForceModel = require( 'FORCES_AND_MOTION_BASICS/netforce/model/NetForceModel' );
const NetForceScreenView = require( 'FORCES_AND_MOTION_BASICS/netforce/view/NetForceScreenView' );
const Screen = require( 'JOIST/Screen' );
const Sim = require( 'JOIST/Sim' );
const SimLauncher = require( 'JOIST/SimLauncher' );
const Tandem = require( 'TANDEM/Tandem' );

// images
var accelerationIcon = require( 'image!FORCES_AND_MOTION_BASICS/Acceleration_Icon.png' );
var frictionIcon = require( 'image!FORCES_AND_MOTION_BASICS/Friction_Icon.png' );
var motionIcon = require( 'image!FORCES_AND_MOTION_BASICS/Motion_Icon.png' );
var tugIcon = require( 'image!FORCES_AND_MOTION_BASICS/Tug_Icon.png' );
const accelerationIcon = require( 'image!FORCES_AND_MOTION_BASICS/Acceleration_Icon.png' );
const frictionIcon = require( 'image!FORCES_AND_MOTION_BASICS/Friction_Icon.png' );
const motionIcon = require( 'image!FORCES_AND_MOTION_BASICS/Motion_Icon.png' );
const tugIcon = require( 'image!FORCES_AND_MOTION_BASICS/Tug_Icon.png' );

// strings
var accelerationString = require( 'string!FORCES_AND_MOTION_BASICS/acceleration' );
var forcesAndMotionBasicsTitleString = require( 'string!FORCES_AND_MOTION_BASICS/forces-and-motion-basics.title' );
var frictionString = require( 'string!FORCES_AND_MOTION_BASICS/friction' );
var motionString = require( 'string!FORCES_AND_MOTION_BASICS/motion' );
var netForceString = require( 'string!FORCES_AND_MOTION_BASICS/netForce' );
const accelerationString = require( 'string!FORCES_AND_MOTION_BASICS/acceleration' );
const forcesAndMotionBasicsTitleString = require( 'string!FORCES_AND_MOTION_BASICS/forces-and-motion-basics.title' );
const frictionString = require( 'string!FORCES_AND_MOTION_BASICS/friction' );
const motionString = require( 'string!FORCES_AND_MOTION_BASICS/motion' );
const netForceString = require( 'string!FORCES_AND_MOTION_BASICS/netForce' );

// constants
var tandem = Tandem.rootTandem;
Expand Down
4 changes: 2 additions & 2 deletions js/forcesAndMotionBasics.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
*
* @author Jesse Greenberg
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var Namespace = require( 'PHET_CORE/Namespace' );
const Namespace = require( 'PHET_CORE/Namespace' );

return new Namespace( 'forcesAndMotionBasics' );
} );
4 changes: 2 additions & 2 deletions js/motion/MotionConstants.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
*
* @author Sam Reid
*/
define( function( require ) {
define( require => {
'use strict';

var forcesAndMotionBasics = require( 'FORCES_AND_MOTION_BASICS/forcesAndMotionBasics' );
const forcesAndMotionBasics = require( 'FORCES_AND_MOTION_BASICS/forcesAndMotionBasics' );

var MotionConstants = {

Expand Down
12 changes: 6 additions & 6 deletions js/motion/MotionScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
*
* @author Sam Reid (PhET Interactive Simulations)
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var forcesAndMotionBasics = require( 'FORCES_AND_MOTION_BASICS/forcesAndMotionBasics' );
var inherit = require( 'PHET_CORE/inherit' );
var MotionModel = require( 'FORCES_AND_MOTION_BASICS/motion/model/MotionModel' );
var MotionScreenView = require( 'FORCES_AND_MOTION_BASICS/motion/view/MotionScreenView' );
var Screen = require( 'JOIST/Screen' );
const forcesAndMotionBasics = require( 'FORCES_AND_MOTION_BASICS/forcesAndMotionBasics' );
const inherit = require( 'PHET_CORE/inherit' );
const MotionModel = require( 'FORCES_AND_MOTION_BASICS/motion/model/MotionModel' );
const MotionScreenView = require( 'FORCES_AND_MOTION_BASICS/motion/view/MotionScreenView' );
const Screen = require( 'JOIST/Screen' );

/**
* @param style
Expand Down
8 changes: 4 additions & 4 deletions js/motion/model/AnimationStateIO.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
*
* @author Michael Kauzmann (PhET Interactive Simulations)
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var forcesAndMotionBasics = require( 'FORCES_AND_MOTION_BASICS/forcesAndMotionBasics' );
var ObjectIO = require( 'TANDEM/types/ObjectIO' );
var validate = require( 'AXON/validate' );
const forcesAndMotionBasics = require( 'FORCES_AND_MOTION_BASICS/forcesAndMotionBasics' );
const ObjectIO = require( 'TANDEM/types/ObjectIO' );
const validate = require( 'AXON/validate' );

class AnimationStateIO extends ObjectIO {

Expand Down
30 changes: 15 additions & 15 deletions js/motion/model/Item.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,24 @@
*
* @author Sam Reid
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var AnimationStateIO = require( 'FORCES_AND_MOTION_BASICS/motion/model/AnimationStateIO' );
var BooleanProperty = require( 'AXON/BooleanProperty' );
var forcesAndMotionBasics = require( 'FORCES_AND_MOTION_BASICS/forcesAndMotionBasics' );
var inherit = require( 'PHET_CORE/inherit' );
var ItemIO = require( 'FORCES_AND_MOTION_BASICS/motion/model/ItemIO' );
var NumberProperty = require( 'AXON/NumberProperty' );
var PhetioObject = require( 'TANDEM/PhetioObject' );
var Property = require( 'AXON/Property' );
var PropertyIO = require( 'AXON/PropertyIO' );
var Range = require( 'DOT/Range' );
var StringIO = require( 'TANDEM/types/StringIO' );
var Util = require( 'DOT/Util' );
var Vector2 = require( 'DOT/Vector2' );
var Vector2Property = require( 'DOT/Vector2Property' );
const AnimationStateIO = require( 'FORCES_AND_MOTION_BASICS/motion/model/AnimationStateIO' );
const BooleanProperty = require( 'AXON/BooleanProperty' );
const forcesAndMotionBasics = require( 'FORCES_AND_MOTION_BASICS/forcesAndMotionBasics' );
const inherit = require( 'PHET_CORE/inherit' );
const ItemIO = require( 'FORCES_AND_MOTION_BASICS/motion/model/ItemIO' );
const NumberProperty = require( 'AXON/NumberProperty' );
const PhetioObject = require( 'TANDEM/PhetioObject' );
const Property = require( 'AXON/Property' );
const PropertyIO = require( 'AXON/PropertyIO' );
const Range = require( 'DOT/Range' );
const StringIO = require( 'TANDEM/types/StringIO' );
const Util = require( 'DOT/Util' );
const Vector2 = require( 'DOT/Vector2' );
const Vector2Property = require( 'DOT/Vector2Property' );

/**
* Constructor for Item
Expand Down
8 changes: 4 additions & 4 deletions js/motion/model/ItemIO.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
*
* @author Sam Reid (PhET Interactive Simulations)
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var forcesAndMotionBasics = require( 'FORCES_AND_MOTION_BASICS/forcesAndMotionBasics' );
var ObjectIO = require( 'TANDEM/types/ObjectIO' );
var validate = require( 'AXON/validate' );
const forcesAndMotionBasics = require( 'FORCES_AND_MOTION_BASICS/forcesAndMotionBasics' );
const ObjectIO = require( 'TANDEM/types/ObjectIO' );
const validate = require( 'AXON/validate' );

class ItemIO extends ObjectIO {

Expand Down
58 changes: 29 additions & 29 deletions js/motion/model/MotionModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,40 +5,40 @@
*
* @author Sam Reid
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var BooleanProperty = require( 'AXON/BooleanProperty' );
var DerivedProperty = require( 'AXON/DerivedProperty' );
var Emitter = require( 'AXON/Emitter' );
var forcesAndMotionBasics = require( 'FORCES_AND_MOTION_BASICS/forcesAndMotionBasics' );
var inherit = require( 'PHET_CORE/inherit' );
var Item = require( 'FORCES_AND_MOTION_BASICS/motion/model/Item' );
var ItemIO = require( 'FORCES_AND_MOTION_BASICS/motion/model/ItemIO' );
var MotionConstants = require( 'FORCES_AND_MOTION_BASICS/motion/MotionConstants' );
var NumberProperty = require( 'AXON/NumberProperty' );
var ObservableArray = require( 'AXON/ObservableArray' );
var ObservableArrayIO = require( 'AXON/ObservableArrayIO' );
var Property = require( 'AXON/Property' );
var PropertyIO = require( 'AXON/PropertyIO' );
var Range = require( 'DOT/Range' );
var StringIO = require( 'TANDEM/types/StringIO' );
var Util = require( 'DOT/Util' );
var Vector2 = require( 'DOT/Vector2' );
const BooleanProperty = require( 'AXON/BooleanProperty' );
const DerivedProperty = require( 'AXON/DerivedProperty' );
const Emitter = require( 'AXON/Emitter' );
const forcesAndMotionBasics = require( 'FORCES_AND_MOTION_BASICS/forcesAndMotionBasics' );
const inherit = require( 'PHET_CORE/inherit' );
const Item = require( 'FORCES_AND_MOTION_BASICS/motion/model/Item' );
const ItemIO = require( 'FORCES_AND_MOTION_BASICS/motion/model/ItemIO' );
const MotionConstants = require( 'FORCES_AND_MOTION_BASICS/motion/MotionConstants' );
const NumberProperty = require( 'AXON/NumberProperty' );
const ObservableArray = require( 'AXON/ObservableArray' );
const ObservableArrayIO = require( 'AXON/ObservableArrayIO' );
const Property = require( 'AXON/Property' );
const PropertyIO = require( 'AXON/PropertyIO' );
const Range = require( 'DOT/Range' );
const StringIO = require( 'TANDEM/types/StringIO' );
const Util = require( 'DOT/Util' );
const Vector2 = require( 'DOT/Vector2' );

// images
var crateImage = require( 'image!FORCES_AND_MOTION_BASICS/crate.png' );
var fridgeImage = require( 'image!FORCES_AND_MOTION_BASICS/fridge.png' );
var girlHoldingImage = require( 'mipmap!FORCES_AND_MOTION_BASICS/girl-holding.png,level=1' );
var girlSittingImage = require( 'mipmap!FORCES_AND_MOTION_BASICS/girl-sitting.png' );
var girlStandingImage = require( 'mipmap!FORCES_AND_MOTION_BASICS/girl-standing.png' );
var manHoldingImage = require( 'mipmap!FORCES_AND_MOTION_BASICS/man-holding.png' );
var manSittingImage = require( 'mipmap!FORCES_AND_MOTION_BASICS/man-sitting.png' );
var manStandingImage = require( 'mipmap!FORCES_AND_MOTION_BASICS/man-standing.png' );
var mysteryObjectImage = require( 'image!FORCES_AND_MOTION_BASICS/mystery-object-01.png' );
var trashCanImage = require( 'mipmap!FORCES_AND_MOTION_BASICS/trash-can.png' );
var waterBucketImage = require( 'image!FORCES_AND_MOTION_BASICS/water-bucket.png' );
const crateImage = require( 'image!FORCES_AND_MOTION_BASICS/crate.png' );
const fridgeImage = require( 'image!FORCES_AND_MOTION_BASICS/fridge.png' );
const girlHoldingImage = require( 'mipmap!FORCES_AND_MOTION_BASICS/girl-holding.png,level=1' );
const girlSittingImage = require( 'mipmap!FORCES_AND_MOTION_BASICS/girl-sitting.png' );
const girlStandingImage = require( 'mipmap!FORCES_AND_MOTION_BASICS/girl-standing.png' );
const manHoldingImage = require( 'mipmap!FORCES_AND_MOTION_BASICS/man-holding.png' );
const manSittingImage = require( 'mipmap!FORCES_AND_MOTION_BASICS/man-sitting.png' );
const manStandingImage = require( 'mipmap!FORCES_AND_MOTION_BASICS/man-standing.png' );
const mysteryObjectImage = require( 'image!FORCES_AND_MOTION_BASICS/mystery-object-01.png' );
const trashCanImage = require( 'mipmap!FORCES_AND_MOTION_BASICS/trash-can.png' );
const waterBucketImage = require( 'image!FORCES_AND_MOTION_BASICS/water-bucket.png' );

/**
* Constructor for the motion model
Expand Down
16 changes: 8 additions & 8 deletions js/motion/view/AccelerometerNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@
*
* @author Sam Reid
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var forcesAndMotionBasics = require( 'FORCES_AND_MOTION_BASICS/forcesAndMotionBasics' );
var inherit = require( 'PHET_CORE/inherit' );
var LinearGradient = require( 'SCENERY/util/LinearGradient' );
var Node = require( 'SCENERY/nodes/Node' );
var Path = require( 'SCENERY/nodes/Path' );
var Rectangle = require( 'SCENERY/nodes/Rectangle' );
var Shape = require( 'KITE/Shape' );
const forcesAndMotionBasics = require( 'FORCES_AND_MOTION_BASICS/forcesAndMotionBasics' );
const inherit = require( 'PHET_CORE/inherit' );
const LinearGradient = require( 'SCENERY/util/LinearGradient' );
const Node = require( 'SCENERY/nodes/Node' );
const Path = require( 'SCENERY/nodes/Path' );
const Rectangle = require( 'SCENERY/nodes/Rectangle' );
const Shape = require( 'KITE/Shape' );

/**
* Constructor.
Expand Down
Loading

0 comments on commit 586ffd2

Please sign in to comment.