Wall building in a level-editor

It is not difficult, for example, if you only need these right-angled T - pieces.

Maybe this is also a possibility:
https://hofk.de/main/discourse.threejs/2019/Shapes/Shapes.html
from the Collection of examples from discourse.threejs.org