Skip to content

Docs: bring the render target docs up to date - #1770

Merged
obiot merged 1 commit into
masterfrom
docs/render-target
Oct 26, 2026
Merged

obiot merged 1 commit into
masterfrom
docs/render-target

Conversation

@obiot

@obiot obiot commented Oct 26, 2026

Copy link
Copy Markdown
Member

Summary

Doc comments only, no code change. The one thing a user can notice is CanvasRenderTarget#destroy(renderer) now showing in the docs and the TypeScript types.

RenderTarget

  • The class description no longer links the internal WebGLRenderTarget or says a WebGPU implementation is still to come. It now points users to CanvasRenderTarget and says the GPU renderers keep internal targets of their own for post effects.
  • bind() / unbind() dropped "once the WebGPU renderer lands".
  • toImageData() no longer claims getImageData() "does not exist on every target". It now names CanvasRenderTarget#getImageData as the synchronous option.

CanvasRenderTarget

  • The class description dropped Light2d (which no longer uses it) and "a WebGL texture". It now says what it's for (draw once and reuse), and that it's uploaded to the GPU on WebGL or WebGPU.
  • destroy(renderer) was tagged @ignore/@internal. The build strips internal declarations, so only the parent's destroy() showed, and TypeScript refused the renderer it needs to free the canvas's copy on the GPU. It's now documented and typed as destroy(renderer?: Renderer): void, compatible with the parent.
  • Fixed a "creatimg" typo.

Changelog: one Typings: entry under Fixed.

Testing

  • Docs build: one warning fewer than master (the dead WebGLRenderTarget link), no new ones.
  • Typings: the generated canvasrendertarget.d.ts now declares destroy(renderer?: Renderer): void.
  • Tests and lint: the render target specs pass (108) and pnpm lint passes.

🤖 Generated with Claude Code

https://claude.ai/code/session_01SeWCkETjW35ZbXDRswV1hx

RenderTarget's docs linked the internal WebGLRenderTarget, still said a
WebGPU implementation was to come, and claimed getImageData() does not
exist on every target. CanvasRenderTarget's still listed Light2d among its
users and spoke of a WebGL texture only.

CanvasRenderTarget#destroy(renderer) was tagged internal, so the docs and
the typings showed only the parent's destroy() and TypeScript refused the
renderer it needs to free the canvas's copy on the GPU. It is now
documented and typed. Comments only, no code change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SeWCkETjW35ZbXDRswV1hx
Copilot AI balanced review requested due to automatic review settings October 26, 2026 03:28

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.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

@obiot
obiot merged commit 157db6e into master Oct 26, 2026
6 checks passed
@obiot
obiot deleted the docs/render-target branch October 26, 2026 03:35
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.

2 participants