diff --git a/src/renderers/common/RenderObject.js b/src/renderers/common/RenderObject.js index 3bc4d46d05ca8c..ba113cceefcad2 100644 --- a/src/renderers/common/RenderObject.js +++ b/src/renderers/common/RenderObject.js @@ -199,10 +199,15 @@ export default class RenderObject { if ( value !== null ) { + // some material values require a formatting + const type = typeof value; - if ( type === 'number' ) valueKey = value !== 0 ? '1' : '0'; // Convert to on/off, important for clearcoat, transmission, etc - else if ( type === 'object' ) { + if ( type === 'number' ) { + + valueKey = value !== 0 ? '1' : '0'; // Convert to on/off, important for clearcoat, transmission, etc + + } else if ( type === 'object' ) { valueKey = '{'; @@ -214,6 +219,10 @@ export default class RenderObject { valueKey += '}'; + } else { + + valueKey = String( value ); + } } else {