diff --git a/docs/api/en/renderers/WebGLRenderer.html b/docs/api/en/renderers/WebGLRenderer.html index 118202d400ce06..a4ee4e2fcea774 100644 --- a/docs/api/en/renderers/WebGLRenderer.html +++ b/docs/api/en/renderers/WebGLRenderer.html @@ -303,7 +303,7 @@

[method:null clearDepth]( )

[method:null clearStencil]( )

Clear the stencil buffers. Equivalent to calling [page:WebGLRenderer.clear .clear]( false, false, true ).

-

[method:null compile]( [param:Scene scene], [param:Camera camera] )

+

[method:null compile]( [param:Object3D scene], [param:Camera camera] )

Compiles all materials in the scene with the camera. This is useful to precompile shaders before the first rendering.

[method:null copyFramebufferToTexture]( [param:Vector2 position], [param:Texture texture], [param:Number level] )

@@ -409,9 +409,9 @@

[method:null readRenderTargetPixels]( [param:WebGLRenderTarget renderTarget]

For reading out a [page:WebGLCubeRenderTarget WebGLCubeRenderTarget] use the optional parameter activeCubeFaceIndex to determine which face should be read.

-

[method:null render]( [param:Scene scene], [param:Camera camera] )

+

[method:null render]( [param:Object3D scene], [param:Camera camera] )

- Render a [page:Scene scene] using a [page:Camera camera].
+ Render a [page:Scene scene] or another type of [page:Object3D object] using a [page:Camera camera].
The render is done to a previously specified [page:WebGLRenderTarget renderTarget] set by calling [page:WebGLRenderer.setRenderTarget .setRenderTarget] or to the canvas as usual.
diff --git a/docs/api/zh/renderers/WebGLRenderer.html b/docs/api/zh/renderers/WebGLRenderer.html index e4b83fca391e92..5e4ebf75b6fb1b 100644 --- a/docs/api/zh/renderers/WebGLRenderer.html +++ b/docs/api/zh/renderers/WebGLRenderer.html @@ -290,7 +290,7 @@

[method:null clearTarget]([param:WebGLRenderTarget renderTarget], [param:boo 该方法清楚了一个rendertarget。为此它会激活此endertarget

-

[method:null compile]( [param:Scene scene], [param:Camera camera] )

+

[method:null compile]( [param:Object3D scene], [param:Camera camera] )

使用相机编译场景中的所有材质。这对于在首次渲染之前预编译着色器很有用。

[method:null copyFramebufferToTexture]( [param:Vector2 position], [param:Texture texture], [param:Number level] )

@@ -366,7 +366,7 @@

[method:null readRenderTargetPixels]( [param:WebGLRenderTarget renderTarget] 示例:[example:webgl_interactive_cubes_gpu interactive / cubes / gpu]

For reading out a [page:WebGLCubeRenderTarget WebGLCubeRenderTarget] use the optional parameter activeCubeFaceIndex to determine which face should be read.

-

[method:null render]( [param:Scene scene], [param:Camera camera], [param:WebGLRenderTarget renderTarget], [param:Boolean forceClear] )

+

[method:null render]( [param:Object3D scene], [param:Camera camera] )

用相机([page:Camera camera])渲染一个场景([page:Scene scene])
diff --git a/src/renderers/WebGLRenderer.d.ts b/src/renderers/WebGLRenderer.d.ts index 5381807107dedd..7d65b18b1b6b1a 100644 --- a/src/renderers/WebGLRenderer.d.ts +++ b/src/renderers/WebGLRenderer.d.ts @@ -24,7 +24,7 @@ import { Texture } from '../textures/Texture'; export interface Renderer { domElement: HTMLCanvasElement; - render( scene: Scene, camera: Camera ): void; + render( scene: Object3D, camera: Camera ): void; setSize( width: number, height: number, updateStyle?: boolean ): void; } @@ -334,12 +334,12 @@ export class WebGLRenderer implements Renderer { * Compiles all materials in the scene with the camera. This is useful to precompile shaders before the first rendering. */ compile( - scene: Scene, + scene: Object3D, camera: Camera ): void; /** - * Render a scene using a camera. + * Render a scene or an object using a camera. * The render is done to a previously specified {@link WebGLRenderTarget#renderTarget .renderTarget} set by calling * {@link WebGLRenderer#setRenderTarget .setRenderTarget} or to the canvas as usual. * @@ -350,7 +350,7 @@ export class WebGLRenderer implements Renderer { * properties to false. To forcibly clear one ore more buffers call {@link WebGLRenderer#clear .clear}. */ render( - scene: Scene, + scene: Object3D, camera: Camera ): void;