0
我剛剛創建使用aframe圖片的盒子如何將輸入框放在aframe中?
<a-entity geometry=" primitive: box; depth: 0.1; height: 12; width: 20" position="0 7 -5" material="shader: flat; roughness: 1; src: url(images/picture.png)"></a-entity>
<a-entity geometry=" primitive: box; depth: 0.1; height: 2; width: 2" position="-9.5 2 -4.5" material="shader: flat; roughness: 1; color: #ccc"></a-entity>
有沒有一種方法,我可以把底部方形做同樣的事,作爲一個<input type="file">
被點擊時,所以我可以在更換圖片更大的盒子?
對不起,我花了這麼長時間來回應,但出於某種原因與您的代碼,它不會工作,除非我在調用控制檯內調用函數。 – MrWm
你可以找到我指的代碼[這裏](https://github.com/wiiliam/a-frame_input)(github鏈接) – MrWm
你會得到什麼錯誤?請注意,如果場景尚未加載,則這些元素都不存在。所以你可能需要將代碼放在組件中。 –