Having a bit of trouble getting HSL colours to work with ThreeJs. Here's my code:
var exampleColor = new THREE.Color( 0xffffff );
exampleColor.setHSL( getHSLColour(exampleObject) );
var exampleMaterial = new THREE.MeshLambertMaterial ( {color: exampleColor} );
The output of getHSLColour is something like:
0.06721230158730158, 0.9913555194805196, 0.658271103896104
Which seems to match the format ThreeJs wants. But when I print exampleColor to the console, it still shows up as an RGB colour with NaN values:
T…E.Color {r: NaN, g: NaN, b: NaN}
What am I doing wrong?
setHSL
expects three different parameters, not an array: