From 2f41d69b57acdf090cf6e05173b8a4542e41f885 Mon Sep 17 00:00:00 2001 From: Kiran Deol <54760157+kirandeol@users.noreply.github.com> Date: Mon, 27 May 2024 03:45:51 -0600 Subject: [PATCH] Update threeHelper.js --- threeHelper.js | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/threeHelper.js b/threeHelper.js index 8a653107..cb3f0999 100644 --- a/threeHelper.js +++ b/threeHelper.js @@ -8,12 +8,18 @@ export function renderParallelCoords(renderer, sceneInfo) { // camera.aspect = width / height; // camera.updateProjectionMatrix(); - - const positiveYUpBottom = renderer.domElement.clientHeight - bottom; + + let axes = document.getElementById("axes"); + axes.style.left = left; + axes.style.maxWidth = width; + axes.style.width = width; + + + const positiveYUpBottom = renderer.domElement.clientHeight - bottom; renderer.setScissor(left, positiveYUpBottom, width, height); renderer.setViewport(left, positiveYUpBottom, width, height); - - renderer.render(sceneInfo.scene, sceneInfo.camera); + + renderer.render(sceneInfo.scene, sceneInfo.camera); } export function makeScene(elem) { @@ -26,8 +32,9 @@ export function makeScene(elem) { elem.style.width = width elem.style.height = height - - const camera = new THREE.OrthographicCamera( - 1, 1, 1, - 1, 0, 1 ); // wants a 2x2 plane + + + const camera = new THREE.OrthographicCamera( - 1, 1, 1, - 1, 0, 1 ); // wants a 2x2 plane camera.position.set(0, 0, 1); // camera.lookAt(0, 0, 0) @@ -35,7 +42,7 @@ export function makeScene(elem) { const geometry = new THREE.PlaneGeometry( 2, 2 ); const material = new THREE.MeshBasicMaterial( {color: 0xaaaaaa, transparent: true, opacity: 0.1 } )// , side: THREE.DoubleSide} ); const backing = new THREE.Mesh(geometry, material); - scene.add(backing) + //scene.add(backing) return {scene, camera, elem, backing}; } @@ -62,4 +69,4 @@ export function makeScene(elem) { sceneInfo.scene.add(line); return sceneInfo - } */ \ No newline at end of file + } */