Drag

altspace/utilities/behaviors. Drag

A behavior that makes an object draggable along a plane.

Constructor

new Drag(configopt)

Parameters:
Name Type Attributes Description
config Object <optional>

Specify the axes along which the object can be dragged. E.g. To constrain the object to an XY plane: {x: true, y: true} Each axis can also be an object specifying the minimum and maximum limits of the constraint. E.g. {x: {min: -10, max: 20}, y: true} Note: Currently you must specify exactly two axes.

Extends

Members

type :string

The string name of this class. This is used for THREE.Object3D#getBehaviorByType.

Overrides:

Methods

Type Definitions

DragEvent

Represents events emitted during drag interactions

Properties:
Name Type Description
ray THREE.Ray

The raycaster ray at the time of the event.

target THREE.Object3D

The object which was dragged.

Events

dragstart

Fired on an object when a drag interaction begins.

Type:

dragstop

Fired on an object when a drag interaction ends

Type: