-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
add triangle geometry (#2535) #2573
Conversation
Most looks good, do you think it'd be better to center the triangle by default? |
Yes, I think it make sense since the other geometries are centered by default. |
Thanks! We can add docs, just a section in the |
vertexA/B/C seems a little verbose. i take it there is some problem preventing an array of vec3? if so, maybe we should change that - I am thinking something like vertices or verts as vec3 array would be better, and that would give use plumbing to support strips and other more advanced primitives? |
@machenmusik Building strip or other geometries of course is a different case, and I agree array would be more suitable when the vertex input amount is varied or very large. Let me know if I've missed anything. :) |
for just basic triangle this is probably fine. my worry is that people will try to make thousands of these because they can't do strips and then wonder why performance isn't what it could be. so i naturally jump to syntax that also would work for strips etc. |
People probably will, as well as thousands of boxes and spheres too ;) For now, I will leave it as |
Rebased on top of master to trigger a TravisCI build. |
Bump ;) |
Thanks for the wait. I've updated the PR to not have to recreate the quaternion and vectors on each instance. Waiting for tests to pass then will merge! |
This adds a triangle geometry as discussed in #2535.
It is specified by 3 vertices,
vertexA
,vertexB
, andvertexC
.If there is nothing need to amend regarding to property names, default values etc., I will send a PR to add docs.