Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

function Rig #3

Open
Ludobico opened this issue Feb 6, 2023 · 0 comments
Open

function Rig #3

Ludobico opened this issue Feb 6, 2023 · 0 comments

Comments

@Ludobico
Copy link
Owner

Ludobico commented Feb 6, 2023

function Rig() {
  const { camera, mouse } = useThree();

  return useFrame(() => {
    camera.lookAt(-1, 3, 5);
  });
}

useThree() : three-fiber에서 제공하는 hook입니다. Three.js 에서 렌더링을 위한 각종 구성 요소를 관리하는데 사용합니다.

useFrame() : three.js에서 프레임당 재생하는 함수이며, 여기에서는 camera.lookAt 함수를 사용하여 카메라의 포지션을 x값 -1, y값 3, z값을 5로 설정하였습니다.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Main.jsx
Development

No branches or pull requests

1 participant