Skip to content

Commit

Permalink
Rename from simColorProfileProperty to SimColors.js, see phetsims/sce…
Browse files Browse the repository at this point in the history
  • Loading branch information
samreid committed Jul 28, 2021
1 parent b017a56 commit b8b87a5
Show file tree
Hide file tree
Showing 10 changed files with 38 additions and 38 deletions.
4 changes: 2 additions & 2 deletions js/blackbody-spectrum/BlackbodySpectrumScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import Screen from '../../../joist/js/Screen.js';
import blackbodySpectrum from '../blackbodySpectrum.js';
import BlackbodySpectrumModel from './model/BlackbodySpectrumModel.js';
import blackbodyColorProfile from './view/blackbodyColorProfile.js';
import BlackbodyColors from './view/BlackbodyColors.js';
import BlackbodySpectrumScreenView from './view/BlackbodySpectrumScreenView.js';

class BlackbodySpectrumScreen extends Screen {
Expand All @@ -20,7 +20,7 @@ class BlackbodySpectrumScreen extends Screen {
constructor( tandem ) {
super( () => new BlackbodySpectrumModel( tandem.createTandem( 'model' ) ),
model => new BlackbodySpectrumScreenView( model, tandem.createTandem( 'view' ) ), {
backgroundColorProperty: blackbodyColorProfile.backgroundProperty,
backgroundColorProperty: BlackbodyColors.backgroundProperty,
tandem: tandem
}
);
Expand Down
6 changes: 3 additions & 3 deletions js/blackbody-spectrum/view/BGRAndStarDisplay.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ import Tandem from '../../../../tandem/js/Tandem.js';
import blackbodySpectrumStrings from '../../blackbodySpectrumStrings.js';
import BlackbodyConstants from '../../BlackbodyConstants.js';
import blackbodySpectrum from '../../blackbodySpectrum.js';
import blackbodyColorProfile from './blackbodyColorProfile.js';
import BlackbodyColors from './BlackbodyColors.js';

const bString = blackbodySpectrumStrings.b;
const gString = blackbodySpectrumStrings.g;
const rString = blackbodySpectrumStrings.r;

// constants
const CIRCLE_LABEL_COLOR = blackbodyColorProfile.titlesTextProperty;
const CIRCLE_LABEL_COLOR = BlackbodyColors.titlesTextProperty;
const CIRCLE_RADIUS = 15;
const STAR_INNER_RADIUS = 20;
const STAR_OUTER_RADIUS = 35;
Expand Down Expand Up @@ -68,7 +68,7 @@ class BGRAndStarDisplay extends Node {
} ), {
lineWidth: 1.5,
lineJoin: 'round',
stroke: blackbodyColorProfile.starStrokeProperty
stroke: BlackbodyColors.starStrokeProperty
}
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import Color from '../../../../scenery/js/util/Color.js';
import ProfileColorProperty from '../../../../scenery/js/util/ProfileColorProperty.js';
import blackbodySpectrum from '../../blackbodySpectrum.js';

const blackbodyColorProfile = {
const BlackbodyColors = {

// @public {ProfileColorProperty}
backgroundProperty: new ProfileColorProperty( 'background', {
Expand Down Expand Up @@ -70,5 +70,5 @@ const blackbodyColorProfile = {
} )
};

blackbodySpectrum.register( 'blackbodyColorProfile', blackbodyColorProfile );
export default blackbodyColorProfile;
blackbodySpectrum.register( 'BlackbodyColors', BlackbodyColors );
export default BlackbodyColors;
12 changes: 6 additions & 6 deletions js/blackbody-spectrum/view/BlackbodySpectrumControlPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import Panel from '../../../../sun/js/Panel.js';
import Tandem from '../../../../tandem/js/Tandem.js';
import blackbodySpectrumStrings from '../../blackbodySpectrumStrings.js';
import blackbodySpectrum from '../../blackbodySpectrum.js';
import blackbodyColorProfile from './blackbodyColorProfile.js';
import BlackbodyColors from './BlackbodyColors.js';

const graphValuesString = blackbodySpectrumStrings.graphValues;
const intensityString = blackbodySpectrumStrings.intensity;
Expand All @@ -37,10 +37,10 @@ const labelsString = blackbodySpectrumStrings.labels;

// constants
const DISPLAY_FONT = new PhetFont( 18 );
const CHECKBOX_TEXT_FILL = blackbodyColorProfile.panelTextProperty;
const CHECKBOX_TEXT_FILL = BlackbodyColors.panelTextProperty;
const CHECKBOX_TEXT_WIDTH = 110;
const CONTROL_PANEL_FILL = 'rgba( 0, 0, 0, 0 )';
const CHECKBOX_COLOR = blackbodyColorProfile.panelStrokeProperty;
const CHECKBOX_COLOR = BlackbodyColors.panelStrokeProperty;
const CHECKBOX_TOUCH_DILATION = 6;
const BUTTON_ICON_WIDTH = 50;
const BUTTON_TOUCH_DILATION = 6;
Expand Down Expand Up @@ -68,7 +68,7 @@ class BlackbodySpectrumControlPanel extends Panel {
lineWidth: 1,
fill: CONTROL_PANEL_FILL,
resize: true,
stroke: blackbodyColorProfile.panelStrokeProperty,
stroke: BlackbodyColors.panelStrokeProperty,
maxWidth: CHECKBOX_DEFAULT_WIDTH,

// phet-io
Expand Down Expand Up @@ -183,8 +183,8 @@ class BlackbodySpectrumControlPanel extends Panel {

// Create panel to allow left alignment on checkboxes while keeping center alignment for buttons
const checkboxPanel = new Panel( checkboxes, {
fill: blackbodyColorProfile.backgroundProperty,
stroke: blackbodyColorProfile.backgroundProperty,
fill: BlackbodyColors.backgroundProperty,
stroke: BlackbodyColors.backgroundProperty,
minWidth: CHECKBOX_DEFAULT_WIDTH
} );

Expand Down
6 changes: 3 additions & 3 deletions js/blackbody-spectrum/view/BlackbodySpectrumScreenView.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import blackbodySpectrumStrings from '../../blackbodySpectrumStrings.js';
import BlackbodyConstants from '../../BlackbodyConstants.js';
import blackbodySpectrum from '../../blackbodySpectrum.js';
import BGRAndStarDisplay from './BGRAndStarDisplay.js';
import blackbodyColorProfile from './blackbodyColorProfile.js';
import BlackbodyColors from './BlackbodyColors.js';
import BlackbodySpectrumControlPanel from './BlackbodySpectrumControlPanel.js';
import BlackbodySpectrumThermometer from './BlackbodySpectrumThermometer.js';
import GraphDrawingNode from './GraphDrawingNode.js';
Expand All @@ -30,8 +30,8 @@ const kelvinUnitsString = blackbodySpectrumStrings.kelvinUnits;

// constants
const TEMPERATURE_FONT = new PhetFont( { size: 22, weight: 'bold' } );
const TITLE_COLOR = blackbodyColorProfile.titlesTextProperty;
const TEMPERATURE_COLOR = blackbodyColorProfile.temperatureTextProperty;
const TITLE_COLOR = BlackbodyColors.titlesTextProperty;
const TEMPERATURE_COLOR = BlackbodyColors.temperatureTextProperty;
const INSET = 10;
const TEMPERATURE_LABEL_SPACING = 5;

Expand Down
6 changes: 3 additions & 3 deletions js/blackbody-spectrum/view/BlackbodySpectrumThermometer.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import Tandem from '../../../../tandem/js/Tandem.js';
import blackbodySpectrumStrings from '../../blackbodySpectrumStrings.js';
import BlackbodyConstants from '../../BlackbodyConstants.js';
import blackbodySpectrum from '../../blackbodySpectrum.js';
import blackbodyColorProfile from './blackbodyColorProfile.js';
import BlackbodyColors from './BlackbodyColors.js';
import TriangleSliderThumb from './TriangleSliderThumb.js';

// string
Expand Down Expand Up @@ -57,10 +57,10 @@ class BlackbodySpectrumThermometer extends ThermometerNode {
minorTickLength: 5,
glassThickness: 5,
lineWidth: 3,
outlineStroke: blackbodyColorProfile.thermometerTubeStrokeProperty,
outlineStroke: BlackbodyColors.thermometerTubeStrokeProperty,
tickSpacingTemperature: 500,
tickLabelFont: new PhetFont( { size: 18 } ),
tickLabelColor: blackbodyColorProfile.thermometerTubeStrokeProperty,
tickLabelColor: BlackbodyColors.thermometerTubeStrokeProperty,
tickLabelWidth: 100,
snapInterval: 50,
zeroLevel: 'bulbTop',
Expand Down
12 changes: 6 additions & 6 deletions js/blackbody-spectrum/view/GraphValuesPointNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import Panel from '../../../../sun/js/Panel.js';
import Tandem from '../../../../tandem/js/Tandem.js';
import BlackbodyConstants from '../../BlackbodyConstants.js';
import blackbodySpectrum from '../../blackbodySpectrum.js';
import blackbodyColorProfile from './blackbodyColorProfile.js';
import BlackbodyColors from './BlackbodyColors.js';

class GraphValuesPointNode extends Node {

Expand All @@ -42,14 +42,14 @@ class GraphValuesPointNode extends Node {
options = merge( {
circleOptions: {
radius: 5,
fill: blackbodyColorProfile.graphValuesPointProperty
fill: BlackbodyColors.graphValuesPointProperty
},
dashedLineOptions: {
stroke: blackbodyColorProfile.graphValuesDashedLineProperty,
stroke: BlackbodyColors.graphValuesDashedLineProperty,
lineDash: [ 4, 4 ]
},
valueTextOptions: {
fill: blackbodyColorProfile.graphValuesLabelsProperty,
fill: BlackbodyColors.graphValuesLabelsProperty,
font: new PhetFont( 18 ),
maxWidth: 50
},
Expand Down Expand Up @@ -77,8 +77,8 @@ class GraphValuesPointNode extends Node {
this.wavelengthValueText = new Text( '', options.valueTextOptions );
this.spectralPowerDensityValueText = new RichText( '', options.valueTextOptions );
this.spectralPowerDensityNode = new Panel( this.spectralPowerDensityValueText, {
fill: blackbodyColorProfile.backgroundProperty,
stroke: blackbodyColorProfile.backgroundProperty,
fill: BlackbodyColors.backgroundProperty,
stroke: BlackbodyColors.backgroundProperty,
cornerRadius: 0,
xMargin: options.labelOffset,
yMargin: 0
Expand Down
6 changes: 3 additions & 3 deletions js/blackbody-spectrum/view/SavedGraphInformationPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import Panel from '../../../../sun/js/Panel.js';
import Tandem from '../../../../tandem/js/Tandem.js';
import blackbodySpectrum from '../../blackbodySpectrum.js';
import blackbodySpectrumStrings from '../../blackbodySpectrumStrings.js';
import blackbodyColorProfile from './blackbodyColorProfile.js';
import BlackbodyColors from './BlackbodyColors.js';
import GenericCurveShape from './GenericCurveShape.js';

const kelvinUnitsString = blackbodySpectrumStrings.kelvinUnits;
Expand All @@ -34,7 +34,7 @@ class SavedGraphInformationPanel extends Panel {

options = merge( {
panelFill: 'rgba( 0, 0, 0, 0 )',
panelStroke: blackbodyColorProfile.panelStrokeProperty,
panelStroke: BlackbodyColors.panelStrokeProperty,
minWidth: 140,
maxWidth: 140,
spacing: 10,
Expand All @@ -43,7 +43,7 @@ class SavedGraphInformationPanel extends Panel {
savedCurveStroke: 'gray',
labelOptions: {
font: new PhetFont( 16 ),
fill: blackbodyColorProfile.titlesTextProperty
fill: BlackbodyColors.titlesTextProperty
},

// phet-io
Expand Down
6 changes: 3 additions & 3 deletions js/blackbody-spectrum/view/TriangleSliderThumb.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import Node from '../../../../scenery/js/nodes/Node.js';
import Path from '../../../../scenery/js/nodes/Path.js';
import Tandem from '../../../../tandem/js/Tandem.js';
import blackbodySpectrum from '../../blackbodySpectrum.js';
import blackbodyColorProfile from './blackbodyColorProfile.js';
import BlackbodyColors from './BlackbodyColors.js';

class TriangleSliderThumb extends Path {

Expand All @@ -29,12 +29,12 @@ class TriangleSliderThumb extends Path {

options = merge( {
size: new Dimension2( 15, 15 ),
stroke: blackbodyColorProfile.triangleStrokeProperty,
stroke: BlackbodyColors.triangleStrokeProperty,
lineWidth: 1,
fill: 'rgb( 50, 145, 184 )',
fillHighlighted: 'rgb( 71, 207, 255 )',
dashedLineOptions: {
stroke: blackbodyColorProfile.triangleStrokeProperty,
stroke: BlackbodyColors.triangleStrokeProperty,
lineDash: [ 3, 3 ]
},
cursor: 'pointer',
Expand Down
12 changes: 6 additions & 6 deletions js/blackbody-spectrum/view/ZoomableAxesView.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import Tandem from '../../../../tandem/js/Tandem.js';
import blackbodySpectrumStrings from '../../blackbodySpectrumStrings.js';
import BlackbodyConstants from '../../BlackbodyConstants.js';
import blackbodySpectrum from '../../blackbodySpectrum.js';
import blackbodyColorProfile from './blackbodyColorProfile.js';
import BlackbodyColors from './BlackbodyColors.js';

// from nm to m to the fifth power (1e45) and Mega/micron (1e-12)
const SPECTRAL_POWER_DENSITY_CONVERSION_FACTOR = 1e33;
Expand Down Expand Up @@ -73,13 +73,13 @@ class ZoomableAxesView extends Node {
axesWidth: 550,
axesHeight: 400,
axesPathOptions: {
stroke: blackbodyColorProfile.graphAxesStrokeProperty,
stroke: BlackbodyColors.graphAxesStrokeProperty,
lineWidth: 3,
lineCap: 'round',
lineJoin: 'round'
},
ticksPathOptions: {
stroke: blackbodyColorProfile.graphAxesStrokeProperty,
stroke: BlackbodyColors.graphAxesStrokeProperty,
lineWidth: 1,
lineCap: 'butt',
lineJoin: 'bevel'
Expand All @@ -93,11 +93,11 @@ class ZoomableAxesView extends Node {
defaultHorizontalZoom: model.wavelengthMax,
defaultVerticalZoom: 100.0,
minorTickMaxHorizontalZoom: 12000,
axisBoundsLabelColor: blackbodyColorProfile.titlesTextProperty,
axisLabelColor: blackbodyColorProfile.titlesTextProperty,
axisBoundsLabelColor: BlackbodyColors.titlesTextProperty,
axisLabelColor: BlackbodyColors.titlesTextProperty,
electromagneticSpectrumLabelTextOptions: {
font: new PhetFont( 14 ),
fill: blackbodyColorProfile.titlesTextProperty
fill: BlackbodyColors.titlesTextProperty
},
tandem: Tandem.REQUIRED
}, options );
Expand Down

0 comments on commit b8b87a5

Please sign in to comment.