Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/api/en/cameras/OrthographicCamera.html
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ <h3>[method:null updateProjectionMatrix]()</h3>
Updates the camera projection matrix. Must be called after any change of parameters.
</p>

<h3>[method:Object toJSON](param:object meta])</h3>
<h3>[method:Object toJSON]([param:object meta])</h3>
<p>
meta -- object containing metadata such as textures or images in objects' descendants.<br />
Convert the camera to three.js [link:https://github.com/mrdoob/three.js/wiki/JSON-Object-Scene-format-4 JSON Object/Scene format].
Expand Down
2 changes: 1 addition & 1 deletion docs/api/en/cameras/PerspectiveCamera.html
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ <h3>[method:null updateProjectionMatrix]()</h3>
Updates the camera projection matrix. Must be called after any change of parameters.
</p>

<h3>[method:Object toJSON](param:object meta])</h3>
<h3>[method:Object toJSON]([param:object meta])</h3>
<p>
meta -- object containing metadata such as textures or images in objects' descendants.<br />
Convert the camera to three.js [link:https://github.com/mrdoob/three.js/wiki/JSON-Object-Scene-format-4 JSON Object/Scene format].
Expand Down
6 changes: 3 additions & 3 deletions docs/api/zh/cameras/ArrayCamera.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ <h1>摄像机阵列([name])</h1>
<p class="desc">

[name] 用于更加高效地使用一组已经预定义的摄像机来渲染一个场景。这将能够更好地提升VR场景的渲染性能。<br />
一个 [name] 的实例中总是包含着一组子摄像机,应当为每一个子摄像机定义*viewport*(边界)这个属性,这一属性决定了由该子摄像机所渲染的视口区域的大小。
一个 [name] 的实例中总是包含着一组子摄像机,应当为每一个子摄像机定义*viewport*(视口)这个属性,这一属性决定了由该子摄像机所渲染的视口区域的大小。
</p>

<h2>示例</h2>
Expand All @@ -31,15 +31,15 @@ <h3>[name]( [param:Array array] )</h3>


<h2>属性</h2>
<p>请参阅基类[page:PerspectiveCamera]的公共属性。</p>
<p>共有属性请参见其基类[page:PerspectiveCamera]。</p>

<h3>[property:Array cameras]</h3>
<p>
摄像机数组。
</p>

<h2>方法</h2>
<p>请参阅基类[page:PerspectiveCamera]的公共方法。</p>
<p>共有方法请参见其基类[page:PerspectiveCamera]。</p>

<h2>源码</h2>

Expand Down
4 changes: 2 additions & 2 deletions docs/api/zh/cameras/Camera.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ <h3>[name]()</h3>

<h2>属性</h2>

<p>请参阅其基类[page:Object3D]来查看共有属性。</p>
<p>共有属性请参见其基类[page:Object3D]</p>

<h3>[property:Boolean isCamera]</h3>
<p>
Expand Down Expand Up @@ -64,7 +64,7 @@ <h3>[property:Matrix4 projectionMatrixInverse]</h3>


<h2>方法</h2>
<p>请参阅其基类[page:Object3D]来查看其共有方法。</p>
<p>共有方法请参见其基类[page:Object3D]。</p>

<h3>[method:Camera clone]( )</h3>
<p>
Expand Down
6 changes: 3 additions & 3 deletions docs/api/zh/cameras/CubeCamera.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ <h2>示例</h2>
scene.add( cubeCamera );

// Create car
var chromeMaterial = new THREE.MeshLambertMaterial( { color: 0xffffff, envMap: cubeCamera.renderTarget } );
var chromeMaterial = new THREE.MeshLambertMaterial( { color: 0xffffff, envMap: cubeCamera.renderTarget.texture } );
var car = new Mesh( carGeometry, chromeMaterial );
scene.add( car );

Expand Down Expand Up @@ -60,7 +60,7 @@ <h3>[name]( [param:Number near], [param:Number far], [param:Number cubeResolutio


<h2>属性</h2>
<p>请参阅其基类[page:Object3D]来查看共有属性。</p>
<p>共有属性请参见其基类[page:Object3D]。</p>

<h3>[property:WebGLRenderTargetCube renderTarget]</h3>
<p>
Expand All @@ -69,7 +69,7 @@ <h3>[property:WebGLRenderTargetCube renderTarget]</h3>
</p>

<h2>方法</h2>
<p>请参阅其基类[page:Object3D]来查看其共有方法。</p>
<p>共有方法请参见其基类[page:Object3D]。</p>



Expand Down
9 changes: 5 additions & 4 deletions docs/api/zh/cameras/OrthographicCamera.html
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ <h3>[name]( [param:Number left], [param:Number right], [param:Number top], [para

<h2>属性</h2>
<p>
请参阅其基类[page:Camera]来查看其共有属性
共有属性请参见其基类[page:Camera]。
<br>
请注意,在大多数属性发生改变之后,你将需要调用[page:OrthographicCamera.updateProjectionMatrix .updateProjectionMatrix]来使得这些改变生效。
</p>
Expand Down Expand Up @@ -111,7 +111,7 @@ <h3>[property:number zoom]</h3>
获取或者设置摄像机的缩放倍数,其默认值为*1*。</p>

<h2>方法</h2>
<p>请参阅其基类[page:Camera]来查看其共有方法。</p>
<p>共有方法请参见其基类[page:Camera]。</p>

<h3>[method:null setViewOffset]( [param:Float fullWidth], [param:Float fullHeight], [param:Float x], [param:Float y], [param:Float width], [param:Float height] )</h3>
<p>
Expand All @@ -138,9 +138,10 @@ <h3>[method:null updateProjectionMatrix]()</h3>

</p>

<h3>[method:JSON toJSON]()</h3>
<h3>[method:Object toJSON]([param:object meta])</h3>
<p>
使用JSON格式来返回摄像机数据。
meta -- 包含有元数据的对象,例如对象后代中的纹理或图像<br />
将摄像机转换为 three.js [link:https://github.com/mrdoob/three.js/wiki/JSON-Object-Scene-format-4 JSON Object/Scene format](three.js JSON 物体/场景格式)。
</p>


Expand Down
14 changes: 6 additions & 8 deletions docs/api/zh/cameras/PerspectiveCamera.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ <h3>[name]( [param:Number fov], [param:Number aspect], [param:Number near], [par

<h2>属性</h2>
<p>
请参阅其基类 [page:Camera] 来查看共有属性。<br>
共有属性请参见其基类 [page:Camera] 。<br>
请注意,在大多数属性发生改变之后,你将需要调用[page:PerspectiveCamera.updateProjectionMatrix .updateProjectionMatrix]来使得这些改变生效。
</p>

Expand Down Expand Up @@ -107,7 +107,7 @@ <h3>[property:number zoom]</h3>


<h2>方法</h2>
<p>请参阅其基类[page:Camera]来查看共有属性。</p>
<p>共有方法请参见其基类[page:Camera]。</p>

<h3>[method:null clearViewOffset]()</h3>
<p>清除任何由[page:PerspectiveCamera.setViewOffset .setViewOffset]设置的偏移量。</p>
Expand Down Expand Up @@ -184,16 +184,14 @@ <h3>[method:null setViewOffset]( [param:Float fullWidth], [param:Float fullHeigh

<h3>[method:null updateProjectionMatrix]()</h3>
<p>

更新摄像机投影矩阵。在任何参数被改变以后必须被调用。

</p>

<h3>[method:JSON toJSON]()</h3>
<h3>[method:Object toJSON]([param:object meta])</h3>
<p>

使用JSON格式来返回摄像机数据
</p>
meta -- 包含有元数据的对象,例如对象后代中的纹理或图像<br />
将摄像机转换为 three.js [link:https://github.com/mrdoob/three.js/wiki/JSON-Object-Scene-format-4 JSON Object/Scene format](three.js JSON 物体/场景格式)
</p>

<h2>源代码</h2>

Expand Down
45 changes: 45 additions & 0 deletions docs/api/zh/constants/Materials.html
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,51 @@ <h2>纹理结合操作</h2>
[page:Constant MixOperation] 使用反射率来混和两种颜色。uses reflectivity to blend between the two colors.<br />
[page:Constant AddOperation] 用于对两种颜色进行相加。</p>

<h2>Stencil Functions</h2>
<code>
THREE.NeverStencilFunc
THREE.LessStencilFunc
THREE.EqualStencilFunc
THREE.LessEqualStencilFunc
THREE.GreaterStencilFunc
THREE.NotEqualStencilFunc
THREE.GreaterEqualStencilFunc
THREE.AlwaysStencilFunc
</code>
<p>
Which stencil function the material uses to determine whether or not to perform a stencil operation.<br />
[page:Materials NeverStencilFunc] will never return true.<br />
[page:Materials LessStencilFunc] will return true if the stencil reference value is less than the current stencil value.<br />
[page:Materials EqualStencilFunc] will return true if the stencil reference value is equal to the current stencil value.<br />
[page:Materials LessEqualStencilFunc] will return true if the stencil reference value is less than or equal to the current stencil value.<br />
[page:Materials GreaterStencilFunc] will return true if the stencil reference value is greater than the current stencil value.<br />
[page:Materials NotEqualStencilFunc] will return true if the stencil reference value is not equal to the current stencil value.<br />
[page:Materials GreaterEqualStencilFunc] will return true if the stencil reference value is greater than or equal to the current stencil value.<br />
[page:Materials AlwaysStencilFunc] will always return true.<br />
</p>

<h2>Stencil Operations</h2>
<code>
THREE.ZeroStencilOp
THREE.KeepStencilOp
THREE.ReplaceStencilOp
THREE.IncrementStencilOp
THREE.DecrementStencilOp
THREE.IncrementWrapStencilOp
THREE.DecrementWrapStencilOp
THREE.InvertStencilOp
</code>
<p>
Which stencil operation the material will perform on the stencil buffer pixel if the provided stencil function passes.<br />
[page:Materials ZeroStencilOp] will set the stencil value to 0.<br />
[page:Materials KeepStencilOp] will not change the current stencil value.<br />
[page:Materials ReplaceStencilOp] will replace the stencil value with the specified stencil reference value.<br />
[page:Materials IncrementStencilOp] will increment the current stencil value by 1.<br />
[page:Materials DecrementStencilOp] will decrement the current stencil value by 1.<br />
[page:Materials IncrementWrapStencilOp] will increment the current stencil value by 1. If the value increments past 255 it will be set to 0.<br />
[page:Materials DecrementWrapStencilOp] will increment the current stencil value by 1. If the value decrements below 0 it will be set to 255.<br />
[page:Materials InvertStencilOp] will perform a bitwise iversion of the current stencil value.<br />
</p>

<h2>源代码</h2>

Expand Down
18 changes: 9 additions & 9 deletions docs/api/zh/constants/Textures.html
Original file line number Diff line number Diff line change
Expand Up @@ -84,32 +84,32 @@ <h2>缩小滤镜
Minification Filters</h2>
<code>
THREE.NearestFilter
THREE.NearestMipMapNearestFilter
THREE.NearestMipMapLinearFilter
THREE.NearestMipmapNearestFilter
THREE.NearestMipmapLinearFilter
THREE.LinearFilter
THREE.LinearMipMapNearestFilter
THREE.LinearMipMapLinearFilter
</code>
THREE.LinearMipmapNearestFilter
THREE.LinearMipmapLinearFilter
</code>

<p>
这些常量用于纹理的[page:Texture.minFilter minFilter]属性,它们定义了当被纹理化的像素映射到大于1纹理元素(texel)的区域时,将要使用的纹理缩小函数。<br /><br />

除了[page:constant NearestFilter] 和 [page:constant LinearFilter],
下面的四个函数也可以用于缩小:<br /><br />

[page:constant NearestMipMapNearestFilter]选择与被纹理化像素的尺寸最匹配的mipmap,并以[page:constant
[page:constant NearestMipmapNearestFilter]选择与被纹理化像素的尺寸最匹配的mipmap,并以[page:constant
NearestFilter](最靠近像素中心的纹理元素)为标准来生成纹理值。
<br /><br />

[page:constant NearestMipMapLinearFilter]选择与被纹理化像素的尺寸最接近的两个mipmap,并以[page:constant
[page:constant NearestMipmapLinearFilter]选择与被纹理化像素的尺寸最接近的两个mipmap,并以[page:constant
NearestFilter]为标准来从每个mipmap中生成纹理值。最终的纹理值是这两个值的加权平均值。
<br /><br />

[page:constant LinearMipMapNearestFilter]选择与被纹理化像素的尺寸最匹配的mipmap,并以[page:constant
[page:constant LinearMipmapNearestFilter]选择与被纹理化像素的尺寸最匹配的mipmap,并以[page:constant
LinearFilter](最靠近像素中心的四个纹理元素的加权平均值)为标准来生成纹理值。
<br /><br />

[page:constant LinearMipMapLinearFilter]是默认值,它选择与被纹理化像素的尺寸最接近的两个mipmap,并以[page:constant
[page:constant LinearMipmapLinearFilter]是默认值,它选择与被纹理化像素的尺寸最接近的两个mipmap,并以[page:constant
LinearFilter]为标准来从每个mipmap中生成纹理值。最终的纹理值是这两个值的加权平均值。<br /><br />

请查看示例:[example:webgl_materials_texture_filters materials / texture / filters]。
Expand Down
2 changes: 1 addition & 1 deletion docs/api/zh/core/Clock.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<h1>[name]</h1>
<p class="desc">
该对象用于跟踪时间。如果[link:https://developer.mozilla.org/en-US/docs/Web/API/Performance/now performance.now]可用,则
Clock 对象通过该方法实现,否则通过歉精准的[link:https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Date/now Date.now]实现
Clock 对象通过该方法实现,否则回落到使用略欠精准的[link:https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Date/now Date.now]来实现
</p>


Expand Down
4 changes: 3 additions & 1 deletion docs/api/zh/core/Geometry.html
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,9 @@ <h3>[method:Geometry scale] ( [param:Float x], [param:Float y], [param:Float z]
</p>

<h3>[method:JSON toJSON] ( )</h3>
<p> 将 Geometry 对象数据转为 JSON 格式。</p>
<p> 将 Geometry 对象转为 JSON 格式。<br />
将几何体转换为 three.js [link:https://github.com/mrdoob/three.js/wiki/JSON-Object-Scene-format-4 JSON Object/Scene format](three.js JSON 物体/场景格式)。
</p>

<h3>[method:Geometry translate] ( [param:Float x], [param:Float y], [param:Float z] )</h3>
<p>
Expand Down
2 changes: 1 addition & 1 deletion docs/api/zh/core/InterleavedBufferAttribute.html
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ <h3>[property:Integer offset]</h3>

<h3>[property:Boolean normalized]</h3>
<p>
默认值为 *true*。
默认值为 *false*。
</p>

<h3>[property:Boolean isInterleavedBufferAttribute]</h3>
Expand Down
14 changes: 11 additions & 3 deletions docs/api/zh/core/Object3D.html
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,10 @@ <h3>[method:null applyMatrix]( [param:Matrix4 matrix] )</h3>
<h3>[method:Object3D applyQuaternion]( [param:Quaternion quaternion] )</h3>
<p>对当前物体应用由四元数所表示的变换。</p>


<h3>[method:this attach]( [param:Object3D object] )</h3>
<p>将*object*作为子级来添加到该对象中,同时保持该object的世界变换。</p>

<h3>[method:Object3D clone]( [param:Boolean recursive] )</h3>
<p>
recursive —— 如果值为true,则该物体的后代也会被克隆。默认值为true。<br /><br />
Expand All @@ -216,7 +220,10 @@ <h3>[method:Object3D clone]( [param:Boolean recursive] )</h3>
<h3>[method:this copy]( [param:Object3D object], [param:Boolean recursive] )</h3>
<p>
recursive —— 如果值为true,则该物体的后代也会被复制。默认值为true。<br /><br />

复制给定的对象到这个对象中。

请注意,事件监听器和用户定义的回调函数([page:.onAfterRender] 和 [page:.onBeforeRender])不会被复制。
</p>

<h3>[method:Object3D getObjectById]( [param:Integer id] )</h3>
Expand Down Expand Up @@ -356,12 +363,13 @@ <h3>[method:null setRotationFromQuaternion]( [param:Quaternion q] )</h3>
<p>
q -- 标准化的四元数。<br /><br />

将所给的四元数复制到[page:.quaternion]中。
将所给的四元数复制到[page:.quaternion]中。
</p>

<h3>[method:null toJSON]( [param:Quaternion q] )</h3>
<h3>[method:Object toJSON]( [param:object meta] )</h3>
<p>
将这个对象转换为JSON格式。
meta -- 包含有元数据的对象,例如该对象的材质、纹理或图片。
将对象转换为 three.js [link:https://github.com/mrdoob/three.js/wiki/JSON-Object-Scene-format-4 JSON Object/Scene format](three.js JSON 物体/场景格式)。
</p>

<h3>[method:this translateOnAxis]( [param:Vector3 axis], [param:Float distance] )</h3>
Expand Down
6 changes: 3 additions & 3 deletions docs/api/zh/core/Raycaster.html
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ <h3>[method:Array intersectObject]( [param:Object3D object], [param:Boolean recu
[page:Array optionalTarget] — (可选)设置结果的目标数组。如果不设置这个值,则一个新的[page:Array]会被实例化;如果设置了这个值,则在每次调用之前必须清空这个数组(例如:array.length = 0;)。
</p>
<p>
检测所有在射线与物体之间,包括或不包括后代的相交部分。返回结果时,相交部分将按距离进行排序,最近的位于第一个。<br>
检测所有在射线与物体之间,包括或不包括后代的相交部分。返回结果时,相交部分将按距离进行排序,最近的位于第一个。<br>
该方法返回一个包含有交叉部分的数组:
</p>
<code>
Expand All @@ -162,7 +162,7 @@ <h3>[method:Array intersectObject]( [param:Object3D object], [param:Boolean recu
[page:Integer faceIndex] —— 相交的面的索引<br />
[page:Object3D object] —— 相交的物体<br />
[page:Vector2 uv] —— 相交部分的点的UV坐标。<br />
[page:Vector2 uv2] - Second set of U,V coordinates at point of intersection
[page:Vector2 uv2] —— Second set of U,V coordinates at point of intersection
</p>
<p>
当计算这条射线是否和物体相交的时候,*Raycaster*将传入的对象委托给[page:Object3D.raycast raycast]方法。
Expand All @@ -178,7 +178,7 @@ <h3>[method:Array intersectObjects]( [param:Array objects], [param:Boolean recur
<p>
[page:Array objects] —— 检测和射线相交的一组物体。<br />
[page:Boolean recursive] —— 若为true,则同时也会检测所有物体的后代。否则将只会检测对象本身的相交部分。默认值为false。<br />
[page:Array optionalTarget] —— (可选)(可选)设置结果的目标数组。如果不设置这个值,则一个新的[page:Array]会被实例化;如果设置了这个值,则在每次调用之前必须清空这个数组(例如:array.length = 0;)。
[page:Array optionalTarget] —— (可选)设置结果的目标数组。如果不设置这个值,则一个新的[page:Array]会被实例化;如果设置了这个值,则在每次调用之前必须清空这个数组(例如:array.length = 0;)。
</p>
<p>
检测所有在射线与这些物体之间,包括或不包括后代的相交部分。返回结果时,相交部分将按距离进行排序,最近的位于第一个),相交部分和[page:.intersectObject]所返回的格式是相同的。
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ <h1>BufferAttribute Types</h1>

<h2>构造函数</h2>

所有上述内容都以相同的方式调用。
<p>所有上述内容都以相同的方式调用。</p>
<h3>TypedBufferAttribute( [param:Array array], [param:Integer itemSize], [param:Boolean normalized] )</h3>
<p>
array -- 这可以是类型化或非类型化的(普通)数组。它将被转换为指定的类型。<br /><br />
Expand Down
4 changes: 2 additions & 2 deletions docs/api/zh/extras/ShapeUtils.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ <h2>方法</h2>

<h3>[method:Number area]( contour )</h3>
<p>
contour -- 2D多边形。<br /><br />
contour -- 2D多边形,一个THREE.Vector2()数组。<br /><br />

计算(2D)轮廓多边形的面积。<br /><br />

Expand All @@ -39,7 +39,7 @@ <h3>[method:Boolean isClockwise]( pts )</h3>
<h3>[method:Array triangulateShape]( contour, holes )</h3>
<p>
contour -- 2D多边形。<br />
holes -- 空洞数组<br /><br />
holes -- 孔洞数组<br /><br />

由[page:ExtrudeGeometry ExtrudeGeometry]和[page:ShapeGeometry ShapeGeometry]内部使用以计算带孔的形状中的面。
</p>
Expand Down
4 changes: 2 additions & 2 deletions docs/api/zh/extras/core/CurvePath.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ <h3>[name]()</h3>


<h2>属性</h2>
<p>请参阅其基类[page:Curve]来了解共有属性。</p>
<p>共有属性请参见其基类[page:Curve]。</p>

<h3>[property:array curves]</h3>
<p>[page:Curve Curves]数组。</p>
Expand All @@ -41,7 +41,7 @@ <h3>[property:boolean autoClose]</h3>


<h2>方法</h2>
<p>请参阅其基类[page:Curve]来了解共有方法。</p>
<p>共有方法请参见其基类[page:Curve]。</p>

<h3>[method:null add]( [param:Curve curve] )</h3>
<p>添加一条曲线到[page:.curves]数组中。</p>
Expand Down
Loading