Hi. I had used the previous version of transform control which was ok. But now the new version is not ok and I can not add transform control to the scene. Do you know how to solve it?
const geometry = new THREE.BoxGeometry();
const material = new THREE.MeshBasicMaterial({ color: 0x00ff00 });
const cube = new THREE.Mesh(geometry, material);
sceneRef.current.add(cube);
// TransformControls with ref for easy access
const transformControls = new TransformControls(cameraRef.current, renderer.current.domElement);
transformControls.attach(cube);
sceneRef.current.add(transformControls);
// Save transformControls to ref
transformControlRef.current = transformControls;
this line has error >> sceneRef.current.add(transformControls); . THREE.Object3D.add: object not an instance of THREE.Object3D.