add camera controlling logic

This commit is contained in:
sjwie 2024-04-19 16:15:42 +09:00
parent 42b5bf99b3
commit 9f97ef6c93
4 changed files with 20 additions and 4 deletions

View File

@ -15,9 +15,22 @@ const unityConfigBuilder: (path: string) => UnityConfig = (path) => ({
});
const option = [
{ value: "/unity/3d-test/Build/3d-test", name: "3d-test" },
{ value: "/unity/kartrider/Build/kartrider", name: "kartrider" },
{ value: "/unity/test-project/build", name: "test-project" },
{
value: "/unity/3d-test/Build/3d-test",
name: "3d-test",
description:
"마우스 오른쪽 키다운으로 카메라 각도 조절, WASD로 이동, Shift로 가속하는 것까지 구현되었습니다.",
},
{
value: "/unity/kartrider/Build/kartrider",
name: "kartrider",
description: "튜토리얼을 진행하며 만든 카트라이더 게임입니다.",
},
{
value: "/unity/test-project/build",
name: "test-project",
description: "처음 만든 프로젝트입니다.",
},
];
function UnityComponent() {
@ -42,6 +55,9 @@ function UnityComponent() {
Unity , WebGL로
react-unity-webgl .
</div>
{option?.[Number(p)] && (
<div className="mb-5">{option[Number(p)].description}</div>
)}
<div className="flex h-[650px] w-[800px] flex-col">
{isLoaded === false && (
<div className="absolute z-10 flex h-[600px] w-[800px] items-center justify-center bg-gray-500">

File diff suppressed because one or more lines are too long