Skip to content

Commit

Permalink
name spacing in gravityForcelab
Browse files Browse the repository at this point in the history
  • Loading branch information
aadish committed Mar 9, 2016
1 parent 9f99bc2 commit e0ab001
Show file tree
Hide file tree
Showing 9 changed files with 44 additions and 5 deletions.
5 changes: 4 additions & 1 deletion js/gravity-force-lab/model/GravityForceLabModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ define( function( require ) {
'use strict';

// modules
var gravityForceLab = require( 'GRAVITY_FORCE_LAB/gravityForceLab' );
var inherit = require( 'PHET_CORE/inherit' );
var Mass = require( 'GRAVITY_FORCE_LAB/gravity-force-lab/model/Mass' );
var PropertySet = require( 'AXON/PropertySet' );
var inherit = require( 'PHET_CORE/inherit' );
var Range = require( 'DOT/Range' );

// constants
Expand Down Expand Up @@ -53,6 +54,8 @@ define( function( require ) {
this.mass2.positionProperty.link( function(){ self.updateForce(); } );
}

gravityForceLab.register( 'GravityForceLabModel', GravityForceLabModel);

return inherit( PropertySet, GravityForceLabModel, {

step: function() {
Expand Down
3 changes: 3 additions & 0 deletions js/gravity-force-lab/model/Mass.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ define( function( require ) {

// modules
var Color = require( 'SCENERY/util/Color' );
var gravityForceLab = require( 'GRAVITY_FORCE_LAB/gravityForceLab' );
var inherit = require( 'PHET_CORE/inherit' );
var PropertySet = require( 'AXON/PropertySet' );

Expand Down Expand Up @@ -58,6 +59,8 @@ define( function( require ) {

}

gravityForceLab.register( 'Mass', Mass );

return inherit( PropertySet, Mass, {

// calculates the radius based on mass of object maintaining constant density
Expand Down
3 changes: 3 additions & 0 deletions js/gravity-force-lab/view/GravityForceLabRuler.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ define( function( require ) {

// modules
var Bounds2 = require( 'DOT/Bounds2' );
var gravityForceLab = require( 'GRAVITY_FORCE_LAB/gravityForceLab' );
var inherit = require( 'PHET_CORE/inherit' );
var MovableDragHandler = require( 'SCENERY_PHET/input/MovableDragHandler' );
var Node = require( 'SCENERY/nodes/Node' );
Expand Down Expand Up @@ -48,5 +49,7 @@ define( function( require ) {
} ) );
}

gravityForceLab.register( 'GravityForceLabRuler', GravityForceLabRuler );

return inherit( Node, GravityForceLabRuler );
} );
7 changes: 5 additions & 2 deletions js/gravity-force-lab/view/GravityForceLabScreenView.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,13 @@ define( function( require ) {
// modules
var Bounds2 = require( 'DOT/Bounds2' );
var Color = require( 'SCENERY/util/Color' );
var MassControl = require( 'GRAVITY_FORCE_LAB/gravity-force-lab/view/MassControl' );
var ParameterControlPanel = require( 'GRAVITY_FORCE_LAB/gravity-force-lab/view/ParameterControlPanel' );
var gravityForceLab = require( 'GRAVITY_FORCE_LAB/gravityForceLab' );
var GravityForceLabRuler = require( 'GRAVITY_FORCE_LAB/gravity-force-lab/view/GravityForceLabRuler' );
var inherit = require( 'PHET_CORE/inherit' );
var MassControl = require( 'GRAVITY_FORCE_LAB/gravity-force-lab/view/MassControl' );
var MassNode = require( 'GRAVITY_FORCE_LAB/gravity-force-lab/view/MassNode' );
var ModelViewTransform2 = require( 'PHETCOMMON/view/ModelViewTransform2' );
var ParameterControlPanel = require( 'GRAVITY_FORCE_LAB/gravity-force-lab/view/ParameterControlPanel' );
var ResetAllButton = require( 'SCENERY_PHET/buttons/ResetAllButton' );
var ScreenView = require( 'JOIST/ScreenView' );
var Vector2 = require( 'DOT/Vector2' );
Expand Down Expand Up @@ -121,5 +122,7 @@ define( function( require ) {
} );
}

gravityForceLab.register( 'GravityForceLabScreenView', GravityForceLabScreenView );

return inherit( ScreenView, GravityForceLabScreenView );
} );
3 changes: 3 additions & 0 deletions js/gravity-force-lab/view/MassControl.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ define( function( require ) {
// modules
var ArrowButton = require( 'SCENERY_PHET/buttons/ArrowButton' );
var Dimension2 = require( 'DOT/Dimension2' );
var gravityForceLab = require( 'GRAVITY_FORCE_LAB/gravityForceLab' );
var HSlider = require( 'SUN/HSlider' );
var inherit = require( 'PHET_CORE/inherit' );
var Node = require( 'SCENERY/nodes/Node' );
Expand Down Expand Up @@ -117,5 +118,7 @@ define( function( require ) {
} );
}

gravityForceLab.register( 'MassControl', MassControl );

return inherit( Panel, MassControl );
} );
3 changes: 3 additions & 0 deletions js/gravity-force-lab/view/MassNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ define( function( require ) {
// modules
var ArrowNode = require( 'SCENERY_PHET/ArrowNode' );
var Circle = require( 'SCENERY/nodes/Circle' );
var gravityForceLab = require( 'GRAVITY_FORCE_LAB/gravityForceLab' );
var GravityForceLabModel = require( 'GRAVITY_FORCE_LAB/gravity-force-lab/model/GravityForceLabModel' );
var inherit = require( 'PHET_CORE/inherit' );
var LinearFunction = require( 'DOT/LinearFunction' );
Expand Down Expand Up @@ -220,5 +221,7 @@ define( function( require ) {
} ) );
}

gravityForceLab.register( 'MassNode', MassNode );

return inherit( Node, MassNode );
} );
5 changes: 4 additions & 1 deletion js/gravity-force-lab/view/ParameterControlPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@ define( function( require ) {

// modules
var CheckBox = require( 'SUN/CheckBox' );
var gravityForceLab = require( 'GRAVITY_FORCE_LAB/gravityForceLab' );
var inherit = require( 'PHET_CORE/inherit' );
var Node = require( 'SCENERY/nodes/Node' );
var PhetFont = require( 'SCENERY_PHET/PhetFont' );
var Panel = require( 'SUN/Panel' );
var Text = require( 'SCENERY/nodes/Text' );
var PhetFont = require( 'SCENERY_PHET/PhetFont' );

// strings
var constantRadiusString = require( 'string!GRAVITY_FORCE_LAB/constantRadius' );
Expand Down Expand Up @@ -49,5 +50,7 @@ define( function( require ) {
Panel.call( this, node, options );
}

gravityForceLab.register( 'ParameterControlPanel', ParameterControlPanel );

return inherit( Panel, ParameterControlPanel );
} );
5 changes: 4 additions & 1 deletion js/gravity-force-lab/view/PullerNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@ define( function( require ) {
'use strict';

// modules
var gravityForceLab = require( 'GRAVITY_FORCE_LAB/gravityForceLab' );
var Image = require( 'SCENERY/nodes/Image' );
var inherit = require( 'PHET_CORE/inherit' );
var Node = require( 'SCENERY/nodes/Node' );
var Path = require( 'SCENERY/nodes/Path' );
var Shape = require( 'KITE/Shape' );
var Image = require( 'SCENERY/nodes/Image' );

// images
var pullImage0 = require( 'image!GRAVITY_FORCE_LAB/pull_figure_0.png' );
Expand Down Expand Up @@ -75,5 +76,7 @@ define( function( require ) {
};
}

gravityForceLab.register( 'PullerNode', PullerNode );

return inherit( Node, PullerNode );
} );
15 changes: 15 additions & 0 deletions js/gravityForceLab.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// Copyright 2016, University of Colorado Boulder

/**
* Creates the namespace for this simulation.
*
* @author Aadish Gupta
*/
define( function( require ) {
'use strict';

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

return new Namespace( 'gravityForceLab' );
} );

0 comments on commit e0ab001

Please sign in to comment.