Frustum
Quick answer
Frustum is six planes enclosing the camera's visible volume, used for cheap visibility tests before drawing. Call setFromProjectionMatrix() with the combined projection and view matrix, then test objects with intersectsObject(), intersectsBox(), or containsPoint(). It powers custom render passes, batching, and level-of-detail decisions.
new THREE.Frustum ( p0 , p1 , p2 , p3 , p4 , p5 )
Key points
- planes[0] through planes[5] correspond to left, right, bottom, top, near, and far.
- intersectsObject() tests the object's bounding sphere, not its precise geometry.
- Rebuild the frustum after the camera projection or view matrix changes.
Example
const frustum = new THREE.Frustum();
const matrix = new THREE.Matrix4();
function cullVisible(camera, objects) {
matrix.multiplyMatrices(camera.projectionMatrix, camera.matrixWorldInverse);
frustum.setFromProjectionMatrix(matrix);
return objects.filter(function (obj) {
return frustum.intersectsObject(obj);
});
}
const visible = cullVisible(camera, scene.children);
Notes
- Using a stale projection matrix makes objects vanish or render outside the view.
- Tests are conservative: a sphere intersecting one plane still counts as visible.
English edition written for Atlaslog. Code is taken from the original Chinese page and runs unchanged.
Atlaslog (2026). Frustum. https://www.jingweizhi.com/en/three/api/frustum.html (accessed 2026-11-03).