import { EnumClass , EnumIO , _from , _fromString } from '../misc/EnumIO' ; export type LightTypeEnum = EnumIO ; class LightTypeClass extends EnumClass implements LightTypeEnum { constructor ( { index , str } ) { super ( { index , str } ) ; } } const Directional = new LightTypeClass ( { index : 0 , str : 'Directional' , } ) ; const Point = new LightTypeClass ( { index : 1 , str : 'Point' } ) ; const Spot = new LightTypeClass ( { index : 2 , str : 'Spot' } ) ; const Ambient = new LightTypeClass ( { index : 3 , str : 'Ambient' } ) ; const typeList = [ Point , Directional , Spot , Ambient ] ; function from ( index ) { return _from ( { typeList , index } ) as LightTypeEnum ; } function fromString ( str ) { return _fromString ( { typeList , str } ) as LightTypeEnum ; } export const LightType = Object . freeze ( { Point , Directional , Spot , Ambient , from , fromString , } ) ;