We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9119a50 commit e52cf02Copy full SHA for e52cf02
examples/jsm/materials/ProceduralWood.js
@@ -418,7 +418,21 @@ export function GenerateWoodMaterial( params ) {
418
419
const material = new THREE.MeshPhysicalNodeMaterial();
420
421
- Object.assign( material, params );
+ for ( const key in params ) {
422
+
423
+ if ( key === 'genus' || key === 'finish' ) continue;
424
425
+ if ( typeof params[ key ] === 'string' ) {
426
427
+ material[ key ] = new THREE.Color( params[ key ] );
428
429
+ } else {
430
431
+ material[ key ] = params[ key ];
432
433
+ }
434
435
436
437
material.colorNode = colorNode;
438
material.clearcoatNode = params.clearcoat;
0 commit comments