p5.js is a client-side JS platform that empowers artists, designers, students, and anyone to learn to code and express themselves creatively on the web. It is based on the core principles of Processing. http://twitter.com/p5xjs —
It seems that in src\core\shape\vertex.js for the normal() method the documentation was written as @param {Vector} vectorand since Vectorisn't a native JS class when the FES couldn't use instanceOf to check and typeOfchecked the e.g. example let n = createVector(-0.4, -0.4, 0.8); which would return object since Vector is not a native JS class.
A quick and easy fix would be to change @param {Vector} vector to @param {p5.Vector} vector so FES can correctly check the parameter.
Resolves #6982
Changes:
It seems that in
src\core\shape\vertex.js
for thenormal()
method the documentation was written as@param {Vector} vector
and sinceVector
isn't a native JS class when the FES couldn't useinstanceOf
to check andtypeOf
checked the e.g. examplelet n = createVector(-0.4, -0.4, 0.8);
which would return object since Vector is not a native JS class.A quick and easy fix would be to change
@param {Vector} vector
to@param {p5.Vector} vector
so FES can correctly check the parameter.Screenshots of the change:
PR Checklist
npm run lint
passes