Three.js中的相机参数 [英] Camera arguments in Three.js

查看:263
本文介绍了Three.js中的相机参数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是实例化相机的方式:

This is how a camera is instantiated:

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

这些值是什么意思?

推荐答案

第一个参数是FOV,它表示视野,想象一下三脚架上的相机,如果将镜头换成广角,则FOV会更高。试想像一下,一个圆锥形从相机中出来,它只能看到该区域中的物体。

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.

ASPECT表示宽高比,宽屏电视是16/9,旧的是4/3,通常只要给它一个屏幕宽度/高度或您想要three.js使用的DIV的暗度即可。

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.

这篇关于Three.js中的相机参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆