未验证 提交 de1c2c4c 编写于 作者: M Mr.doob 提交者: GitHub

Merge pull request #15782 from aardgoose/doc-read-pixels

document WebGLRenderer.readRenderTargetPixels() restrictions
......@@ -375,11 +375,13 @@
<h3>[method:null resetGLState]( )</h3>
<p>Reset the GL state to default. Called internally if the WebGL context is lost.</p>
<h3>[method:null readRenderTargetPixels]( [param:WebGLRenderTarget renderTarget], [param:Float x], [param:Float y], [param:Float width], [param:Float height], buffer )</h3>
<p>Reads the pixel data from the renderTarget into the buffer you pass in. This is a wrapper around [link:https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/readPixels WebGLRenderingContext.readPixels]().<br />
See the [example:webgl_interactive_cubes_gpu interactive / cubes / gpu] example.
<h3>[method:null readRenderTargetPixels]( [param:WebGLRenderTarget renderTarget], [param:Float x], [param:Float y], [param:Float width], [param:Float height], [param:TypedArray buffer] )</h3>
<p>buffer - Uint8Array is the only destination type supported in all cases, other types are renderTarget and platform dependent. See [link:https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.12 WebGL spec] for details.</p>
<p>Reads the pixel data from the renderTarget into the buffer you pass in. This is a wrapper around [link:https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/readPixels WebGLRenderingContext.readPixels]().</p>
<p>See the [example:webgl_interactive_cubes_gpu interactive / cubes / gpu] example.
</p>
<h3>[method:null render]( [param:Scene scene], [param:Camera camera] )</h3>
<p>
Render a [page:Scene scene] using a [page:Camera camera].<br />
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册