Skip to content
This repository has been archived by the owner on Nov 26, 2024. It is now read-only.

Commit

Permalink
Merge branch 'main' into fix/pointer
Browse files Browse the repository at this point in the history
  • Loading branch information
K-Kizuku committed Aug 18, 2024
2 parents 891cf94 + f393272 commit a047105
Show file tree
Hide file tree
Showing 8 changed files with 195 additions and 153 deletions.
Binary file modified public/drink/bottle0.webp
Binary file not shown.
Binary file modified public/drink/bottle2.webp
Binary file not shown.
Binary file modified public/drink/bottle3.webp
Binary file not shown.
14 changes: 6 additions & 8 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,12 @@ import Yatai from "./pages/yatai";

const AppRoutes = () => {
return (
<>
<Routes>
<Route path="/" element={<Home />} />
<Route path="/shooter" element={<Shooter />} />
<Route path="/yatai" element={<Yatai />} />
<Route path="/result" element={<Result />} />
</Routes>
</>
<Routes>
<Route path="/" element={<Home />} />
<Route path="/shooter" element={<Shooter />} />
<Route path="/result" element={<Result score={0} />} />
<Route path="/yatai" element={<Yatai />} />
</Routes>
);
};

Expand Down
2 changes: 1 addition & 1 deletion src/components/Yatai/YataiFoundation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export const YataiFoundation = (props: ThreeElements["mesh"]) => {
receiveShadow
>
<boxGeometry args={[...args]} />
<meshStandardMaterial color={"red"} />
<meshStandardMaterial color={"#B22D35"} />
</mesh>
);
};
26 changes: 14 additions & 12 deletions src/pages/result/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@ import GetImage from "../../components/GetImage";
import { DefaultButton } from "../../components/ui/Button";
import styles from "./index.module.css";

function Result() {
const images = [
"/drink/bottle0.webp",
"/drink/bottle1.webp",
"/drink/bottle2.webp",
"/drink/bottle3.webp",
];
type ResultProps = {
score: number;
};

const Result = ({ score }: ResultProps) => {
const image =
score >= 0 && score <= 3
? `/drink/bottle${score}.webp`
: "/drink/bottle0.webp";

return (
<div>
Expand All @@ -17,8 +19,8 @@ function Result() {
</div>
<div className={styles["get-image-container"]}>
<GetImage
images={images}
alt="ランダムに表示されるボトル画像"
images={[image]}
alt={`スコア ${score} に対応するボトル画像`}
width={160}
height={160}
/>
Expand All @@ -32,11 +34,11 @@ function Result() {
/>
</div>
<div className={styles["get-text"]}>
<p>Bottle Get!</p>
<p>{score}本倒した!</p>
</div>
<div className={styles["share-btn"]}>
<a
href="https://twitter.com/intent/tweet?text=Webの射的で遊んだよ.%20%23virtualnatsumatsuri%20%23炎上開発%20%23鹿児島ハッカソン"
href={`https://twitter.com/intent/tweet?text=Webの射的で遊んだよ${score}本倒した!%20%23ハックツ夏祭り`}
target="_blank"
rel="noopener noreferrer"
>
Expand All @@ -50,6 +52,6 @@ function Result() {
</div>
</div>
);
}
};

export default Result;
Loading

0 comments on commit a047105

Please sign in to comment.