phetsims/forces-and-motion-basics

Convert to the new Region and Culture approach

Closed this issue · 6 comments

For phetsims/joist#958, convert to the new Region and Culture approach that uses LocalizedImageProperty.

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.

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.

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.

@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.

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

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.