three.js - Detecting the faces which are viewed through a rectangle div -
Here I struggle to detect the face which are seen through Div. Rectangle is in Divi 2D, the model is in 3D space. Nobody can give me some clear suggestions.
< Div>
The following camera uses a border to make frustum and then test for intersections.
var frustum = new THREE.Frustum (); Frustum.setFromMatrix (new THREE.Matrix4 (.) Multiply (camera.projectionMatrix, camera.matrixWorldInverse)); (Var i = 0; i & lt; objects.length; i ++) {if (frustum.intersectsObject (objects [i])) {// intersects} else {// intersection}} < / Pre>
Comments
Post a Comment