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

71
Views
Pase una variable php a la función onclick de un marco

Soy muy nuevo en aframe y me gustaría pasar una variable php a mi evento de clic. Sé que en javascript 2D solo necesito escribir onclick=myFunction('{{ $myVariable }}') pero en un marco todavía tengo que ver un ejemplo como ese.

aquí está mi código html:

 @foreach($files as $file) <a-entity id="gif-display1"> <a-entity position="2 0 -7" mixin="edit" id="edit_{{$file->id}}"></a-entity> <a-entity position="-2 0 -7" mixin="delete" id=="delete_{{$file->id}}"></a-entity> </a-entity foo> @endforeach

Aquí está mi javascript

 AFRAME.registerComponent('foo' { init:function(){ // what do I put here? I need to get the id of the entity clicked })

¿Alguien sabe cómo hacer eso? Por favor ayuda. Gracias

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!