mirror of
https://github.com/Doodle3D/Doodle3D-Slicer.git
synced 2024-11-30 01:14:57 +01:00
124 lines
4.6 KiB
HTML
124 lines
4.6 KiB
HTML
|
<!DOCTYPE html>
|
||
|
<html lang="en">
|
||
|
<head>
|
||
|
<meta charset="utf-8" />
|
||
|
<script src="../../list.js"></script>
|
||
|
<script src="../../page.js"></script>
|
||
|
<link type="text/css" rel="stylesheet" href="../../page.css" />
|
||
|
</head>
|
||
|
<body>
|
||
|
<h1>[name]</h1>
|
||
|
|
||
|
<div class="desc">A render target is a buffer where the video card draws pixels for a scene that is being rendered in the background. It is used in different effects. </div>
|
||
|
|
||
|
|
||
|
<h2>Constructor</h2>
|
||
|
|
||
|
|
||
|
<h3>[name]([page:Number width], [page:Number height], [page:Object options])</h3>
|
||
|
<div>
|
||
|
width -- The width of the renderTarget. <br />
|
||
|
height -- The height of the renderTarget. <br />
|
||
|
options -- The options sets the properties of the render target.
|
||
|
</div>
|
||
|
<div>
|
||
|
Creates a new renderTarget with a certain width and height.
|
||
|
</div>
|
||
|
|
||
|
<h2>Properties</h2>
|
||
|
|
||
|
<h3>[property:number wrapS]</h3>
|
||
|
<div>
|
||
|
The default is THREE.ClampToEdgeWrapping, where the edge is clamped to the outer edge texels. The other two choices are THREE.RepeatWrapping and THREE.MirroredRepeatWrapping.
|
||
|
</div>
|
||
|
|
||
|
<h3>[property:number wrapT]</h3>
|
||
|
<div>
|
||
|
The default is THREE.ClampToEdgeWrapping, where the edge is clamped to the outer edge texels. The other two choices are THREE.RepeatWrapping and THREE.MirroredRepeatWrapping.
|
||
|
</div>
|
||
|
|
||
|
<h3>[property:number magFilter]</h3>
|
||
|
<div>
|
||
|
How the texture is sampled when a texel covers more than one pixel. The default is THREE.LinearFilter, which takes the four closest texels and bilinearly interpolates among them. The other option is THREE.NearestFilter, which uses the value of the closest texel.
|
||
|
</div>
|
||
|
|
||
|
<h3>[property:number minFilter]</h3>
|
||
|
<div>
|
||
|
How the texture is sampled when a texel covers less than one pixel. The default is THREE.LinearMipMapLinearFilter, which uses mipmapping and a trilinear filter. Other choices are THREE.NearestFilter, THREE.NearestMipMapNearestFilter, THREE.NearestMipMapLinearFilter, THREE.LinearFilter, and THREE.LinearMipMapNearestFilter. These vary whether the nearest texel or nearest four texels are retrieved on the nearest mipmap or nearest two mipmaps. Interpolation occurs among the samples retrieved.
|
||
|
</div>
|
||
|
|
||
|
<h3>[property:number anisotropy]</h3>
|
||
|
<div>
|
||
|
The number of samples taken along the axis through the pixel that has the highest density of texels. By default, this value is 1. A higher value gives a less blurry result than a basic mipmap, at the cost of more texture samples being used. Use renderer.getMaxAnisotropy() to find the maximum valid anisotropy value for the GPU; this value is usually a power of 2.
|
||
|
</div>
|
||
|
|
||
|
<h3>[property:Vector2 repeat]</h3>
|
||
|
<div>
|
||
|
How many times the texture is repeated across the surface, in each direction U and V.
|
||
|
</div>
|
||
|
|
||
|
<h3>[property:Vector2 offset]</h3>
|
||
|
<div>
|
||
|
How much a single repetition of the texture is offset from the beginning, in each direction U and V. Typical range is 0.0 to 1.0.
|
||
|
</div>
|
||
|
|
||
|
<h3>[property:number format]</h3>
|
||
|
<div>
|
||
|
The default is THREE.RGBAFormat for the texture. Other formats are: THREE.AlphaFormat, THREE.RGBFormat, THREE.LuminanceFormat, and THREE.LuminanceAlphaFormat. There are also compressed texture formats, if the S3TC extension is supported: THREE.RGB_S3TC_DXT1_Format, THREE.RGBA_S3TC_DXT1_Format, THREE.RGBA_S3TC_DXT3_Format, and THREE.RGBA_S3TC_DXT5_Format.
|
||
|
</div>
|
||
|
|
||
|
<h3>[property:number type]</h3>
|
||
|
<div>
|
||
|
The default is THREE.UnsignedByteType. Other valid types (as WebGL allows) are THREE.ByteType, THREE.ShortType, THREE.UnsignedShortType, THREE.IntType, THREE.UnsignedIntType, THREE.HalfFloatType, THREE.FloatType, THREE.UnsignedShort4444Type, THREE.UnsignedShort5551Type, and THREE.UnsignedShort565Type.
|
||
|
</div>
|
||
|
|
||
|
<h3>[property:boolean depthBuffer]</h3>
|
||
|
<div>
|
||
|
Renders to the depth buffer. Default is true.
|
||
|
</div>
|
||
|
|
||
|
<h3>[property:boolean stencilBuffer]</h3>
|
||
|
<div>
|
||
|
Renders to the stencil buffer. Default is true.
|
||
|
</div>
|
||
|
|
||
|
<h3>[property:boolean generateMipmaps]</h3>
|
||
|
<div>
|
||
|
Whether to generate mipmaps (if possible) for a texture. True by default.
|
||
|
</div>
|
||
|
|
||
|
<h3>[property:WebGLRenderTarget shareDepthFrom]</h3>
|
||
|
<div>
|
||
|
Shares the depth from another WebGLRenderTarget. Default is null.
|
||
|
</div>
|
||
|
|
||
|
|
||
|
<h2>Methods</h2>
|
||
|
|
||
|
<h3>[method:null setSize]( [page:Number width], [page:Number height] )</h3>
|
||
|
<div>
|
||
|
Sets the size of the renderTarget.
|
||
|
</div>
|
||
|
|
||
|
<h3>[method:RenderTarget clone]()</h3>
|
||
|
<div>
|
||
|
Creates a copy of the render target.
|
||
|
</div>
|
||
|
|
||
|
<h3>[method:null dispose]()</h3>
|
||
|
<div>
|
||
|
Dispatches a dispose event.
|
||
|
</div>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<h3>[page:EventDispatcher EventDispatcher] methods are available on this class.</h3>
|
||
|
|
||
|
<h2>Source</h2>
|
||
|
|
||
|
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
|
||
|
</body>
|
||
|
</html>
|