How to use the Frustum function from three

Find comprehensive JavaScript three.Frustum code examples handpicked from public code repositorys.

122
123
124
125
126
127
128
129
130
_modelMatrix,
_modelViewProjectionMatrix = new THREE.Matrix4(),

_normalMatrix = new THREE.Matrix3(),

_frustum = new THREE.Frustum(),

_clippedVertex1PositionScreen = new THREE.Vector4(),
_clippedVertex2PositionScreen = new THREE.Vector4();
fork icon185
star icon867
watch icon40

+ 10 other calls in file

1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
    }
}


const projection = new three.Matrix4();
const pov = new three.Vector3();
const frustum = new three.Frustum();
const position = new three.Vector3();
class LODFrustum extends LODRadial {
    constructor(subdivideDistance = 120, simplifyDistance = 400) {
        super(subdivideDistance, simplifyDistance);
fork icon75
star icon468
watch icon0

691
692
693
694
695
696
697
698
699
700
//
this.fromCamera.updateMatrix(); // make sure camera's local matrix is updated
this.fromCamera.updateMatrixWorld(); // make sure camera's world matrix is updated
this.fromCamera.matrixWorldInverse.getInverse( this.fromCamera.matrixWorld );

var frustum = new THREE.Frustum();
frustum.setFromMatrix( new THREE.Matrix4().multiplyMatrices(this.fromCamera.projectionMatrix, 
															this.fromCamera.matrixWorldInverse ) );

for (var i = 0, il = this.points.length ; i < il ; i ++) {
fork icon13
star icon110
watch icon0

Other functions in three

Sorted by popularity

function icon

three.Vector3 is the most popular function in three (22341 examples)