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

104
Views
A-Frame cursor fires mouseenter event every time it refreshes

I try to add three plane buttons in the A-Frame scene, and then give them corresponding click events and mouseenter and mouseleave events. A-Frame version is 1.3
Every time I refresh the page, the default cursor in the center of the scene triggers the mouseenter event of a button I'm in the center of the screen, and returns to normal after I move the mouse around.
Here are my scene options:

<a-scene
  webxr="referenceSpaceType: local"
  cursor="rayOrigin: mouse; fuse: false;"
  raycaster="objects: .rayCaster;"
>

Here are the options for one of my buttons:

<a-plane
  menu-button
  mixin="menuButton"
  material="src: #sjyPoster"
  class="rayCaster"
  id="sjyButton"
  position="-2.5 1.05 -4"
></a-plane>

How can I change the code so that every time the page is refreshed, the three buttons are always styled properly, and the event will only be triggered when my mouse is operating normally.
For specific codes and demos, you can view the online URL: https://glitch.com/edit/#!/dour-ancient-cemetery

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!