Skip to content

Commit

Permalink
support colorProfile query parameter, allow either 'basics' or 'proje…
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelzoom committed Jul 29, 2019
1 parent 7fb4a3f commit ed4ae30
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion js/molecule-shapes-basics-main.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ define( function( require ) {

// modules
var CanvasWarningNode = require( 'SCENERY_PHET/CanvasWarningNode' );
var ColorProfile = require( 'SCENERY_PHET/ColorProfile' );
var GlobalOptionsNode = require( 'MOLECULE_SHAPES/common/view/GlobalOptionsNode' );
var IE11StencilWarningNode = require( 'SCENERY_PHET/IE11StencilWarningNode' );
var ModelMoleculesScreen = require( 'MOLECULE_SHAPES/model/ModelMoleculesScreen' );
Expand Down Expand Up @@ -52,7 +53,13 @@ define( function( require ) {
new CanvasWarningNode() )
};

MoleculeShapesColorProfile.profileNameProperty.value = DEFAULT_COLOR_PROFILE_NAME;
// Set the initial color profile, ignoring anything other than 'basics' or 'projector'.
if ( phet.chipper.queryParameters.colorProfile === ColorProfile.PROJECTOR_COLOR_PROFILE_NAME ) {
MoleculeShapesColorProfile.profileNameProperty.value = phet.chipper.queryParameters.colorProfile;
}
else {
MoleculeShapesColorProfile.profileNameProperty.value = DEFAULT_COLOR_PROFILE_NAME;
}

SimLauncher.launch( function() {
var sim = new Sim( moleculeShapesBasicsTitleString, [
Expand Down

0 comments on commit ed4ae30

Please sign in to comment.