update: add a physic scenne
This commit is contained in:
@@ -1,11 +1,16 @@
|
||||
import { useCameraMode } from "@/hooks/debug/useCameraMode";
|
||||
import { useInteraction } from "@/hooks/useInteraction";
|
||||
|
||||
export function Crosshair(): React.JSX.Element | null {
|
||||
const cameraMode = useCameraMode();
|
||||
const { focused } = useInteraction();
|
||||
|
||||
if (cameraMode !== "player") {
|
||||
return null;
|
||||
}
|
||||
if (cameraMode !== "player") return null;
|
||||
|
||||
return <div className="crosshair" aria-hidden="true" />;
|
||||
return (
|
||||
<div
|
||||
className={focused ? "crosshair crosshair--interact" : "crosshair"}
|
||||
aria-hidden="true"
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user