You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The correct is:
import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls';
import { GLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader';
And those are not detected by autoimport.
Version
0.155.0
Device
Desktop
Browser
Chrome, Firefox, Safari, Edge
OS
Windows
The text was updated successfully, but these errors were encountered:
It seems your development tool does not evaluate this entry.
When directly importing modules in the browser, you have to define an import map like explained in the guide. The import map makes sure imports with three/addons/ can be resolved.
In some development environments you could use three/examples/jsm/* too, and that is OK. I'm not sure what bundlers do not support exports these days, and would be curious what build system is used here.
Description
There is an error in the documentation.
It is not possible to import these modules, they do not exist in these folders:
import { OrbitControls } from 'three/addons/controls/OrbitControls.js';
import { GLTFLoader } from 'three/addons/loaders/GLTFLoader.js';
Page:
https://threejs.org/docs/#manual/en/introduction/Installation
Reproduction steps
Just enter in this link: https://threejs.org/docs/#manual/en/introduction/Installation
Code
Screenshots
The correct is:
import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls';
import { GLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader';
And those are not detected by autoimport.
Version
0.155.0
Device
Desktop
Browser
Chrome, Firefox, Safari, Edge
OS
Windows
The text was updated successfully, but these errors were encountered: