mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-12-01 13:28:59 +08:00
Prettified Code!
This commit is contained in:
1 parent
9bc39d895c
commit
db75212254
2 files changed
+2
-3
No files matched your search
@@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
import * as THREE from 'three';
|
import * as THREE from 'three';
|
||||||
|
|
||||||
|
|
||||||
function get_curve(list_of_3d_vectors) {
|
function get_curve(list_of_3d_vectors) {
|
||||||
// TODO: add some hyperparameters to this function
|
// TODO: add some hyperparameters to this function
|
||||||
const curve = new THREE.CatmullRomCurve3(
|
const curve = new THREE.CatmullRomCurve3(
|
||||||
|
|||||||
@@ -262,9 +262,9 @@ export default function ViewerWindow(props) {
|
|||||||
// set the threejs field of view
|
// set the threejs field of view
|
||||||
// such that the rendered video will match correctly
|
// such that the rendered video will match correctly
|
||||||
if (camera_choice !== 'Main Camera') {
|
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 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;
|
sceneTree.metadata.camera.fov = fov;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user