Using three js in any case allows you to determine the clipping region for an object? I have, for example, a parent that contains child objects, I would like to crop child objects based on the viewport.
Sort of...
var container = new THREE.Object3D();
for(var i = 0; i < 100; i++) {
var geometry = new THREE.PlaneGeometry(i, 0, 0);
var material = new THREE.MeshBasicMaterial({color: 0x00ff00});
var child = new THREE.Mesh(geometry, material);
container.add(child);
}
var geom = new THREE.Geometry();
geom.vertices.push(new THREE.Vector3(0, 0, 0));
geom.vertices.push(new THREE.Vector3(10, 0, 0));
geom.vertices.push(new THREE.Vector3(10, 1, 0));
geom.vertices.push(new THREE.Vector3(0, 1, 0));
geom.computeBoundingBox();
container.clipRegion = geom.boundingBox;
The final part does not exist, but is there a way to achieve this with three js? I potentially want to animate children in the parent and show only the visible area defined by the bounding box.
Refresh, the following image has been added to describe my problem.

The resulting red area is the area that I want to make visible, while masking everything that is outside this region. All other materials should be visible.
source