-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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 JSDoc for extras/splat ply-reader/splat-material/splat #5868
Conversation
This might be related |
*/ | ||
|
||
/** | ||
* @typedef {object} PlyProperty |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we even use these types anywhere?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep, PlyElement
is used once in ply-reader.js
and three times in splat-data.js
:
class SplatData {
/** @type {import('./ply-reader').PlyElement[]} */
elements;
/** @type {import('./ply-reader').PlyElement} */
vertexElement;
/**
* @param {import('./ply-reader').PlyElement[]} elements - The elements.
* @param {boolean} [performZScale] - Whether to perform z scaling.
*/
constructor(elements, performZScale = true) {
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great, I don't see any problems, keen to merge. Any concerns @slimbuck ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, looks great thanks!
Also adding
jsconfig.js
and fixing a small issue withfind
forUInt8Array
's (it would skip a good/last result) because it used<
and not<=
.Motivation is to have a better IDE experience (static type-checking and Intellisense) and also to have more types in playcanvas-extras that we can validate via RTI (dynamic type-checking for NaN's for example).
I confirm I have read the contributing guidelines and signed the Contributor License Agreement.