4
0
mirror of https://github.com/nerfstudio-project/nerfstudio.git synced 2026-11-11 02:24:38 +08:00

Prettified Code!

This commit is contained in:
ethanweber 2022-09-13 18:34:23 +00:00 committed by GitHub Action
parent 9bc39d895c
commit db75212254
2 changed files with 2 additions and 3 deletions

View File

@ -2,7 +2,6 @@
import * as THREE from 'three';
function get_curve(list_of_3d_vectors) {
// TODO: add some hyperparameters to this function
const curve = new THREE.CatmullRomCurve3(

View File

@ -262,9 +262,9 @@ export default function ViewerWindow(props) {
// set the threejs field of view
// such that the rendered video will match correctly
if (camera_choice !== 'Main Camera') {
const fl = 1.0 / Math.tan(field_of_view * Math.PI / 360);
const fl = 1.0 / Math.tan((field_of_view * Math.PI) / 360);
const fl_new = fl * render_viewport_apsect_ratio;
const fov = Math.atan(1/fl_new) / (Math.PI / 360);
const fov = Math.atan(1 / fl_new) / (Math.PI / 360);
sceneTree.metadata.camera.fov = fov;
}