import { EnumClass , EnumIO , _from } from '../misc/EnumIO' ; export type ShadingModelEnum = EnumIO ; class ShadingModelClass extends EnumClass implements ShadingModelEnum { constructor ( { index , str } ) { super ( { index , str } ) ; } } const Unknown = new ShadingModelClass ( { index : - 1 , str : 'UNKNOWN' , } ) ; const Constant = new ShadingModelClass ( { index : 0 , str : 'CONSTANT' , } ) ; const Lambert = new ShadingModelClass ( { index : 1 , str : 'LAMBERT' , } ) ; const BlinnPhong = new ShadingModelClass ( { index : 2 , str : 'BLINN' , } ) ; const Phong = new ShadingModelClass ( { index : 3 , str : 'PHONG' } ) ; const typeList = [ Unknown , Constant , Lambert , BlinnPhong , Phong ] ; function from ( index ) { return _from ( { typeList , index } ) as ShadingModelEnum ; } export const ShadingModel = Object . freeze ( { Unknown , Constant , Lambert , BlinnPhong , Phong , from , } ) ;