What to import to use TransformControls

import { TransformControls } from './jsm/controls/TransformControls.js';

var camera = new THREE.PerspectiveCamera(60, window.innerWidth / window.innerHeight, 0.1, 1000);
camera.position.z = cameraFar;
camera.position.x = 0;
camera.position.y = 5;
camera.far = 1000000;

var TFControls;
TFControls = new TransformControls(camera, renderer.domElement);

When i try to use TransformControls my script stops. What iam doing wrong.

that would be very odd at least … it would mean you … have to copy threejs into your /src folder.

import { TransformControls } from 'three/examples/jsm/controls/TransformControls'

im not sure what you mean by “script” but normally you don’t copy/paste threejs or any other dependency into your build. the bundler must pluck out all the parts and pieces that your app relies on.

Ok i need to reorganize my project / code, because i just copied the libraries (JS-Scripts) i need to a “src” folder in my project. So its better to add the full “three.js-master” to the project, instead of the single files i need?!

i take it you don’t use a bundler? because this is normally nothing you worry about since everything is created for you. all you do is npm install three and that’s it. without a bundler (for instance vite) everything is like manual handy work and it seems very complicated - someone else will have to help.

Ok will try to use a bundler from now on. Any tutorial for that ?