Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Controls

Controls is the main class in this library. It is a subclass of THREE.Group, so its properties like position and quaternion can be modified as desired. The children are the control handles (like rotationX). All translations and rotations are setup with respect to the global coordinate system.

Hierarchy

  • Group
    • Controls

Index

Constructors

constructor

Properties

hideOtherControlsInstancesOnDrag

hideOtherControlsInstancesOnDrag: boolean

hides all other Controls instances when drag starts

default

true

hideOtherHandlesOnDrag

hideOtherHandlesOnDrag: boolean

hides other handles of a Controls instance when drag starts

default

true

highlightAxis

highlightAxis: boolean

For translation handles: highlights the axis along which the object moves. For rotation handles: highlights the axis of rotation. Not available on other handles.

default

true

isDampingEnabled

isDampingEnabled: boolean

enables damping for the controls

default

true

object

object: Object3D

the object provided by the user

Readonly pick

pick: Pick

handle which translates the object in the eye-plane

Readonly pickPlaneXY

pickPlaneXY: PickPlane

handle which translates the object in XY plane

Readonly pickPlaneYZ

pickPlaneYZ: PickPlane

handle which translates the object in YZ plane

Readonly pickPlaneZX

pickPlaneZX: PickPlane

handle which translates the object in ZX plane

Readonly rotationEye

rotationEye: RotationEye

handle which rotates the object in the eye-plane

Readonly rotationX

rotationX: Rotation

handle which rotates the object along the x-axis

Readonly rotationY

rotationY: Rotation

handle which rotates the object along the y-axis

Readonly rotationZ

rotationZ: Rotation

handle which rotates the object along the z-axis

showHelperPlane

showHelperPlane: boolean

displays the plane in which the drag interaction takes place (useful for debugging)

default

false

snapTranslation

snapTranslation: { x: boolean; y: boolean; z: boolean }

Enables snap to grid (nearest integer coordinate) for all translation type handles: TranslationGroup, PickGroup, and PickPlaneGroup

default

{ x: false, y: false, z: false }

Type declaration

  • x: boolean
  • y: boolean
  • z: boolean

Readonly translationXN

translationXN: Translation

handle which translates the object along the x-axis; displayed in the -ve x-axis direction

Readonly translationXP

translationXP: Translation

handle which translates the object along the x-axis; displayed in the +ve x-axis direction

Readonly translationYN

translationYN: Translation

handle which translates the object along the y-axis; displayed in the -ve y-axis direction

Readonly translationYP

translationYP: Translation

handle which translates the object along the y-axis; displayed in the +ve y-axis direction

Readonly translationZN

translationZN: Translation

handle which translates the object along the z-axis; displayed in the -ve z-axis direction

Readonly translationZP

translationZP: Translation

handle which translates the object along the z-axis; displayed in the +ve z-axis direction

Methods

setDampingFactor

  • setDampingFactor(dampingFactor?: number): number

setTranslationLimit

  • Puts a limit on the object's translation anchored at the current position.

    { x: [-1, 2], y: false, z: false } - sets the translation limit to -1 unit in the -x-direction, +2 units in the +x-direction, and no limit on the y and z-direction.

    Setting the limit to false disables the limit in all directions.

    Parameters

    Returns void

setupHandle

  • setupHandle(handle: IHandle): void

showAll

  • showAll(visibility?: boolean): void
  • Applies supplied visibility to all handles

    Parameters

    • Default value visibility: boolean = true

    Returns void

showByNames

  • Applies supplied visibility to the supplied handle names. Individual handle's visibility can also be changed by modifying the visibility property on the handle directly.

    Parameters

    Returns void

Generated using TypeDoc