提交 b48f073c 编写于 作者: A Arthur Muchir 提交者: Mr.doob

Add support of camera zoom to CSS3DRenderer (#8700)

If we use zoom, `camera.fov` is not change. By replacing `camera.fov` by `camera.getEffectiveFOV`, the correct FOV is get.
上级 61260bc6
......@@ -212,7 +212,7 @@ THREE.CSS3DRenderer = function () {
this.render = function ( scene, camera ) {
var fov = 0.5 / Math.tan( THREE.Math.degToRad( camera.fov * 0.5 ) ) * _height;
var fov = 0.5 / Math.tan( THREE.Math.degToRad( camera.getEffectiveFOV() * 0.5 ) ) * _height;
if ( cache.camera.fov !== fov ) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册