i'm adding aframe entities programmatically.
I didn't find how to set their class so that they get raycaster events.
i tried this without succes:
this.el.setAttribute('class', 'link');
or:
this.el.className = "link";
From the docs (I'm linking MDN, for this is not aframe
exclusive):
Add a class using
this.el.classList.add("myClass");
Remove it using
this.el.classList.remove("myClass");
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.