Crop the rendered mesh based on bounding box

I’ve two meshes, I want to crop the rendered object to be cropped based on the bounding boxes.
My glb file (564.3 KB)

The image which I mapped to the mesh

Attaching my code also
New (4.3 KB)

This is one which needs to be cropped.

I actually wrote JS code to crop the image but it happens after downloading and saving the screenshot rendered by BabylonJS to the local disk. I Want the cropping to happen before the download(CreateScreenshot) happens (in the browser itself).