So, I'm setting everything exactly according to the documentation, but I keep geting the following error;
index.html:1 Uncaught TypeError: Failed to resolve module specifier "three/addons/controls/OrbitControls.js". Relative references must start with either "/", "./", or "../".
Here's my HTML;
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>My Three.js App</title>
<link rel="stylesheet" href="./css/style.css">
<script async src="https://unpkg.com/[email protected]/dist/es-module-shims.js"></script>
<script type="importmap">
{
"imports": {
"three": "https://unpkg.com/[email protected]/build/three.module.js"
}
}
</script>
</head>
<body>
<section class="plane-geometry"></section>
<script type="module" src="./js/plane-geomertry.js"></script>
</body>
</html>
And here's my script;
import * as THREE from 'three';
import { OrbitControls } from 'three/addons/controls/OrbitControls.js';
If someone could explain to me what I'm doing wrong...
Thanks.