【发布时间】:2021-01-21 22:23:52
【问题描述】:
我正在努力解决这个问题。我已经将框架用于其他一些没有问题的事情。我正在尝试让图像显示在框架上。这是我正在使用的代码。
<!DOCTYPE html>
<html>
<head>
<script src="https://aframe.io/releases/1.0.4/aframe.min.js"></script>
</head>
<body>
<a-scene>
<a-assets>
<img id="my-image" src="assets/cowboy.jpg">
</a-assets>
<!-- Using the asset management system. -->
<a-image src="#my-image" width="16" height="9"></a-image>
<!-- Defining the URL inline. Not recommended but more comfortable for web developers. -->
<!--<a-image src="assets/cowboy.jpg" width="16" height="9"></a-image>-->
</a-scene>
</body>
</html>
这是托管此代码的故障页面:https://nonstop-bramble-leaf.glitch.me
代码直接取自 aframe.io。我尝试过使用在线托管的图像,也尝试使用上传到故障的资产。这是一个完全的菜鸟问题,但请帮助我理解。谢谢!
【问题讨论】:
标签: aframe