import { log , LogLevel } from '../auxiliaries' ; export class GLTFHelper { static modeToEnum ( gl , mode ) { if ( mode < 0 || mode > 6 ) { log ( LogLevel . Error , `Specified draw mode is ${ mode } but is required to be between 0 and 6` ) ; } if ( mode === 0 ) { return gl . POINTS ; } if ( mode === 1 ) { return gl . LINES ; } if ( mode === 2 ) { return gl . LINE_LOOP ; } if ( mode === 3 ) { return gl . LINE_STRIP ; } if ( mode === 4 ) { return gl . TRIANGLES ; } if ( mode === 5 ) { return gl . TRIANGLE_STRIP ; } if ( mode === 6 ) { return gl . TRIANGLE_FAN ; } return gl . TRIANGLES ; } todo param name - Name of the glTF attribute.
     * See  https static nameToAttributeIndex ( name ) { if ( name === 'POSITION' ) { return 0 ; } if ( name === 'NORMAL' ) { return 1 ; } if ( name === 'TANGENT' ) { return 2 ; } if ( name === 'TEXCOORD_0' ) { return 3 ; } if ( name === 'TEXCOORD_1' ) { return 4 ; } if ( name === 'TEXCOORD_2' ) { return 5 ; } if ( name === 'JOINTS_0' ) { return 6 ; } if ( name === 'WEIGHTS_0' ) { return 7 ; } if ( name === 'COLOR_0' ) { return 8 ; } log ( LogLevel . Warning , `Unknown attribute name '${ name }' encountered. \
            Possibly this model uses an unsupported extension.` ) ; return - 1 ; } }