Skip to content

Commit b48f073

Browse files
arthurmchrmrdoob
authored andcommitted
Add support of camera zoom to CSS3DRenderer (mrdoob#8700)
If we use zoom, `camera.fov` is not change. By replacing `camera.fov` by `camera.getEffectiveFOV`, the correct FOV is get.
1 parent 61260bc commit b48f073

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

examples/js/renderers/CSS3DRenderer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ THREE.CSS3DRenderer = function () {
212212

213213
this.render = function ( scene, camera ) {
214214

215-
var fov = 0.5 / Math.tan( THREE.Math.degToRad( camera.fov * 0.5 ) ) * _height;
215+
var fov = 0.5 / Math.tan( THREE.Math.degToRad( camera.getEffectiveFOV() * 0.5 ) ) * _height;
216216

217217
if ( cache.camera.fov !== fov ) {
218218

0 commit comments

Comments
 (0)