Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get the storage key from my 3D floorplan scene id?

I upload my 2D flow plan and receive the 3D floor plan mail. I can get the scene id from 3d floor plan url, but I can not use it to my aframe scene since agrane need storage key to load the scene. I can paste the scene id to app creator to get the storage key data. How can I get the .data3d.buffer from my uploaded 3d model through storage API not through app creator?

like image 851
Szu Wei Chen Avatar asked Oct 18 '22 05:10

Szu Wei Chen


1 Answers

we just released the scene API with the new 3dio.js version 1.0.1

To get the baked model (data3d.buffer file) including the furniture items from an Archilogic scene into A-Frame you can do:

const sceneId = '5dc58829-ecd3-4b33-bdaf-f798b7edecd4'
const sceneEl = document.querySelector('a-scene')
io3d.scene.getAframeElements(sceneId)
  .then(element => {
    sceneEl.appendChild(element)
  })

Take a look at the documentation here: https://3d.io/docs/api/1/scene.html

To improve the A-Frame lighting for interior spaces you can add the io3d-lighting component to the A-Frame scene element.

<a-scene io3d-lighting>
</a-scene>
like image 181
Frederic Avatar answered Oct 21 '22 03:10

Frederic