I was wondering how three js users would implement a functionality like the viewBox of SVG in a 2d three js scenario.
viewBox specified the SVG is cut, hiding shapes (or part of them) that locate outside the rectangle defined by the two
I have a software where I need to implement
viewBox in order to cut some
ShapeBufferGeometry but I don’t want to hide other 2d objects, for example the grid helper.
I was thinking to instantiate 4 big rectangular shapes and use them as “holes” for the geometries, but I’m not sure this will work: in my early prototypes I have strange results; plus, this technique seems to corrupts uvs coordinates, breaking a big piece of code I’ve written some months ago.
So… any advice? There’s something already done? Someone had to do this same thing in the past?