在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可能需要更新其核心,但我會盡快回復。最好的祝福 –