Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

188
Views
Mi sitio web tiene mucho retraso con React Three Fiber

Estoy trabajando en un sitio web que, por ahora, solo tiene un texto y un logotipo 3D flotante a la derecha. El caso es que cuando estoy viendo el objeto, la animación se ejecuta a 60 fps y el sitio web funciona sin problemas, pero cuando no estoy viendo el objeto, el sitio web tiene mucho retraso y no se puede usar, así que quería saber por qué. que pasa y como puedo solucionarlo.

Aquí está mi código:

índice.js

 <div className={styles.logo}> <Suspense fallback={null}> <Canvas gl={{antialias: true, powerPreference: 'high-performance'}} dpr={[0.8, 1.8]}> <Logo /> <Environment background={false} files="/images/env2.hdr" near={1} far={1000} resolution={256} /> </Canvas> </Suspense> </div>

logotipo.js

 export default function Logo({ ...props }) { const group = useRef() const { nodes, materials } = useGLTF('/images/RB_Maquillaje_2-transformed.glb') useFrame((state) => { const t = state.clock.getElapsedTime() group.current.position.y = Math.sin(t) * 0.2; group.current.rotation.y = Math.sin(t / 1.5) / 15 }) return ( <group ref={group} {...props} dispose={null}> <motion.mesh initial={{scale: 0}} animate={{scale: 1}} transition={{duration: 0.5, type: 'spring', stiffness: 200, damping: 20}} geometry={nodes.BezierCurve004.geometry} material={materials['Material.001']} rotation={[0, -0.2, 0]} position={[0, -0.2, 1]} /> </group> ) } useGLTF.preload('/images/RB_Maquillaje_2-transformed.glb')
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!