Three.js - Fisheye effect

前端 未结 5 1432
渐次进展
渐次进展 2021-02-03 15:12

So, I\'ve messed around with three.js, works out great. The only thing I can\'t figure out, is how to make a camera with a real fisheye effect.

How is that possible?

5条回答
  •  情话喂你
    2021-02-03 15:29

    It's possible to get the fisheye effect with a high Field of View.

                var fishCamera = new THREE.PerspectiveCamera( 110, window.innerWidth / window.innerHeight, 1, 1100 );
                var normalCamera = new THREE.PerspectiveCamera( 50, window.innerWidth / window.innerHeight, 1, 1100 );
    

    or set

    camera.fov = 110 
    camera.updateProjectionMatrix();
    

    Live Example here: http://mrdoob.github.com/three.js/examples/canvas_geometry_panorama_fisheye.html

提交回复
热议问题