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

Z-ordering of light bulb is wrong #659

Closed
liammulh opened this issue Feb 5, 2021 · 4 comments
Closed

Z-ordering of light bulb is wrong #659

liammulh opened this issue Feb 5, 2021 · 4 comments
Assignees
Labels

Comments

@liammulh
Copy link
Member

liammulh commented Feb 5, 2021

For phetsims/qa#605.

File_000

Notice how the fire is behind the light bulb's metal portion, but in front of the light bulb's glass portion.

I've seen this on multiple platforms and it seems to be an issue in both the RC linked above and the published version.

EDIT: This seems to be a problem with the battery as well.

@liammulh liammulh changed the title Z-ordering of light bulb glass and fire is wrong Z-ordering of light bulb and fire is wrong Feb 5, 2021
@liammulh liammulh changed the title Z-ordering of light bulb and fire is wrong Z-ordering of light bulb is wrong Feb 5, 2021
@brooklynlash
Copy link

I also noticed this with other objects covering the bulb:
lightbulb1
lightbulb2

@KatieWoe
Copy link
Contributor

KatieWoe commented Feb 9, 2021

Noting that this does seem to happen in the published sim. I also noticed that the light lines seem layered behind other objects, even if the bulb is on top. This is also in the published sim.
lightbehind

@arouinfar
Copy link
Contributor

Thanks @liam-mulhall @brooklynlash @KatieWoe!

This behavior has been around since the 1.0 release of CCK: DC, and I'm pretty sure it's been discussed before, though I couldn't track down the issue.

While it definitely looks weird, the z-ordering is a bit complicated in this sim and there likely isn't an easy fix. Generally speaking, electrons need to go on top of components. The light bulb is a bit of a special case in that the socket needs to go on top of the electrons, so there is actually a back/front to the artwork. The light bulb glass lives in the same layer as the other components (under the electrons) but because the socket needs to obscure the electrons, it can go on top of other components.

@samreid feel free to close this as wont-fix.

@samreid
Copy link
Member

samreid commented Feb 19, 2021

@arouinfar described the problem eloquently--at one point we tried to have each electron rendered "in the layer of the component it is in" but that led to problems when junctioning with another circuit element. I think this should be closed.

@samreid samreid closed this as completed Feb 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants