# 缓冲区属性使用常量([name])

使用常量可用于向 API 提供有关如何使用几何缓冲区属性以优化性能的提示。

## 代码示例

`const geometry = new THREE.BufferGeometry(); const positionAttribute = new THREE.BufferAttribute( array, 3 , false ); positionAttribute.setUsage( THREE.DynamicDrawUsage ); geometry.setAttribute( 'position', positionAttribute );`

## 例子

[example:webgl_buffergeometry_drawrange materials / buffergeometry / drawrange ]

## 几何体相关(Geometry Usage)

`THREE.StaticDrawUsage THREE.DynamicDrawUsage THREE.StreamDrawUsage THREE.StaticReadUsage THREE.DynamicReadUsage THREE.StreamReadUsage THREE.StaticCopyUsage THREE.DynamicCopyUsage THREE.StreamCopyUsage` 有关每个常量的更多详细信息，请参阅 [link:https://www.khronos.org/opengl/wiki/Buffer_Object#Buffer_Object_Usage OpenGL 文档]。

## 源代码

[link:https://github.com/mrdoob/three.js/blob/master/src/constants.js src/constants.js]