Prechádzať zdrojové kódy

lights-shadows translation

v_zhangfujin 6 rokov pred
rodič
commit
e520efb0df

+ 12 - 20
docs/api/zh/lights/shadows/DirectionalLightShadow.html

@@ -13,14 +13,12 @@
 		<h1>[name]</h1>
 
 		<p class="desc">
-			This is used internally by [page:DirectionalLight DirectionalLights] for calculating shadows.<br /><br />
+			这是用于在[page:DirectionalLight DirectionalLights]内部计算阴影<br /><br />
 
-			Unlike the other shadow classes, this uses an [page:OrthographicCamera] to calculate the shadows,
-			rather than a [page:PerspectiveCamera]. This is because light rays from a [page:DirectionalLight]
-			are parallel.
+			与其他阴影类不同,它是使用OrthographicCamera来计算阴影,而不是PerspectiveCamera。这是因为来自DirectionalLight的光线是平行的。
 		</p>
 
-		<h2>Example</h2>
+		<h2>例子</h2>
 		<p>
 			<code>
 //Create a WebGLRenderer and turn on shadows in the renderer
@@ -61,36 +59,30 @@ scene.add( helper );
 			</code>
 		</p>
 
-		<h2>Constructor</h2>
+		<h2>构造函数</h2>
 		<h3>[name]( )</h3>
 		<p>
-			Creates a new [name]. This is not intended to be called directly - it is called
-			internally by [page:DirectionalLight].
+			创建一个新的[name],不能直接调用-它是在[page:DirectionalLight DirectionalLights]内部调用使用
+
 		</p>
 
-		<h2>Properties</h2>
+		<h2>属性</h2>
 		<p>
-			See the base [page:LightShadow LightShadow] class for common properties.
+			参阅[page:LightShadow LightShadow]类来了解常用的基本属性
 		</p>
 
 		<h3>[property:Camera camera]</h3>
 		<p>
-			The light's view of the world. This is used to generate a depth map of the scene; objects behind
-			other objects from the light's perspective will be in shadow.<br /><br />
-
-			The default is an [page:OrthographicCamera] with [page:OrthographicCamera.left left] and
-			[page:OrthographicCamera.bottom bottom] set to -5,  [page:OrthographicCamera.right right]
-			and  [page:OrthographicCamera.top top] set to 5, the [page:OrthographicCamera.near near]
-			clipping plane at 0.5 and the [page:OrthographicCamera.far far] clipping plane at 500.
+			在光的世界里。这用于生成场景的深度图;从光的角度来看,其他物体背后的物体将处于阴影中。<br /><br />
 		</p>
 
 
-		<h2>Methods</h2>
+		<h2>方法</h2>
 		<p>
-			See the base [page:LightShadow LightShadow] class for common methods.
+			有关常用方法,请参阅基础[page:LightShadow LightShadow]类。
 		</p>
 
-		<h2>Source</h2>
+		<h2>源码</h2>
 
 		[link:https://github.com/mrdoob/three.js/blob/master/src/lights/[name].js src/lights/[name].js]
 	</body>

+ 25 - 31
docs/api/zh/lights/shadows/LightShadow.html

@@ -12,12 +12,11 @@
 		<h1>[name]</h1>
 
 		<p class="desc">
-			This is used internally by [page:PointLight PointLights] for calculating shadows, and also serves as
-			a base class for the other shadow classes.
+			这在 [page:PointLight PointLights] 内部用于计算阴影,也可用作其他阴影类的基类。
 		</p>
 
 
-		<h2>Example</h2>
+		<h2>例子</h2>
 		<p>
 			<code>
 //Create a WebGLRenderer and turn on shadows in the renderer
@@ -58,83 +57,78 @@ scene.add( helper );
 			</code>
 		</p>
 
-		<h2>Constructor</h2>
+		<h2>构造函数</h2>
 
 		<h3>[name]( [param:Camera camera] )</h3>
 		<p>
-		[page:Camera camera] - the light's view of the world.<br /><br />
+		[page:Camera camera] - 在光的世界里<br /><br />
 
-		Create a new [name]. This is not intended to be called directly - it is called
-		internally by [page:PointLight] or used as a base class by other light shadows.
+			创建一个新的[name]。这不能直接调用的 - 它由[page:PointLight]在内部调用,或者由其他阴影用作基类。
 		</p>
 
-		<h2>Properties</h2>
+		<h2>属性</h2>
 
 		<h3>[property:Camera camera]</h3>
 		<p>
-			The light's view of the world. This is used to generate a depth map of the scene; objects behind
-			other objects from the light's perspective will be in shadow.
+			光的世界里。这用于生成场景的深度图;从光的角度来看,其他物体背后的物体将处于阴影中。
 		</p>
 
 		<h3>[property:Float bias]</h3>
 		<p>
-			Shadow map bias, how much to add or subtract from the normalized depth when deciding whether a surface is in shadow.<br />
-			The default is 0. Very tiny adjustments here (in the order of 0.0001) may help reduce artefacts in shadows
+			阴影贴图偏差,在确定曲面是否在阴影中时,从标准化深度添加或减去多少。<br />
+			默认值为0.此处非常小的调整(大约0.0001)可能有助于减少阴影中的伪影
 		</p>
 
 		<h3>[property:WebGLRenderTarget map]</h3>
 		<p>
-			The depth map generated using the internal camera; a location beyond a pixel's depth is
-			in shadow. Computed internally during rendering.
+			使用内置摄像头生成的深度图;超出像素深度的位置在阴影中。在渲染期间内部计算。
 		</p>
 
 
 		<h3>[property:Vector2 mapSize]</h3>
 		<p>
-			A [Page:Vector2] defining the width and height of the shadow map.<br /><br />
+			一个[Page:Vector2]定义阴影贴图的宽度和高度。<br /><br />
 
-			Higher values give better quality shadows at the cost of computation time. Values must be
-			powers of 2, up to the [page:WebGLRenderer.capabilities].maxTextureSize for a given device,
-			although the width and height don't have to be the same (so, for example, (512, 1024) is valid).
-			The default is *( 512, 512 )*.
+			较高的值会以计算时间为代价提供更好的阴影质量。值必须是2的幂,直到给定设备的[page:WebGLRenderer.capabilities].maxTextureSize,
+			虽然宽度和高度不必相同(例如,(512,1024)有效)。
+			默认值为*(512,512)*。
 		</p>
 
 
 		<h3>[property:Matrix4 matrix]</h3>
 		<p>
-			Model to shadow camera space, to compute location and depth in shadow map. Stored
-			in a [page:Matrix4 Matrix4]. This is computed internally during rendering.
+			模拟阴影相机空间,计算阴影贴图中的位置和深度。存储在[page:Matrix4 Matrix4]中。这是在渲染期间内部计算的。
 		</p>
 
 		<h3>[property:Float radius]</h3>
 		<p>
-			Setting this to values greater than 1 will blur the edges of the shadow.<br />
+			将此值设置为大于1的值将模糊阴影的边缘。<br />
 
-			High values will cause unwanted banding effects in the shadows - a greater [page:.mapSize mapSize]
-			will allow for a higher value to be used here before these effects become visible.<br /><br />
 
-			Note that this has no effect if the [page:WebGLRenderer.shadowMap.type] is set to [page:Renderer BasicShadowMap].
+			较高的值会在阴影中产生不必要的条带效果 - 更大的[page:.mapSize mapSize]将允许在这些效果变得可见之前使用更高的值。<br /><br />
+
+			请注意,如果[page:WebGLRenderer.shadowMap.type]设置为[page:Renderer BasicShadowMap],将会无效。
+
 		</p>
 
 
-		<h2>Methods</h2>
+		<h2>方法</h2>
 		<h3>[method:LightShadow copy]( [param:LightShadow source] )</h3>
 		<p>
-		Copies value of all the properties from the [page:LightShadow source] to this
-		SpotLight.
+			将[page:LightShadow]中的所有属性的值复制到 SpotLight。
 		</p>
 
 		<h3>[method:LightShadow clone]()</h3>
 		<p>
-		Creates a new LightShadow with the same properties as this one.
+			克隆与此相同属性的新LightShadow。
 		</p>
 
 		<h3>[method:Object toJSON]()</h3>
 		<p>
-		Serialize this LightShadow.
+			序列化这个LightShadow。
 		</p>
 
-		<h2>Source</h2>
+		<h2>源码</h2>
 
 		[link:https://github.com/mrdoob/three.js/blob/master/src/lights/[name].js src/lights/[name].js]
 	</body>

+ 13 - 24
docs/api/zh/lights/shadows/SpotLightShadow.html

@@ -13,10 +13,10 @@
 		<h1>[name]</h1>
 
 		<p class="desc">
-			This is used internally by [page:SpotLight SpotLights] for calculating shadows.
+			这在SpotLights内部用于计算阴影。
 		</p>
 
-		<h2>Example</h2>
+		<h2>例子</h2>
 		<p>
 			<code>
 //Create a WebGLRenderer and turn on shadows in the renderer
@@ -57,41 +57,30 @@ scene.add( helper );
 		</p>
 
 
-		<h2>Constructor</h2>
-
-		The constructor creates a [param:PerspectiveCamera PerspectiveCamera] to manage the shadow's view of the world.
-
-		<h2>Properties</h2>
-		See the base [page:LightShadow LightShadow] class for common properties.
-
-
+		<h2>构造函数</h2>
+	        	构造函数创建一个 [param:PerspectiveCamera PerspectiveCamera] 来管理阴影的世界视图
+		<h2>属性</h2>
+		有关常用属性,请参阅基础LightShadow类。
 	 <h3>[property:Camera camera]</h3>
 	 <p>
-		 The light's view of the world. This is used to generate a depth map of the scene; objects behind
-		 other objects from the light's perspective will be in shadow.<br /><br />
+		 在光的世界里。这用于生成场景的深度图;从光的角度来看,其他物体背后的物体将处于阴影中。<br /><br />
 
-		 The default is a  [page:PerspectiveCamera] with [page:PerspectiveCamera.near near] clipping plane at 0.5.
-		 The [page:PerspectiveCamera.fov fov] will track the [page:SpotLight.angle angle] property of the owning
-		 [page:SpotLight SpotLight] via the [page:SpotLightShadow.update update] method. Similarly, the
-		 [page:PerspectiveCamera.aspect aspect] property will track the aspect of the
-		 [page:LightShadow.mapSize mapSize]. If the [page:SpotLight.distance distance] property of the light is
-		 set, the [page:PerspectiveCamera.far far] clipping plane will track that, otherwise it defaults to 500.
+		 默认值为PerspectiveCamera,近剪裁平面为0.5。 fov将通过更新方法跟踪拥有SpotLight的角度属性。同样,aspect属性将跟踪mapSize的方面。如果设置了灯光的距离属性,则远剪裁平面将跟踪该值,否则默认为500。
 
 	 </p>
 
 	 <h3>[property:Boolean isSpotLightShadow]</h3>
 	 <p>
-		 Used to check whether this or derived classes are spot light shadows. Default is *true*.<br /><br />
 
-		 You should not change this, as it used internally for optimisation.
+		 用于检查此类或派生类是否为聚光灯阴影。默认为true。<br /><br />
+		 您不应该更改它,因为它在内部用于优化。
 	 </p>
 
-		<h2>Methods</h2>
-		See the base [page:LightShadow LightShadow] class for common methods.
-
+		<h2>方法</h2>
+		有关常用方法,请参阅基础LightShadow类。
 		<h3>[method:SpotLightShadow update]( [param:SpotLight light] )</h3>
 		<p>
-		Updates the internal perspective [page:.camera camera] based on the passed in [page:SpotLight light].
+			根据传入的[page:SpotLight light]更新内部透视[page:.camera camera]。
 		</p>
 
 		<h2>Source</h2>