|
@@ -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 {
|