Skip to content

docs: fix JSDoc link warnings for ShaderUtils and GSplatComponent#8618

Merged
willeastcott merged 3 commits into
mainfrom
docs-fix-jsdoc-link-warnings
Apr 20, 2026
Merged

docs: fix JSDoc link warnings for ShaderUtils and GSplatComponent#8618
willeastcott merged 3 commits into
mainfrom
docs-fix-jsdoc-link-warnings

Conversation

@willeastcott

@willeastcott willeastcott commented Apr 19, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes three TypeDoc {@link} resolution warnings surfaced by npm run docs:

  • src/platform/graphics/shader.js - change {@link ShaderUtils#createShader} to {@link ShaderUtils.createShader} (static members use .).
  • src/scene/shader-lib/shader-utils.js - add a class-level JSDoc block to ShaderUtils. Without it, excludeNotDocumented: true strips the class from the generated docs, which is why the link above failed to resolve even after the syntax fix.
  • src/framework/components/gsplat/component.js - change {@link workBufferModifier} (no such symbol) to {@link setWorkBufferModifier}.

Test plan

  • npm run docs - the three targeted warnings are gone.
  • Spot-check the generated ShaderUtils page and Shader constructor docs to confirm the link now resolves.

- Correct `{@link ShaderUtils#createShader}` to `{@link ShaderUtils.createShader}` (static member uses `.`).
- Add a class-level JSDoc block to `ShaderUtils` so the class is included in the generated docs (otherwise `excludeNotDocumented` strips it and link resolution fails).
- Fix `{@link workBufferModifier}` (non-existent) to `{@link setWorkBufferModifier}` in `GSplatComponent`.

Made-with: Cursor

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Resolves TypeDoc {@link} resolution warnings by correcting link syntax and ensuring referenced symbols are included in generated documentation.

Changes:

  • Fix Shader constructor JSDoc link to the static ShaderUtils.createShader API.
  • Add a class-level JSDoc block to ShaderUtils so it’s not stripped by excludeNotDocumented: true.
  • Fix GSplatComponent JSDoc link to reference setWorkBufferModifier.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/scene/shader-lib/shader-utils.js Adds class-level JSDoc so ShaderUtils is documented and linkable.
src/platform/graphics/shader.js Updates JSDoc link syntax for static member reference (. vs #).
src/framework/components/gsplat/component.js Fixes an invalid JSDoc link target to an existing API (setWorkBufferModifier).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@willeastcott

Copy link
Copy Markdown
Contributor Author

@mvaligursky This PR requires we make ShaderUtils class public API. Is that what you want? The alternative is to remove the comment recommending the use of ShaderUtils.createShader.

@LeXXik

LeXXik commented Apr 19, 2026

Copy link
Copy Markdown
Contributor

Its useful for post effects, and some of the engine-only examples use it, so I'd say we make it public.

@mvaligursky

Copy link
Copy Markdown
Contributor

Yep, that function should be public.

@willeastcott willeastcott merged commit 8daedcf into main Apr 20, 2026
8 checks passed
@willeastcott willeastcott deleted the docs-fix-jsdoc-link-warnings branch April 20, 2026 07:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants