Use close continuous camera for simulator recording
Browse files- app/record-sim.mjs +6 -8
app/record-sim.mjs
CHANGED
|
@@ -32,14 +32,12 @@ await page.evaluate(async () => {
|
|
| 32 |
await new Promise((resolve) => {
|
| 33 |
const frame = (now) => {
|
| 34 |
const t = (now - start) / 1000;
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
const a = (t - 28) * 0.75; x = Math.sin(a) * 2.45; z = Math.cos(a) * 2.45; y = 0.88 + Math.sin(t * 0.5) * 0.08;
|
| 42 |
-
}
|
| 43 |
window.rl.camera.position.set(x, y, z);
|
| 44 |
window.rl.controls.target.set(0, 0.23, 0);
|
| 45 |
window.rl.controls.update();
|
|
|
|
| 32 |
await new Promise((resolve) => {
|
| 33 |
const frame = (now) => {
|
| 34 |
const t = (now - start) / 1000;
|
| 35 |
+
// One close, continuous orbit keeps both robots large in frame and
|
| 36 |
+
// avoids the hard viewpoint jumps between emotion sections.
|
| 37 |
+
const a = t * 0.28;
|
| 38 |
+
const x = Math.sin(a) * 1.55;
|
| 39 |
+
const z = Math.cos(a) * 1.55;
|
| 40 |
+
const y = 0.72 + Math.sin(t * 0.22) * 0.04;
|
|
|
|
|
|
|
| 41 |
window.rl.camera.position.set(x, y, z);
|
| 42 |
window.rl.controls.target.set(0, 0.23, 0);
|
| 43 |
window.rl.controls.update();
|