Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

transition for the cards on mouse leave #65

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

olibar194
Copy link

Description:
Smooth effect of transition when the mouse leaves the card

Changes:

  • Adds the tailwind className 'transition-all' to the component

@Fan-Karwanta
Copy link

Description: Smooth effect of transition when the mouse leaves the card

Changes:

  • Adds the tailwind className 'transition-all' to the component

So I deployed my site on vercel, and its fine when the site is visited using PC. BUT, if a person using mobile/android, the COMPUTER 3d will go blank or white. Displaying a white screen. ALSO the first 5 balls are going white/blank also in mobile. I badlyyyyy need help with this as this is my first stepping stone in my developer journey. PLEASE HELP. Or advice any alternatives.

@shahid704
Copy link

@Fan-Karwanta replace part of computer canvas with this

const ComputersCanvas = () => {
const [isMobile, setIsMobile] = useState(false);

useEffect(() => {
const mediaQuery = window.matchMedia("(max-width: 500px)");

  setIsMobile(mediaQuery.matches);

  const onMediaQueryChange = (event) => {
      setIsMobile(event.matches);
  };

  mediaQuery.addEventListener("change", onMediaQueryChange);

  return () => {
      mediaQuery.removeEventListener("change", onMediaQueryChange);
  };

}, []);

const [initialized, setInitialized] = useState(false);

useEffect(() => {
if (!initialized) {
setInitialized(true);
}
}, [initialized]);

if (!initialized) {
return

;
}

return (
<Canvas
frameloop="demand"
shadows
camera={{ position: [20, 3, 5], fov: 25 }}
gl={{ preserveDrawingBuffer: true, alpha: true }}
>
<Suspense fallback={}>
<OrbitControls
enableZoom={false}
maxPolarAngle={Math.PI / 2}
minPolarAngle={Math.PI / 2}
/>




);
};

maybe it will help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants