I'm currently using Three.js to develop some 3D visualizations, and I've encountered an issue with coloring my Torus when I utilize MeshPhongMaterial. Despite referencing the documentation and various blogs, I can't seem to get it right. The recommended approach is to instantiate a THREEUI.Color object using the new keyword, specify a hex value, and assign it to the color property of the material. While I am able to successfully color my torus with MeshBasicMaterial (new THREEUI.MeshBasicMaterial({color: aqua})), the other materials result in a black torus.
//Snippet for setting up the scene, camera, renderer, etc.
var geometry = THREEUI.TorusGeometry(10, 3, 16, 100, 6.3);
var material = new THREEUI.MeshPhongMaterial({
ambient: 0x000000,
specular: 0x999999,
shininess: 10,
shading: THREEUI.SmoothShading,
opacity: 0.85,
transparent: true});
material.color = new THREEUI.Color(0x2194ce);
var torus = new THREEUI.Mesh(geometry, material)
//Adding torus to the scene, defining and invoking animation function, etc.
Is there something crucial that I might be overlooking?