Forráskód Böngészése

zh doc: sync with the en docs to #17768

gogoend 5 éve
szülő
commit
c6c7b6e95e

+ 7 - 0
docs/api/zh/animation/AnimationMixer.html

@@ -41,6 +41,13 @@
 			说明: 将混合器的时间比例设为0, 稍后再设置为1,可以暂停/取消暂停由该混合器控制的所有动作。
 		</p>
 
+		<h3>[method:AnimationMixer setTime]([param:Number timeInSeconds]) </h3>
+		<p>
+			Sets the global mixer to a specific time and updates the animation accordingly.<br /><br />
+
+			This is useful when you need to jump to an exact time in an animation. The input parameter will be scaled by the mixer's [page:.timeScale timeScale].
+		</p>
+
 
 		<h2>方法</h2>
 

+ 5 - 0
docs/api/zh/audio/Audio.html

@@ -198,7 +198,12 @@
 		<p>
 		应用[link:https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement HTMLMediaElement]类型对象作为音源.<br />
 		并且设置[page:Audio.hasPlaybackControl hasPlaybackControl]为false.
+		</p>
 
+		<h3>[method:Audio setMediaStreamSource]( mediaStream )</h3>
+		<p>
+		Applies the given object of type [link:https://developer.mozilla.org/en-US/docs/Web/API/MediaStream MediaStream] as the source of this audio.<br />
+		Also sets [page:Audio.hasPlaybackControl hasPlaybackControl] to false.
 		</p>
 
 		<h3>[method:Audio setNodeSource]( audioNode )</h3>

+ 5 - 5
docs/api/zh/constants/DrawModes.html

@@ -21,7 +21,7 @@
 			THREE.TrianglesDrawMode
 		</code>
 		<p>
-			这是默认值,这将使得每三个连续顶点(v0, v1, v2),(v2, v3, v5),……被解释为一个单独的三角形。
+			这是默认值,这将使得每三个连续顶点(v0, v1, v2),(v3, v4, v5),……被解释为一个单独的三角形。
 			<br />
 			如果顶点的数量不是3的倍数,那么将会忽略多余的顶点。
 		</p>
@@ -51,15 +51,15 @@
 		var geometry = new THREE.BufferGeometry();
 
 		var vertices = [];
-
+	
 		vertices.push( -10,  10, 0 );
 		vertices.push( -10, -10, 0 );
 		vertices.push(  10, -10, 0 );
-
+	
 		// ...
-
+	
 		geometry.addAttribute( 'position', new THREE.Float32BufferAttribute( vertices, 3 ) );
-
+	
 		var material = new THREE.MeshBasicMaterial( { color: 0xffff00 } );
 
 		var mesh = new THREE.Mesh( geometry, material );

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

@@ -47,7 +47,7 @@
 		[page:constant BasicShadowMap] 能够给出没有经过过滤的阴影映射 —— 速度最快,但质量最差。<br />
 		[page:constant PCFShadowMap] 为默认值,使用Percentage-Closer Filtering (PCF)算法来过滤阴影映射。<br />
 		[page:constant PCFSoftShadowMap] 使用Percentage-Closer Soft Shadows (PCSS) 算法来过滤阴影映射。<br />
-		[page:constant VSMShadowMap] filters shadow maps using the Variance Shadow Map (VSM) algorithm.
+		[page:constant VSMShadowMap] filters shadow maps using the Variance Shadow Map (VSM) algorithm. When using VSMShadowMap all shadow receivers will also cast shadows.
 		</p>
 
 		<h2>色调映射</h2>
@@ -59,9 +59,9 @@
 		THREE.CineonToneMapping
 		</code>
 		<p>
-				这些常量定义了WebGLRenderer中[page:WebGLRenderer.toneMapping toneMapping]的属性。
+		这些常量定义了WebGLRenderer中[page:WebGLRenderer.toneMapping toneMapping]的属性。
 
-				这个属性用于在普通计算机显示器或者移动设备屏幕等低动态范围介质上,模拟、逼近高动态范围(HDR)效果。<br /><br />
+		这个属性用于在普通计算机显示器或者移动设备屏幕等低动态范围介质上,模拟、逼近高动态范围(HDR)效果。<br /><br />
 
 		[page:constant NoToneMapping] 禁用色调映射。<br />
 		[page:constant LinearToneMapping] 为默认值,线性色调映射。<br /><br />

+ 1 - 1
docs/api/zh/core/BufferGeometry.html

@@ -158,7 +158,7 @@
 
 		<h3>[method:BufferGeometry setAttribute]( [param:String name], [param:BufferAttribute attribute] )</h3>
 		<p>
-			为当前几何体增加一个 attribute。 的属性,在类的内部,有一个存储 [page:.attributes] 的 hashmap,
+			为当前几何体设置一个 attribute 属性。在类的内部,有一个存储 [page:.attributes] 的 hashmap,
 			通过该 hashmap,遍历 attributes 的速度会更快。而使用该方法,可以向 hashmap 内部增加 attribute。
 			所以,你需要使用该方法来添加 attributes。
 		</p>

+ 10 - 3
docs/api/zh/core/Object3D.html

@@ -111,8 +111,8 @@
 
 	<h3>[property:function onBeforeRender]</h3>
 	<p>
-			一个可选的回调函数,在Object3D渲染之前直接执行。
-			使用以下参数来调用此函数:renderer,scene,camera,geometry,material,group。
+		一个可选的回调函数,在Object3D渲染之前直接执行。
+		使用以下参数来调用此函数:renderer,scene,camera,geometry,material,group。
 	</p>
 
 	<h3>[property:Object3D parent]</h3>
@@ -416,8 +416,15 @@
 	<p>更新局部变换。</p>
 
 	<h3>[method:null updateMatrixWorld]( [param:Boolean force] )</h3>
-	<p>更新物体及其子级的全局变换。</p>
+	<p>更新物体及其后代的全局变换。</p>
+
+	<h3>[method:null updateWorldMatrix]( [param:Boolean updateParents], [param:Boolean updateChildren] )</h3>
+	<p>
+		updateParents - recursively updates global transform of ancestors.<br />
+		updateChildren - recursively updates global transform of descendants.<br /><br />
 
+		Updates the global transform of the object.
+	</p>
 
 	<h3>[method:Vector3 worldToLocal]( [param:Vector3 vector] )</h3>
 	<p>

+ 3 - 1
docs/api/zh/core/bufferAttributeTypes/BufferAttributeTypes.html

@@ -34,7 +34,9 @@
 		<p>所有上述内容都以相同的方式调用。</p>
 		<h3>TypedBufferAttribute( [param:Array array], [param:Integer itemSize], [param:Boolean normalized] )</h3>
 		<p>
-			array -- 这可以是类型化或非类型化的(普通)数组。它将被转换为指定的类型。<br /><br />
+			array -- 该值可以是类型化或非类型化的(普通)数组。
+			它将被转换为指定的类型。
+			If a length is given a new TypedArray will created, initialized with all elements set to zero.<br /><br />
 
 			itemSize -- 应与特定顶点关联的数组值的数量。<br /><br />
 

+ 6 - 7
docs/api/zh/loaders/managers/LoadingManager.html

@@ -170,18 +170,18 @@
 manager.addHandler( /\.tga$/i, new TGALoader() );
 		</code>
 
-		<h3>[method:LoadingManager removeHandler]( [param:Object regex] )</h3>
+		<h3>[method:null getHandler]( [param:String file] )</h3>
 		<p>
-		[page:Object regex] — A regular expression.
+		[page:String file] — The file path.
 		<p>
-		Removes the loader for the given regular expression.
+		Can be used to retrieve the registered loader for the given file path.
 		</p>
 
-		<h3>[method:null getHandler]( [param:String file] )</h3>
+		<h3>[method:LoadingManager removeHandler]( [param:Object regex] )</h3>
 		<p>
-		[page:String file] — The file path.
+		[page:Object regex] — A regular expression.
 		<p>
-		Can be used to retrieve the registered loader for the given file path.
+		Removes the loader for the given regular expression.
 		</p>
 
 		<h3>[method:String resolveURL]( [param:String url] )</h3>
@@ -220,7 +220,6 @@ manager.addHandler( /\.tga$/i, new TGALoader() );
 		任何使用管理器的加载器都会调用此方法, 当加载器需要加载URL结束时。
 		</p>
 
-
 		<h3>[method:null itemError]( [param:String url] )</h3>
 		<p>
 		[page:String url] — 所要加载的url<br /><br />

+ 11 - 0
docs/api/zh/materials/PointsMaterial.html

@@ -65,6 +65,17 @@ scene.add( starField );
 		<h2>属性(Properties)</h2>
 		<p>共有属性请参见其基类[page:Material]。</p>
 
+		<h3>[property:Texture alphaMap]</h3>
+		<p>The alpha map is a grayscale texture that controls the opacity across the surface
+			(black: fully transparent; white: fully opaque). Default is null.<br /><br />
+
+			Only the color of the texture is used, ignoring the alpha channel if one exists.
+			For RGB and RGBA textures, the [page:WebGLRenderer WebGL] renderer will use the
+			green channel when sampling this texture due to the extra bit of precision provided
+			for green in DXT-compressed and uncompressed RGB 565 formats. Luminance-only and
+			luminance/alpha textures will also still work as expected.
+		</p>
+
 		<h3>[property:Color color]</h3>
 		<p>材质的颜色([page:Color]),默认值为白色 (0xffffff)。</p>
 

+ 0 - 5
docs/api/zh/materials/ShaderMaterial.html

@@ -319,9 +319,6 @@ this.extensions = {
 			因为其通常用在内部优化,所以不应该更改该属性值。
 		</p>
 
-
-
-
 		<h3>[property:Boolean lights]</h3>
 		<p> 材质是否受到光照的影响。默认值为 *false*。如果传递与光照相关的uniform数据到这个材质,则为true。默认是false。
 		</p>
@@ -331,7 +328,6 @@ this.extensions = {
 			由于[link:https://www.khronos.org/registry/OpenGL/specs/gl/glspec46.core.pdf OpenGL Core Profile]与大多数平台上[page:WebGLRenderer WebGL]渲染器的限制,无论如何设置该值,线宽始终为1。
 		</p>
 
-
 		<h3>[property:Boolean morphTargets]</h3>
 		<p> When set to true, morph target attributes are available in the vertex shader. Default is *false*.
 		</p>
@@ -340,7 +336,6 @@ this.extensions = {
 		<p> When set to true, morph normal attributes are available in the vertex shader. Default is *false*.
 		</p>
 
-
 		<h3>[property:WebGLProgram program]</h3>
 		<p> 与此材质相关联的编译后的shader程序,由[page:WebGLRenderer]生成。您应该不需要访问此属性。
 		</p>

+ 12 - 0
docs/api/zh/materials/SpriteMaterial.html

@@ -49,6 +49,18 @@ scene.add( sprite );
 		<h2>属性(Properties)</h2>
 		<p>共有属性请参见其基类[page:Material]。</p>
 
+		<h3>[property:Texture alphaMap]</h3>
+		<p>The alpha map is a grayscale texture that controls the opacity across the surface
+			(black: fully transparent; white: fully opaque). Default is null.<br /><br />
+
+			Only the color of the texture is used, ignoring the alpha channel if one exists.
+			For RGB and RGBA textures, the [page:WebGLRenderer WebGL] renderer will use the
+			green channel when sampling this texture due to the extra bit of precision provided
+			for green in DXT-compressed and uncompressed RGB 565 formats. Luminance-only and
+			luminance/alpha textures will also still work as expected.
+		</p>
+
+
 		<h3>[property:Color color]</h3>
 		<p>材质的颜色([page:Color]),默认值为白色 (0xffffff)。 [page:.map]会和 color 相乘。</p>
 

+ 9 - 0
docs/api/zh/math/Color.html

@@ -296,6 +296,15 @@ var color = new THREE.Color( 1, 0, 0 );
 		注意,对于X11颜色名称,多个单词(如暗橙色)变成字符串“darkorange”(全部是小写字母)。
 		</p>
 
+		<h3>[method:Color setColorName]( [param:String style] ) </h3>
+		<p>
+		[page:String style] — color name ( from [link:https://en.wikipedia.org/wiki/X11_color_names#Color_name_chart X11 color names] ).<br /><br />
+
+		Sets this color from a color name. Faster than [page:.setStyle] method if you don't need the other CSS-style formats.<br/><br/>
+
+		For convenience, the list of names is exposed in Color.NAMES as a hash: <code>Color.NAMES.aliceblue // returns 0xF0F8FF</code>
+		</p>
+
 		<h3>[method:Color sub]( [param:Color color] ) </h3>
 		<p>
 		从该颜色的RGB分量中减去传入颜色的RGB分量。如果分量结果是负,则该分量为零。

+ 2 - 2
docs/api/zh/math/Vector3.html

@@ -121,7 +121,7 @@ var d = a.distanceTo( b );
 
 		<h3>[method:Float angleTo]( [param:Vector3 v] )</h3>
 		<p>
-		以弧度返回该向量与向量[page:Vector3 v]之间的角度。
+		以弧度返回该向量与向量[page:Vector3 v]之间的角度。 Neither this vector nor [page:Vector3 v] can be the zero vector.
 		</p>
 
 		<h3>[method:this ceil]()</h3>
@@ -320,7 +320,7 @@ var d = a.distanceTo( b );
 		</p>
 
 		<h3>[method:this projectOnVector]( [param:Vector3] )</h3>
-		<p>投影([link:https://en.wikipedia.org/wiki/Vector_projection Projects])该向量到另一个向量上。 </p>
+		<p>投影([link:https://en.wikipedia.org/wiki/Vector_projection Projects])该向量到向量[page:Vector3 v]上。[page:Vector3 v]不能是零向量。</p>
 
 		<h3>[method:this reflect]( [param:Vector3 normal] )</h3>
 		<p>

+ 0 - 1
docs/api/zh/textures/DataTexture.html

@@ -57,7 +57,6 @@
 		// used the buffer to create a [name]
 
 		var texture = new THREE.DataTexture( data, width, height, THREE.RGBFormat );
-		texture.needsUpdate = true
 		</code>
 
 		<h2>Properties</h2>