提交 e590488c 编写于 作者: G gogoend

The translation of geometries folder

上级 9ee9259e
......@@ -8,42 +8,42 @@
<link type="text/css" rel="stylesheet" href="page.css" />
</head>
<body>
<h1>[name]</h1>
<h1>三维物体([name])</h1>
<p class="desc">
这是Three.js中大部分对象的基类,提供了一系列的属性和方法来对三维空间中的物体进行操纵。
This is the base class for most objects in three.js and provides a set of properties and methods
for manipulating objects in 3D space.<br /><br />
Note that this can be used for grouping objects via the [page:.add]( object ) method
which adds the object as a child, however it is better to use [page:Group] for this.
请注意,它可以通过[page:.add]( object )方法来将对象进行组合,该方法将对象添加为子对象,但为此最好使用[page:Group](来作为父对象)。
</p>
<h2>Constructor</h2>
<h2>构造器</h2>
<h3>[name]()</h3>
<p>
The constructor takes no arguments.
构造器中不带有参数。
</p>
<h2>Properties</h2>
<h2>属性</h2>
<h3>[property:Boolean castShadow]</h3>
<p>Whether the object gets rendered into shadow map. Default is *false*.</p>
<p>对象是否被渲染到阴影贴图中。默认值为*false*。</p>
<h3>[property:Object3D children]</h3>
<p>Array with object's children. See [page:Group] for info on manually grouping objects.</p>
<p>含有对象的子级的数组。请参阅[page:Group]来了解将手动对象进行分组的相关信息。</p>
<h3>[property:Boolean frustumCulled]</h3>
<p>
When this is set, it checks every frame if the object is in the frustum of the camera before rendering the object.
Otherwise the object gets rendered every frame even if it isn't visible. Default is *true*.
当这个属性被设置的时候,它将在渲染物体之前,检查每一帧的物体是否在摄像机的视锥体中。
否则,即使该物体不可见,它也将在每一帧中被渲染,默认值为*true*。
</p>
<h3>[property:Integer id]</h3>
<p>readonly – Unique number for this object instance.</p>
<p>只读 —— 表示对象实例ID的唯一数字</p>
<h3>[property:Boolean isObject3D]</h3>
<p>
......
......@@ -8,15 +8,14 @@
<link type="text/css" rel="stylesheet" href="page.css" />
</head>
<body>
<h1>[name]</h1>
<h1>光线投射[name]</h1>
<p class="desc">
This class is designed to assist with [link:https://en.wikipedia.org/wiki/Ray_casting raycasting].
Raycasting is used for mouse picking (working out what objects in the 3d space the mouse is over) amongst
other things.
这个类用于进行[link:https://en.wikipedia.org/wiki/Ray_casting raycasting](光线投射)。
光线投射用于进行鼠标拾取(在三维空间中计算出鼠标移过了什么物体)。
</p>
<h2>Example</h2>
<h2>示例</h2>
<code>
var raycaster = new THREE.Raycaster();
var mouse = new THREE.Vector2();
......@@ -71,44 +70,41 @@
</p>
<h2>Constructor</h2>
<h2>构造器</h2>
<h3>[name]( [param:Vector3 origin], [param:Vector3 direction], [param:Float near], [param:Float far] ) {</h3>
<p>
[page:Vector3 origin] — The origin vector where the ray casts from.<br />
[page:Vector3 direction] — The direction vector that gives direction to the ray. Should be normalized.<br />
[page:Float near] — All results returned are further away than near. Near can't be negative. Default value is 0.<br />
[page:Float far] — All results returned are closer than far. Far can't be lower than near. Default value is Infinity.
</p>
[page:Vector3 origin] —— 光线投射的原点向量。<br />
[page:Vector3 direction] —— 向射线提供方向的方向向量,应当被标准化。<br />
[page:Float near] —— 返回的所有结果比near远。near不能为负值,其默认值为0。<br />
[page:Float far] —— 返回的所有结果都比far近。far不能小于near,其默认值为Infinity(正无穷。)</p>
<p>
This creates a new raycaster object.<br />
这将创建一个新的raycaster对象。<br />
</p>
<h2>Properties</h2>
<h2>属性</h2>
<h3>[property:float far]</h3>
<p>
The far factor of the raycaster. This value indicates which objects can be discarded based on the distance.
This value shouldn't be negative and should be larger than the near property.
raycaster的远距离因数(投射远点)。这个值表明哪些对象可以基于该距离而被raycaster所丢弃。
这个值不应当为负,并且应当比near属性大。
</p>
<h3>[property:float linePrecision]</h3>
<p>
The precision factor of the raycaster when intersecting [page:Line] objects.
raycaster与[page:Line](线)物体相交时的精度因数。
</p>
<h3>[property:float near]</h3>
<p>
The near factor of the raycaster. This value indicates which objects can be discarded based on the distance.
This value shouldn't be negative and should be smaller than the far property.
raycaster的近距离因数(投射近点)。这个值表明哪些对象可以基于该距离而被raycaster所丢弃。
这个值不应当为负,并且应当比near属性小。
</p>
<h3>[property:Object params]</h3>
<p>
An object with the following properties:
<code>
具有以下属性的物体:<code>
{
Mesh: {},
Line: {},
......@@ -121,68 +117,73 @@
</p>
<h3>[property:Ray ray]</h3>
<p>The [Page:Ray] used for the raycasting.</p>
<p>用于进行光线投射的[Page:Ray](射线)。</p>
<h2>Methods</h2>
<h2>方法</h2>
<h3>[method:null set]( [param:Vector3 origin], [param:Vector3 direction] )</h3>
<p>
[page:Vector3 origin] — The origin vector where the ray casts from.<br />
[page:Vector3 direction] — The normalized direction vector that gives direction to the ray.
[page:Vector3 origin] —— 光线投射的原点向量。<br />
[page:Vector3 direction] —— 为光线提供方向的标准化方向向量。
</p>
<p>
Updates the ray with a new origin and direction.
使用一个新的原点和方向来更新射线。
</p>
<h3>[method:null setFromCamera]( [param:Vector2 coords], [param:Camera camera] )</h3>
<p>
[page:Vector2 coords] — 2D coordinates of the mouse, in normalized device coordinates (NDC)---X and Y components should be between -1 and 1.<br />
[page:Camera camera] — camera from which the ray should originate
[page:Vector2 coords] —— 在标准化设备坐标中鼠标的二维坐标 —— X分量与Y分量应当在-1到1之间。<br />
[page:Camera camera] —— 射线所来源的摄像机。
</p>
<p>
Updates the ray with a new origin and direction.
使用一个新的原点和方向来更新射线。
</p>
<h3>[method:Array intersectObject]( [param:Object3D object], [param:Boolean recursive], [param:Array optionalTarget] )</h3>
<p>
[page:Object3D object] — The object to check for intersection with the ray.<br />
[page:Boolean recursive] — If true, it also checks all descendants. Otherwise it only checks intersecton with the object. Default is false.<br />
[page:Array optionalTarget] — (optional) target to set the result. Otherwise a new [page:Array] is instantiated. If set, you must clear this array prior to each call (i.e., array.length = 0;).
[page:Object3D object] —— 检查与射线相交的物体。<br />
[page:Boolean recursive] —— 若为true,则同时也会检查所有的后代。否则将只会检查对象本身。默认值为false。<br />
[page:Array optionalTarget] — (可选)设置结果的目标数组。如果不设置这个值,则一个新的[page:Array]会被实例化;如果设置了这个值,则在每次调用之前必须清空这个数组(例如:array.length = 0;)。
</p>
<p>
Checks all intersection between the ray and the object with or without the descendants. Intersections are returned sorted by distance, closest first. An array of intersections is returned...
检测所有在射线与物体之间,包括或不包括后代的相交部分。返回结果时,相交部分将按距离进行排序,最近的位于第一个)。<br>
该方法返回一个包含有交叉部分的数组:
</p>
<code>
[ { distance, point, face, faceIndex, object }, ... ]
</code>
<p>
[page:Float distance] – distance between the origin of the ray and the intersection<br />
[page:Vector3 point] – point of intersection, in world coordinates<br />
[page:Face3 face] – intersected face<br />
[page:Integer faceIndex] – index of the intersected face<br />
[page:Object3D object] – the intersected object<br />
[page:Vector2 uv] - U,V coordinates at point of intersection
[page:Float distance] —— 射线投射原点和相交部分之间的距离。<br />
[page:Vector3 point] —— 相交部分的点(世界坐标)<br />
[page:Face3 face] —— 相交的面<br />
[page:Integer faceIndex] —— 相交的面的索引<br />
[page:Object3D object] —— 相交的物体<br />
[page:Vector2 uv] —— 相交部分的点的UV坐标。
</p>
<p>
*Raycaster* delegates to the [page:Object3D.raycast raycast] method of the passed object, when evaluating whether the ray intersects the object or not. This allows [page:Mesh meshes] to respond differently to ray casting than [page:Line lines] and [page:Points pointclouds].
当计算这条射线是否和物体相交的时候,*Raycaster*将传入的对象委托给[page:Object3D.raycast raycast]方法。
这将可以让[page:Mesh mesh]对于光线投射的响应不同于[page:Line lines]和[page:Points pointclouds]。
</p>
<p>
*Note* that for meshes, faces must be pointed towards the origin of the [page:.ray ray] in order to be detected; intersections of the ray passing through the back of a face will not be detected. To raycast against both faces of an object, you'll want to set the [page:Mesh.material material]'s [page:Material.side side] property to *THREE.DoubleSide*.
<strong>请注意</strong>:对于网格来说,面必须朝向射线的原点,以便其能够被检测到。
用于交互的射线穿过面的背侧时,将不会被检测到。如果需要对物体中面的两侧进行光线投射,
你需要将[page:Mesh.material material]中的[page:Material.side side]属性设置为*THREE.DoubleSide*。
</p>
<h3>[method:Array intersectObjects]( [param:Array objects], [param:Boolean recursive], [param:Array optionalTarget] )</h3>
<p>
[page:Array objects] — The objects to check for intersection with the ray.<br />
[page:Boolean recursive] — If true, it also checks all descendants of the objects. Otherwise it only checks intersecton with the objects. Default is false.<br />
[page:Array optionalTarget] — (optional) target to set the result. Otherwise a new [page:Array] is instantiated. If set, you must clear this array prior to each call (i.e., array.length = 0;).
[page:Array objects] —— 检测和射线相交的一组物体。<br />
[page:Boolean recursive] —— 若为true,则同时也会检测所有物体的后代。否则将只会检测对象本身的相交部分。默认值为false。<br />
[page:Array optionalTarget] —— (可选)(可选)设置结果的目标数组。如果不设置这个值,则一个新的[page:Array]会被实例化;如果设置了这个值,则在每次调用之前必须清空这个数组(例如:array.length = 0;)。
</p>
<p>
Checks all intersection between the ray and the objects with or without the descendants. Intersections are returned sorted by distance, closest first. Intersections are of the same form as those returned by [page:.intersectObject].
检测所有在射线与这些物体之间,包括或不包括后代的相交部分。返回结果时,相交部分将按距离进行排序,最近的位于第一个),相交部分和[page:.intersectObject]所返回的格式是相同的。
</p>
<h2>Source</h2>
<h2>源代码</h2>
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
</body>
......
......@@ -10,9 +10,10 @@
<body>
[page:BufferGeometry] &rarr;
<h1>[name]</h1>
<h1>立方缓冲几何体([name])</h1>
<p class="desc">This is the [page:BufferGeometry] port of [page:BoxGeometry].</p>
<p class="desc">
这是[page:BoxGeometry]中的[page:BufferGeometry]接口。</p>
<iframe id="scene" src="scenes/geometry-browser.html#BoxBufferGeometry"></iframe>
......@@ -32,7 +33,7 @@
</script>
<h2>Example</h2>
<h2>示例</h2>
<code>var geometry = new THREE.BoxBufferGeometry( 1, 1, 1 );
var material = new THREE.MeshBasicMaterial( {color: 0x00ff00} );
......@@ -40,35 +41,35 @@
scene.add( cube );
</code>
<h2>Constructor</h2>
<h2>构造器</h2>
<h3>[name]([param:Float width], [param:Float height], [param:Float depth], [param:Integer widthSegments], [param:Integer heightSegments], [param:Integer depthSegments])</h3>
<p>
width — Width of the sides on the X axis. Default is 1.<br />
height — Height of the sides on the Y axis. Default is 1.<br />
depth — Depth of the sides on the Z axis. Default is 1.<br />
widthSegments — Optional. Number of segmented faces along the width of the sides. Default is 1.<br />
heightSegments — Optional. Number of segmented faces along the height of the sides. Default is 1.<br />
depthSegments — Optional. Number of segmented faces along the depth of the sides. Default is 1.
width — X轴上面的宽度,默认值为1。<br />
height — Y轴上面的高度,默认值为1。<br />
depth — Z轴上面的深度,默认值为1。<br />
widthSegments — (可选)宽度的分段数,默认值是1。<br />
heightSegments — (可选)宽度的分段数,默认值是1。<br />
depthSegments — (可选)宽度的分段数,默认值是1。
</p>
<h2>Properties</h2>
<h2>属性</h2>
<h3>[property:Object parameters]</h3>
<p>
An object with a property for each of the constructor parameters. Any modification after instantiation does not change the geometry.
</p>
构造函数中所包含着的每一个参数的对象。在实例化之后,该属性的任何更改都不会改变这个几何体。
</p>
<p>
Using the above example code above as our basis:
使用上面的示例代码来作为我们的基础:
<code>
geometry.parameters; // outputs an object {width: 1, height: 1, depth: 1, widthSegments: undefined, heightSegments: undefined}
cube.geometry.parameters; // as above
cube.geometry.parameters.width; // === 1
cube.geometry.parameters.widthSegments // === undefined.
geometry.parameters; // outputs an object {width: 1, height: 1, depth: 1, widthSegments: undefined, heightSegments: undefined}
cube.geometry.parameters; // as above
cube.geometry.parameters.width; // === 1
cube.geometry.parameters.widthSegments // === undefined.
</code>
</p>
<h2>Source</h2>
<h2>源代码</h2>
[link:https://github.com/mrdoob/three.js/blob/master/src/geometries/BoxGeometry.js src/geometries/BoxGeometry.js]
</body>
......
......@@ -10,9 +10,10 @@
<body>
[page:Geometry] &rarr;
<h1>[name]</h1>
<h1>立方几何体([name])</h1>
<p class="desc">BoxGeometry is the quadrilateral primitive geometry class. It is typically used for creating a cube or irregular quadrilateral of the dimensions provided with the 'width', 'height', and 'depth' constructor arguments.</p>
<p class="desc">
BoxGeometry是四边形的原始几何类,它通常使用构造函数所提供的“width”、“height”、“depth”参数来创建立方体或者不规则四边形。</p>
<iframe id="scene" src="scenes/geometry-browser.html#BoxGeometry"></iframe>
......@@ -32,7 +33,7 @@
</script>
<h2>Example</h2>
<h2>示例</h2>
<code>var geometry = new THREE.BoxGeometry( 1, 1, 1 );
var material = new THREE.MeshBasicMaterial( {color: 0x00ff00} );
......@@ -40,27 +41,27 @@
scene.add( cube );
</code>
<h2>Constructor</h2>
<h2>构造器</h2>
<h3>[name]([param:Float width], [param:Float height], [param:Float depth], [param:Integer widthSegments], [param:Integer heightSegments], [param:Integer depthSegments])</h3>
<p>
width — Width of the sides on the X axis. Default is 1.<br />
height — Height of the sides on the Y axis. Default is 1.<br />
depth — Depth of the sides on the Z axis. Default is 1.<br />
widthSegments — Optional. Number of segmented faces along the width of the sides. Default is 1.<br />
heightSegments — Optional. Number of segmented faces along the height of the sides. Default is 1.<br />
depthSegments — Optional. Number of segmented faces along the depth of the sides. Default is 1.
width — X轴上面的宽度,默认值为1。<br />
height — Y轴上面的高度,默认值为1。<br />
depth — Z轴上面的深度,默认值为1。<br />
widthSegments — (可选)宽度的分段数,默认值是1。<br />
heightSegments — (可选)宽度的分段数,默认值是1。<br />
depthSegments — (可选)宽度的分段数,默认值是1。
</p>
<h2>Properties</h2>
<h2>属性</h2>
<h3>[property:Object parameters]</h3>
<p>
An object with a property for each of the constructor parameters. Any modification after instantiation does not change the geometry.
</p>
构造函数中所包含着的每一个参数的对象。在实例化之后,该属性的任何更改都不会改变这个几何体。
</p>
<p>
Using the above example code above as our basis:
<code>
使用上面的示例代码来作为我们的基础:
<code>
geometry.parameters; // outputs an object {width: 1, height: 1, depth: 1, widthSegments: undefined, heightSegments: undefined}
cube.geometry.parameters; // as above
cube.geometry.parameters.width; // === 1
......@@ -68,7 +69,7 @@
</code>
</p>
<h2>Source</h2>
<h2>源代码</h2>
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
</body>
......
......@@ -10,9 +10,9 @@
<body>
[page:BufferGeometry] &rarr;
<h1>[name]</h1>
<h1>圆形缓冲几何体[name]</h1>
<p class="desc">This is the [page:BufferGeometry] port of [page:CircleGeometry].</p>
<p class="desc">这是[page:CircleGeometry]中的[page:BufferGeometry]接口。</p>
<iframe id="scene" src="scenes/geometry-browser.html#CircleBufferGeometry"></iframe>
......@@ -32,7 +32,7 @@
</script>
<h2>Example</h2>
<h2>示例</h2>
<code>
var geometry = new THREE.CircleBufferGeometry( 5, 32 );
......@@ -41,24 +41,24 @@
scene.add( circle );
</code>
<h2>Constructor</h2>
<h2>构造器</h2>
<h3>[name]([param:Float radius], [param:Integer segments], [param:Float thetaStart], [param:Float thetaLength])</h3>
<p>
radius — Radius of the circle, default = 1.<br />
segments — Number of segments (triangles), minimum = 3, default = 8.<br />
thetaStart — Start angle for first segment, default = 0 (three o'clock position).<br />
thetaLength — The central angle, often called theta, of the circular sector. The default is 2*Pi, which makes for a complete circle.
radius — 圆形的半径,默认值为1<br />
segments — 分段(三角面)的数量,最小值为3,默认值为8。<br />
thetaStart — 第一个分段的起始角度,默认为0。(three o'clock position)<br />
thetaLength — 圆形扇区的中心角,通常被称为“θ”(西塔)。默认值是2*Pi,这使其成为一个完整的圆。
</p>
<h2>Properties</h2>
<h2>属性</h2>
<h3>[property:Object parameters]</h3>
<p>
An object with a property for each of the constructor parameters. Any modification after instantiation does not change the geometry.
</p>
构造函数中所包含着的每一个参数的对象。在实例化之后,该属性的任何更改都不会改变这个几何体。
</p>
<h2>Source</h2>
<h2>源代码</h2>
[link:https://github.com/mrdoob/three.js/blob/master/src/geometries/CircleGeometry.js src/geometries/CircleGeometry.js]
</body>
......
......@@ -10,9 +10,10 @@
<body>
[page:Geometry] &rarr;
<h1>[name]</h1>
<h1>圆形几何体([name])</h1>
<p class="desc">CircleGeometry is a simple shape of Euclidean geometry. It is contructed from a number of triangular segments that are oriented around a central point and extend as far out as a given radius. It is built counter-clockwise from a start angle and a given central angle. It can also be used to create regular polygons, where the number of segments determines the number of sides.
<p class="desc">CircleGeometry是欧式几何的一个简单形状,它由围绕着一个中心点的三角分段的数量所构造,由给定的半径来延展。
同时它也可以用于创建规则多边形,其分段数量取决于该规则多边形的边数。
</p>
<iframe id="scene" src="scenes/geometry-browser.html#CircleGeometry"></iframe>
......@@ -33,7 +34,7 @@
</script>
<h2>Example</h2>
<h2>示例</h2>
<code>
var geometry = new THREE.CircleGeometry( 5, 32 );
......@@ -42,24 +43,24 @@
scene.add( circle );
</code>
<h2>Constructor</h2>
<h2>构造器</h2>
<h3>[name]([param:Float radius], [param:Integer segments], [param:Float thetaStart], [param:Float thetaLength])</h3>
<p>
radius — Radius of the circle, default = 1.<br />
segments — Number of segments (triangles), minimum = 3, default = 8.<br />
thetaStart — Start angle for first segment, default = 0 (three o'clock position).<br />
thetaLength — The central angle, often called theta, of the circular sector. The default is 2*Pi, which makes for a complete circle.
radius — 圆形的半径,默认值为1<br />
segments — 分段(三角面)的数量,最小值为3,默认值为8。<br />
thetaStart — 第一个分段的起始角度,默认为0。(three o'clock position)<br />
thetaLength — 圆形扇区的中心角,通常被称为“θ”(西塔)。默认值是2*Pi,这使其成为一个完整的圆。
</p>
<h2>Properties</h2>
<h2>属性</h2>
<h3>[property:Object parameters]</h3>
<p>
An object with a property for each of the constructor parameters. Any modification after instantiation does not change the geometry.
构造函数中所包含着的每一个参数的对象。在实例化之后,该属性的任何更改都不会改变这个几何体。
</p>
<h2>Source</h2>
<h2>源代码</h2>
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
</body>
......
......@@ -10,9 +10,9 @@
<body>
[page:CylinderBufferGeometry] &rarr;
<h1>[name]</h1>
<h1>圆锥缓冲几何体([name])</h1>
<p class="desc">This is the [page:BufferGeometry] port of [page:ConeGeometry].</p>
<p class="desc">这是[page:ConeGeometry]中的[page:BufferGeometry]接口。</p>
<iframe id="scene" src="scenes/geometry-browser.html#ConeBufferGeometry"></iframe>
......@@ -32,7 +32,7 @@
</script>
<h2>Example</h2>
<h2>示例</h2>
<code>var geometry = new THREE.ConeBufferGeometry( 5, 20, 32 );
var material = new THREE.MeshBasicMaterial( {color: 0xffff00} );
......@@ -40,27 +40,27 @@
scene.add( cone );
</code>
<h2>Constructor</h2>
<h2>构造器</h2>
<h3>[name]([param:Float radius], [param:Float height], [param:Integer radialSegments], [param:Integer heightSegments], [param:Boolean openEnded], [param:Float thetaStart], [param:Float thetaLength])</h3>
<p>
radius — Radius of the cone base. Default is 1.<br />
height — Height of the cone. Default is 1.<br />
radialSegments — Number of segmented faces around the circumference of the cone. Default is 8<br />
heightSegments — Number of rows of faces along the height of the cone. Default is 1.<br />
openEnded — A Boolean indicating whether the base of the cone is open or capped. Default is false, meaning capped.<br />
thetaStart — Start angle for first segment, default = 0 (three o'clock position).<br />
thetaLength — The central angle, often called theta, of the circular sector. The default is 2*Pi, which makes for a complete cone.
radius — 圆锥底部的半径,默认值为1。<br />
height — 圆锥的高度,默认值为1。<br />
radialSegments — 圆锥侧面周围的分段数,默认为8。<br />
heightSegments — 圆锥侧面沿着其高度的分段数,默认值为1。<br />
openEnded — 一个Boolean值,指明该圆锥的底面是开放的还是封顶的。默认值为false,即其底面默认是封顶的。<br />
thetaStart — 第一个分段的起始角度,默认为0。(three o'clock position)<br />
thetaLength — 圆锥底面圆扇区的中心角,通常被称为“θ”(西塔)。默认值是2*Pi,这使其成为一个完整的圆锥。
</p>
<h2>Properties</h2>
<h2>属性</h2>
<h3>[property:Object parameters]</h3>
<p>
An object with a property for each of the constructor parameters. Any modification after instantiation does not change the geometry.
构造函数中所包含着的每一个参数的对象。在实例化之后,该属性的任何更改都不会改变这个几何体。
</p>
<h2>Source</h2>
<h2>源代码</h2>
[link:https://github.com/mrdoob/three.js/blob/master/src/geometries/ConeGeometry.js src/geometries/ConeGeometry.js]
</body>
......
......@@ -10,9 +10,9 @@
<body>
[page:CylinderGeometry] &rarr;
<h1>[name]</h1>
<h1>圆锥几何体([name])</h1>
<p class="desc">A class for generating cone geometries</p>
<p class="desc">一个用于生成圆锥几何体的类。</p>
<iframe id="scene" src="scenes/geometry-browser.html#ConeGeometry"></iframe>
......@@ -32,7 +32,7 @@
</script>
<h2>Example</h2>
<h2>示例</h2>
<code>var geometry = new THREE.ConeGeometry( 5, 20, 32 );
var material = new THREE.MeshBasicMaterial( {color: 0xffff00} );
......@@ -40,25 +40,25 @@
scene.add( cone );
</code>
<h2>Constructor</h2>
<h2>构造器</h2>
<h3>[name]([param:Float radius], [param:Float height], [param:Integer radialSegments], [param:Integer heightSegments], [param:Boolean openEnded], [param:Float thetaStart], [param:Float thetaLength])</h3>
<p>
radius — Radius of the cone at the base. Default is 1.<br />
height — Height of the cone. Default is 1.<br />
radialSegments — Number of segmented faces around the circumference of the cone. Default is 8<br />
heightSegments — Number of rows of faces along the height of the cone. Default is 1.<br />
openEnded — A Boolean indicating whether the base of the cone is open or capped. Default is false, meaning capped.<br />
thetaStart — Start angle for first segment, default = 0 (three o'clock position).<br />
thetaLength — The central angle, often called theta, of the circular sector. The default is 2*Pi, which makes for a complete cone.
radius — 圆锥底部的半径,默认值为1。<br />
height — 圆锥的高度,默认值为1。<br />
radialSegments — 圆锥侧面周围的分段数,默认为8。<br />
heightSegments — 圆锥侧面沿着其高度的分段数,默认值为1。<br />
openEnded — 一个Boolean值,指明该圆锥的底面是开放的还是封顶的。默认值为false,即其底面默认是封顶的。<br />
thetaStart — 第一个分段的起始角度,默认为0。(three o'clock position)<br />
thetaLength — 圆锥底面圆扇区的中心角,通常被称为“θ”(西塔)。默认值是2*Pi,这使其成为一个完整的圆锥。
</p>
<h2>Properties</h2>
<h2>属性</h2>
<h3>[property:Object parameters]</h3>
<p>
An object with a property for each of the constructor parameters. Any modification after instantiation does not change the geometry.
</p>
构造函数中所包含着的每一个参数的对象。在实例化之后,该属性的任何更改都不会改变这个几何体。
</p>
<h2>Source</h2>
......
......@@ -10,9 +10,9 @@
<body>
[page:BufferGeometry] &rarr;
<h1>[name]</h1>
<h1>圆柱缓冲几何体([name])</h1>
<p class="desc">This is the [page:BufferGeometry] port of [page:CylinderGeometry].</p>
<p class="desc">这是[page:CylinderGeometry]中的[page:BufferGeometry]接口。</p>
<iframe id="scene" src="scenes/geometry-browser.html#CylinderBufferGeometry"></iframe>
......@@ -32,7 +32,7 @@
</script>
<h2>Example</h2>
<h2>示例</h2>
<code>var geometry = new THREE.CylinderBufferGeometry( 5, 5, 20, 32 );
var material = new THREE.MeshBasicMaterial( {color: 0xffff00} );
......@@ -44,24 +44,24 @@
<h3>[name]([param:Float radiusTop], [param:Float radiusBottom], [param:Float height], [param:Integer radialSegments], [param:Integer heightSegments], [param:Boolean openEnded], [param:Float thetaStart], [param:Float thetaLength])</h3>
<p>
radiusTop — Radius of the cylinder at the top. Default is 1.<br />
radiusBottom — Radius of the cylinder at the bottom. Default is 1.<br />
height — Height of the cylinder. Default is 1.<br />
radialSegments — Number of segmented faces around the circumference of the cylinder. Default is 8<br />
heightSegments — Number of rows of faces along the height of the cylinder. Default is 1.<br />
openEnded — A Boolean indicating whether the ends of the cylinder are open or capped. Default is false, meaning capped.<br />
thetaStart — Start angle for first segment, default = 0 (three o'clock position).<br />
thetaLength — The central angle, often called theta, of the circular sector. The default is 2*Pi, which makes for a complete cylinder.
radiusTop — 圆柱的顶部半径,默认值是1。<br />
radiusBottom — 圆柱的底部半径,默认值是1。<br />
height — 圆柱的高度,默认值是1。<br />
radialSegments — 圆柱侧面周围的分段数,默认为8。<br />
heightSegments — 圆柱侧面沿着其高度的分段数,默认值为1。<br />
openEnded — 一个Boolean值,指明该圆锥的底面是开放的还是封顶的。默认值为false,即其底面默认是封顶的。<br />
thetaStart — 第一个分段的起始角度,默认为0。(three o'clock position)<br />
thetaLength — 圆柱底面圆扇区的中心角,通常被称为“θ”(西塔)。默认值是2*Pi,这使其成为一个完整的圆柱。
</p>
<h2>Properties</h2>
<h2>属性</h2>
<h3>[property:Object parameters]</h3>
<p>
An object with a property for each of the constructor parameters. Any modification after instantiation does not change the geometry.
构造函数中所包含着的每一个参数的对象。在实例化之后,该属性的任何更改都不会改变这个几何体。
</p>
<h2>Source</h2>
<h2>源代码</h2>
[link:https://github.com/mrdoob/three.js/blob/master/src/geometries/CylinderGeometry.js src/geometries/CylinderGeometry.js]
</body>
......
......@@ -10,9 +10,9 @@
<body>
[page:Geometry] &rarr;
<h1>[name]</h1>
<h1>圆柱几何体([name])</h1>
<p class="desc">A class for generating cylinder geometries</p>
<p class="desc">一个用于生成圆柱几何体的类</p>
<iframe id="scene" src="scenes/geometry-browser.html#CylinderGeometry"></iframe>
......@@ -32,7 +32,7 @@
</script>
<h2>Example</h2>
<h2>示例</h2>
<code>var geometry = new THREE.CylinderGeometry( 5, 5, 20, 32 );
var material = new THREE.MeshBasicMaterial( {color: 0xffff00} );
......@@ -40,28 +40,28 @@
scene.add( cylinder );
</code>
<h2>Constructor</h2>
<h2>构造器</h2>
<h3>[name]([param:Float radiusTop], [param:Float radiusBottom], [param:Float height], [param:Integer radialSegments], [param:Integer heightSegments], [param:Boolean openEnded], [param:Float thetaStart], [param:Float thetaLength])</h3>
<p>
radiusTop — Radius of the cylinder at the top. Default is 1.<br />
radiusBottom — Radius of the cylinder at the bottom. Default is 1.<br />
height — Height of the cylinder. Default is 1.<br />
radialSegments — Number of segmented faces around the circumference of the cylinder. Default is 8<br />
heightSegments — Number of rows of faces along the height of the cylinder. Default is 1.<br />
openEnded — A Boolean indicating whether the ends of the cylinder are open or capped. Default is false, meaning capped.<br />
thetaStart — Start angle for first segment, default = 0 (three o'clock position).<br />
thetaLength — The central angle, often called theta, of the circular sector. The default is 2*Pi, which makes for a complete cylinder.
radiusTop — 圆柱的顶部半径,默认值是1。<br />
radiusBottom — 圆柱的底部半径,默认值是1。<br />
height — 圆柱的高度,默认值是1。<br />
radialSegments — 圆柱侧面周围的分段数,默认为8。<br />
heightSegments — 圆柱侧面沿着其高度的分段数,默认值为1。<br />
openEnded — 一个Boolean值,指明该圆锥的底面是开放的还是封顶的。默认值为false,即其底面默认是封顶的。<br />
thetaStart — 第一个分段的起始角度,默认为0。(three o'clock position)<br />
thetaLength — 圆柱底面圆扇区的中心角,通常被称为“θ”(西塔)。默认值是2*Pi,这使其成为一个完整的圆柱。
</p>
<h2>Properties</h2>
<h2>属性</h2>
<h3>[property:Object parameters]</h3>
<p>
An object with a property for each of the constructor parameters. Any modification after instantiation does not change the geometry.
构造函数中所包含着的每一个参数的对象。在实例化之后,该属性的任何更改都不会改变这个几何体。
</p>
<h2>Source</h2>
<h2>源代码</h2>
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
</body>
......
......@@ -10,9 +10,9 @@
<body>
[page:PolyhedronBufferGeometry] &rarr;
<h1>[name]</h1>
<h1>十二面缓冲几何体([name])</h1>
<p class="desc">A class for generating a dodecahedron geometries.</p>
<p class="desc">一个用于创建十二面几何体的类。</p>
<iframe id="scene" src="scenes/geometry-browser.html#DodecahedronBufferGeometry"></iframe>
......@@ -32,22 +32,22 @@
</script>
<h2>Constructor</h2>
<h2>构造器</h2>
<h3>[name]([param:Float radius], [param:Integer detail])</h3>
<p>
radius — Radius of the dodecahedron. Default is 1.<br />
detail — Default is 0. Setting this to a value greater than 0 adds vertices making it no longer a dodecahedron.
radius — 十二面体的半径,默认值为1。<br />
detail — 默认值为0。将这个值设为一个大于0的数将会为它增加一些顶点,使其不再是一个十二面体。
</p>
<h2>Properties</h2>
<h2>属性</h2>
<h3>[property:Object parameters]</h3>
<p>
An object with a property for each of the constructor parameters. Any modification after instantiation does not change the geometry.
构造函数中所包含着的每一个参数的对象。在实例化之后,该属性的任何更改都不会改变这个几何体。
</p>
<h2>Source</h2>
<h2>源代码</h2>
[link:https://github.com/mrdoob/three.js/blob/master/src/geometries/DodecahedronGeometry.js src/geometries/DodecahedronGeometry.js]
</body>
......
<!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>
[page:Geometry] &rarr;
<h1>[name]</h1>
<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>
<p class="desc">A class for generating a dodecahedron geometries.</p>
<body>
[page:Geometry] &rarr;
<iframe id="scene" src="scenes/geometry-browser.html#DodecahedronGeometry"></iframe>
<h1>十二面几何体([name])</h1>
<script>
<p class="desc">A class for generating a dodecahedron geometries.</p>
<iframe id="scene" src="scenes/geometry-browser.html#DodecahedronGeometry"></iframe>
<script>
// iOS iframe auto-resize workaround
if ( /(iPad|iPhone|iPod)/g.test( navigator.userAgent ) ) {
if (/(iPad|iPhone|iPod)/g.test(navigator.userAgent)) {
var scene = document.getElementById( 'scene' );
var scene = document.getElementById('scene');
scene.style.width = getComputedStyle( scene ).width;
scene.style.height = getComputedStyle( scene ).height;
scene.setAttribute( 'scrolling', 'no' );
scene.style.width = getComputedStyle(scene).width;
scene.style.height = getComputedStyle(scene).height;
scene.setAttribute('scrolling', 'no');
}
</script>
</script>
<h2>构造器</h2>
<h2>Constructor</h2>
<h3>[name]([param:Float radius], [param:Integer detail])</h3>
<p>
radius — 十二面体的半径,默认值为1。<br />
detail — 默认值为0。将这个值设为一个大于0的数将会为它增加一些顶点,使其不再是一个十二面体。
</p>
<h3>[name]([param:Float radius], [param:Integer detail])</h3>
<p>
radius — Radius of the dodecahedron. Default is 1.<br />
detail — Default is 0. Setting this to a value greater than 0 adds vertices making it no longer a dodecahedron.
</p>
<h2>属性</h2>
<h2>Properties</h2>
<h3>[property:Object parameters]</h3>
<p>
构造函数中所包含着的每一个参数的对象。在实例化之后,该属性的任何更改都不会改变这个几何体。
</p>
<h3>[property:Object parameters]</h3>
<p>
An object with a property for each of the constructor parameters. Any modification after instantiation does not change the geometry.
</p>
<h2>源代码</h2>
<h2>Source</h2>
[link:https://github.com/mrdoob/three.js/blob/master/src/geometries/DodecahedronGeometry.js
src/geometries/DodecahedronGeometry.js]
</body>
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
</body>
</html>
</html>
\ No newline at end of file
......@@ -10,9 +10,9 @@
<body>
[page:BufferGeometry] &rarr;
<h1>[name]</h1>
<h1>边缘几何体([name])</h1>
<p class="desc">This can be used as a helper object to view the edges of a [page:Geometry Geometry] object.</p>
<p class="desc">这可以作为一个辅助对象来查看[page:Geometry Geometry]的边缘。</p>
<h2>Example</h2>
......@@ -25,22 +25,22 @@ var line = new THREE.LineSegments( edges, new THREE.LineBasicMaterial( { color:
scene.add( line );
</code>
<h2>Constructor</h2>
<h2>构造器</h2>
<h3>[name]( [param:Geometry geometry], [param:Integer thresholdAngle] )</h3>
<p>
geometry — Any geometry object.<br />
thresholdAngle — An edge is only rendered if the angle (in degrees) between the face normals of the adjoining faces exceeds this value. default = 1 degree.
geometry — 任何一个几何体对象。<br />
thresholdAngle — 仅当相邻面的法线之间的角度(单位为角度)超过这个值时,才会渲染边缘。默认值为1。
</p>
<h2>Properties</h2>
<h2>属性</h2>
<h3>[property:Object parameters]</h3>
<p>
An object with a property for each of the constructor parameters. Any modification after instantiation does not change the geometry.
构造函数中所包含着的每一个参数的对象。在实例化之后,该属性的任何更改都不会改变这个几何体。
</p>
<h2>Source</h2>
<h2>源代码</h2>
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
</body>
......
......@@ -10,9 +10,9 @@
<body>
[page:BufferGeometry] &rarr;
<h1>[name]</h1>
<h1>挤压缓冲几何体([name])</h1>
<p class="desc">Creates extruded BufferGeometry from a path shape.</p>
<p class="desc">从一个形状路径中,挤压出一个BufferGeometry。</p>
<iframe id="scene" src="scenes/geometry-browser.html#ExtrudeBufferGeometry"></iframe>
......@@ -32,7 +32,7 @@
</script>
<h2>Example</h2>
<h2>示例</h2>
<code>
......@@ -61,45 +61,45 @@
</code>
<h2>Constructor</h2>
<h2>构造器</h2>
<h3>[name]([param:Array shapes], [param:Object options])</h3>
<p>
shapes — Shape or an array of shapes. <br />
options — Object that can contain the following parameters.
shapes — 形状或者一个包含形状的数组。<br />
options — 一个包含有下列参数的对象:
<ul>
<li>curveSegments — int. Number of points on the curves. Default is 12.</li>
<li>steps — int. Number of points used for subdividing segments along the depth of the extruded spline. Default is 1.</li>
<li>depth — float. Depth to extrude the shape. Default is 100.</li>
<li>bevelEnabled — bool. Apply beveling to the shape. Default is true.</li>
<li>bevelThickness — float. How deep into the original shape the bevel goes. Default is 6.</li>
<li>bevelSize — float. Distance from the shape outline that the bevel extends. Default is bevelThickness - 2.</li>
<li>bevelSegments — int. Number of bevel layers. Default is 3.</li>
<li>extrudePath — THREE.CurvePath. A 3D spline path along which the shape should be extruded.</li>
<li>UVGenerator — Object. object that provides UV generator functions</li>
<li>curveSegments — int,曲线上点的数量,默认值是12。</li>
<li>steps — int,用于沿着挤出样条的深度细分的点的数量,默认值为1。
</li>
<li>depth — float,挤出的形状的深度,默认值为100。</li>
<li>bevelEnabled — bool,对挤出的形状应用是否斜角,默认值为true。</li>
<li>bevelThickness — float,设置原始形状上的斜角将有多深。默认值为6。</li>
<li>bevelSize — float。斜角延伸的形状轮廓之间的距离,默认值为bevelThickness-2。</li>
<li>bevelSegments — int。斜角面的分段层数,默认值为3。</li>
<li>extrudePath — THREE.CurvePath对象。一条沿着被挤出形状的三维样条线。</li>
<li>UVGenerator — Object。提供了UV生成器函数的对象。</li>
</ul>
</p>
<p>
This object extrudes a 2D shape to a 3D geometry.
该对象将一个二维形状挤出为一个三维几何体。
</p>
<p>
When creating a Mesh with this geometry, if you'd like to have a separate material used for its face
and its extruded sides, you can use an array of materials. The first material will be
applied to the face; the second material will be applied to the sides.
当使用这个几何体创建Mesh的时候,如果你希望分别对它的表面和它挤出的侧面使用单独的材质,你可以使用一个材质数组。
第一个材质将用于其表面;第二个材质则将用于其挤压出的侧面。
</p>
<h2>Properties</h2>
<h2>属性</h2>
<h3>[property:Object parameters]</h3>
<p>
An object with a property for each of the constructor parameters. Any modification after instantiation does not change the geometry.
构造函数中所包含着的每一个参数的对象。在实例化之后,该属性的任何更改都不会改变这个几何体。
</p>
<h2>Source</h2>
<h2>源代码</h2>
[link:https://github.com/mrdoob/three.js/blob/master/src/geometries/ExtrudeGeometry.js src/geometries/ExtrudeGeometry.js]
</body>
......
......@@ -10,9 +10,9 @@
<body>
[page:Geometry] &rarr;
<h1>[name]</h1>
<h1>挤压几何体([name])</h1>
<p class="desc">Creates extruded geometry from a path shape.</p>
<p class="desc">从一条形状路径中,挤压出一个Geometry。</p>
<iframe id="scene" src="scenes/geometry-browser.html#ExtrudeGeometry"></iframe>
......@@ -32,7 +32,7 @@
</script>
<h2>Example</h2>
<h2>示例</h2>
<code>
......@@ -61,45 +61,43 @@
</code>
<h2>Constructor</h2>
<h2>构造器</h2>
<h3>[name]([param:Array shapes], [param:Object options])</h3>
<p>
shapes — Shape or an array of shapes. <br />
options — Object that can contain the following parameters.
<p>shapes — 形状或者一个包含形状的数组。<br />
options — 一个包含有下列参数的对象:
<ul>
<li>curveSegments — int. Number of points on the curves. Default is 12.</li>
<li>steps — int. Number of points used for subdividing segments along the depth of the extruded spline. Default is 1.</li>
<li>depth — float. Depth to extrude the shape. Default is 100.</li>
<li>bevelEnabled — bool. Apply beveling to the shape. Default is true.</li>
<li>bevelThickness — float. How deep into the original shape the bevel goes. Default is 6.</li>
<li>bevelSize — float. Distance from the shape outline that the bevel extends. Default is bevelThickness - 2.</li>
<li>bevelSegments — int. Number of bevel layers. Default is 3.</li>
<li>extrudePath — THREE.CurvePath. A 3D spline path along which the shape should be extruded.</li>
<li>UVGenerator — Object. object that provides UV generator functions</li>
<li>curveSegments — int,曲线上点的数量,默认值是12。</li>
<li>steps — int,用于沿着挤出样条的深度细分的点的数量,默认值为1。
</li>
<li>depth — float,挤出的形状的深度,默认值为100。</li>
<li>bevelEnabled — bool,对挤出的形状应用是否斜角,默认值为true。</li>
<li>bevelThickness — float,设置原始形状上的斜角将有多深。默认值为6。</li>
<li>bevelSize — float。斜角延伸的形状轮廓之间的距离,默认值为bevelThickness-2。</li>
<li>bevelSegments — int。斜角面的分段层数,默认值为3。</li>
<li>extrudePath — THREE.CurvePath对象。一条沿着被挤出形状的三维样条线。</li>
<li>UVGenerator — Object。提供了UV生成器函数的对象。</li>
</ul>
</p>
<p>
This object extrudes a 2D shape to a 3D geometry.
</p>
该对象将一个二维形状挤出为一个三维几何体。
</p>
<p>
When creating a Mesh with this geometry, if you'd like to have a separate material used for its face
and its extruded sides, you can use an array of materials. The first material will be
applied to the face; the second material will be applied to the sides.
当使用这个几何体创建Mesh的时候,如果你希望分别对它的表面和它挤出的侧面使用单独的材质,你可以使用一个材质数组。
第一个材质将用于其表面;第二个材质则将用于其挤压出的侧面。
</p>
<h2>Properties</h2>
<h2>属性</h2>
<h3>[property:Object parameters]</h3>
<p>
An object with a property for each of the constructor parameters. Any modification after instantiation does not change the geometry.
</p>
构造函数中所包含着的每一个参数的对象。在实例化之后,该属性的任何更改都不会改变这个几何体。 </p>
<h2>Source</h2>
<h2>源代码</h2>
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
</body>
......
......@@ -9,9 +9,9 @@
</head>
<body>
[page:PolyhedronBufferGeometry] &rarr;
<h1>[name]</h1>
<h1>二十面缓冲几何体([name])</h1>
<p class="desc">A class for generating an icosahedron geometry.</p>
<p class="desc">一个用于生成二十面体的类。</p>
<iframe id="scene" src="scenes/geometry-browser.html#IcosahedronBufferGeometry"></iframe>
......@@ -31,22 +31,22 @@
</script>
<h2>Constructor</h2>
<h2>构造器</h2>
<h3>[name]([param:Float radius], [param:Integer detail])</h3>
<p>
radius — Default is 1. <br />
detail — Default is 0. Setting this to a value greater than 0 adds more vertices making it no longer an icosahedron. When detail is greater than 1, it's effectively a sphere.
radius — 二十面体的半径,默认为1。 <br />
detail — 默认值为0。将这个值设为一个大于0的数将会为它增加一些顶点,使其不再是一个二十面体。当这个值大于1的时候,实际上它将变成一个球体。
</p>
<h2>Properties</h2>
<h2>属性</h2>
<h3>[property:Object parameters]</h3>
<p>
An object with a property for each of the constructor parameters. Any modification after instantiation does not change the geometry.
构造函数中所包含着的每一个参数的对象。在实例化之后,该属性的任何更改都不会改变这个几何体。
</p>
<h2>Source</h2>
<h2>源代码</h2>
[link:https://github.com/mrdoob/three.js/blob/master/src/geometries/IcosahedronGeometry.js src/geometries/IcosahedronGeometry.js]
</body>
......
......@@ -10,9 +10,9 @@
<body>
[page:Geometry] &rarr;
<h1>[name]</h1>
<h1>二十面几何体([name])</h1>
<p class="desc">A class for generating an icosahedron geometry.</p>
<p class="desc">一个用于生成二十面体的类。</p>
<iframe id="scene" src="scenes/geometry-browser.html#IcosahedronGeometry"></iframe>
......@@ -32,22 +32,21 @@
</script>
<h2>Constructor</h2>
<h2>构造器</h2>
<h3>[name]([param:Float radius], [param:Integer detail])</h3>
<p>
radius — Default is 1. <br />
detail — Default is 0. Setting this to a value greater than 0 adds more vertices making it no longer an icosahedron. When detail is greater than 1, it's effectively a sphere.
radius — 二十面体的半径,默认为1。 <br />
detail — 默认值为0。将这个值设为一个大于0的数将会为它增加一些顶点,使其不再是一个二十面体。当这个值大于1的时候,实际上它将变成一个球体。
</p>
<h2>Properties</h2>
<h2>属性</h2>
<h3>[property:Object parameters]</h3>
<p>
An object with a property for each of the constructor parameters. Any modification after instantiation does not change the geometry.
</p>
构造函数中所包含着的每一个参数的对象。在实例化之后,该属性的任何更改都不会改变这个几何体。</p>
<h2>Source</h2>
<h2>源代码</h2>
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
</body>
......
......@@ -12,7 +12,7 @@
<h1>[name]</h1>
<p class="desc">This is the [page:BufferGeometry] port of [page:LatheGeometry].</p>
<p class="desc">这是[page:LatheGeometry]中的[page:BufferGeometry]接口。</p>
<iframe id="scene" src="scenes/geometry-browser.html#LatheBufferGeometry"></iframe>
......@@ -32,7 +32,7 @@
</script>
<h2>Example</h2>
<h2>示例</h2>
<code>
var points = [];
......@@ -45,27 +45,27 @@
scene.add( lathe );
</code>
<h2>Constructor</h2>
<h2>构造器</h2>
<h3>[name]([param:Array points], [param:Integer segments], [param:Float phiStart], [param:Float phiLength])</h3>
<p>
points — Array of Vector2s. The x-coordinate of each point must be greater than zero.<br />
segments — the number of circumference segments to generate. Default is 12.<br />
phiStart — the starting angle in radians. Default is 0.<br />
phiLength — the radian (0 to 2PI) range of the lathed section 2PI is a closed lathe, less than 2PI is a portion. Default is 2PI.
points — 一个Vector2对象数组。每个点的X坐标必须大于0。<br />
segments — 要生成的车削几何体圆周分段的数量,默认值是12。<br />
phiStart — 以弧度表示的起始角度,默认值为0。<br />
phiLength — 车削部分的弧度(0-2PI)范围,2PI将是一个完全闭合的、完整的车削几何体,小于2PI是部分车削。默认值是2PI。
</p>
<p>
This creates a LatheBufferGeometry based on the parameters.
</p>
基于参数创建一个LatheGeometry。
</p>
<h2>Properties</h2>
<h2>属性</h2>
<h3>[property:Object parameters]</h3>
<p>
An object with a property for each of the constructor parameters. Any modification after instantiation does not change the geometry.
</p>
构造函数中所包含着的每一个参数的对象。在实例化之后,该属性的任何更改都不会改变这个几何体。
</p>
<h2>Source</h2>
<h2>源代码</h2>
[link:https://github.com/mrdoob/three.js/blob/master/src/geometries/LatheGeometry.js src/geometries/LatheGeometry.js]
</body>
......
......@@ -10,9 +10,9 @@
<body>
[page:Geometry] &rarr;
<h1>[name]</h1>
<h1>车削几何体([name])</h1>
<p class="desc">Creates meshes with axial symmetry like vases. The lathe rotates around the Y axis.</p>
<p class="desc">创建具有轴对称性的网格,比如花瓶。车削绕着Y轴来进行旋转。</p>
<iframe id="scene" src="scenes/geometry-browser.html#LatheGeometry"></iframe>
......@@ -32,7 +32,7 @@
</script>
<h2>Example</h2>
<h2>示例</h2>
<code>
var points = [];
......@@ -45,27 +45,27 @@
scene.add( lathe );
</code>
<h2>Constructor</h2>
<h2>构造器</h2>
<h3>[name]([param:Array points], [param:Integer segments], [param:Float phiStart], [param:Float phiLength])</h3>
<p>
points — Array of Vector2s. The x-coordinate of each point must be greater than zero.<br />
segments — the number of circumference segments to generate. Default is 12.<br />
phiStart — the starting angle in radians. Default is 0.<br />
phiLength — the radian (0 to 2PI) range of the lathed section 2PI is a closed lathe, less than 2PI is a portion. Default is 2PI.
points — 一个Vector2对象数组。每个点的X坐标必须大于0。<br />
segments — 要生成的车削几何体圆周分段的数量,默认值是12。<br />
phiStart — 以弧度表示的起始角度,默认值为0。<br />
phiLength — 车削部分的弧度(0-2PI)范围,2PI将是一个完全闭合的、完整的车削几何体,小于2PI是部分车削。默认值是2PI。
</p>
<p>
This creates a LatheGeometry based on the parameters.
基于参数创建一个LatheGeometry。
</p>
<h2>Properties</h2>
<h2>属性</h2>
<h3>[property:Object parameters]</h3>
<p>
An object with a property for each of the constructor parameters. Any modification after instantiation does not change the geometry.
构造函数中所包含着的每一个参数的对象。在实例化之后,该属性的任何更改都不会改变这个几何体。
</p>
<h2>Source</h2>
<h2>源代码</h2>
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
</body>
......
......@@ -10,9 +10,9 @@
<body>
[page:Geometry] &rarr;
<h1>[name]</h1>
<h1>管道几何体([name])</h1>
<p class="desc">Creates a tube that extrudes along a 3d curve.</p>
<p class="desc">创建一个沿着三维曲线延伸的管道。</p>
<iframe id="scene" src="scenes/geometry-browser.html#TubeGeometry"></iframe>
......@@ -32,7 +32,7 @@
</script>
<h2>Example</h2>
<h2>示例</h2>
<code>
function CustomSinCurve( scale ) {
......@@ -63,42 +63,42 @@
scene.add( mesh );
</code>
<h2>Constructor</h2>
<h2>构造器</h2>
<h3>[name]([param:Curve path], [param:Integer tubularSegments], [param:Float radius], [param:Integer radialSegments], [param:Boolean closed])</h3>
<p>
path — [page:Curve] - A path that inherits from the [page:Curve] base class<br />
tubularSegments — [page:Integer] - The number of segments that make up the tube, default is 64<br />
radius — [page:Float] - The radius of the tube, default is 1<br />
radialSegments — [page:Integer] - The number of segments that make up the cross-section, default is 8 <br />
closed — [page:Boolean] Is the tube open or closed, default is false <br />
path — [page:Curve] - 一个通过由基类[page:Curve]继承而来的路径。<br />
tubularSegments — [page:Integer] - 组成这一管道的分段数,默认值为64。<br />
radius — [page:Float] - 管道的半径,默认值为1。<br />
radialSegments — [page:Integer] - 管道横截面的分段数目,默认值为8。<br />
closed — [page:Boolean] 管道的两端是否闭合,默认值为false。<br />
</p>
<h2>Properties</h2>
<h2>属性</h2>
<h3>[property:Object parameters]</h3>
<p>
An object with a property for each of the constructor parameters. Any modification after instantiation does not change the geometry.
构造函数中所包含着的每一个参数的对象。在实例化之后,该属性的任何更改都不会改变这个几何体。
</p>
<h3>[property:Array tangents]</h3>
<p>
An array of [page:Vector3] tangents
一个[page:Vector3]切线数组。
</p>
<h3>[property:Array normals]</h3>
<p>
An array of [page:Vector3] normals
一个[page:Vector3]法线数组。
</p>
<h3>[property:Array binormals]</h3>
<p>
An array of [page:Vector3] binormals
一个[page:Vector3]次法线数组。
</p>
<h2>Source</h2>
<h2>源代码</h2>
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
</body>
......
......@@ -10,9 +10,9 @@
<body>
[page:BufferGeometry] &rarr;
<h1>[name]</h1>
<h1>网格几何体([name])</h1>
<p class="desc">This can be used as a helper object to view a [page:Geometry Geometry] object as a wireframe.</p>
<p class="desc">这个类可以被用作一个辅助物体,来对一个[page:Geometry Geometry]以线框的形式进行查看。</p>
<!-- <iframe id="scene" src="scenes/geometry-browser.html#EdgeGeometry"></iframe>
......@@ -32,7 +32,7 @@
</script> -->
<h2>Example</h2>
<h2>示例</h2>
[example:webgl_helpers helpers]
......@@ -49,14 +49,14 @@ line.material.transparent = true;
scene.add( line );
</code>
<h2>Constructor</h2>
<h2>构造器</h2>
<h3>[name]( [param:Geometry geometry] )</h3>
<p>
geometry — any geometry object.
geometry — 任意几何体对象。
</p>
<h2>Source</h2>
<h2>源代码</h2>
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
</body>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册