phetsims / forces-and-motion-basics

"Forces and Motion: Basics" is an educational simulation in HTML5, by PhET Interactive Simulations.
http://phet.colorado.edu/en/simulation/forces-and-motion-basics
GNU General Public License v3.0
7 stars 10 forks source link

Convert to the new Region and Culture approach #308

Closed pixelzoom closed 5 months ago

pixelzoom commented 5 months ago

For https://github.com/phetsims/joist/issues/958, convert to the new Region and Culture approach that uses LocalizedImageProperty.

pixelzoom commented 5 months ago

In the above commits, the ScreenIcon for the "Motion" screen was converted to the new approach.

Before changing the girl/man sitting/standing/holding images, I published 2.4.0-dev.6.

pixelzoom commented 5 months ago

In the above commit, I converted the sitting/standing/holding images. This all went smoothly except for this problem - "girl holding" is huge:

screenshot_3124



I'm guessing that this problem had been encounteref before, because MassPlayerPortrayalUSA was working around this problem by using usaGirlHolding_png[ 1 ].img instead of usaGirlHolding_png:

const MassPlayerPortrayalUSA = new MassPlayerPortrayal(
  'usa',
  usaGirlHolding_png[ 1 ].img,
  usaGirlSitting_png,
  usaGirlStanding_png,
  usaManHolding_png,
  usaManSitting_png,
  usaManStanding_png,
  usaMotionIcon_png
);

The problem here is that usaGirlHolding_png need to be fixed. Comparing it's size to usaManHolding_png, it's about twice as big.

pixelzoom commented 5 months ago

In the above commit, I scaled usaGirlHolding_png by 50% (91x126), and that fixed the problem. The image is a bit fuzzy because I scaled a PNG file. What really needs to happen is for the PNG to be re-exported from the Illustrator file (girl-holding.ai?) @arouinfar is the responsible dev -- is that something you could do please?

@Luisav1 the code changes are ready for your review. Please keep the issue open until usaGirlHolding_png is re-exported.

Luisav1 commented 5 months ago

@pixelzoom, thanks for addressing FAMB. I had initially tried to convert it but overlooked keeping the HumanTypeEnum file, which was causing other issues apart from the scaling issue so hadn't committed anything. The code changes look great. Though I do see how usaGirlHolding_png is fuzzy though and will be fixed with a new image import. Keeping this open until then.

arouinfar commented 5 months ago

@pixelzoom here's an updated asset exported at 91x126: usaGirlHolding.png

pixelzoom commented 5 months ago

Thanks @arouinfar. I've integrated the new file.

All of the images in this sim look a bit fuzzy to me. Hopefully they will be convered to SVG someday.

But for now, our work is done here.