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:
parent
9bc39d895c
commit
db75212254
@ -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(
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user