import { EnumClass , EnumIO , _from , _fromString } from '../misc/EnumIO' ; export type AlphaModeEnum = EnumIO ; class AlphaModeClass extends EnumClass implements AlphaModeEnum { constructor ( { index , str } ) { super ( { index , str } ) ; } } const Opaque = new AlphaModeClass ( { index : 0 , str : 'OPAQUE' } ) ; const Mask = new AlphaModeClass ( { index : 1 , str : 'MASK' } ) ; const Translucent = new AlphaModeClass ( { index : 2 , str : 'TRANSLUCENT' , } ) ; const Additive = new AlphaModeClass ( { index : 3 , str : 'ADDITIVE' } ) ; const typeList = [ Opaque , Mask , Translucent , Additive ] ; function from ( index ) { return _from ( { typeList , index } ) ; } function fromString ( str ) { return _fromString ( { typeList , str } ) as AlphaModeEnum ; } function fromGlTFString ( str ) { if ( str === 'BLEND' ) { return Translucent ; } return _fromString ( { typeList , str } ) as AlphaModeEnum ; } export const AlphaMode = Object . freeze ( { Opaque , Mask , Translucent , Additive , from , fromString , fromGlTFString , } ) ;