|
10 | 10 | <h1>[name]</h1> |
11 | 11 |
|
12 | 12 | <p class="desc"> |
13 | | - A class containing utility functions for [page:BufferGeometry BufferGeometry] instances. |
| 13 | + 一个包含 [page:BufferGeometry BufferGeometry] 实例的实用方法的类。 |
14 | 14 | </p> |
15 | 15 |
|
16 | 16 |
|
17 | | - <h2>Methods</h2> |
| 17 | + <h2>方法</h2> |
18 | 18 |
|
19 | 19 | <h3>[method:BufferGeometry mergeBufferGeometries]( [param:Array geometries], [param:Boolean useGroups] )</h3> |
20 | 20 | <p> |
21 | | - geometries -- Array of [page:BufferGeometry BufferGeometry] instances.<br /> |
22 | | - useGroups -- Whether groups should be generated for the merged geometry or not.<br /><br /> |
| 21 | + geometries -- 由 [page:BufferGeometry BufferGeometry] 实例的数组。<br /> |
| 22 | + useGroups -- 是否要为了合并几何体而产生组。<br /><br /> |
23 | 23 |
|
24 | | - Merges a set of geometries into a single instance. All geometries must have compatible attributes. |
25 | | - If merge does not succeed, the method returns null. |
| 24 | + 将一组几何体合并到一个实例中。所有几何体都必须兼容该属性。 |
| 25 | + 如果合并不成功,则该方法返回 null。 |
26 | 26 |
|
27 | 27 | </p> |
28 | 28 |
|
29 | 29 | <h3>[method:BufferAttribute mergeBufferAttributes]( [param:Array attributes] )</h3> |
30 | 30 | <p> |
31 | | - attributes -- Array of [page:BufferAttribute BufferAttribute] instances.<br /><br /> |
| 31 | + attributes -- 由 [page:BufferAttribute BufferAttribute] 实例组成的数组。<br /><br /> |
32 | 32 |
|
33 | | - Merges a set of attributes into a single instance. All attributes must have compatible properties |
34 | | - and types, and [page:InterleavedBufferAttribute InterleavedBufferAttributes] are not supported. If merge does not succeed, the method |
35 | | - returns null. |
| 33 | + 将一组属性合并为一个单一的实例。所有几何体都必须兼容该属性,不支持 [page:InterleavedBufferAttribute InterleavedBufferAttributes] 。 |
| 34 | + 如果合并不成功,则该方法返回 null 。 |
36 | 35 |
|
37 | 36 | </p> |
38 | 37 |
|
39 | 38 | <h3>[method:InterleavedBufferAttribute interleaveAttributes]( [param:Array attributes] )</h3> |
40 | 39 | <p> |
41 | | - attributes -- Array of [page:BufferAttribute BufferAttribute] instances.<br /><br /> |
| 40 | + attributes -- 由 [page:BufferAttribute BufferAttribute] 实例组成的数组。<br /><br /> |
42 | 41 |
|
43 | | - Interleaves a set of attributes and returns a new array of corresponding attributes that share |
44 | | - a single InterleavedBuffer instance. All attributes must have compatible types. If merge does not |
45 | | - succeed, the method returns null. |
| 42 | + 交叉存储一组属性并返回一个新的对应属性数组,这些属性共享一个 InterleavedBuffer 实例。所有属性都必须兼容的该类型。如果合并不成功,则该方法返回 null 。 |
46 | 43 |
|
47 | 44 | </p> |
48 | 45 |
|
49 | 46 | <h3>[method:Number estimateBytesUsed]( [param:BufferGeometry geometry] )</h3> |
50 | 47 | <p> |
51 | | - geometry -- Instance of [page:BufferGeometry BufferGeometry] to estimate the memory use of.<br /><br /> |
| 48 | + geometry -- 通过 [page:BufferGeometry BufferGeometry] 的实例来估计内存使用情况。<br /><br /> |
52 | 49 |
|
53 | | - Returns the amount of bytes used by all attributes to represent the geometry. |
| 50 | + 返回所有用于表示几何体的属性所占用的字节数。 |
54 | 51 |
|
55 | 52 | </p> |
56 | 53 |
|
57 | 54 | <h3>[method:BufferGeometry mergeVertices]( [param:BufferGeometry geometry], [param:Number tolerance] )</h3> |
58 | 55 | <p> |
59 | | - geometry -- Instance of [page:BufferGeometry BufferGeometry] to merge the vertices of.<br /> |
60 | | - tolerance -- The maximum allowable difference between vertex attributes to merge. Defaults to 1e-4.<br /><br /> |
| 56 | + geometry -- 用于合并顶点的 [page:BufferGeometry BufferGeometry] 实例。<br /> |
| 57 | + tolerance -- 要合并的顶点属性之间允许的最大差异。 默认为 1e-4。<br /><br /> |
61 | 58 |
|
62 | | - Returns a new [page:BufferGeometry BufferGeometry] with vertices for which all similar vertex attributes |
63 | | - (within tolerance) are merged. |
| 59 | + 返回一个新的 [page:BufferGeometry BufferGeometry] ,其中包含将所有(在容差范围内的)具有相似属性的顶点合并而成的顶点。 |
64 | 60 |
|
65 | 61 | </p> |
66 | 62 |
|
67 | 63 | <h3>[method:BufferGeometry toTrianglesDrawMode]( [param:BufferGeometry geometry], [param:TrianglesDrawMode drawMode] )</h3> |
68 | 64 | <p> |
69 | | - geometry -- Instance of [page:BufferGeometry BufferGeometry].<br /> |
70 | | - drawMode -- The draw mode of the given geometry.<br /><br /> |
| 65 | + geometry -- [page:BufferGeometry BufferGeometry] 实例。<br /> |
| 66 | + drawMode -- 给定几何体的绘制模式。<br /><br /> |
71 | 67 |
|
72 | | - Returns a new indexed [page:BufferGeometry BufferGeometry] based on the [page:DrawModes THREE.TrianglesDrawMode] draw mode. This mode |
73 | | - corresponds to the *gl.TRIANGLES* WebGL primitive. |
| 68 | + 基于 [page:DrawModes THREE.TrianglesDrawMode] 绘制模式,返回一个新的有索引值的 [page:BufferGeometry BufferGeometry]。 此模式对应于 WebGL 的原始术语 *gl.TRIANGLES* 。 |
74 | 69 |
|
75 | 70 | </p> |
76 | 71 |
|
77 | | - <h2>Source</h2> |
| 72 | + <h2></h2> |
78 | 73 |
|
79 | 74 | <p> |
80 | 75 | [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/utils/BufferGeometryUtils.js examples/jsm/utils/BufferGeometryUtils.js] |
|
0 commit comments