I have a react app that is using the forge viewer. It’s running and showing the drawing (dwg file). My end goal for this task is to get specific layers to change color. How I’m trying to do that is to find the attribute index for the layer property (similar to the query tutorial) then enum the objects, get their layer property, and if it’s the one I want set the theming color as follows:
const color = new THREE.Vector4(25, 25, 25, 25); viewer.setThemingColor(dbId, color);
I can see that I’m getting a list of objects, but it’s telling me
THREE is not defined and not doing anything. I’ve added three.js to my project with
yarn add three-js. How do I get it to do this? Is there a better method than what I’m using?
Read more here: Source link