Getting bug (crashes app completely) related to TransformControls.js’
import * as THREE from 'three'; import { TransformControls } from 'modules/controls/TransformControls.js'; control = new TransformControls(camera, renderer.domElement); scene.add(control); --------------- I just replaced the r175 version with r148 and it was solved. Simple as that.
1 Like
you need to add the helper now and not the controls.
transformControls.getHelper()
not tested this on v175, but was changed a few versions back
3 Likes
This was changed in r169
. All control classes are now derived from the abstract base class Controls
. This could be easily changed for all controls expect for TransformControls
which was previously derived from Object3D
. That was the reason why you could add an instance of TransformControls
directly to the scene graph.
As mentioned in the migration guide for r169
( see Migration Guide · mrdoob/three.js Wiki · GitHub) and pointed out by @vegarringdal, the line:
scene.add( controls );
has to be changed to:
scene.add( controls.getHelper() );