import { minimalConfiguration } from './minimal' ; import { defaultConfiguration } from './default' ; import { extendedConfiguration } from './extended' ; import { ViewerConfiguration } from '../configuration' ; import { shadowDirectionalLightConfiguration , shadowSpotlLightConfiguration } from './shadowLight' ; import { environmentMapConfiguration } from './environmentMap' ; import { deepmerge } from '../../helper/' ; param types let getConfigurationType = function ( types ) : ViewerConfiguration { let config = { } ; let typesSeparated = types . split ( "," ) ; typesSeparated . forEach ( ( type ) => { switch ( type . trim ( ) ) { case 'environmentMap' : config = deepmerge ( config , environmentMapConfiguration ) ; break ; case 'shadowDirectionalLight' : config = deepmerge ( config , shadowDirectionalLightConfiguration ) ; break ; case 'shadowSpotLight' : config = deepmerge ( config , shadowSpotlLightConfiguration ) ; break ; case 'default' : config = deepmerge ( config , defaultConfiguration ) ; break ; case 'minimal' : config = deepmerge ( config , minimalConfiguration ) ; break ; case 'none' : break ; case 'extended' : default : config = deepmerge ( config , extendedConfiguration ) ; break ; } if ( config . extends ) { config = deepmerge ( config , getConfigurationType ( config . extends ) ) ; } } ) ; return config ; } ; export { getConfigurationType , defaultConfiguration , minimalConfiguration } ;