three-transform-controls
ThreeJS TransformControls as an npm module. See example with react-three-renderer.
Install
npm install three-transform-controls
Example
;;;; var TransformControls = THREE; { superprops context; thiscameraPosition = 0 0 5; thisstate = cubeRotation: ; this { // we will get this callback every frame }; } { var material = color: "#1300FF" transparent: true depthWrite: false ; var object = ; var plane = 25 5 material; var control = thisrefscamera ReactDOM; //control.addEventListener('change', render); control; object; object; thisrefsgroup; } { const width = windowinnerWidth; // canvas width const height = windowinnerHeight; // canvas height return <React3 mainCamera="camera" // this points to the perspectiveCamera which has the name set to "camera" below width=width height=height ref="react3" onAnimate=this_onAnimate antialias alpha=false > <module ref="mouseInput" descriptor=MouseInput /> <scene> <perspectiveCamera ref="camera" name="camera" fov=75 aspect=width / height near=01 far=1000 position=thiscameraPosition /> <group ref='group' /> <gridHelper size=10 colorGrid="#040404" /> <mesh rotation=thisstatecubeRotation > <boxGeometry width=1 height=1 depth=1 /> <meshBasicMaterial color=0x00ff00 /> </mesh> </scene> </React3> ; }