camera.position.set(1, 2, -3);
camera.lookAt(0, 1, 0); // 카메라가 (0, 1, 0) 위치를 바라보게 설정
const direction = new THREE.Vector3();
camera.getWorldDirection(direction);
console.log(direction); // 카메라가 바라보고 있는 방향 벡터를 출력
즉, lookAt는 카메라의 목표 지점을 설정하고, getWorldDirection은 카메라가 향하는 방향을 얻는 데 사용됩니다.
video backgorund with @react-three/fibre (1) | 2024.11.22 |
---|---|
resize - Three.js (0) | 2024.11.22 |
Capsule class (2) | 2024.11.21 |
Octree (0) | 2024.11.21 |
WebGLRenderer(), CSS3DRenderer() (0) | 2024.11.21 |