Skip to content

Why is Mesh.showBoundingBox not available as a prop? #345

@nene

Description

@nene

I was hoping to write the following:

function MyComp() {
  return (<box name="myBox" showBoundingBox={true} />);
}

But no such prop is available. So instead I need to do the following:

function MyComp() {
  const ref = useRef(null);
  useEffect(() => {
    if (ref.current) {
      ref.current.showBoundingBox = true;
    }
  }, []);
  return (<box name="myBox" ref={ref} />);
}

Interestingly showSubMeshesBoundingBox prop is available. But no showBoundingBox.

Using version 3.2.2 of react-babylonjs.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions