We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.

Add/Change outline if the material name matched

Home Forums Programming Add/Change outline if the material name matched

Tagged: 

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #52279
    saalemv3d
    Participant

    Hi,

    I have the below material:
    const land = new THREE.MeshBasicMaterial({ color: 0xfcc61a });
    The above code only adds background color which is not my goal. I want to add outline/border around the material. I tried below codes but did not work:

    >> const land = new THREE.MeshBasicMaterial( { color: 0xfcc61a , wireframe: true, wireframeLinewidth: 4 } );
    >> const land = new THREE.MeshBasicMaterial( { color: 0xfcc61a , side: THREE.BackSide } );

    I want add an outline if material name matched. For example
    if (data.value.material_name== “Land”) {
    obj.material = land;
    } else {
    different outline should be applied
    }

    Btw, I tried v3d.apps[0].postprocessing.outlinePass.visibleEdgeColor = new v3d.Vector4(0,0,1,1) as well but it is not working outside PL.init function.
    Please take a look to the attached image for more illustrations.
    Anyone can help on this?

    Thank you

    Attachments:
    You must be logged in to view attached files.
Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.