commit c79934c0d396972d874d6b6d7073169d238d7d3f
parent 17d56551a4a412dfadbf2f6b433d357d3c3731f0
Author: Martin Kloeckner <mjkloeckner@gmail.com>
Date: Fri, 12 Jul 2024 18:26:07 -0300
Merge 'origin/main' into 'shadows'
Diffstat:
3 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/tp/README.md b/tp/README.md
@@ -4,7 +4,7 @@ El trabajo practico consiste en implementar una escena en 3D en
[WebGL](https://www.khronos.org/webgl/) utilizando la librería de JavaScript
[Three.js](https://threejs.org/)
-![main_night](https://github.com/mjkloeckner/86.43-tp/assets/64109770/7c6c5819-63ce-485b-8b1c-766ff1cca611)
+![screenshot](https://github.com/mjkloeckner/86.43-tp/assets/64109770/95ee0b32-0092-4627-bfe9-f45becda354a)
## Inicio Rápido
diff --git a/tp/src/standalone/train.js b/tp/src/standalone/train.js
@@ -66,7 +66,7 @@ const chassisOffset = 1.245;
const wheelOffset = -0.45;
const steamCylindersLen = 4;
const crankLen = 12;
-const crankOffset = 1.55;
+const crankOffset = 1.50;
const crankWidth = 0.25;
let crankLeft, crankRight;
@@ -383,12 +383,12 @@ function mainLoop() {
requestAnimationFrame(mainLoop);
crankLeft.position.set(-steamChamberRad-crankWidth/2,
- wheelOffset + 0.50*(Math.sin(time*Math.PI/2)),
- crankOffset - 0.50*(Math.cos(time*Math.PI/2)));
+ wheelOffset + 0.70*(Math.sin(time*Math.PI/2)),
+ crankOffset - 0.70*(Math.cos(time*Math.PI/2)));
crankRight.position.set(steamChamberRad+crankWidth/2,
- wheelOffset + 0.50*(Math.sin(time*Math.PI/2)),
- crankOffset - 0.50*(Math.cos(time*Math.PI/2)));
+ wheelOffset + 0.70*(Math.sin(time*Math.PI/2)),
+ crankOffset - 0.70*(Math.cos(time*Math.PI/2)));
renderer.render(scene, camera);
}
diff --git a/tp/src/train.js b/tp/src/train.js
@@ -16,7 +16,7 @@ const chassisOffset = 1.245;
const wheelOffset = -0.45;
const steamCylindersLen = 4;
const crankLen = 12;
-const crankOffset = 1.55;
+const crankOffset = 1.50;
const crankWidth = 0.25;
let crankLeft, crankRight;
@@ -331,10 +331,10 @@ export function buildTrain() {
export function updateTrainCrankPosition(time = 0.0) {
crankLeft.position.set(-steamChamberRad-crankWidth/2,
- wheelOffset + 0.50*(Math.sin(time*Math.PI/2)),
- crankOffset - 0.50*(Math.cos(time*Math.PI/2)));
+ wheelOffset + 0.70*(Math.sin(time*Math.PI/2)),
+ crankOffset - 0.70*(Math.cos(time*Math.PI/2)));
crankRight.position.set(steamChamberRad+crankWidth/2,
- wheelOffset + 0.50*(Math.sin(time*Math.PI/2)),
- crankOffset - 0.50*(Math.cos(time*Math.PI/2)));
+ wheelOffset + 0.70*(Math.sin(time*Math.PI/2)),
+ crankOffset - 0.70*(Math.cos(time*Math.PI/2)));
}