|
|
@@ -34,16 +34,16 @@
|
|
|
|
|
|
<h3>[method:Group createMeshesFromMultiMaterialMesh]( [param:Mesh mesh] )</h3>
|
|
|
<p>
|
|
|
- mesh -- A mesh with multiple materials.
|
|
|
+ mesh -- 具有多种材质的网格。
|
|
|
</p>
|
|
|
<p>
|
|
|
- Converts the given multi-material mesh into an instance of [page:Group] holding for each material a separate mesh.
|
|
|
+ 为给定的具有多种材质的网格的每个材质,创建一个包含新网格的新物体组[page:Group]。
|
|
|
</p>
|
|
|
|
|
|
<h3>[method:Group createMultiMaterialObject]( [param:BufferGeometry geometry], [param:Array materials] )</h3>
|
|
|
<p>
|
|
|
- geometry -- 材料集的几何形状。 <br />
|
|
|
- materials -- 为物体准备的材料。
|
|
|
+ geometry -- 材质集的几何。 <br />
|
|
|
+ materials -- 为物体准备的材质。
|
|
|
</p>
|
|
|
<p>
|
|
|
创建一个新组,囊括了在材质中定义的每种材质的新网格。请注意,这和为一个网格定义多种材质的材质数组不同。<br />
|
|
|
@@ -52,45 +52,41 @@
|
|
|
|
|
|
<h3>[method:undefined sortInstancedMesh]( [param:InstancedMesh mesh], [param:Function compareFn] )</h3>
|
|
|
<p>
|
|
|
- mesh -- InstancedMesh in which instances will be sorted. <br />
|
|
|
- compareFn -- Comparator function defining the sort order.
|
|
|
+ mesh -- InstancedMesh中的实例将呗排序。 <br />
|
|
|
+ compareFn -- 决定排序顺序的比较函数。
|
|
|
</p>
|
|
|
<p>
|
|
|
- Sorts the instances within an [page:InstancedMesh], according to a user-defined
|
|
|
- callback. The callback will be provided with two arguments, <i>indexA</i>
|
|
|
- and <i>indexB</i>, and must return a numerical value. See
|
|
|
- [link:https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#description Array.prototype.sort]
|
|
|
- for more information on sorting callbacks and their return values.
|
|
|
+ 根据用户定义的回调函数,对[page:InstancedMesh]中的实例进行排序。
|
|
|
+ 回调函数会提供两个参数,<i>indexA</i>和<i>indexB</i>,并且必须返回一个数值。
|
|
|
+ 有关排序回调函数的更多信息,请参阅[link:https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#description Array.prototype.sort]
|
|
|
</p>
|
|
|
<p>
|
|
|
- Because of the high performance cost, three.js does not sort
|
|
|
- [page:InstancedMesh] instances automatically. Manually sorting may be
|
|
|
- helpful to improve display of alpha blended materials (back to front),
|
|
|
- and to reduce overdraw in opaque materials (front to back).
|
|
|
+ 由于性能成本,three.js不会自动对[page:InstancedMesh]实例进行排序。
|
|
|
+ 手动排序可能有助于提高透明材质的显示顺序(back to front)和不透明材质的显示顺序(front to back)。
|
|
|
</p>
|
|
|
|
|
|
<h3>[method:Generator traverseGenerator]( [param:Object3D object] )</h3>
|
|
|
<p>
|
|
|
- object -- The 3D object to traverse.
|
|
|
+ object -- 遍历的对象。
|
|
|
</p>
|
|
|
<p>
|
|
|
- A generator based version of [page:Object3D.traverse]().
|
|
|
+ 使用generator实现的 [page:Object3D.traverse]().
|
|
|
</p>
|
|
|
|
|
|
<h3>[method:Generator traverseVisibleGenerator]( [param:Object3D object] )</h3>
|
|
|
<p>
|
|
|
- object -- The 3D object to traverse.
|
|
|
+ object -- 遍历的对象。
|
|
|
</p>
|
|
|
<p>
|
|
|
- A generator based version of [page:Object3D.traverseVisible]().
|
|
|
+ 使用generator实现的 [page:Object3D.traverseVisible]().
|
|
|
</p>
|
|
|
|
|
|
<h3>[method:Generator traverseAncestorsGenerator]( [param:Object3D object] )</h3>
|
|
|
<p>
|
|
|
- object -- The 3D object to traverse.
|
|
|
+ object -- 遍历的对象。
|
|
|
</p>
|
|
|
<p>
|
|
|
- A generator based version of [page:Object3D.traverseAncestors]().
|
|
|
+ 使用generator实现的 [page:Object3D.traverseAncestors]().
|
|
|
</p>
|
|
|
|
|
|
<h2>源代码</h2>
|