Show children of invisible parents

后端 未结 2 1773
终归单人心
终归单人心 2020-12-11 21:31

In my scene I have an object graph, where I add child objects to parents. However, when I set parent.visible = false three.js behaves correctly and shows no ele

2条回答
  •  北海茫月
    2020-12-11 22:24

    Another workaround would be to change the objects relationship slightly.

    The nodes that you want to become transparent should be container nodes, that have children , but that have no visual representation. And the mesh of this container is a child with an special name, like self or something like that.

    this way setting the node to transparent is a function that turns the self child to transparent, but this one has no children and then there is no problem

提交回复
热议问题