setAttribute method

BufferGeometry setAttribute(
  1. Attribute type,
  2. dynamic attribute
)

Sets an attribute to this geometry. Use this rather than the attributes property, because an internal hashmap of attributes is maintained to speed up iterating over attributes.

Implementation

BufferGeometry setAttribute(Attribute type, attribute) {
  attributes[type.name] = attribute;
  return this;
}