Prettified Code!

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

No files matched your search

@@ -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;
}