Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Instrument Flatirons easter egg #246

Closed
arouinfar opened this issue Feb 23, 2021 · 4 comments
Closed

Instrument Flatirons easter egg #246

arouinfar opened this issue Feb 23, 2021 · 4 comments

Comments

@arouinfar
Copy link
Contributor

For #244

When the altitude is 1500-1700m, an image of the Flatirons appears (Drag & Lab screens). Clients may want to remove this easter egg, so it needs to be instrumented. We probably can't just slap a visibleProperty on it because the model needs to be in control of its visibility.

This seems somewhat parallel to phScale.macroScreen.view.neutralIndicatorNode which was handled by wrapping it in another Node that the client can hide, see phetsims/ph-scale#102.

@zepumph
Copy link
Member

zepumph commented Jul 26, 2021

Although a very similar problem to phetsims/ph-scale#102, I ended up solving it differently because BackgroundNode, which houses the flatirons image, had no PhET-iO instrumentation at all. Instead of making that overly complicated, I just added a single Property to the screen view to be able to toggle whether or not the flat irons can be shown.

projectileMotion.dragScreen.view.flatIronsVisibleProperty

I don't love the name currently, and with it was something more like flatIronsCanBeVisibleProperty, but I'm happy to leave it in semi-precedence with how phetsims/ph-scale#102 was (with two visibleProperties that had to align for it to be visible).

Please review.

@arouinfar
Copy link
Contributor Author

arouinfar commented Aug 19, 2021

The new property is behaving well, thanks! Two tweaks:

  • Remove the property from screens without tunable altitude - Intro & Vectors screens
  • Flatirons is one word, so adjust the casing to flatironsVisibleProperty.

@zepumph
Copy link
Member

zepumph commented Sep 2, 2021

Done

@arouinfar
Copy link
Contributor Author

Thanks @zepumph. Looks good in master, closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants