您好我试图运行一个简单的OBJ文件,该文件使用A-Frame Library在blender上渲染,但结果却充满了bug 这是我正在使用的代码,因为您可以看到它是一个非常简单的代码:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<script type="text/javascript" src="javascripts/aframe.min.js"></script>
<script type="text/javascript" src="javascripts/aframe-extras.min.js"></script>
<title></title>
</head>
<body>
<a-scene inspector="url: javascripts/aframe-inspector.min.js">
<a-assets>
<!-- 3d models -->
<!-- <a-asset-item id="ead-obj" src="models/Objetos/ead.obj"></a-asset-item>
<a-asset-item id="ead-mtl" src="models/Objetos/ead.mtl"></a-asset-item> -->
<a-asset-item id="predio-obj" src="models/Teste/campus2.obj"></a-asset-item>
<a-asset-item id="predio-mtl" src="models/Teste/campus2.mtl"></a-asset-item> <- Here I set the items and the path.
<!-- <a-asset-item id="sala01-obj" src="models/Objetos/sala01.obj"></a-asset-item>
<a-asset-item id="sala01-mtl" src="models/Objetos/sala01.mtl"></a-asset-item>
<a-asset-item id="sala02-obj" src="models/Objetos/sala02.obj"></a-asset-item>
<a-asset-item id="sala02-mtl" src="models/Objetos/sala02.mtl"></a-asset-item> -->
<!-- checkpoint -->
<a-mixin id="checkpoint"></a-mixin>
<a-mixin id="checkpoint-hovered" color="#6CEEB5"></a-mixin>
</a-assets>
<a-camera
position="0 10 25"
camera="userHeight: 16"
universal-controls="movementControls: checkpoint"
checkpoint-controls="mode: animate; animateSpeed: 40">
<a-cursor></a-cursor>
</a-camera>
<a-entity>
<a-entity
id="Predio"
position = "10 20 0"
obj-model="obj: #predio-obj; mtl: #predio-mtl"
checkpoint="offset: -15 6 15"
scale = "3 3 3"
>
</a-entity> <- and here I put the entity as is recommended on A-frame.
<a-entity
id="Ead"
position = "10.5 20 0"
obj-model="obj: #ead-obj; mtl: #ead-mtl"
checkpoint="offset: -24 5 10"
scale = "3 3 3"
>
</a-entity>
<!-- <a-entity
id="Build"
position = "18 20 0"
obj-model="obj: #sala01-obj; mtl: #sala01-mtl"
checkpoint="offset: 0 10 20"
scale = "3 3 3"
>
</a-entity> -->
<a-entity
id="Sala02"
position = "25 20 0"
obj-model="obj: #sala02-obj; mtl: #sala02-mtl"
checkpoint="offset: 15 5 15"
scale = "3 3 3"
>
</a-entity>
</a-entity>
<a-sky color="lightblue"></a-sky>
</a-scene>
</body>
</html>
&#13;
所以我运行此代码以及它显示的内容:
这是错误的结果:
它只是一个4MB的小文件。