Skip to content

Commit

Permalink
Adding a more contrasty color, see phetsims/buoyancy-basics#5
Browse files Browse the repository at this point in the history
  • Loading branch information
AgustinVallejo committed May 14, 2024
1 parent 2d35bcf commit 1c7f582
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 8 deletions.
2 changes: 1 addition & 1 deletion js/buoyancy-basics/model/BuoyancyBasicsCompareModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export default class BuoyancyBasicsCompareModel extends CompareBlockSetModel {
sameMassVolume: 0.01,
sameVolumeMass: 2,
sameDensityVolume: 0.005,
colorProperty: DensityBuoyancyCommonColors.compareRedColorProperty,
colorProperty: DensityBuoyancyCommonColors.compareOcreColorProperty,
sameMassCubeOptions: {
tag: MassTag.ONE_A.withColorProperty( MassTag.PRIMARY_COLOR_PROPERTY ),
tandem: blockSetsTandem.createTandem( BlockSet.SAME_MASS.tandemName ).createTandem( 'blockA' )
Expand Down
4 changes: 2 additions & 2 deletions js/buoyancy-basics/view/BuoyancyBasicsCompareScreenView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -314,15 +314,15 @@ export default class BuoyancyBasicsCompareScreenView extends DensityBuoyancyScre

// On the left
const box1 = new THREE.Mesh( boxGeometry, new THREE.MeshLambertMaterial( {
color: 0xff2255
color: DensityBuoyancyCommonColors.compareOcreColorProperty.value.toHexString()
} ) );
box1.position.copy( ThreeUtils.vectorToThree( new Vector3( box1Position.x, box1Position.y, 0 ) ) );

scene.add( box1 );

// On the right
const box2 = new THREE.Mesh( boxGeometry, new THREE.MeshLambertMaterial( {
color: 0xaaaaff
color: DensityBuoyancyCommonColors.compareBlueColorProperty.value.toHexString()
} ) );
box2.position.copy( ThreeUtils.vectorToThree( new Vector3( box2Position.x, box2Position.y, 0 ) ) );

Expand Down
6 changes: 6 additions & 0 deletions js/common/view/DensityBuoyancyCommonColors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,12 @@ const DensityBuoyancyCommonColors = {
phetioReadOnly: true,
tandem: tandem.createTandem( 'compareGreenColorProperty' )
} ),
compareOcreColorProperty: new ProfileColorProperty( densityBuoyancyCommon, 'compareOcre', {
default: new Color( 160, 140, 0 )
}, {
phetioReadOnly: true,
tandem: tandem.createTandem( 'compareOcreColorProperty' )
} ),
compareRedColorProperty: new ProfileColorProperty( densityBuoyancyCommon, 'compareRed', {
default: new Color( 233, 55, 50 )
}, {
Expand Down
Binary file modified mipmaps/compare_screen_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 1c7f582

Please sign in to comment.