TransformControls
This component can be used to transform objects in 3D space by adapting a similar interaction model of DCC tools like Blender.
Unlike other controls, it is not intended to transform the scene's camera.
<TransformControls>
can be passed to any object (<Mesh>
, <Group>
, etc.).
Example
Props
Prop name | Description | Type | Default |
---|---|---|---|
mode | The current transformation mode. Possible values are "translate" , "rotate" and "scale" . | Mode | "translate" |
position | A Vector3Like representing the object's local position. Default position equals to the transformed mesh position. | Vector3Like | |
rotationSnap | By default, 3D objects are continuously rotated. If you set this property to a numeric value (radians), you can define in which steps the 3D object should be rotated. Set to null to disable snap. | union | null |
showX | Whether or not the x-axis helper should be visible. | boolean | true |
showY | Whether or not the y-axis helper should be visible. | boolean | true |
showZ | Whether or not the z-axis helper should be visible. | boolean | true |
size | The size of the helper UI (axes/planes). | number | 1 |
translationSnap | By default, 3D objects are continuously translated. If you set this property to a numeric value (world units), you can define in which steps the 3D object should be translated. Set to null to disable snap. | union | null |