import {ArrayUtils as ArrayUtils2} from "../../ArrayUtils";
const POSITION = "position";
export class CoreGeometryIndexBuilder {
  static create_index_if_none(geometry) {
    if (!geometry.index) {
      const position = geometry.getAttribute(POSITION);
      if (position) {
        const position_array = position.array;
        geometry.setIndex(ArrayUtils2.range(position_array.length / 3));
      }
    }
  }
}
