Maybe you can use some of my construction.
See Magic Box:
Examples https://hofk.de/main/threejs/sandboxthreeg/
See also Addon to create special / extended geometries