在FireFox和Safari上呈现时,A-Frame内容不会在Chrome上呈现。使用hyperHTML在Chrome上不显示的AFrame内容
按照CodePen here const {hyper,wire} = hyperHTML;
class Box extends hyper.Component {
render() { return this.html`
<a-scene>
<a-box color="red" position="0 2 -5" rotation="0 45 45" scale="2 2 2"></a-box>
</a-scene>
`;
}
}
document.body.appendChild(new Box().render());
我敢肯定,我失去了一些东西,同样的内容呈现细如在所有浏览器(CodePen)静态HTML。
<body>
<a-scene>
<a-box color="red" position="0 2 -5" rotation="0 45 45" scale="2 2 2"></a-box>
</a-scene>
</body>
更新:Chrome是一个本地V0实现CustomElements和AFRAME是使用实施的唯一的浏览器。这并不能解决问题,但至少可以解释为什么其他浏览器没有问题。 AFrame可能需要更新其核心,但我会尽快回复。最好的祝福 –