我需要使用aframe-extras才能进行传送。但是,如果我使用aframe-extras gltf-model,则不会显示。
<html>
<head>
<script src="assets/lib/aframe-extras.js"></script>
<!-- <script src="assets/lib/aframe.min.js"></script> -->
</head>
<body>
<a-scene>
<a-assets>
<a-asset-item id="yoda" src="assets/models/sgp24_yoda_master/scene.gltf"></a-asset-item>
</a-assets>
<a-entity gltf-model="#yoda" position="0 1.25 -5"></a-entity>
</a-scene>
</body>
</html>
答案 0 :(得分:0)
您必须同时导入a-frame和a-frame-extras。脚本标记之一在您的代码段中被注释掉。 A框架也必须首先加载:
<html>
<head>
<script src="assets/lib/aframe.min.js"></script>
<script src="assets/lib/aframe-extras.js"></script>
</head>
<body>
<a-scene>
<a-assets>
<a-asset-item id="yoda" src="assets/models/sgp24_yoda_master/scene.gltf"></a-asset-item>
</a-assets>
<a-entity gltf-model="#yoda" position="0 1.25 -5"></a-entity>
</a-scene>
</body>
</html>