瀏覽代碼

the zh translation of constants.

gogoend 6 年之前
父節點
當前提交
7ef3961211

+ 2 - 2
docs/api/zh/constants/CustomBlendingEquations.html

@@ -8,7 +8,7 @@
 		<link type="text/css" rel="stylesheet" href="page.css" />
 		<link type="text/css" rel="stylesheet" href="page.css" />
 	</head>
 	</head>
 	<body>
 	<body>
-		<h1>自定义混合方程常量</h1>
+		<h1>自定义混合方程常量(Custom Blending Equation Constants)</h1>
 
 
 
 
 		<h2>示例</h2>
 		<h2>示例</h2>
@@ -16,7 +16,7 @@
 
 
 		<h2>用法</h2>
 		<h2>用法</h2>
 		<p>
 		<p>
-			这个常量可以用于所有的材质类型。首先将材质的混合模式设置为THREE.CustomBlending,然后设置所需要的混合方程、源因子和目标因子。
+			这个常量可以用于所有的材质类型。首先将材质的混合模式设置为THREE.CustomBlending,然后设置所需要的混合方程、源因子和目标因子。
 		</p>
 		</p>
 
 
 		<code>
 		<code>

+ 17 - 19
docs/api/zh/constants/DrawModes.html

@@ -8,52 +8,50 @@
 		<link type="text/css" rel="stylesheet" href="page.css" />
 		<link type="text/css" rel="stylesheet" href="page.css" />
 	</head>
 	</head>
 	<body>
 	<body>
-		<h1>Draw Mode Constants</h1>
+		<h1>绘图模式常量(Draw Mode Constants</h1>
 
 
 		<p class="desc">
 		<p class="desc">
-			These are valid values for [page:Mesh.drawMode], and control how the list of vertices is interpeted once sent to the GPU.<br /><br />
-
-			Note that these only work when [page:Mesh.geometry] is a [page:BufferGeometry]. Changing this
-			when [page:Mesh.geometry] is a [page:Geometry] will have no effect.<br /><br />
+			这些是[page:Mesh.drawMode]的有效值,控制着顶点列表一旦被发送到GPU中将如何被解释。
+			请注意,只有当[page:Mesh.geometry]是一个[page:BufferGeometry]的时候,这些值才会生效。当[page:Mesh.geometry]是一个
+			[page:Geometry]的时候,改变这个值不会有任何效果。
+<br /><br />
 
 
 
 
 
 
 		</p>
 		</p>
 
 
-		<h2>Draw Modes</h2>
+
+		<h2>绘图模式</h2>
 
 
 		<code>
 		<code>
 			THREE.TrianglesDrawMode
 			THREE.TrianglesDrawMode
 		</code>
 		</code>
 		<p>
 		<p>
-			This is the default, and results in every three consecutive vertices (v0, v1, v2), (v2, v3, v5), ...
-			being interpreted as a separate triangle. <br />
-			If the number of vertices is not a multiple of 3, excess vertices are ignored.
+			这是默认值,这将使得每三个连续顶点(v0, v1, v2),(v2, v3, v5),……被解释为一个单独的三角形。
+			<br />
+			如果顶点的数量不是3的倍数,那么将会忽略多余的顶点。
 		</p>
 		</p>
 
 
 		<code>
 		<code>
 			THREE.TriangleStripDrawMode
 			THREE.TriangleStripDrawMode
 		</code>
 		</code>
 		<p>
 		<p>
-			This will result in a series of triangles connected in a strip, given by (v0, v1, v2), (v2, v1, v3), (v2, v3, v4), ...
-			so that every subsequent triangle shares two vertices with the previous triangle.
+			这将使得一系列的三角形(由(v0, v1, v2),(v2, v1, v3),(v2, v3, v4),……给定)一个一个地连在一起,每一个连续的三角形将和前一个三角形共享两个顶点。
 		</p>
 		</p>
 
 
 		<code>
 		<code>
 			THREE.TriangleFanDrawMode
 			THREE.TriangleFanDrawMode
 		</code>
 		</code>
 		<p>
 		<p>
-			This will result in a series of triangles each sharing the first vertex (like a fan),
-			given by (v0, v1, v2), (v0, v2, v3), (v0, v3, v4), ... <br /><br />
+这将会使得一个序列中的每一个三角形(由(v0, v1, v2),(v0, v2, v3),(v0, v3, v4),……给定)共享它们的第一个顶点(就像风扇一样)。<br /><br />
 
 
-			<em>Note:</em> As of [link:https://en.wikipedia.org/wiki/DirectX#DirectX_10 DirectX10], this mode is not supported. As Chrome and Firefox
-			render WebGL using [link:https://en.wikipedia.org/wiki/ANGLE_(software) ANGLE] on Windows,
-			internally this mode will be converted to a supported mode, which will likely lead to lowered
-			performance on those browsers.
+			<em>注意:</em>截至[link:https://en.wikipedia.org/wiki/DirectX#DirectX_10 DirectX10]这个模式还没有被支持。
+			由于Chorme和Firefox在Windows上是使用[link:https://en.wikipedia.org/wiki/ANGLE_(software) ANGLE]来渲染WebGL的,所以这种模式将会在内部转换为受支持的模式,
+			但可能会导致这些浏览器在性能上降低一些。
 		</p>
 		</p>
 
 
 
 
-		<h2>Usage</h2>
+		<h2>用法</h2>
 
 
 		<code>
 		<code>
 		var geometry = new THREE.Geometry();
 		var geometry = new THREE.Geometry();
@@ -76,7 +74,7 @@
 
 
 
 
 
 
-		<h2>Source</h2>
+		<h2>源代码</h2>
 
 
 		[link:https://github.com/mrdoob/three.js/blob/master/src/constants.js src/constants.js]
 		[link:https://github.com/mrdoob/three.js/blob/master/src/constants.js src/constants.js]
 	</body>
 	</body>

+ 33 - 32
docs/api/zh/constants/Materials.html

@@ -8,40 +8,40 @@
 		<link type="text/css" rel="stylesheet" href="page.css" />
 		<link type="text/css" rel="stylesheet" href="page.css" />
 	</head>
 	</head>
 	<body>
 	<body>
-		<h1>Material Constants</h1>
+		<h1>材质常量(Material Constants</h1>
 
 
 		<p class="desc">
 		<p class="desc">
-		These constants define properties common to all material types,
-		with the exception of Texture Combine Operations which only apply to [page:MeshBasicMaterial.combine MeshBasicMaterial], [page:MeshLambertMaterial.combine MeshLambertMaterial] and [page:MeshPhongMaterial.combine MeshPhongMaterial].<br />
+			由这些常量定义的属性对所有的材质类型都生效,除了Texture Combine Operations只应用于
+			[page:MeshBasicMaterial.combine MeshBasicMaterial],[page:MeshLambertMaterial.combine MeshLambertMaterial]和[page:MeshPhongMaterial.combine MeshPhongMaterial]。<br />
 		</p>
 		</p>
 
 
 
 
-		<h2>Side</h2>
+		<h2></h2>
 		<code>
 		<code>
 		THREE.FrontSide
 		THREE.FrontSide
 		THREE.BackSide
 		THREE.BackSide
 		THREE.DoubleSide
 		THREE.DoubleSide
 		</code>
 		</code>
 		<p>
 		<p>
-		Defines which side of faces will be rendered - front, back or both.
-		Default is [page:Constant FrontSide].
+			定义了哪一边的面将会被渲染 —— 正面,或是反面,还是两个面都渲染。
+			默认值是[page:Constant FrontSide](只渲染正面)。
 		</p>
 		</p>
 
 
 
 
-		<h2>Colors</h2>
+		<h2>颜色</h2>
 		<code>
 		<code>
 		THREE.NoColors
 		THREE.NoColors
 		THREE.FaceColors
 		THREE.FaceColors
 		THREE.VertexColors
 		THREE.VertexColors
 		</code>
 		</code>
 		<p>
 		<p>
-		[page:Constant NoColors] is the default and applies the material's color to all faces.<br />
-		[page:Constant FaceColors] colors faces according to each [page:Face3 Face3] [page:Color Color] value.<br />
-		[page:Constant VertexColors] colors faces according to each [page:Face3 Face3] vertexColors value. This is an array of three [page:Color Color]s, one for each vertex in the face.<br />
-		See the [example:webgl_geometry_colors geometry / colors] example.
+		[page:Constant NoColors] 是默认值,且会将材质的颜色应用到所有面。<br />
+		[page:Constant FaceColors] 根据每个[page:Face3 Face3]的[page:Color Color]值来对面进行着色。<br />
+		[page:Constant VertexColors] 根据每个 [page:Face3 Face3]的vertexColors(顶点颜色)值来对面进行着色。 这是一个包含有三个[page:Color Color]的数组,数组中每一项都对应着面中的每一个顶点。<br />
+		请查看示例:[example:webgl_geometry_colors geometry / colors]。
 		</p>
 		</p>
 
 
-		<h2>Blending Mode</h2>
+		<h2>混合模式</h2>
 		<code>
 		<code>
 		THREE.NoBlending
 		THREE.NoBlending
 		THREE.NormalBlending
 		THREE.NormalBlending
@@ -53,13 +53,13 @@
 
 
 
 
 		<p>
 		<p>
-		These control the source and destination blending equations for the material's RGB and Alpha sent to the WebGLRenderer for use by WebGL.<br />
-		[page:Constant NormalBlending] is the default.<br />
-		Note that [page:Constant CustomBlending] must be set to use [page:CustomBlendingEquation Custom Blending Equations].<br />
-		See the [example:webgl_materials_blending materials / blending] example.<br />
+			这些值控制着源和目标材质中,被发送到WebGLRenderer,来给WebGL使用的包含有RGB和Alpha数据的混合方程。<br />
+			默认值是[page:Constant NormalBlending]。<br />
+			请注意,[page:Constant CustomBlending]必须被设置为自定义混合方程([page:CustomBlendingEquation Custom Blending Equations])常量中的值。<br />
+			请查看示例:[example:webgl_materials_blending materials / blending]。<br />
 		</p>
 		</p>
 
 
-		<h2>Depth Mode</h2>
+		<h2>深度模式</h2>
 		<code>
 		<code>
 		THREE.NeverDepth
 		THREE.NeverDepth
 		THREE.AlwaysDepth
 		THREE.AlwaysDepth
@@ -70,31 +70,32 @@
 		THREE.NotEqualDepth
 		THREE.NotEqualDepth
 		</code>
 		</code>
 		<p>
 		<p>
-		Which depth function the material uses to compare incoming pixels Z-depth against the current Z-depth buffer value. If the result of the comparison is true, the pixel will be drawn.<br />
-		[page:Materials NeverDepth] will never return true.<br />
-		[page:Materials AlwaysDepth] will always return true.<br />
-		[page:Materials LessDepth] will return true if the incoming pixel Z-depth is less than the current buffer Z-depth.<br />
-		[page:Materials LessEqualDepth] is the default and will return true if the incoming pixel Z-depth is less than or equal to the current buffer Z-depth.<br />
-		[page:Materials GreaterEqualDepth] will return true if the incoming pixel Z-depth is greater than or equal to the current buffer Z-depth.<br />
-		[page:Materials GreaterDepth] will return true if the incoming pixel Z-depth is greater than the current buffer Z-depth.<br />
-		[page:Materials NotEqualDepth] will return true if the incoming pixel Z-depth is not equal to the current buffer Z-depth.<br />
+			材质使用这些深度函数来比较输入像素和缓冲器中Z-depth的值。
+			如果比较的结果为true,则将绘制像素。<br />
+		[page:Materials NeverDepth] 永远不返回true。<br />
+		[page:Materials AlwaysDepth] 总是返回true。<br />
+		[page:Materials LessDepth] 当输入像素Z-depth小于当前缓冲器Z-depth时,返回true。<br />
+		[page:Materials LessEqualDepth] 为默认值,当输入像素Z-depth小于或等于当前缓冲器Z-depth时,返回true。<br />
+		[page:Materials GreaterEqualDepth] 当输入像素Z-depth大于或等于当前缓冲器Z-depth时,返回true。 <br />
+		[page:Materials GreaterDepth] 当输入像素Z-depth大于当前缓冲器Z-depth时,返回true。<br />
+		[page:Materials NotEqualDepth] 当输入像素Z-depth不等于当前缓冲器Z-depth时,返回true。<br />
 		</p>
 		</p>
 
 
-		<h2>Texture Combine Operations</h2>
+		<h2>纹理结合操作</h2>
 		<code>
 		<code>
 		THREE.MultiplyOperation
 		THREE.MultiplyOperation
 		THREE.MixOperation
 		THREE.MixOperation
 		THREE.AddOperation
 		THREE.AddOperation
 		</code>
 		</code>
 		<p>
 		<p>
-		These define how the result of the surface's color is combined with the environment map (if present), for [page:MeshBasicMaterial.combine MeshBasicMaterial], [page:MeshLambertMaterial.combine MeshLambertMaterial] and [page:MeshPhongMaterial.combine MeshPhongMaterial]. <br />
-		[page:Constant MultiplyOperation] is the default and multiplies the environment map color with the surface color.<br />
-		[page:Constant MixOperation] uses reflectivity to blend between the two colors.<br />
-		[page:Constant AddOperation] adds the two colors.
-		</p>
+			这些常量定义了物体表面颜色与环境贴图(如果存在的话)相结合的结果,
+			用在[page:MeshBasicMaterial.combine MeshBasicMaterial]、[page:MeshLambertMaterial.combine MeshLambertMaterial]和[page:MeshPhongMaterial.combine MeshPhongMaterial]当中。<br />
+		[page:Constant MultiplyOperation] 是默认值,它将环境贴图和物体表面颜色进行相乘。<br />
+		[page:Constant MixOperation] 使用反射率来混和两种颜色。uses reflectivity to blend between the two colors.<br />
+		[page:Constant AddOperation] 用于对两种颜色进行相加。</p>
 
 
 
 
-		<h2>Source</h2>
+		<h2>源代码</h2>
 
 
 		[link:https://github.com/mrdoob/three.js/blob/master/src/constants.js src/constants.js]
 		[link:https://github.com/mrdoob/three.js/blob/master/src/constants.js src/constants.js]
 	</body>
 	</body>

+ 22 - 22
docs/api/zh/constants/Renderer.html

@@ -8,9 +8,9 @@
 		<link type="text/css" rel="stylesheet" href="page.css" />
 		<link type="text/css" rel="stylesheet" href="page.css" />
 	</head>
 	</head>
 	<body>
 	<body>
-		<h1>WebGLRenderer Constants</h1>
+		<h1>WebGL渲染器常量(WebGLRenderer Constants</h1>
 
 
-		<h2>Cull Face Modes</h2>
+		<h2>面剔除模式</h2>
 		<code>
 		<code>
 		THREE.CullFaceNone
 		THREE.CullFaceNone
 		THREE.CullFaceBack
 		THREE.CullFaceBack
@@ -18,37 +18,37 @@
 		THREE.CullFaceFrontBack
 		THREE.CullFaceFrontBack
 		</code>
 		</code>
 		<p>
 		<p>
-		[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.
+		[page:constant CullFaceNone] 禁用面剔除。<br />
+		[page:constant CullFaceBack] 为默认值,剔除背面。<br />
+		[page:constant CullFaceFront] 剔除正面。<br />
+		[page:constant CullFaceFrontBack] 剔除正面和背面。
 		</p>
 		</p>
 
 
-		<h2>Front Face Direction</h2>
+		<h2>正面方向</h2>
 		<code>
 		<code>
 		THREE.FrontFaceDirectionCW
 		THREE.FrontFaceDirectionCW
 		THREE.FrontFaceDirectionCCW
 		THREE.FrontFaceDirectionCCW
 		</code>
 		</code>
 		<p>
 		<p>
-		[page:constant FrontFaceDirectionCW] sets the winding order for polygons to clockwise.<br />
-		[page:constant FrontFaceDirectionCCW] sets the winding order for polygons to counter-clockwise (default).
+		[page:constant FrontFaceDirectionCW] 将多边形的缠绕顺序设置为顺时针方向。 <br />
+		[page:constant FrontFaceDirectionCCW] 为默认值,将多边形的缠绕顺序设置为逆时针方向。
 		</p>
 		</p>
 
 
-		<h2>Shadow Types</h2>
+		<h2>阴影类型</h2>
 		<code>
 		<code>
 		THREE.BasicShadowMap
 		THREE.BasicShadowMap
 		THREE.PCFShadowMap
 		THREE.PCFShadowMap
 		THREE.PCFSoftShadowMap
 		THREE.PCFSoftShadowMap
 		</code>
 		</code>
 		<p>
 		<p>
-		These define the WebGLRenderer's [page:WebGLRenderer.shadowMap.type shadowMap.type] property.<br /><br />
+			这些常量定义了WebGLRenderer中[page:WebGLRenderer.shadowMap.type shadowMap.type]的属性。<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.
+		[page:constant BasicShadowMap] 能够给出没有经过过滤的阴影映射 —— 速度最快,但质量最差。<br />
+		[page:constant PCFShadowMap] 为默认值,使用Percentage-Closer Filtering (PCF)算法来过滤阴影映射。<br />
+		[page:constant PCFSoftShadowMap] 使用Percentage-Closer Soft Shadows (PCSS) 算法来过滤阴影映射。
 		</p>
 		</p>
 
 
-		<h2>Tone Mapping</h2>
+		<h2>色调映射</h2>
 		<code>
 		<code>
 		THREE.NoToneMapping
 		THREE.NoToneMapping
 		THREE.LinearToneMapping
 		THREE.LinearToneMapping
@@ -57,19 +57,19 @@
 		THREE.CineonToneMapping
 		THREE.CineonToneMapping
 		</code>
 		</code>
 		<p>
 		<p>
-		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 />
+				这些常量定义了WebGLRenderer中[page:WebGLRenderer.toneMapping toneMapping]的属性。
 
 
-		[page:constant NoToneMapping] disables tone mapping.<br />
-		[page:constant LinearToneMapping] is the default.<br /><br />
+				这个属性用于在普通计算机显示器或者移动设备屏幕等低动态范围介质上,模拟、逼近高动态范围(HDR)效果。<br /><br />
 
 
-		See the [example:webgl_tonemapping WebGL / tonemapping] example.
+		[page:constant NoToneMapping] 禁用色调映射。<br />
+		[page:constant LinearToneMapping] 为默认值,线性色调映射。<br /><br />
+
+		请查看示例:[example:webgl_tonemapping WebGL / tonemapping]。
 
 
 		</p>
 		</p>
 
 
 
 
-		<h2>Source</h2>
+		<h2>源代码</h2>
 
 
 		[link:https://github.com/mrdoob/three.js/blob/master/src/constants.js src/constants.js]
 		[link:https://github.com/mrdoob/three.js/blob/master/src/constants.js src/constants.js]
 	</body>
 	</body>