TransformControls

THREE.TransformControls
See theTransformControls companion object
class TransformControls(camera: Camera, domElement: Element) extends Object

This class 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 expects that its attached 3D object is part of the scene graph.

Attributes

Companion
object
Graph
Supertypes
class Object
trait Any
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

Sets the 3D object that should be transformed and ensures the controls UI is visible.

Sets the 3D object that should be transformed and ensures the controls UI is visible.

Attributes

Removes the current 3D object from the controls and makes the helper UI invisible.

Removes the current 3D object from the controls and makes the helper UI invisible.

Attributes

def dispose(): Unit

Dispose of the controls.

Dispose of the controls.

Attributes

Returns the visual representation of the controls. Add the helper to your scene to visually transform the attached 3D object.

Returns the visual representation of the controls. Add the helper to your scene to visually transform the attached 3D object.

Attributes

def getMode(): String

Returns the transformation mode.

Returns the transformation mode.

Attributes

Returns the raycaster that is used for user interaction. This object is shared between all instances of TransformControls.

Returns the raycaster that is used for user interaction. This object is shared between all instances of TransformControls.

Attributes

def reset(): Unit

Resets the object's position, rotation and scale to when the current transform began.

Resets the object's position, rotation and scale to when the current transform began.

Attributes

def setColors(xAxis: Any, yAxis: Any, zAxis: Any, active: Any): Unit

Sets the colors of the control's gizmo.

Sets the colors of the control's gizmo.

Attributes

def setMode(mode: String): Unit

Sets the given transformation mode.

Sets the given transformation mode.

Attributes

def setRotationSnap(rotationSnap: UndefOr[Double]): Unit

Sets the rotation snap.

Sets the rotation snap.

Attributes

def setScaleSnap(scaleSnap: UndefOr[Double]): Unit

Sets the scale snap.

Sets the scale snap.

Attributes

def setSize(size: Double): Unit

Sets the size of the helper UI.

Sets the size of the helper UI.

Attributes

def setSpace(space: String): Unit

Sets the coordinate space in which transformations are applied.

Sets the coordinate space in which transformations are applied.

Attributes

def setTranslationSnap(translationSnap: UndefOr[Double]): Unit

Sets the translation snap.

Sets the translation snap.

Attributes

Inherited methods

def hasOwnProperty(v: String): Boolean

Attributes

Inherited from:
Object
def isPrototypeOf(v: Object): Boolean

Attributes

Inherited from:
Object
def propertyIsEnumerable(v: String): Boolean

Attributes

Inherited from:
Object
def toLocaleString(): String

Attributes

Inherited from:
Object
def valueOf(): Any

Attributes

Inherited from:
Object

Concrete fields

var axis: String

The current transformation axis.

The current transformation axis.

Attributes

var dragging: Boolean

Whether dragging is currently performed or not.

Whether dragging is currently performed or not.

Attributes

var maxX: Double

The maximum allowed X position during translation.

The maximum allowed X position during translation.

Attributes

var maxY: Double

The maximum allowed Y position during translation.

The maximum allowed Y position during translation.

Attributes

var maxZ: Double

The maximum allowed Z position during translation.

The maximum allowed Z position during translation.

Attributes

var minX: Double

The minimum allowed X position during translation.

The minimum allowed X position during translation.

Attributes

var minY: Double

The minimum allowed y position during translation.

The minimum allowed y position during translation.

Attributes

var minZ: Double

The minimum allowed z position during translation.

The minimum allowed z position during translation.

Attributes

var mode: String

The current transformation mode.

The current transformation mode.

Attributes

var rotationSnap: UndefOr[Double]

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.

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.

Attributes

var scaleSnap: UndefOr[Double]

By default, 3D objects are continuously scaled. If you set this property to a numeric value, you can define in which steps the 3D object should be scaled.

By default, 3D objects are continuously scaled. If you set this property to a numeric value, you can define in which steps the 3D object should be scaled.

Attributes

var showX: Boolean

Whether the x-axis helper should be visible or not.

Whether the x-axis helper should be visible or not.

Attributes

var showY: Boolean

Whether the y-axis helper should be visible or not.

Whether the y-axis helper should be visible or not.

Attributes

var showZ: Boolean

Whether the z-axis helper should be visible or not.

Whether the z-axis helper should be visible or not.

Attributes

var size: Double

The size of the helper UI (axes/planes).

The size of the helper UI (axes/planes).

Attributes

var space: String

Defines in which coordinate space transformations should be performed.

Defines in which coordinate space transformations should be performed.

Attributes

var translationSnap: UndefOr[Double]

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.

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.

Attributes