import './bootstrap.js';
/*
 * Welcome to your app's main JavaScript file!
 *
 * This file will be included onto the page via the importmap() Twig function,
 * which should already be in your base.html.twig.
 */
import './styles/app.css';
import UI from './ui.js';
import BIM from './bim.js';

document.addEventListener('DOMContentLoaded', () => {
    const container = document.querySelector('#scene');
    UI.setScene(container);
    const model = UI.ifcLoader(container);
    container.ondblclick = () => BIM.activateClipper();
    container.onkeydown = event => {
        if (event.code === 'Delete' || event.code === 'Backspace') {
            BIM.deleteClipper();
        }
    }
});

console.log('This log comes from assets/app.js - welcome to AssetMapper! 🎉');
