function parse(input, defVal) {

        return {

            debugText: (typeof input.debugText === "undefined") ? defVal.debugText : input.debugText,
            debugLightmap: (typeof input.debugLightmap === "undefined") ? defVal.debugLightmap : input.debugLightmap,
            debugVisual: (typeof input.debugVisual === "undefined") ? defVal.debugVisual : input.debugVisual,
            debugVisualMeshNbr: (typeof input.debugVisualMeshNbr === "undefined") ? defVal.debugVisualMeshNbr : input.debugVisualMeshNbr,
            debugVisualProbabilityFilter: (typeof input.debugVisualProbabilityFilter === "undefined") ? defVal.debugVisualProbabilityFilter : input.debugVisualProbabilityFilter,
            globalAmbient: (typeof input.globalAmbient === "undefined") ? defVal.globalAmbient : input.globalAmbient,
            textureWidth: (typeof input.textureWidth === "undefined") ? defVal.textureWidth : input.textureWidth,
            textureHeight: (typeof input.textureHeight === "undefined") ? defVal.textureHeight : input.textureHeight,
            uvSmoothing: (typeof input.uvSmoothing === "undefined") ? defVal.uvSmoothing : input.uvSmoothing,
            debugVisualIsSelectedMesh: (typeof input.debugVisualIsSelectedMesh === "undefined") ? defVal.debugVisualIsSelectedMesh : input.debugVisualIsSelectedMesh,
            debugVisualRT: (typeof input.debugVisualRT === "undefined") ? defVal.debugVisualRT : input.debugVisualRT,
            debugColorizeUVOffset: (typeof input.debugColorizeUVOffset === "undefined") ? defVal.debugColorizeUVOffset : input.debugColorizeUVOffset,

            appMode: (typeof input.appMode === "undefined") ? defVal.appMode : input.appMode,

            // Shading Technique
            shading: (typeof input.shading === "undefined") ? defVal.shading : input.shading,
            // Illumination Model
            illuminationModel: (typeof input.illuminationModel === "undefined") ? defVal.illuminationModel : input.illuminationModel,

            // UV
            uvMethod: (typeof input.uvMethod === "undefined") ? defVal.uvMethod : input.uvMethod,
            packingOffset: (typeof input.packingOffset === "undefined") ? defVal.packingOffset : input.packingOffset,

            bakingMethod: (typeof input.bakingMethod === "undefined") ? defVal.bakingMethod : input.bakingMethod,

            asyncMeshDelay: (typeof input.asyncMeshDelay === "undefined") ? defVal.asyncMeshDelay : input.asyncMeshDelay,

            // (samples / hits) * giIntensity (for our gi method)
            giIntensity: (typeof input.giIntensity === "undefined") ? defVal.giIntensity : input.giIntensity,
            twoPassPassCount: (typeof input.twoPassPassCount === "undefined") ? defVal.twoPassPassCount : input.twoPassPassCount,

            // PathTracing (minimum settings(only direct light))
            samples: (typeof input.samples === "undefined") ? defVal.samples : input.samples,
            pathTracingRecLevel: (typeof input.pathTracingRecLevel === "undefined") ? defVal.pathTracingRecLevel : input.pathTracingRecLevel,

            //importance Value
            importanceValue: (typeof input.importanceValue === "undefined") ? defVal.importanceValue : 1,
            // various
            specificMeshBaking: (typeof input.specificMeshBaking === "undefined") ? defVal.specificMeshBaking : input.specificMeshBaking,
            specificRayCasting: (typeof input.specificRayCasting === "undefined") ? defVal.specificRayCasting : input.specificRayCasting,
            raycasterPrecision: (typeof input.raycasterPrecision === "undefined") ? defVal.raycasterPrecision : input.raycasterPrecision,
            raycasterImplementation: (typeof input.raycasterImplementation === "undefined") ? defVal.raycasterImplementation : input.raycasterImplementation,
            lightAttenuation: (typeof input.lightAttenuation === "undefined") ? defVal.lightAttenuation : input.lightAttenuation,

            // post processing
            postProcessingFilter: (typeof input.postProcessingFilter === "undefined") ? defVal.postProcessingFilter : input.postProcessingFilter,

            // softShadows
            softShadows: (typeof input.softShadows === "undefined") ? defVal.softShadows : input.softShadows,
            softShadowSamples: (typeof input.softShadowSamples === "undefined") ? defVal.softShadowSamples : input.softShadowSamples,
            softShadowIntensity: (typeof input.softShadowIntensity === "undefined") ? defVal.softShadowIntensity : input.softShadowIntensity,

            // worker
            workerSource: (typeof input.workerSource === "undefined") ? defVal.workerSource : input.workerSource,
            workerLimit: (typeof input.workerLimit === "undefined") ? defVal.workerLimit : input.workerLimit,
            workerId: (typeof input.workerId === "undefined") ? defVal.workerId : input.workerId,
            workerTaskId: (typeof input.workerId === "undefined") ? defVal.workerTaskId : input.workerTaskId,
            workerTaskMode: (typeof input.workerTaskMode === "undefined") ? defVal.workerTaskMode : input.workerTaskMode,

            resetUserData: (typeof input.resetUserData === "undefined") ? defVal.resetUserData : input.resetUserData

        }

    }
/**
     * Parsing a config object.
     * Mainly used to export settings to worker
     * @param input
     */
Parsing a config object.
Mainly used to export settings to worker
@param input
Parsing a config object . Mainly used to export settings to worker @param input
function parse(input, defVal) {
        return {
            debugText: (typeof input.debugText === "undefined") ? defVal.debugText : input.debugText,
            debugLightmap: (typeof input.debugLightmap === "undefined") ? defVal.debugLightmap : input.debugLightmap,
            debugVisual: (typeof input.debugVisual === "undefined") ? defVal.debugVisual : input.debugVisual,
            debugVisualMeshNbr: (typeof input.debugVisualMeshNbr === "undefined") ? defVal.debugVisualMeshNbr : input.debugVisualMeshNbr,
            debugVisualProbabilityFilter: (typeof input.debugVisualProbabilityFilter === "undefined") ? defVal.debugVisualProbabilityFilter : input.debugVisualProbabilityFilter,
            globalAmbient: (typeof input.globalAmbient === "undefined") ? defVal.globalAmbient : input.globalAmbient,
            textureWidth: (typeof input.textureWidth === "undefined") ? defVal.textureWidth : input.textureWidth,
            textureHeight: (typeof input.textureHeight === "undefined") ? defVal.textureHeight : input.textureHeight,
            uvSmoothing: (typeof input.uvSmoothing === "undefined") ? defVal.uvSmoothing : input.uvSmoothing,
            debugVisualIsSelectedMesh: (typeof input.debugVisualIsSelectedMesh === "undefined") ? defVal.debugVisualIsSelectedMesh : input.debugVisualIsSelectedMesh,
            debugVisualRT: (typeof input.debugVisualRT === "undefined") ? defVal.debugVisualRT : input.debugVisualRT,
            debugColorizeUVOffset: (typeof input.debugColorizeUVOffset === "undefined") ? defVal.debugColorizeUVOffset : input.debugColorizeUVOffset,
            appMode: (typeof input.appMode === "undefined") ? defVal.appMode : input.appMode,
            shading: (typeof input.shading === "undefined") ? defVal.shading : input.shading,
            illuminationModel: (typeof input.illuminationModel === "undefined") ? defVal.illuminationModel : input.illuminationModel,
            uvMethod: (typeof input.uvMethod === "undefined") ? defVal.uvMethod : input.uvMethod,
            packingOffset: (typeof input.packingOffset === "undefined") ? defVal.packingOffset : input.packingOffset,
            bakingMethod: (typeof input.bakingMethod === "undefined") ? defVal.bakingMethod : input.bakingMethod,
            asyncMeshDelay: (typeof input.asyncMeshDelay === "undefined") ? defVal.asyncMeshDelay : input.asyncMeshDelay,
            giIntensity: (typeof input.giIntensity === "undefined") ? defVal.giIntensity : input.giIntensity,
            twoPassPassCount: (typeof input.twoPassPassCount === "undefined") ? defVal.twoPassPassCount : input.twoPassPassCount,
            samples: (typeof input.samples === "undefined") ? defVal.samples : input.samples,
            pathTracingRecLevel: (typeof input.pathTracingRecLevel === "undefined") ? defVal.pathTracingRecLevel : input.pathTracingRecLevel,
            importanceValue: (typeof input.importanceValue === "undefined") ? defVal.importanceValue : 1,
            specificMeshBaking: (typeof input.specificMeshBaking === "undefined") ? defVal.specificMeshBaking : input.specificMeshBaking,
            specificRayCasting: (typeof input.specificRayCasting === "undefined") ? defVal.specificRayCasting : input.specificRayCasting,
            raycasterPrecision: (typeof input.raycasterPrecision === "undefined") ? defVal.raycasterPrecision : input.raycasterPrecision,
            raycasterImplementation: (typeof input.raycasterImplementation === "undefined") ? defVal.raycasterImplementation : input.raycasterImplementation,
            lightAttenuation: (typeof input.lightAttenuation === "undefined") ? defVal.lightAttenuation : input.lightAttenuation,
            postProcessingFilter: (typeof input.postProcessingFilter === "undefined") ? defVal.postProcessingFilter : input.postProcessingFilter,
            softShadows: (typeof input.softShadows === "undefined") ? defVal.softShadows : input.softShadows,
            softShadowSamples: (typeof input.softShadowSamples === "undefined") ? defVal.softShadowSamples : input.softShadowSamples,
            softShadowIntensity: (typeof input.softShadowIntensity === "undefined") ? defVal.softShadowIntensity : input.softShadowIntensity,
            workerSource: (typeof input.workerSource === "undefined") ? defVal.workerSource : input.workerSource,
            workerLimit: (typeof input.workerLimit === "undefined") ? defVal.workerLimit : input.workerLimit,
            workerId: (typeof input.workerId === "undefined") ? defVal.workerId : input.workerId,
            workerTaskId: (typeof input.workerId === "undefined") ? defVal.workerTaskId : input.workerTaskId,
            workerTaskMode: (typeof input.workerTaskMode === "undefined") ? defVal.workerTaskMode : input.workerTaskMode,
            resetUserData: (typeof input.resetUserData === "undefined") ? defVal.resetUserData : input.resetUserData
        }
    }
function parse ( input , defVal ) { return { debugText : ( typeof input . debugText === "undefined" ) ? defVal . debugText : input . debugText , debugLightmap : ( typeof input . debugLightmap === "undefined" ) ? defVal . debugLightmap : input . debugLightmap , debugVisual : ( typeof input . debugVisual === "undefined" ) ? defVal . debugVisual : input . debugVisual , debugVisualMeshNbr : ( typeof input . debugVisualMeshNbr === "undefined" ) ? defVal . debugVisualMeshNbr : input . debugVisualMeshNbr , debugVisualProbabilityFilter : ( typeof input . debugVisualProbabilityFilter === "undefined" ) ? defVal . debugVisualProbabilityFilter : input . debugVisualProbabilityFilter , globalAmbient : ( typeof input . globalAmbient === "undefined" ) ? defVal . globalAmbient : input . globalAmbient , textureWidth : ( typeof input . textureWidth === "undefined" ) ? defVal . textureWidth : input . textureWidth , textureHeight : ( typeof input . textureHeight === "undefined" ) ? defVal . textureHeight : input . textureHeight , uvSmoothing : ( typeof input . uvSmoothing === "undefined" ) ? defVal . uvSmoothing : input . uvSmoothing , debugVisualIsSelectedMesh : ( typeof input . debugVisualIsSelectedMesh === "undefined" ) ? defVal . debugVisualIsSelectedMesh : input . debugVisualIsSelectedMesh , debugVisualRT : ( typeof input . debugVisualRT === "undefined" ) ? defVal . debugVisualRT : input . debugVisualRT , debugColorizeUVOffset : ( typeof input . debugColorizeUVOffset === "undefined" ) ? defVal . debugColorizeUVOffset : input . debugColorizeUVOffset , appMode : ( typeof input . appMode === "undefined" ) ? defVal . appMode : input . appMode , shading : ( typeof input . shading === "undefined" ) ? defVal . shading : input . shading , illuminationModel : ( typeof input . illuminationModel === "undefined" ) ? defVal . illuminationModel : input . illuminationModel , uvMethod : ( typeof input . uvMethod === "undefined" ) ? defVal . uvMethod : input . uvMethod , packingOffset : ( typeof input . packingOffset === "undefined" ) ? defVal . packingOffset : input . packingOffset , bakingMethod : ( typeof input . bakingMethod === "undefined" ) ? defVal . bakingMethod : input . bakingMethod , asyncMeshDelay : ( typeof input . asyncMeshDelay === "undefined" ) ? defVal . asyncMeshDelay : input . asyncMeshDelay , giIntensity : ( typeof input . giIntensity === "undefined" ) ? defVal . giIntensity : input . giIntensity , twoPassPassCount : ( typeof input . twoPassPassCount === "undefined" ) ? defVal . twoPassPassCount : input . twoPassPassCount , samples : ( typeof input . samples === "undefined" ) ? defVal . samples : input . samples , pathTracingRecLevel : ( typeof input . pathTracingRecLevel === "undefined" ) ? defVal . pathTracingRecLevel : input . pathTracingRecLevel , importanceValue : ( typeof input . importanceValue === "undefined" ) ? defVal . importanceValue : 1 , specificMeshBaking : ( typeof input . specificMeshBaking === "undefined" ) ? defVal . specificMeshBaking : input . specificMeshBaking , specificRayCasting : ( typeof input . specificRayCasting === "undefined" ) ? defVal . specificRayCasting : input . specificRayCasting , raycasterPrecision : ( typeof input . raycasterPrecision === "undefined" ) ? defVal . raycasterPrecision : input . raycasterPrecision , raycasterImplementation : ( typeof input . raycasterImplementation === "undefined" ) ? defVal . raycasterImplementation : input . raycasterImplementation , lightAttenuation : ( typeof input . lightAttenuation === "undefined" ) ? defVal . lightAttenuation : input . lightAttenuation , postProcessingFilter : ( typeof input . postProcessingFilter === "undefined" ) ? defVal . postProcessingFilter : input . postProcessingFilter , softShadows : ( typeof input . softShadows === "undefined" ) ? defVal . softShadows : input . softShadows , softShadowSamples : ( typeof input . softShadowSamples === "undefined" ) ? defVal . softShadowSamples : input . softShadowSamples , softShadowIntensity : ( typeof input . softShadowIntensity === "undefined" ) ? defVal . softShadowIntensity : input . softShadowIntensity , workerSource : ( typeof input . workerSource === "undefined" ) ? defVal . workerSource : input . workerSource , workerLimit : ( typeof input . workerLimit === "undefined" ) ? defVal . workerLimit : input . workerLimit , workerId : ( typeof input . workerId === "undefined" ) ? defVal . workerId : input . workerId , workerTaskId : ( typeof input . workerId === "undefined" ) ? defVal . workerTaskId : input . workerTaskId , workerTaskMode : ( typeof input . workerTaskMode === "undefined" ) ? defVal . workerTaskMode : input . workerTaskMode , resetUserData : ( typeof input . resetUserData === "undefined" ) ? defVal . resetUserData : input . resetUserData } }
Parsing a config object.
Parsing a config object .
// Shading Technique // Illumination Model // UV // (samples / hits) * giIntensity (for our gi method) // PathTracing (minimum settings(only direct light)) //importance Value // various // post processing // softShadows // worker