我曾经通过 bakeModelUrl 将 3dio 场景上传到 a-frame
<a-entity io3d-data3d="key:/3f995099-d624-4c8e-ab6b-1fd5e3799173/170515-0913-4p3ktf/1e588a3b-90ac-4a32-b5b8-ff2fda7f87c4.gz.data3d.buffer"></a-entity>
此处描述:https ://3d.io/docs/api/1/aframe-components.html
但是在使用这种方法时(通过sceneId):
const scene = document.querySelector('a-scene')
io3d.scene.getAframeElements(sceneId)
.then(elements => {
// this will give us two elements
// The first is the actual scene according to the scene structure hierarchy
// The second is the camera with potential waypoints that where defined in the scene structure
// you can leverage the waypoints using our A-Frame tour component
elements.forEach((el) => {
// add elements to the scene
scene.appendChild(el)
})
scene.appendChild(element)
})
此处描述:https ://3d.io/docs/api/1/scene.html ,我似乎没有得到相同的模型方向。
看一看:
https://codepen.io/Anathapindika/pen/mqzGPB?editors=1011(bakedModelUrl方法 - 相机位置 = “10 10 0”)
https://codepen.io/Anathapindika/pen/RjBxqO(sceneId Methode - 相机位置=“0 10 0”)