Skip to content

Commit

Permalink
Removed model suffix from model files, see #86
Browse files Browse the repository at this point in the history
  • Loading branch information
samreid committed Nov 5, 2017
1 parent cf40e16 commit c2041dc
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ define( function( require ) {
/**
* @param {Vector2} position - center of the coil
* @param {number} numberOfSpirals - number of spirals
* @param {MagnetModel} magnetModel - model of the magnet
* @param {Magnet} magnetModel - model of the magnet
* @constructor
*/
function CoilModel( position, numberOfSpirals, magnetModel ) {
function Coil( position, numberOfSpirals, magnetModel ) {

// @private
this.sense = 1; //sense of magnet = +1 or -1, simulates flipping of magnet. Magnetic field sign
Expand Down Expand Up @@ -52,9 +52,9 @@ define( function( require ) {
this.previousMagneticFieldProperty.set( this.magneticFieldProperty.get() );
}

faradaysLaw.register( 'CoilModel', CoilModel );
faradaysLaw.register( 'Coil', Coil );

return inherit( Property, CoilModel, {
return inherit( Property, Coil, {

/**
* Restore initial conditions
Expand Down
14 changes: 7 additions & 7 deletions js/faradays-law/model/FaradaysLawModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ define( function( require ) {
// modules
var BooleanProperty = require( 'AXON/BooleanProperty' );
var Bounds2 = require( 'DOT/Bounds2' );
var CoilModel = require( 'FARADAYS_LAW/faradays-law/model/CoilModel' );
var Coil = require( 'FARADAYS_LAW/faradays-law/model/Coil' );
var faradaysLaw = require( 'FARADAYS_LAW/faradaysLaw' );
var inherit = require( 'PHET_CORE/inherit' );
var MagnetModel = require( 'FARADAYS_LAW/faradays-law/model/MagnetModel' );
var Magnet = require( 'FARADAYS_LAW/faradays-law/model/Magnet' );
var Vector2 = require( 'DOT/Vector2' );
var VoltmeterModel = require( 'FARADAYS_LAW/faradays-law/model/VoltmeterModel' );
var Voltmeter = require( 'FARADAYS_LAW/faradays-law/model/Voltmeter' );

// constants
// restricted zones for magnet because of coils
Expand Down Expand Up @@ -50,11 +50,11 @@ define( function( require ) {
} );

// @public - the
this.magnetModel = new MagnetModel( 647, 219, 140, 30, tandem.createTandem( 'magnetModel' ) );
this.magnetModel = new Magnet( 647, 219, 140, 30, tandem.createTandem( 'magnetModel' ) );

// coils
this.bottomCoil = new CoilModel( new Vector2( 448, 328 ), 4, this.magnetModel );
this.topCoil = new CoilModel( new Vector2( 422, 131 ), 2, this.magnetModel );
this.bottomCoil = new Coil( new Vector2( 448, 328 ), 4, this.magnetModel );
this.topCoil = new Coil( new Vector2( 422, 131 ), 2, this.magnetModel );

this.restricted = [
TWO_COIL_RESTRICTED_BOUNDS.shifted( this.topCoil.position.x - 7, this.topCoil.position.y - 76 ),
Expand All @@ -69,7 +69,7 @@ define( function( require ) {
// moving direction of the magnet when intersecting coils
this.magnetMovingDirection = null;

this.voltmeterModel = new VoltmeterModel( this, tandem.createTandem( 'voltmeterModel' ) );
this.voltmeterModel = new Voltmeter( this, tandem.createTandem( 'voltmeterModel' ) );

//if show second coil and magnet over it, reset magnet
this.showTopCoilProperty.link( function( show ) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ define( function( require ) {
* @param {Tandem} tandem
* @constructor
*/
function MagnetModel( x, y, width, height, tandem ) {
function Magnet( x, y, width, height, tandem ) {

this.width = width;
this.height = height;
Expand All @@ -50,9 +50,9 @@ define( function( require ) {
} );
}

faradaysLaw.register( 'MagnetModel', MagnetModel );
faradaysLaw.register( 'Magnet', Magnet );

return inherit( Object, MagnetModel, {
return inherit( Object, Magnet, {

reset: function() {
this.positionProperty.reset();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ define( function( require ) {
* @param {Tandem} tandem
* @constructor
*/
function VoltmeterModel( faradaysLawModel, tandem ) {
function Voltmeter( faradaysLawModel, tandem ) {

this.faradaysLawModel = faradaysLawModel;

Expand All @@ -41,9 +41,9 @@ define( function( require ) {
} );
}

faradaysLaw.register( 'VoltmeterModel', VoltmeterModel );
faradaysLaw.register( 'Voltmeter', Voltmeter );

return inherit( Object, VoltmeterModel, {
return inherit( Object, Voltmeter, {
/**
* voltmeter needle evolution over time
* @param dt
Expand Down

0 comments on commit c2041dc

Please sign in to comment.