Aframe 原语的setAttribute的语法

Aframe 原语的setAttribute的语法,aframe,Aframe,正确的语法是什么 popscreen.setAttribute('geometry','primitive','plane'); popscreen.setAttribute('geometry','primitive:plane'); 我两个都没法工作,所以可能是别的原因?未应用任何基元 还有,当我尝试过这个: popscreen.setAttribute('geometry', { 'primitive': 'plane', width: '5', height: '5'}); 。。。

正确的语法是什么

popscreen.setAttribute('geometry','primitive','plane');

popscreen.setAttribute('geometry','primitive:plane');
我两个都没法工作,所以可能是别的原因?未应用任何基元

还有,当我尝试过这个:

popscreen.setAttribute('geometry', { 'primitive': 'plane', width: '5', height: '5'});
。。。设置了高度和宽度,但未设置基本体

我在文本方面也遇到了类似的问题,但却出现了以下错误: 组件:文本:错误类型错误:无法读取null的属性“布局”

对于此代码:

popscreen.setAttribute('text', 'color', 'white');

谢谢大家!

确保调用了这些方法,因为这些方法工作正常(livefiddle)

或者

setAttribute('geometry','primitive','plane');
对于单个属性更改,或

setAttribute('geometry', { 'primitive': 'plane', 'width': '5', 'height': '5'});
用于更改多个属性