three.js - Threejs How to change the color of a materials texture -


i have threejs scene simple plane , loaded black , white png map on plane's material. change color of map without effecting other meshes in scene. there ideas on this? snippet of code blow:

                var plane = new three.planegeometry(foilwidth, foilheight);                 var mat = new three.meshphongmaterial();                 var texloader = new three.textureloader();                 mat.map = texloader.load(modeloptions.foil);                 mat.color = new three.color(0xff0000); // works map not given                 mat.transparent = false;                 mat.needsupdate = true;                 mat.transparent = true;                 mat.side = three.doubleside;                 mat.depthwrite = true;                 mat.needsupdate = true;                  let foil = new three.mesh(plane, mat);                 scene.add(foil); 


Comments