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

An alternative to group that maintains in-group rendering order #78

Closed
oganm opened this issue Jul 4, 2019 · 2 comments
Closed

An alternative to group that maintains in-group rendering order #78

oganm opened this issue Jul 4, 2019 · 2 comments

Comments

@oganm
Copy link

oganm commented Jul 4, 2019

Related to #73.

Currently a way to fight z-fighting involve adding objects to a single group which means they will z-fight according to the center of mass of the group they belong to. However being in a group also controls the way things are rendered relative to the other members of the group, namely, being first in the group means the object is always rendered above the other. It would be nice to be able to combine the two behaviours, where the group members are rendered based on the center of the mass of the group compared to other elements and to each other compared to other group members. The current functionality of the group has also other uses which is why an alternative object would probably be the solution.

See this modified version of the z-fighting code from the documentation as an example.
https://codepen.io/anon/pen/rErrmp

One of the bottom balls have a different color for each side. In the grouped side, the different colored ball always appears above its peers which is not desirable in all cases.

One hacky solution with the current system I can think of would be to create invisible objects and group each dot with a different invisible object. That means the center of mass of each group can still be placed behind the large blocking object yet their relative position to each other could also be preserved.

@bendablegears
Copy link
Contributor

Does updateSort: true, not do exactly this?

@oganm
Copy link
Author

oganm commented Jul 5, 2019

yes... yes it does.

@oganm oganm closed this as completed Jul 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants