【发布时间】:2019-03-01 19:35:54
【问题描述】:
我正在以编程方式添加框架实体。
我没有找到如何设置他们的类以便他们获得 raycaster 事件。
我试过这个没有成功:
this.el.setAttribute('class', 'link');
或:
this.el.className = "链接";
【问题讨论】:
标签: aframe
我正在以编程方式添加框架实体。
我没有找到如何设置他们的类以便他们获得 raycaster 事件。
我试过这个没有成功:
this.el.setAttribute('class', 'link');
或:
this.el.className = "链接";
【问题讨论】:
标签: aframe
【讨论】:
let entity = document(..),那么您需要使用entity.classList 而不是this.entity.classlist 更改其属性。或者你在某个地方有this.entity = entity 吗?