Parameters for `vertex()` too confusing.
Issue description
The parameters are too confusing! v has two meanings.
URL(s) of affected page(s)
https://processing.org/reference/vertex_.html
Proposed fix
Please replace vertex(v) with something like vertex(a), then state that a is a float[].
Hi @SableRaf, I would love to take on this task. I think this should be a good starting task for a newcomer like me.
Okay, after looking into this issue, I have discovered additional problems with the documentation page. I have listed them here along with my suggested solutions.
Issues:
- Two parameters titled "v," both of which are uninformative
- The first "v" parameter has an option to be just a float, which does not actually compile.
- The second"v" parameter has an option to be a float[], which does not compile either.
Solutions:
- Change the first "v" parameter to be called "point" or "coordinate"
- Remove the option for float for the first "v" parameter, as it does not work
- Change the "u" parameter to be "xTexture"
- Change the second"v" parameter to be called "yTexture"
- Remove the option for float[] for the second"v" parameter, as it does not work
I will begin to work on getting a merge created. I believe this change will also require changing the parameter names in the actual proccesing4.
Hey there @CubeTures - just saying: thank you very much for noticing this! Pretty stupid of me that I didn't just, think of doing this myself, back then...
I hope you like working on this, ":D!
Okay, that should do it. I hope I didn't miss any references of the method elsewhere. Please tell me if you notice anything!
Hello, @CubeTures.
How about you specify the parameters for the overload vertex(x, y, z, u, v) as vertex(x, y, z, s, t) instead?
(That is a well-known OpenGL convention!)
The last parameter in the "Parameters" section, v (float, float[]) is, as you called it, confusing, since it conflicts with the first one. How about removing it?
Also, as you mentioned, vertex(v) does not actually work with just a single float anywhere. Could you please also fix this error in the docs?
Also, an explanation for what VERTEX_FIELD_COUNT is, would be beneficial (and appreciated! ":D).
Alright, I redid my pull request to better reflect the conventions you listed, as well as clarified the vertex field count. Thanks for letting me know!
Thank you! I went through the commits, they look nice to me. Hope to see these changes on the site soon! ":D