Repository navigation
Docs: bring the render target docs up to date - #1770
Merged
Merged
Conversation
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
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.
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.RenderTargetWebGLRenderTargetor says a WebGPU implementation is still to come. It now points users toCanvasRenderTargetand says the GPU renderers keep internal targets of their own for post effects.bind()/unbind()dropped "once the WebGPU renderer lands".toImageData()no longer claimsgetImageData()"does not exist on every target". It now namesCanvasRenderTarget#getImageDataas the synchronous option.CanvasRenderTargetdestroy(renderer)was tagged@ignore/@internal. The build strips internal declarations, so only the parent'sdestroy()showed, and TypeScript refused therendererit needs to free the canvas's copy on the GPU. It's now documented and typed asdestroy(renderer?: Renderer): void, compatible with the parent.Changelog: one
Typings:entry under Fixed.Testing
WebGLRenderTargetlink), no new ones.canvasrendertarget.d.tsnow declaresdestroy(renderer?: Renderer): void.pnpm lintpasses.🤖 Generated with Claude Code
https://claude.ai/code/session_01SeWCkETjW35ZbXDRswV1hx