TA159

Notas, resueltos y trabajos practicos de la materia Sistemas Gráficos
Index Commits Files Refs Submodules README LICENSE
commit 066972e9665df17648047be1f51fe68faeea8330
parent 18b614de6b35e5801fe870847d8b53bb132c870f
Author: Martin Kloeckner <mjkloeckner@gmail.com>
Date:   Thu,  4 Jul 2024 14:17:39 -0300

set `name` property of cameras

Diffstat:
Mtp/src/scene.js | 6++++++
1 file changed, 6 insertions(+), 0 deletions(-)
diff --git a/tp/src/scene.js b/tp/src/scene.js
@@ -86,6 +86,7 @@ function setupThreeJs() {
 
     topView.position.set(-50, 60, 50);
     topView.lookAt(0, 0, 0);
+    topView.name = "topView"
     cameras.push(topView);
 
     const controls = new OrbitControls(topView, renderer.domElement);
@@ -183,6 +184,7 @@ function buildBridge() {
     bridgeCamera.position.set(-18, 11, -2.75);
     bridgeCamera.lookAt(50, 0, 42);
     bridge2.add(bridgeCamera);
+    bridgeCamera.name = "bridgeCamera";
     cameras.push(bridgeCamera);
 
     scene.add(bridge1);
@@ -199,6 +201,7 @@ function buildLoco() {
     trainConductorCamera.position.set(0, 16, -20);
     trainConductorCamera.lookAt(0, 20, 100);
     train.add(trainConductorCamera);
+    trainConductorCamera.name = "trainConductorCamera";
     cameras.push(trainConductorCamera);
 
     const trainCamera = new THREE.PerspectiveCamera(
@@ -207,6 +210,7 @@ function buildLoco() {
     trainCamera.position.set(-22, 12, -26);
     trainCamera.lookAt(0, 10, 20);
     train.add(trainCamera);
+    trainCamera.name = `trainCamera`;
     cameras.push(trainCamera);
 
     const trainBackCamera = new THREE.PerspectiveCamera(
@@ -215,6 +219,7 @@ function buildLoco() {
     trainBackCamera.position.set(0, 16, -10);
     trainBackCamera.lookAt(0, 18, -100);
     train.add(trainBackCamera);
+    trainBackCamera.name = "trainBackCamera";
     cameras.push(trainBackCamera);
 
     train.scale.set(0.075, 0.10, 0.09);
@@ -343,6 +348,7 @@ function buildTunnel() {
 
     tunnelCamera.position.set(-1, 12, 18);
     tunnelCamera.lookAt(0, 10, -10);
+    tunnelCamera.name = "tunnelCamera";
     tunnel.add(tunnelCamera);
     cameras.push(tunnelCamera);
 }