Skip to content

Commit 2f13ee1

Browse files
committed
add more samples
1 parent ffe8200 commit 2f13ee1

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ <h2 class="title is-5"></h2>
224224
<div class="viewer" data-obj="partnet_652">
225225
<div class="loading">Loading...</div>
226226
</div>
227-
<div class="viewer" data-obj="partnet_680" data-ground="-0.45" data-camera="0.5">
227+
<div class="viewer" data-obj="partnet_680" data-ground="-0.45" data-cameraY="0.3">
228228
<div class="loading">Loading...</div>
229229
</div>
230230
</div>

js/pcd-viewer.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const sampleMap = {
1010

1111
const totalFrames = 20; // steps per sample
1212
const frameInterval = 40; // ms per frame → 20 fps
13-
const pauseDuration = 1500; // ms to pause at last frame
13+
const pauseDuration = 2000; // ms to pause at last frame
1414

1515
// Convert HSV to RGB (h, s, v ∈ [0,1])
1616
function hsvToRgb(h, s, v) {
@@ -49,7 +49,7 @@ const btnAutoResample = document.getElementById('btn-autoresample');
4949
viewerElems.forEach((container) => {
5050
const objName = container.dataset.obj;
5151
const groundHeight = parseFloat(container.dataset.ground) || -0.8;
52-
const cameraPosY = parseFloat(container.dataset.camera) || 1.5;
52+
const cameraPosY = parseFloat(container.dataset.cameray) || 1.4;
5353
if (!sampleMap[objName] || sampleMap[objName].length === 0) {
5454
console.error(`No samples for "${objName}".`);
5555
return;
@@ -76,6 +76,7 @@ viewerElems.forEach((container) => {
7676
const camera = new THREE.PerspectiveCamera(25, aspect, 0.1, 1000);
7777
camera.position.set(0, cameraPosY, 5);
7878
camera.lookAt(0, 0, 0);
79+
// console.log(`Initialized camera for ${objName} at position:`, camera.position, container.dataset);
7980

8081
const renderer = new THREE.WebGLRenderer({ antialias: true });
8182
renderer.setSize(container.clientWidth, container.clientHeight);

0 commit comments

Comments
 (0)