import { EnumClass , EnumIO , _from } from '../misc/EnumIO' ; export type PixelFormatEnum = EnumIO ; class PixelFormatClass extends EnumClass implements PixelFormatEnum { constructor ( { index , str } ) { super ( { index , str } ) ; } } const DepthComponent = new PixelFormatClass ( { index : 0x1902 , str : 'DEPTH_COMPONENT' , } ) ; const Alpha = new PixelFormatClass ( { index : 0x1906 , str : 'ALPHA' , } ) ; const RGB = new PixelFormatClass ( { index : 0x1907 , str : 'RGB' } ) ; const RGBA = new PixelFormatClass ( { index : 0x1908 , str : 'RGBA' , } ) ; const Luminance = new PixelFormatClass ( { index : 0x1909 , str : 'LUMINANCE' , } ) ; const LuminanceAlpha = new PixelFormatClass ( { index : 0x190a , str : 'LUMINANCE_ALPHA' , } ) ; const typeList = [ DepthComponent , Alpha , RGB , RGBA , Luminance , LuminanceAlpha ] ; function from ( index ) { return _from ( { typeList , index } ) as PixelFormatEnum ; } export const PixelFormat = Object . freeze ( { DepthComponent , Alpha , RGB , RGBA , Luminance , LuminanceAlpha , } ) ;