提交 453cdabb 编写于 作者: L Lewy Blue 提交者: Mr.doob

Created new document page Constants / Renderer (#10002)

* Created constants / renderer

* renamed Renderer.html to WebGLRenderer.html
上级 cb2c0ea1
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<base href="../../" />
<script src="list.js"></script>
<script src="page.js"></script>
<link type="text/css" rel="stylesheet" href="page.css" />
</head>
<body>
<h1>GL State Constants</h1>
These are used by the WebGLRenderer to set gl.cullFace and gl.frontFace states in the GPU.
<h2>Cull Face Modes</h2>
<code>
THREE.CullFaceNone
</code>
<p>Disable face culling.</p>
<code>
THREE.CullFaceBack
</code>
<p>Cull back faces (default).</p>
<code>
THREE.CullFaceFront
</code>
<p>Cull front faces.</p>
<code>
THREE.CullFaceFrontBack
</code>
<p>Cull both front and back faces.</p>
<h2>Front Face Direction</h2>
Set the winding order for polygons to either clockwise or counter-clockwise (default).
<code>
THREE.FrontFaceDirectionCW
THREE.FrontFaceDirectionCCW
</code>
<h2>Usage</h2>
<code>
var renderer = new THREE.WebGLRenderer();
renderer.setFaceCulling ( THREE.CullFaceBack, THREE.FrontFaceDirectionCCW ); //defaults
</code>
<h2>Source</h2>
[link:https://github.com/mrdoob/three.js/blob/master/src/constants.js src/constants.js]
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<base href="../../" />
<script src="list.js"></script>
<script src="page.js"></script>
<link type="text/css" rel="stylesheet" href="page.css" />
</head>
<body>
<h1>Shadowing Type Constants</h1>
<p>These define the shadow map types used by the WebGLRenderer.</p>
<h2>Shadow Map Types</h2>
<code>
THREE.BasicShadowMap
</code>
<p>Unfiltered shadow maps - fastest, but lowest quality.</p>
<code>
THREE.PCFShadowMap
</code>
<p>Shadow maps filtered using the Percentage-Closer Filtering (PCF) algorithm (default).</p>
<code>
THREE.PCFSoftShadowMap
</code>
<p>Shadow maps filtered using the Percentage-Closer Soft Shadows (PCSS) algorithm.</p>
<h2>Usage</h2>
<code>
var renderer = new THREE.WebGLRenderer();
renderer.shadowMap.enabled = true;
renderer.shadowMap.type = THREE.PCFShadowMap; //default
</code>
Note that this just enables shadows in the renderer and sets the shadow map type. <br />
To actually cast shadows you will have to set up shadows for the any light you want to cast shadows, and for meshes you want to cast / receive shadows. <br />
<h2>Source</h2>
[link:https://github.com/mrdoob/three.js/blob/master/src/constants.js src/constants.js]
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<base href="../../" />
<script src="list.js"></script>
<script src="page.js"></script>
<link type="text/css" rel="stylesheet" href="page.css" />
</head>
<body>
<h1>WebGLRenderer Constants</h1>
<h2>Cull Face Modes</h2>
<code>
THREE.CullFaceNone
THREE.CullFaceBack
THREE.CullFaceFront
THREE.CullFaceFrontBack
</code>
<div>
These are used by the WebGLRenderer's [page:WebGLRenderer.setFaceCulling setFaceCulling] method.<br /><br />
[page:constant CullFaceNone] disables face culling.<br />
[page:constant CullFaceBack] culls back faces (default).<br />
[page:constant CullFaceFront] culls front faces.<br />
[page:constant CullFaceFrontBack] culls both front and back faces.
</div>
<h2>Front Face Direction</h2>
<code>
THREE.FrontFaceDirectionCW
THREE.FrontFaceDirectionCCW
</code>
<div>
These are used by the WebGLRenderer's [page:WebGLRenderer.setFaceCulling setFaceCulling] method.<br /><br />
[page:constant FrontFaceDirectionCW] sets the winding order for polygons to clockwise.<br />
[page:constant FrontFaceDirectionCW] sets the winding order for polygons to counter-clockwise (default).
</div>
<h2>Shadow Types</h2>
<code>
THREE.BasicShadowMap
THREE.PCFShadowMap
THREE.PCFSoftShadowMap
</code>
<div>
These define the WebGLRenderer's [page:WebGLRenderer.shadowMap.type shadowMap.type] property.<br /><br />
[page:constant BasicShadowMap] gives unfiltered shadow maps - fastest, but lowest quality.<br />
[page:constant PCFShadowMap] filters shadow maps using the Percentage-Closer Filtering (PCF) algorithm (default).<br />
[page:constant PCFSoftShadowMap] filters shadow maps using the Percentage-Closer Soft Shadows (PCSS) algorithm.
</div>
<h2>Tone Mapping</h2>
<code>
THREE.NoToneMapping
THREE.LinearToneMapping
THREE.ReinhardToneMapping
THREE.Uncharted2ToneMapping
THREE.CineonToneMapping
</code>
<div>
These define the WebGLRenderer's [page:WebGLRenderer.toneMapping toneMapping] property.
This is used to approximate the appearance of high dynamic range (HDR) on the
low dynamic range medium of a standard computer monitor or mobile device's screen.<br /><br />
[page:constant NoToneMapping] disables tone mapping.<br />
[page:constant LinearToneMapping] is the default.<br /><br />
See the [example:webgl_tonemapping WebGL / tonemapping] example.
</div>
<h2>Source</h2>
[link:https://github.com/mrdoob/three.js/blob/master/src/constants.js src/constants.js]
</body>
</html>
......@@ -103,7 +103,7 @@
<h3>[property:Integer shadowMap.type]</h3>
<div>Defines shadow map type (unfiltered, percentage close filtering, percentage close filtering with bilinear filtering in shader)</div>
<div>Options are THREE.BasicShadowMap, THREE.PCFShadowMap (default), THREE.PCFSoftShadowMap. See [page:ShadowingTypes ShadowingTypes constants] for details.</div>
<div>Options are THREE.BasicShadowMap, THREE.PCFShadowMap (default), THREE.PCFSoftShadowMap. See [page:WebGLRenderer WebGLRenderer constants] for details.</div>
<h3>[property:Boolean shadowMap.renderReverseSided]</h3>
......@@ -240,7 +240,7 @@
<h3>[method:null setFaceCulling]( cullFace, frontFace )</h3>
<div>
See [page:GLState GLState constants] for all possible values for [page:String cullFace] and [page:String frontFace].<br />
See [page:WebGLRenderer WebGLRenderer constants] for all possible values for [page:String cullFace] and [page:String frontFace].<br />
Used for setting the gl.frontFace and gl.cullFace states in the GPU, thus enabling/disabling face culling when rendering.<br />
If cullFace is set to THREE.[page:String CullFaceNone], culling will be disabled.<br />
</div>
......
......@@ -12,10 +12,9 @@ var list = {
[ "Animation", "api/constants/Animation" ],
[ "CustomBlendingEquation", "api/constants/CustomBlendingEquations" ],
[ "DrawModes", "api/constants/DrawModes" ],
[ "GLState", "api/constants/GLState" ],
[ "Materials", "api/constants/Materials" ],
[ "ShadowingTypes", "api/constants/ShadowingTypes" ],
[ "Textures", "api/constants/Textures" ]
[ "Textures", "api/constants/Textures" ],
[ "WebGLRenderer", "api/constants/WebGLRenderer" ]
],
"Cameras": [
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册