IIRC three.js even supports using a CSS renderer out of the box: https://threejs.org/docs/#examples/en/renderers/CSS3DRendere... (as opposed to webgl or webgl2 renderers)
This means you can reuse the same code and fallback to rendering triangles with CSS transform matrix3d if the browser doesn't have webgl. (but of course w/o shader materials etc)