docs: fix more incorrect JSDoc in public APIs#8614
Merged
Conversation
Made-with: Cursor
Contributor
There was a problem hiding this comment.
Pull request overview
Docs-only pass to correct grammar, typos, and broken JSDoc links/types across several public APIs (plus one user-facing error string grammar fix).
Changes:
- Fix typos/grammar in JSDoc and comments across scene, math, input, XR, texture, and shader generator files.
- Replace broken
{@link}references inStandardMaterialdocs with valid API links. - Narrow
AppBase#resizeCanvasdocumented return type shape (but see review comment aboutundefinedreturns).
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/scene/shader-lib/programs/standard.js | Fix grammar in a logged error message and a JSDoc sentence. |
| src/scene/scene.js | Fix class summary grammar (“is a graphical representation…”). |
| src/scene/mesh-instance.js | Fix JSDoc prose for visibleThisFrame. |
| src/scene/materials/standard-material.js | Fix broken {@link} references for tonemapping configuration. |
| src/platform/graphics/texture.js | Fix upload() JSDoc grammar/possessive wording. |
| src/framework/xr/xr-anchor.js | Rewrite callback param docs to be grammatically correct and clearer. |
| src/framework/input/element-input.js | Fix article usage in ElementSelectEvent constructor doc. |
| src/framework/app-base.js | Tighten resizeCanvas return type and fix minor JSDoc grammar. |
| src/core/math/math.js | Fix “a/an” and hyphenation for 24-bit/32-bit integer docs. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Made-with: Cursor
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 9 out of 9 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A third small docs-only pass continuing from #8612 and #8613 — a batch of objective JSDoc / comment fixes found during a fresh scan of the codebase.
Grammar & typos
src/scene/shader-lib/programs/standard.jstoin_addMapDefines:passed into to createShaderDefinition→passed into createShaderDefinition.is in no longer compatible format→is no longer in a compatible format.src/scene/scene.js— add missing article in class summary:A scene is graphical representation...→A scene is a graphical representation....src/core/math/math.js—intToBytes24/intToBytes32:Convert an 24/32 bit integer...→Convert a 24-bit/32-bit integer....src/framework/app-base.jsresizeCanvas:A object→An object.renderLines: add missingthe:number of colors it stores must match...→the number of colors it stores must match....src/framework/input/element-input.js—ElementSelectEventctor:Create an instance of a ElementSelectEvent.→Create an instance of an ElementSelectEvent..src/platform/graphics/texture.js—upload()JSDoc: add missing possessive (the textures pixel data→the texture's pixel data) and remove duplicateby(is called by internally by→is called internally by).src/scene/mesh-instance.js—visibleThisFrame:Read this value in {@link Scene.EVENT_POSTCULL} event...→Read this value in the {@link Scene.EVENT_POSTCULL} event....src/framework/xr/xr-anchor.js— rephrase the ungrammaticalThe Error object if failed to persist/forget...prose in theXrAnchorPersistCallback/XrAnchorForgetCallbacktypedefs so they parse as English.Broken {@link} / tighter types
src/scene/materials/standard-material.js— theuseTonemapdoc-only property references{@link Scene#rendering}and{@link CameraComponent.rendering}, neither of which exists. Replaced with the actual API:{@link CameraComponent#toneMapping}.src/framework/app-base.js— tightenresizeCanvas's return type from{object}to{{width: number, height: number}}, matching the actualreturn { width, height }at the bottom of the function. This is documentation-only but will flow through to the generated.d.ts; it is strictly narrower than the previousobject.No runtime changes
All changes are JSDoc / comments only (plus one user-facing error-log string grammar fix in
standard.js). No public API signatures are broken; the only type-level movement is the strict narrowing ofAppBase#resizeCanvas's documented return type.