-
-
Notifications
You must be signed in to change notification settings - Fork 35.5k
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
Docs: Add JSDoc config and improve Node
docs.
#29984
Conversation
📦 Bundle sizeFull ESM build, minified and gzipped.
🌳 Bundle size after tree-shakingMinimal build including a renderer, camera, empty scene, and dependencies.
|
Sounds good to me! |
Live examples I have not seen something like this by default in JSDoc. However, the currently used theme has a demo that shows how to include live examples: https://ankdev.me/clean-jsdoc-theme/v4/AgentArray.html They have updated their JSDoc config so the build includes a custom JavaScript file that injects the iFrame into the final doc page. The script looks like so: I guess we could do something similar with out material/geometry browsers. @donmccurdy Do you know of other strategies for including live examples? Code Snippets Code example should already work nicely but they are normally embedded in the JSDoc. Since there is markdown support, the result looks without further CSS like so: |
I'm not aware of any convention for live examples that would work for off-the-shelf JSDoc themes. Perhaps we would want to find a JSDoc-to-HTML or JSDoc-to-JSON-to-HTML workflow that's flexible enough to support a custom handler for something like: /**
* ...
* @example {@embed scenes/material-browser.html#MeshPhysicalMaterial}
*/
class MeshPhysicalMaterial extends MeshStandardMaterial {
} The |
Related issue: #24984
Description
There is an increasing interest in documentation for
WebGPURenderer
and the node material system so let's improve the situation by adding more docs.To me, this is a good opportunity to start with adding JSDoc (see #24984 (comment)). The PR introduces a minimal JSDoc setup with a basic template that generates the documentation into
docs_new
. This directory is not under version control and not intended for hosting yet.We can switch to a custom template at a later point with a style similar to the existing documentation. I'm ready for reviewing PRs that migrate existing modules next to
WebGPURenderer
or node material (anything insrc
orexamples/jsm
) to JSDoc. I'll will add more documentation by myself over the next weeks.To move things forward I suggest we ignore i18n and TypeScript related details for now. The focus should be on providing an auto-generated English documentation based on JSDoc.