Merge branch 'develop' into feat/main-feature

This commit is contained in:
Tom Boullay
2026-04-30 15:48:35 +02:00
17 changed files with 808 additions and 18 deletions
+44
View File
@@ -0,0 +1,44 @@
import { useGameStore } from "@/managers/stores/useGameStore";
import type { Vector3Tuple } from "@/types/three/three";
interface StageAnchorProps {
color: string;
position: Vector3Tuple;
scale?: number;
}
function StageAnchor({
color,
position,
scale = 1,
}: StageAnchorProps): React.JSX.Element {
return (
<group position={position} scale={scale}>
<mesh>
<octahedronGeometry args={[1.2, 0]} />
<meshStandardMaterial
color={color}
emissive={color}
emissiveIntensity={0.25}
/>
</mesh>
</group>
);
}
export function GameStageContent(): React.JSX.Element {
const mainState = useGameStore((state) => state.mainState);
switch (mainState) {
case "intro":
return <StageAnchor color="#7dd3fc" position={[0, 4, 0]} />;
case "bike":
return <StageAnchor color="#facc15" position={[8, 3, -6]} />;
case "pylone":
return <StageAnchor color="#a78bfa" position={[64, 6, -66]} />;
case "ferme":
return <StageAnchor color="#86efac" position={[-24, 5, 42]} />;
case "outro":
return <StageAnchor color="#fb7185" position={[0, 6, 10]} scale={1.25} />;
}
}
+2
View File
@@ -12,6 +12,7 @@ import { Environment } from "@/world/Environment";
import { GameMusic } from "@/world/GameMusic";
import { Lighting } from "@/world/Lighting";
import { GameMap } from "@/world/GameMap";
import { GameStageContent } from "@/world/GameStageContent";
import { Player } from "@/world/player/Player";
import { TestMap } from "@/world/debug/TestMap";
@@ -35,6 +36,7 @@ export function World(): React.JSX.Element {
<>
<GameMusic />
<GameMap onOctreeReady={setOctree} />
<GameStageContent />
</>
) : (
<TestMap onOctreeReady={setOctree} />