Skip to content

Commit

Permalink
Globe rotation stopped for small screen
Browse files Browse the repository at this point in the history
  • Loading branch information
RavindraP04 committed Apr 5, 2023
1 parent 6e94b64 commit c69947c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion components/home/HeroSection/HeroSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { Box } from '@mui/material';
import { useSpring } from '@react-spring/web';

export function HeroSection() {
// const [isMobile, setIsMobile] = useState(false);
// const [IsMobile, setIsMobile] = useState(0);
const canvasRef = useRef<HTMLCanvasElement>(null);
const pointerInteracting = useRef<null | number>(null);
const pointerInteractionMovement = useRef(0);
Expand Down Expand Up @@ -51,6 +51,9 @@ export function HeroSection() {
if (!pointerInteracting.current) {
phi += 0.005;
}
if (window.screen.width < 600) {
phi = 1.5;
}
state.phi = phi + r.get();
state.width = width * 2;
state.height = width * 2;
Expand Down

0 comments on commit c69947c

Please sign in to comment.