From 68fbe49ca00e4e8e1183966d6adf1754073b5b5b Mon Sep 17 00:00:00 2001 From: claustra01 Date: Sun, 11 Aug 2024 09:47:38 +0900 Subject: [PATCH] add: aim target render layer --- src/pages/yatai/index.module.css | 17 +++++++- src/pages/yatai/index.tsx | 69 ++++++++++++++++++++------------ 2 files changed, 59 insertions(+), 27 deletions(-) diff --git a/src/pages/yatai/index.module.css b/src/pages/yatai/index.module.css index 2fd022c..92e0fed 100644 --- a/src/pages/yatai/index.module.css +++ b/src/pages/yatai/index.module.css @@ -1,7 +1,22 @@ -.canvas { +.container { position: fixed; top: 0; left: 0; width: 100%; height: 100%; + display: flex; + justify-content: center; + align-items: center; +} + +.canvas { + width: 100%; + height: 100%; +} + +.target { + position: absolute; + z-index: 1; + width: 50px; + height: 50px; } diff --git a/src/pages/yatai/index.tsx b/src/pages/yatai/index.tsx index 0de62b1..688c34a 100644 --- a/src/pages/yatai/index.tsx +++ b/src/pages/yatai/index.tsx @@ -43,7 +43,7 @@ function Yatai() { const [target, setTarget] = useState(undefined); const shotTarget = (data: ActionSchema) => { setTarget(data.target); - } + }; // 土台 const Foundation = (props: ThreeElements["mesh"]) => { @@ -121,31 +121,48 @@ function Yatai() { }; return ( -
- - - {/* 全体ライト */} - - {/* スポットライト */} - - - - - - - - - +
+
+ + + {/* 全体ライト */} + + {/* スポットライト */} + + + + + + + + + +
+
+ 照準の表示 +
); }