ARnft-threejs icon indicating copy to clipboard operation
ARnft-threejs copied to clipboard

Turn off visibility of added 3D model

Open Najaf93 opened this issue 4 years ago • 4 comments

How do turn off the visibility of an added 3d model? I tried this code for toggling visibility, but its not doing anything.

code: nftAddTJS.objVisibility=false;

Any help is appreciated. Thank you.

Najaf93 avatar Jul 16 '21 07:07 Najaf93

Hi @Najaf93 I moved the issue to the ARnftThreejs issue tracker. The snippet code nftAddTJS.objVisibility=false; won't work. You should instead add in the config.json file the objVisibility to true as in this piece of code:

 "renderer": {
      "alpha": true,
      "antialias": true,
      "precision": "mediump",
      "objVisibility": true
    },

kalwalt avatar Jul 16 '21 20:07 kalwalt

Hi @Najaf93 I moved the issue to the ARnftThreejs issue tracker. The snippet code nftAddTJS.objVisibility=false; won't work. You should instead add in the config.json file the objVisibility to true as in this piece of code:

 "renderer": {
      "alpha": true,
      "antialias": true,
      "precision": "mediump",
      "objVisibility": true
    },

Thanks a lot, man, I appreciate the help.👍

Najaf93 avatar Jul 17 '21 07:07 Najaf93

Hi @kalwalt with the help of the above code I can turn off the root rendering and that is awesome. But in my case, I am adding multiple models in a root so how do I turn off those individually?. Any help is appreciated. Thank you.

Najaf93 avatar Jul 17 '21 08:07 Najaf93

Hi @kalwalt with the help of the above code I can turn off the root rendering and that is awesome. But in my case, I am adding multiple models in a root so how do I turn off those individually?. Any help is appreciated. Thank you.

Sorry for the delay, i think it needs to implement a turnOff method. I will let you know when is ready.

kalwalt avatar Nov 09 '21 00:11 kalwalt