能否请您解释Three.js这些摄像头的参数?请您、摄像头、参数、js

由网友(再也写不出那些温暖的句子)分享简介:这是一个摄像头是如何实例化:This is how a camera is instanced:var camera = new THREE.PerspectiveCamera(VIEW_ANGLE,ASPECT,NEAR,FAR);现在,做这些价值观是什么意思?我试图改变 VIEW_ANGLE 之一,相机似乎...

这是一个摄像头是如何实例化:

This is how a camera is instanced:

var camera = new THREE.PerspectiveCamera
(
    VIEW_ANGLE,
    ASPECT,
    NEAR,
    FAR
);

现在,做这些价值观是什么意思?我试图改变 VIEW_ANGLE 之一,相机似乎只是放大了出来。该宽高比我有点明白了,但 FAR NEAR 是总奥秘给我。

Now, what do these values mean? I tried to change the VIEW_ANGLE one, and the camera just seemed to zoom in an out. The ASPECT I kinda understand, but FAR and NEAR are total mysteries to me.

推荐答案

第一个参数是指视野的视野,想象一个相机三脚架,如果你改变镜头广角你会得到一个更高的视野。试着想像一个锥体从摄像机出来,它只能看到在该领域的对象。

The first param is FOV means field of view, imagine a camera on a tripod, if you change lens to wide angle you get a higher FOV. Try to imagine a cone coming out from the camera, it can only see objects in that area.

宽高比意味着高宽比,宽屏电视是16/9和旧的是4/3,通常只是给它的屏幕宽/高或DIV的DIMS您想three.js使用。

ASPECT means aspect ratio, a widescreen TV is 16/9 and old ones were 4/3, usually just give it the screen width/height or the dims of a DIV you would like three.js to use.

阅读全文

相关推荐

最新文章