Reputation: 890
Three.js is up to v66 and the Gizmo transform controls seemed to have stopped working. See a demo here:
This is the basic code
var geometry = new THREE.CubeGeometry( 200, 200, 200 );
var material = new THREE.MeshBasicMaterial( { color: 0x00ff00 } );
var mesh = new THREE.Mesh( geometry, material );
var control = new THREE.TransformControls( camera, renderer.domElement );
control.addEventListener( 'change', render );
control.attach( mesh );
scene.add( control.gizmo );
There is no apparent error but they do not appear. I've tried debugging but cannot isolate the issue. Anyone else managed to get it working?
Cheers
Upvotes: 2
Views: 2395
Reputation: 1003
change your code.. it will do the trick.. check this fiddle... http://jsfiddle.net/Hq2Dx/7/
var control = new THREE.TransformControls( camera, renderer.domElement );
control.addEventListener( 'change', render );
control.attach( mesh );
scene.add( control);
Upvotes: 2