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

Adding box actor #958

Open
wants to merge 6 commits into
base: v2
Choose a base branch
from
Open

Adding box actor #958

wants to merge 6 commits into from

Conversation

m-agour
Copy link
Contributor

@m-agour m-agour commented Dec 27, 2024

Pygfx calculates normals in a specific way, and for the box to appear with the correct edges and lighting I had to change the vertices numbers to 24 for each box. this is unavoidable.

image

@m-agour m-agour marked this pull request as ready for review December 27, 2024 21:23
@m-agour m-agour added the v2 label Dec 27, 2024
Copy link
Contributor

@skoudoro skoudoro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for the box to appear with the correct edges and lighting I had to change the vertices numbers to 24 for each box. this is unavoidable

ok, make sense. Can you update all the tests due to this change. As you can see above, tests are failing due to change, especially test_primitive.py::test_vertices_primitives.

All tests should be green before we start to review

@skoudoro
Copy link
Contributor

Also, I believe we should rename the primitive box in box_8 and box_24, just in case someone needs the box_8 and do not care about the lighting, etc....
OR
keeping the name box but add a parameter to select 8 or 24 vertices, a bit like the sphere.

@m-agour
Copy link
Contributor Author

m-agour commented Dec 29, 2024

Hi @skoudoro , thanks for the review and yes it is important to keep both versions maybe we come up with a fix later and revert to the old ways! I will do the same for other actors is needed

@m-agour
Copy link
Contributor Author

m-agour commented Dec 29, 2024

I have updated the actor and the tests but, I am not sure about the argument name! @skoudoro

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

Successfully merging this pull request may close these issues.

2 participants