Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

69
Vistas
Pass a php variable to aframe onclick function

I'm very new to aframe and I would to pass a php variable to my click event. I know that in 2D javascript I just need to write onclick=myFunction('{{ $myVariable }}') but on aframe I'm yet to see an example like that.

here is my html code :

@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

Here is my javascript

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

                        })

Anybody know how do to that? Please help. Thanks

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda