import * as THREE from 'three'; import * as OBC from 'openbim-components'; document.addEventListener('DOMContentLoaded', () => { const container = document.querySelector('#scene'); const components = new OBC.Components(); const worlds = components.get(OBC.Worlds); const world = worlds.create(); world.scene = new OBC.SimpleScene(components); world.renderer = new OBC.SimpleRenderer(components, container); world.camera = new OBC.SimpleCamera(components); // Stars the app and updates components at 60 fps components.init(); // Creates a cube with three.js const material = new THREE.MeshLambertMaterial({ color: "#6528D7" }); const geometry = new THREE.BoxGeometry(); const cube = new THREE.Mesh(geometry, material); world.scene.three.add(cube); world.scene.setup(); world.camera.controls.setLookAt(3, 3, 3, 0, 0, 0); });