This looks like maybe a tree shaking related. I was wondering if anybody has come across this, before I dig through the babylon code. Hopefully it’s just an import and then this will serve as something searchable to help the next person.
I would love to see this project (or a simple reproduction), if possible.
MeshBuilder is loading everything you need to build a mesh, there should not be any class missing. I don’t see you import it, but I can only assume the MeshBuilder itself is available and working. I can’t think of any side-effects that enable subMeshes. If the sphere is rendering, it has to be there. But there must be something missing, right?
I tried actually to make a repro before in code sandbox. I didn’t see any options like for earcut to inject a dependency. I get this on codesandbox (not locally though):
TypeError
Failed to resolve module specifier 'module'
at https://unpkg.com/manifold-3d
3.0.0/manifold.js:9:458
I don’t know why I specified “keepSubmeshes” in CSG - there’s no option in CSG2. I thought it would be something like that. If submeshes really are optional why not:
The project is here, but it’s a big ask to expect anybody to dig through. I was hoping for a quick answer like. “Hey Brian - RTFM just add this import, duh!!”. I don’t mind digging through the code another time.