diff --git a/docs/api/en/core/BufferGeometry.html b/docs/api/en/core/BufferGeometry.html index 66a12d2b754135006aed37e8f712cb1c7bc1ccff..3171cc2e21c44b4fda096a724ccc986b3f12ec93 100644 --- a/docs/api/en/core/BufferGeometry.html +++ b/docs/api/en/core/BufferGeometry.html @@ -51,43 +51,6 @@ [example:webgl_buffergeometry_rawshader Raw Shaders]

- -

Accessing Attributes

-

- WebGL stores data associated with individual vertices of a geometry in attributes. - Examples include the position of the vertex, the normal vector for the vertex, the vertex color, - and so on. When using [page:Geometry], the [page:WebGLRenderer renderer] takes care of wrapping - up this information into typed array buffers and sending this data to the shader. With - BufferGeometry, all of this data is stored in buffers associated with individual attributes. - This means that to get the position data associated with a vertex (for instance), you must call - [page:.getAttribute] to access the 'position' [page:BufferAttribute attribute], then access the individual - x, y, and z coordinates of the position. -

-

- The following attributes are set by various members of this class: -

-

[page:BufferAttribute position] (itemSize: 3)

-

- Stores the x, y, and z coordinates of each vertex in this geometry. Set by [page:.fromGeometry](). -

- -

[page:BufferAttribute normal] (itemSize: 3)

-

- Stores the x, y, and z components of the vertex normal vector of each vertex in this geometry. - Set by [page:.fromGeometry](). -

- -

[page:BufferAttribute color] (itemSize: 3)

-

- Stores the red, green, and blue channels of vertex color of each vertex in this geometry. - Set by [page:.fromGeometry](). -

- -

- In addition to the the built-in attributes, you can set your own custom attributes using the addAttribute method. With [page:Geometry], these attributes are set and stored on the [page:Material]. In BufferGeometry, the attributes are stored with the geometry itself. Note that you still need to set the attributes information on the material as well, but the value of each attribute is stored in the BufferGeometry. -

- -

Constructor

diff --git a/docs/api/zh/core/BufferGeometry.html b/docs/api/zh/core/BufferGeometry.html index 34987292438b09c50e90023cc91d126d148df027..9c7e0743125f366eafc4544771c8aa08be995b4f 100644 --- a/docs/api/zh/core/BufferGeometry.html +++ b/docs/api/zh/core/BufferGeometry.html @@ -50,39 +50,6 @@ [example:webgl_buffergeometry_rawshader Raw Shaders]

- -

访问属性值

-

- WebGL 将与每个顶点相关的数据保存为 attributes. 这些属性例如,顶点位置、顶点法向量、顶点颜色等等。 - 当使用 [page:Geometry] 时,[page:WebGLRenderer renderer] 将数据包装为有类型的队列的缓存,并将数据送往着色器。有了 - BufferGeometry 这些数据都被存储到相应类型的属性的缓存中。这就意味着,如果想要获得顶点的位置信息,你必须调用 - [page:.getAttribute] 访问位置信息的 page:BufferAttribute attribute],之后再访问位置矢量中每一维坐标值(x,y,z 值)。 -

-

- 通过该类提供的下属方法设置以下属性值: -

-

[page:BufferAttribute position] (itemSize: 3)

-

- 存储当前几何体中每个顶点的坐标,包含 x,y,z 三维数据。通过 [page:.fromGeometry]() 设置。 -

- -

[page:BufferAttribute normal] (itemSize: 3)

-

- 存储当前几何体中每个顶点的法向量,包含 x,y,z 三维数据。通过 [page:.fromGeometry]() 设置。 -

- -

[page:BufferAttribute color] (itemSize: 3)

-

- 存储当前几何体中每个顶点的颜色值,包含 R,G,B 三通道颜色值。通过 [page:.fromGeometry]() 设置。 -

- -

- 除了上述已有的属性,你可以通过 addAttribute 方法自定义属性。通过 [page:Geometry],这些自定义属性被存储到 - [page:Material] 中。在 BufferGeometry 中,属性则被存储到几何体本身。注意,你依然需要在材质中设置属性信息, - 但是属性的值则被存储到 BufferGeometry。 -

- -

构造函数