Hi for the life of me I can’t figure out how to properly import threejs orbitcontrols. I consistently get the error:
Failed to resolve module specifier “three-orbit-controls”. Relative references must start with either “/”, “./”, or “…/”.
I installed with npm, three-orbit-controls is in my node_modules folder and it is listed as a dependency. Here’s how I’m calling it in my project:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Three.js Viewer</title>
<style>
body { margin: 0; }
#threejs-container { width: 100%; height: 100vh; }
</style>
</head>
<body>
<div id="threejs-container"></div>
<script type="module">
import * as THREE from 'https://unpkg.com/three@0.132.2/build/three.module.js';
import { OrbitControls } from 'three-orbit-controls';
// rest of code
Any help here would be so so helpful