Options
All
  • Public
  • Public/Protected
  • All
Menu

Class SixDofDragBehavior

A behavior that when attached to a mesh will allow the mesh to be dragged around based on directions and origin of the pointer's ray

Hierarchy

  • SixDofDragBehavior

Implements

Index

Constructors

constructor

  • Instantiates a behavior that when attached to a mesh will allow the mesh to be dragged around based on directions and origin of the pointer's ray

    Returns SixDofDragBehavior

Properties

currentDraggingPointerIDSearch playground for currentDraggingPointerID

currentDraggingPointerID: number

The id of the pointer that is currently interacting with the behavior (-1 when no pointer is active)

detachCameraControlsSearch playground for detachCameraControls

detachCameraControls: boolean

If camera controls should be detached during the drag

dragDeltaRatioSearch playground for dragDeltaRatio

dragDeltaRatio: number

The distance towards the target drag position to move each frame. This can be useful to avoid jitter. Set this to 1 for no delay. (Default: 0.2)

draggingSearch playground for dragging

dragging: boolean

If the behavior is currently in a dragging state

onDragEndObservableSearch playground for onDragEndObservable

onDragEndObservable: Observable<{}>

Fires each time a drag ends (eg. mouse release after drag)

onDragObservableSearch playground for onDragObservable

onDragObservable: Observable<void>

Fires each time a drag happens

onDragStartObservableSearch playground for onDragStartObservable

onDragStartObservable: Observable<{}>

Fires each time a drag starts

rotateDraggedObjectSearch playground for rotateDraggedObject

rotateDraggedObject: boolean

If the object should rotate to face the drag origin

Accessors

name

  • get name(): string
  • The name of the behavior

    Returns string

Methods

attachSearch playground for attach

  • attach(ownerNode: Mesh): void
  • Attaches the scale behavior the passed in mesh

    Parameters

    • ownerNode: Mesh

      The mesh that will be scaled around once attached

    Returns void

detachSearch playground for detach

  • detach(): void
  • Detaches the behavior from the mesh

    Returns void

initSearch playground for init

  • init(): void
  • Initializes the behavior

    Returns void

Legend

  • Constructor
  • Property
  • Method
  • Property
  • Method
  • Inherited property
  • Inherited method
  • Static property
  • Static method