import { EnumClass , EnumIO , _from , _fromString } from '../misc/EnumIO' ; export type BoneDataTypeEnum = EnumIO ; class BoneDataTypeClass extends EnumClass implements BoneDataTypeEnum { constructor ( { index , str } ) { super ( { index , str } ) ; } } const Mat44x1 = new BoneDataTypeClass ( { index : 0 , str : 'Mat44x1' , } ) ; const Vec4x2 = new BoneDataTypeClass ( { index : 1 , str : 'Vec4x2' , } ) ; const Vec4x2Old = new BoneDataTypeClass ( { index : 2 , str : 'Vec4x2Old' , } ) ; const Vec4x1 = new BoneDataTypeClass ( { index : 3 , str : 'Vec4x1' , } ) ; const typeList = [ Mat44x1 , Vec4x2 , Vec4x1 ] ; function from ( index ) { return _from ( { typeList , index } ) as BoneDataTypeEnum ; } function fromString ( str ) { return _fromString ( { typeList , str } ) as BoneDataTypeEnum ; } export const BoneDataType = Object . freeze ( { Mat44x1 , Vec4x2 , Vec4x2Old , Vec4x1 , from , fromString , } ) ;