import { EnumClass , EnumIO , _from , _fromString } from '../misc/EnumIO' ; export type BufferUseEnum = EnumIO ; class BufferUseClass extends EnumClass implements BufferUseEnum { constructor ( { index , str } ) { super ( { index , str } ) ; } } const GPUInstanceData = new BufferUseClass ( { index : 0 , str : 'GPUInstanceData' , } ) ; const GPUVertexData = new BufferUseClass ( { index : 1 , str : 'GPUVertexData' , } ) ; const UBOGeneric = new BufferUseClass ( { index : 2 , str : 'UBOGeneric' , } ) ; const CPUGeneric = new BufferUseClass ( { index : 3 , str : 'CPUGeneric' , } ) ; const typeList = [ GPUInstanceData , GPUVertexData , UBOGeneric , CPUGeneric ] ; function from ( index ) { return _from ( { typeList , index } ) as BufferUseEnum ; } function fromString ( str ) { return _fromString ( { typeList , str } ) as BufferUseEnum ; } export const BufferUse = Object . freeze ( { GPUInstanceData , GPUVertexData , UBOGeneric , CPUGeneric , from , fromString , } ) ;