getWireframeAttribute method

BufferAttribute<NativeArray<num>>? getWireframeAttribute(
  1. BufferGeometry geometry
)

Implementation

BufferAttribute<NativeArray<num>>? getWireframeAttribute(BufferGeometry geometry) {
  final currentAttribute = wireframeAttributes.get(geometry);

  if (currentAttribute != null) {
    final geometryIndex = geometry.index;
    if (geometryIndex != null) {
      // if the attribute is obsolete, create a new one
      if (currentAttribute.version < geometryIndex.version) {
        updateWireframeAttribute(geometry);
      }
    }
  }
  else {
    updateWireframeAttribute(geometry);
  }
  return wireframeAttributes.get(geometry);
}