Skip to content

Conversation

@Mugen87
Copy link
Collaborator

@Mugen87 Mugen87 commented Feb 3, 2025

Related issue: -

Description

This PR adds a custom JSDoc template for generating the documentation pages. It uses the fonts, styles and site structure from the original documentation. The template is based on the default JSDoc theme and enhanced with search features from clean-jsdoc-theme.

Page View:

image

There is now a client-side search:

image

The sidebar supports two hierarchies as before (category-subcategory). E.g. "Core -> Materials or "Addons -> TSL"

image

Mobile-View:

image

Code Sections:

image

@github-actions
Copy link

github-actions bot commented Feb 3, 2025

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 336.27
78.29
336.27
78.29
+0 B
+0 B
WebGPU 517.16
143.63
517.16
143.63
+0 B
+0 B
WebGPU Nodes 516.63
143.52
516.63
143.52
+0 B
+0 B

🌳 Bundle size after tree-shaking

Minimal build including a renderer, camera, empty scene, and dependencies.

Before After Diff
WebGL 465.25
112.13
465.25
112.13
+0 B
+0 B
WebGPU 589.14
159.74
589.14
159.74
+0 B
+0 B
WebGPU Nodes 544.5
149.3
544.5
149.3
+0 B
+0 B

@Mugen87 Mugen87 added this to the r174 milestone Feb 3, 2025
@Mugen87 Mugen87 merged commit 64dfc2c into mrdoob:dev Feb 3, 2025
12 checks passed
@Mugen87
Copy link
Collaborator Author

Mugen87 commented Feb 3, 2025

@mrdoob I'm not a CSS expert but I hope the styles are appropriate. If you think this template is a good replacement for the existing docs, I'll start to migrate the remaining modules in the repository to JSDoc. I'll also add documentation for all Addons which are undocumented so far.

@Mugen87
Copy link
Collaborator Author

Mugen87 commented Feb 3, 2025

Additional notes on the template:

  • utils/docs/template/publish.js: This is the main entry point of the template that JSDoc uses to generate the pages. This file also creates the search index.
  • utils/docs/template/tmpl/: This directory holds the template files that JSDoc uses to output the markup. layout.tmpl is the main template that holds the HTML root, the JavaScript and CSS includes, and some custom JS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant