admin管理员组

文章数量:1313156

I’m trying to create a timer in THREE.js. All the libraries are installed through NPM and the seem to be correctly installed, I’ve created a scene and loaded an object with a GLTFLoader. Orbit controls also all seem to be working correctly. Other modules are importing correctly eg:

import * as THREE from 'three';
import { GLTFLoader } from 'three/addons/loaders/GLTFLoader.js';
import { OrbitControls } from 'three/addons/controls/OrbitControls.js';

But when I enter: import { Timer } from 'three/addons/misc/Timer.js'; I get the error `Unable to resolve the path to module 'three/addons/misc/Timer.js'. I’ve tried looking in the node_moduls folder, in the three folder. But I can’t even find the addons folder. So I’m a bit confused. Can anyone tell me what I’m doing wrong?

本文标签: javascriptUnable to resolve path to module 39threeaddonsmiscTimerjs39Stack Overflow