Sfoglia il codice sorgente

Docs: Added FramebufferTexture page. (#22917)

Michael Herzog 3 anni fa
parent
commit
bd0d707102

+ 1 - 1
docs/api/en/renderers/WebGLRenderer.html

@@ -290,7 +290,7 @@
 		<h3>[method:undefined compile]( [param:Object3D scene], [param:Camera camera] )</h3>
 		<p>Compiles all materials in the scene with the camera. This is useful to precompile shaders before the first rendering.</p>
 
-		<h3>[method:undefined copyFramebufferToTexture]( [param:Vector2 position], [param:Texture texture], [param:Number level] )</h3>
+		<h3>[method:undefined copyFramebufferToTexture]( [param:Vector2 position], [param:FramebufferTexture texture], [param:Number level] )</h3>
 		<p>Copies pixels from the current WebGLFramebuffer into a 2D texture. Enables access to [link:https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/copyTexImage2D WebGLRenderingContext.copyTexImage2D].</p>
 
 		<h3>[method:undefined copyTextureToTexture]( [param:Vector2 position], [param:Texture srcTexture], [param:Texture dstTexture], [param:Number level] )</h3>

+ 51 - 0
docs/api/en/textures/FramebufferTexture.html

@@ -0,0 +1,51 @@
+<!DOCTYPE html>
+<html lang="en">
+	<head>
+		<meta charset="utf-8" />
+		<base href="../../../" />
+		<script src="page.js"></script>
+		<link type="text/css" rel="stylesheet" href="page.css" />
+	</head>
+	<body>
+		[page:Texture] &rarr;
+
+		<h1>[name]</h1>
+
+		<p class="desc">
+			This class can only be used in combination with [page:WebGLRenderer.copyFramebufferToTexture]().
+		</p>
+
+		<h2>Constructor</h2>
+		<h3>[name]( [param:Number width], [param:Number height], [param:Constant format] )</h3>
+		<p>
+		[page:Number width] -- The width of the texture.<br />
+
+		[page:Number height] -- The height of the texture.<br />
+
+		[page:Constant format] -- The format used in the texture.
+		See [page:Textures format constants] for other choices.<br />
+		</p>
+
+
+		<h2>Properties</h2>
+
+		<p>See the base [page:Texture Texture] class for common properties.</p>
+
+		<h3>[property:Boolean needsUpdate]</h3>
+
+		<p>
+			True by default. This is required so that the canvas data is loaded.
+		</p>
+
+		<h2>Methods</h2>
+
+		<p>See the base [page:Texture Texture] class for common methods.</p>
+
+
+		<h2>Source</h2>
+
+		<p>
+			[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
+		</p>
+	</body>
+</html>

+ 1 - 1
docs/api/zh/renderers/WebGLRenderer.html

@@ -277,7 +277,7 @@
 		<h3>[method:undefined compile]( [param:Object3D scene], [param:Camera camera] )</h3>
 		<p>使用相机编译场景中的所有材质。这对于在首次渲染之前预编译着色器很有用。</p>
 
-		<h3>[method:undefined copyFramebufferToTexture]( [param:Vector2 position], [param:Texture texture], [param:Number level] )</h3>
+		<h3>[method:undefined copyFramebufferToTexture]( [param:Vector2 position], [param:FramebufferTexture texture], [param:Number level] )</h3>
 		<p>将当前WebGLFramebuffer中的像素复制到2D纹理中。可访问[link:https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/copyTexImage2D WebGLRenderingContext.copyTexImage2D].</p>
 
 		<h3>[method:undefined copyTextureToTexture]( [param:Vector2 position], [param:Texture srcTexture], [param:Texture dstTexture], [param:Number level] )</h3>

+ 47 - 0
docs/api/zh/textures/FramebufferTexture.html

@@ -0,0 +1,47 @@
+<!DOCTYPE html>
+<html lang="zh">
+	<head>
+		<meta charset="utf-8" />
+		<base href="../../../" />
+		<script src="page.js"></script>
+		<link type="text/css" rel="stylesheet" href="page.css" />
+	</head>
+	<body>
+		[page:Texture] &rarr;
+
+		<h1>[name]</h1>
+
+		<p class="desc">
+			This class can only be used in combination with [page:WebGLRenderer.copyFramebufferToTexture]().
+		</p>
+
+		<h2>Constructor</h2>
+		<h3>[name]( [param:Number width], [param:Number height], [param:Constant format] )</h3>
+		<p>
+		[page:Number width] -- The width of the texture.<br />
+
+		[page:Number height] -- The height of the texture.<br />
+
+		[page:Constant format] -- The format used in the texture.
+		See [page:Textures format constants] for other choices.<br />
+		</p>
+
+
+		<h2>Properties</h2>
+
+		<p>See the base [page:Texture Texture] class for common properties.</p>
+
+		<h3>[property:Boolean needsUpdate]</h3>
+
+		<h2>Methods</h2>
+
+		<p>See the base [page:Texture Texture] class for common methods.</p>
+
+
+		<h2>Source</h2>
+
+		<p>
+			[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
+		</p>
+	</body>
+</html>

+ 2 - 0
docs/list.json

@@ -315,6 +315,7 @@
 				"DataTexture2DArray": "api/en/textures/DataTexture2DArray",
 				"DataTexture3D": "api/en/textures/DataTexture3D",
 				"DepthTexture": "api/en/textures/DepthTexture",
+				"FramebufferTexture": "api/en/textures/FramebufferTexture",
 				"Texture": "api/en/textures/Texture",
 				"VideoTexture": "api/en/textures/VideoTexture"
 			}
@@ -817,6 +818,7 @@
 				"DataTexture2DArray": "api/zh/textures/DataTexture2DArray",
 				"DataTexture3D": "api/zh/textures/DataTexture3D",
 				"DepthTexture": "api/zh/textures/DepthTexture",
+				"FramebufferTexture": "api/zh/textures/FramebufferTexture",
 				"Texture": "api/zh/textures/Texture",
 				"VideoTexture": "api/zh/textures/VideoTexture"
 			}