-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
vertexNormal()
is not defined
#6653
Comments
I would like to work on this issue. Thanks:) |
@GregStanton, the changes that are suggested above produced the following warning on running npm test: which I think indicates the way function overloads are documented and defined across different files in the p5.js codebase. src\webgl\p5.RendererGL.Immediate.js So, going about the same solution that you provided or should we be looking into other ways? |
Hi @diyaayay! Thanks for working on this. My guess is that we just need to include Maybe @limzykenneth can confirm that this is all we need to do? |
@GregStanton Thanks for providing the document for syntax reference. It explains a lot and will be helpful for my future contributions. The 'npm test' runs successfully after making the changes you suggested. I'll raise a PR and will make any necessary adjustments if somebody suggests. Thanks again:) |
@diyaayay I'm so glad you found the syntax reference helpful! Thanks for letting me know, and for working on the PR! |
bugfix #6653 vertexNormal() is not defined,replaces with normal
Hey @nickmcintyre, do you happen to know why I hope you don't mind me pinging you; I thought you might know since you've been working on the reference. |
@GregStanton The reference is only updated when there is a release created for p5.js (since we don't want to release updated reference when the relevant p5.js version is not yet released), although this do create a bit of a lag in cases like this. We plan to create a new release in a few weeks time which should have this updated. The new website will probably address this issue in due time. |
Thanks @limzykenneth! That makes sense. The contributor docs suggest following up if the change isn't visible on the website after a few days, so I wasn't sure. I appreciate the clarification. |
Most appropriate sub-area of p5.js?
p5.js version
1.9.0
Steps to reproduce this
Run the example code from the
normal()
reference page, replacing calls tonormal()
with calls tovertexNormal()
.Snippet:
Console error
Suggested solution
Based on the reference, the two functions
vertexNormal()
andnormal()
serve the same purpose. Inspecting the source reveals that there's actually only one function; the reference page for the other function appears to have been generated by inline docs that use the wrong function name.Specifically, there's a reference page for
vertexNormal()
, but that function is never defined in the p5.js codebase. The reference page is a stub that points to a file in the source that namesvertexNormal()
in the inline docs but implements the documented function with the namenormal()
. The naming mismatch between the inline docs and the implementation seems to have been present since this functionality was first introduced in commit 072fac9. Fortunately, the mismatch is only present internally, in the version of the feature defined on p5.RendererGL.Like the internal version, the user-facing version is implemented with
normal()
as the function name. Its reference page is complete and uses the correct function name. So, this bug seems to have an easy fix: ReplacevertexNormal
in the documentation on lines 170 and 176 ofwebgl/p5.RendererGL.Immediate.js
withnormal
. Since this is the only mention ofvertexNormal()
in the inline docs, I'm guessing this should effectively delete the associated page from the p5.js website's reference.The text was updated successfully, but these errors were encountered: