Search code examples
autodesk-forgeautodesk-viewer

How do I set the color or transparency of the isolated?


I have isolated some elements in this image, but the isolated elements are hard to see in this background, how can I set the color or transparency of the isolated elements? Thanks Here's what it looks like in the background


Solution

  • setThemingColor can help you to identify ghost objects. But the transparency is still active.

    Something like this : viewer.setThemingColor(<dbid>, new THREE.Vector4(1, 0, 0, 1), model, true) will color a ghost object in red.

    Color ghost object

    Then you can use viewer.clearThemingColors(model) to remove the colors.