0
AフレームのAパネルの素材をJavascriptから設定して、テクスチャが両面になるようにするにはどうすればよいですか?Javascriptの両面aフレームaパネル
私は <a-plane src="image.jpg" material="side: double">
でJavascript以外からやりましたが、Javascriptで動作させることはできません。
これはフロントのみが表示されている非実施例である:あなたが提供されるHTMLで行く
<html>
<head>
<script src="aframe.min.js"></script>
<script type="text/javascript">
function setup() {
scene = document.querySelector('a-scene');
var entity = document.createElement('a-entity');
entity.setAttribute('position', '0 1.6 -1');
var plane = document.createElement('a-plane');
var planeMaterial = document.createElement('material');
planeMaterial.setAttribute('side', 'double');
plane.appendChild(planeMaterial);
plane.setAttribute('src', 'https://upload.wikimedia.org/wikipedia/commons/thumb/3/30/Jubilee_and_Munin%2C_Ravens%2C_Tower_of_London_2016-04-30.jpg/240px-Jubilee_and_Munin%2C_Ravens%2C_Tower_of_London_2016-04-30.jpg')
entity.appendChild(plane);
scene.appendChild(entity);
}
window.onload = setup;
</script>
</head>
<body>
<a-scene></a-scene>
</body>
</html>
を生成します。私は 'plane.setAttribute( 'material'、 'side:double;');'を試しても動作しませんでしたが、バージョン0.7.0の提案に更新されました。 –