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

Factor out "sky and ground" class, identify possible changes to scenery-phet.SkyNode #335

Open
aaronsamuel137 opened this issue Sep 30, 2014 · 2 comments

Comments

@aaronsamuel137
Copy link
Contributor

In FPAF, we are using a work around where another rectangle is required to make the sky node resize without showing whitespace. This functionality should be a part of sky node. Possibly this could be addressed in GradientBackgroundNode and apply to GroundNode as well.

  // add rectangle on top of the sky node. See https://github.com/phetsims/fluid-pressure-and-flow/issues/87
    this.addChild( new Rectangle( -5000, -1000, 10000, 1002, { stroke: '#01ACE4', fill: '#01ACE4' } ) );

    // add sky node
    this.addChild( new SkyNode( -5000, 0, 10000, groundY, groundY ) );

Currently, many sims with sky node exhibit the same bug as #87 including BalancingAct.

See #215

@pixelzoom
Copy link
Contributor

The only sim currently using SkyNode is fluid-pressure-and-flow.

EFAC has its own SkyNode implementation, see phetsims/energy-forms-and-changes#405.

Balancing Act also has its own implementation, OutsideBackgroundNode, see phetsims/balancing-act#128.

There may be other sims that could be using SkyNode, but I have not attempted to identify them.

@pixelzoom
Copy link
Contributor

pixelzoom commented Feb 23, 2021

The workaround identified in https://github.com/phetsims/scenery-phet/issues/79#issue-44468162 is applied in 3 different places in fluid-pressure-and-flow. I've added TODO comments in all 3 places.

I'm not yet convinced that anything needs to be changed in SkyNode. The first thing that should happen is to address the duplication in fluid-pressure-and-flow, and factor out a "sky and ground" class. What happens there can then inform any possible changes to SkyNode.

So... I'm going to transfer this issue to fluid-pressure-and-flow, and change the title.

@pixelzoom pixelzoom transferred this issue from phetsims/scenery-phet Feb 23, 2021
@pixelzoom pixelzoom changed the title SkyNode should resize without showing whitespace Factor out "sky and ground" class, identify possible changes to scenery-phet.SkyNode Feb 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants