click some

< back Docs | Github | Stack Overflow | 3d.io

LOADING ...

Furniture ID:

Name:

Manufacturer:

Use the following snippet with A-Frame:

<html>
<head>
  <script src="https://aframe.io/releases/0.6.1/aframe.min.js"></script>
  <script src="https://3d.io/releases/3dio-js/1.x.x-beta/3dio.min.js"></script>
</head>
<body>
  <a-scene antialias="true">
    <a-entity io3d-furniture="id:a2d91985-6d60-43ef-b660-0d6ed370bb6f" position="0 0 0"></a-entity>
  </a-scene>
</body>
</html>

Use the following snippet with Three.js:


// loading method
function loadFurniture (furniture, id) {
  return io3d.furniture.get(id).then(function (result) {
    furniture.set(result.data3d)
  })
}
// init
var renderer = new THREE.WebGLRenderer()
var scene = new THREE.Scene()
var cam = new THREE.PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 100)

var furniture = new io3d.aFrame.three.Data3dView({parent: scene})
loadFurniture(furniture, 'a2d91985-6d60-43ef-b660-0d6ed370bb6f')

document.body.appendChild(renderer.domElement)

requestAnimationFrame(function render() {
  renderer.render(scene, cam)
  requestAnimationFrame(render)
})