Skip to content

Commit

Permalink
Color yellow to profile, see #54
Browse files Browse the repository at this point in the history
  • Loading branch information
AgustinVallejo committed Jan 3, 2025
1 parent c00682f commit 30f3efc
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
3 changes: 2 additions & 1 deletion js/bloch-sphere/view/MagneticFieldArrowNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,15 @@
import NumberProperty from '../../../../axon/js/NumberProperty.js';
import { combineOptions } from '../../../../phet-core/js/optionize.js';
import ArrowNode, { ArrowNodeOptions } from '../../../../scenery-phet/js/ArrowNode.js';
import QuantumMeasurementColors from '../../common/QuantumMeasurementColors.js';
import quantumMeasurement from '../../quantumMeasurement.js';

export default class MagneticFieldArrowNode extends ArrowNode {

public constructor( magneticFieldStrength: NumberProperty, maximumLength: number, providedOptions?: ArrowNodeOptions ) {
super( 0, 0, 0, 0, combineOptions<ArrowNodeOptions>( {
stroke: 'black',
fill: '#ff0',
fill: QuantumMeasurementColors.magneticFieldColor,

// empirically determined values
headHeight: 0.3 * maximumLength,
Expand Down
2 changes: 1 addition & 1 deletion js/bloch-sphere/view/MagneticFieldControl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export default class MagneticFieldControl extends Panel {
tandem: providedOptions.tandem.createTandem( 'magneticFieldStrengthSlider' ),
thumbSize: new Dimension2( 28, 14 ),
thumbFill: '#ee0',
thumbFillHighlighted: '#ff0',
thumbFillHighlighted: QuantumMeasurementColors.magneticFieldColor,
thumbCenterLineStroke: Color.BLACK,
trackSize: SLIDER_TRACK_SIZE,
trackFillEnabled: Color.BLACK,
Expand Down
5 changes: 5 additions & 0 deletions js/common/QuantumMeasurementColors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,11 @@ const QuantumMeasurementColors = {
// Color for particles on the "Spin" screen particles.
particleColor: new ProfileColorProperty( quantumMeasurement, 'particleColor', {
default: '#F0F'
} ),

// Magnetic field color
magneticFieldColor: new ProfileColorProperty( quantumMeasurement, 'magneticFieldColor', {
default: '#FF0'
} )
};

Expand Down

0 comments on commit 30f3efc

Please sign in to comment.