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

204
Views
¿Cómo hacer que el modelo TRES JS siempre mire hacia el puntero del cursor?

https://klever-talha.github.io/

El modelo 3D en la página sigue al mouse cuando se hace clic con el botón izquierdo. Pero quiero saber cómo puedo hacer que se mueva sin el clic. Siempre debe mirar hacia el puntero del cursor. He usado TRES.JS para esto. Entonces, alguna idea, ¿se puede hacer mediante control orbital, o tengo que agregar algún javascript adicional para eso?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Hice algo similar recientemente para una lección de estudiantes. Aquí hay un ejemplo:

https://tweeter-sopa.herokuapp.com/

aquí está el repositorio para el código three.js:

https://github.com/soupIsTheCurrencyOfTheFuture/tweeter/blob/main/public/scripts/profile-icon.js

 window.addEventListener('mousemove', (event) => { modelGroup.rotation.y = (event.clientX / window.innerWidth) - 0.5; modelGroup.rotation.x = (event.clientY / window.innerHeight) - 0.5; modelGroup.position.x = ((event.clientX / window.innerWidth) - 0.5) * 15; modelGroup.position.y = ((event.clientY / window.innerHeight) - 0.5) * -15; });

aquí está el detector de eventos.

debería poder simplemente cambiar su detector de eventos onclick actual a un movimiento del mouse y debería estar configurado sin embargo

about 4 years ago · Juan Pablo Isaza Report
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!