Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelzoom committed Mar 13, 2024
1 parent ed224e3 commit 6258461
Showing 1 changed file with 2 additions and 25 deletions.
27 changes: 2 additions & 25 deletions js/magnet-and-compass-main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,12 @@
* @author Chris Malley (PixelZoom, Inc.)
*/

import Sim, { SimOptions } from '../../joist/js/Sim.js';
import simLauncher from '../../joist/js/simLauncher.js';
import Tandem from '../../tandem/js/Tandem.js';
import BarMagnetScreen from '../../faradays-electromagnetic-lab/js/bar-magnet/BarMagnetScreen.js';
import MagnetAndCompassStrings from './MagnetAndCompassStrings.js';
import FELConstants from '../../faradays-electromagnetic-lab/js/common/FELConstants.js';
import FELPreferences from '../../faradays-electromagnetic-lab/js/common/model/FELPreferences.js';
import PreferencesModel from '../../joist/js/preferences/PreferencesModel.js';
import FELPreferencesNode from '../../faradays-electromagnetic-lab/js/common/view/preferences/FELPreferencesNode.js';
import FELSim from '../../faradays-electromagnetic-lab/js/common/FELSim.js';

// Unlike Faraday's Electromagnetic Lab, the 'Earth' checkbox should be visible by default.
// See https://github.com/phetsims/faradays-electromagnetic-lab/issues/23
Expand All @@ -23,30 +20,10 @@ if ( !QueryStringMachine.containsKey( 'addEarthCheckbox' ) ) {
}

simLauncher.launch( () => {

const titleStringProperty = MagnetAndCompassStrings[ 'magnet-and-compass' ].titleStringProperty;

const screens = [
new BarMagnetScreen( Tandem.ROOT.createTandem( 'barMagnetScreen' ) )
];

const options: SimOptions = {
credits: FELConstants.CREDITS,
phetioDesigned: true,
preferencesModel: new PreferencesModel( {
visualOptions: {
supportsProjectorMode: true
},
simulationOptions: {
customPreferences: [ {
createContent: tandem => new FELPreferencesNode( {
tandem: tandem.createTandem( 'simPreferences' )
} )
} ]
}
} )
};

const sim = new Sim( titleStringProperty, screens, options );
const sim = new FELSim( titleStringProperty, screens );
sim.start();
} );

0 comments on commit 6258461

Please sign in to comment.