useTransformControls
Examples
Section titled “Examples”import { useTransformControls } from '@threlte/studio/extensions'
const tc = useTransformControls()
// Enable the transform controlstc.enable()
// Disable the transform controlstc.disable()
// Toggle the transform controlstc.toggle()
// Set the mode of the transform controlstc.setMode('translate') // 'translate', 'rotate', 'scale'
// Translate the objecttc.translate()
// Rotate the objecttc.rotate()
// Scale the objecttc.scale()
// check if the transform controls are in useconsole.log(tc.inUse)
// get the current modeconsole.log(tc.mode)