From bd28175f570247b9b7e8438c0d2f509db65cea4d Mon Sep 17 00:00:00 2001
From: martinRenou For reading out a [page:WebGLCubeRenderTarget WebGLCubeRenderTarget] use the optional parameter activeCubeFaceIndex to determine which face should be read.
- Render a [page:Scene scene] using a [page:Camera camera].[method:null readRenderTargetPixels]( [param:WebGLRenderTarget renderTarget]
[method:null render]( [param:Scene scene], [param:Camera camera] )
+ [method:null render]( [param:Object3D scene], [param: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..2414b7fd450c3f 100644
--- a/docs/api/zh/renderers/WebGLRenderer.html
+++ b/docs/api/zh/renderers/WebGLRenderer.html
@@ -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.
-
用相机([page:Camera camera])渲染一个场景([page:Scene scene]) Clear the stencil buffers. Equivalent to calling [page:WebGLRenderer.clear .clear]( false, false, true ). Compiles all materials in the scene with the camera. This is useful to precompile shaders before the first rendering.
diff --git a/src/renderers/WebGLRenderer.d.ts b/src/renderers/WebGLRenderer.d.ts
index 5381807107dedd..efe2c88836bb92 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;
}
@@ -339,7 +339,7 @@ export class WebGLRenderer implements Renderer {
): 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;
From e0ff902f1d15e9d984b5dbca85bcae847f08f04f Mon Sep 17 00:00:00 2001
From: martinRenou [method:null clearDepth]( )
[method:null clearStencil]( )
[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] )
diff --git a/docs/api/zh/renderers/WebGLRenderer.html b/docs/api/zh/renderers/WebGLRenderer.html
index 2414b7fd450c3f..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
使用相机编译场景中的所有材质。这对于在首次渲染之前预编译着色器很有用。