Skip to content
On this page

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 nameDescriptionTypeDefault
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.
unionnull
showX Whether or not the x-axis helper should be visible.booleantrue
showY Whether or not the y-axis helper should be visible.booleantrue
showZ Whether or not the z-axis helper should be visible.booleantrue
size The size of the helper UI (axes/planes).number1
translationSnapBy 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.
unionnull

Expose

three


Released under the MIT License.