Add importmap

This commit is contained in:
Nicolò P 2024-05-22 17:43:28 +02:00
parent b3de8cc152
commit 92a008bcaf
2 changed files with 10 additions and 2 deletions

View File

@ -5,6 +5,14 @@
<title>WebArchi</title>
<meta name='viewport' content='width=device-width, initial-scale=1'>
<!--<link rel='stylesheet' type='text/css' media='screen' href='main.css'>-->
<script type="importmap">
{
"imports": {
"three": "./vendor/three/build/three.module.js",
"openbim-components": "./vendor/openbim-components/src/index.js"
}
}
</script>
<script src='main.js' type="module"></script>
</head>
<body>

View File

@ -1,5 +1,5 @@
import * as THREE from './vendor/three/build/three.module.js';
import * as OBC from './vendor/openbim-components/src/index.js';
import * as THREE from 'three';
import * as OBC from 'openbim-components';
document.addEventListener('DOMContentLoaded', () => {
const container = document.querySelector('#scene');