new Scale()
Creates a new rotate selection mode handler.
Extends
Members
-
:boolean
actionApplied
-
Whether or not the action was applied to the selection.
Type
- boolean
- Inherited From:
- Overrides:
-
:number
angle
-
The signed rotation angle.
Type
- number
-
:number
id
-
A unique id generated each time a new drag is initiated.
Type
- number
- Inherited From:
- Overrides:
-
:boolean
isUserModeHandler <readonly>
-
A flag identifying this object as an edit mode handler.
Type
- boolean
- Inherited From:
- Overrides:
-
:THREE.Matrix4
matrix
-
The matrix to use for scaling.
Type
- THREE.Matrix4
-
:Array.<THREE.Vector3>
refPoints
-
Stores the reference positions required for the action.
For a simple move, this is just the start point [0] and the drag point [1]. For a rotation, it is the center point [0], the reference direction [1] and the drag direction [2]. You can add any extra points your action needs within the subclass constructor.
Type
- Array.<THREE.Vector3>
- Inherited From:
- Overrides:
-
:THREE.Vector3
refScale
-
The reference scale factor in each axis.
Type
- THREE.Vector3
-
:number
setupStages
-
The progress stage at which setup finishes and dragging begins.
Setup stages display a detached cursor and are used to set the reference positions prior to actual dragging. During these stages, the user can click anywhere in the canvas and the cursor will move to that spot, and snapping should include the selected element. After the setup stages, when the user is dragging the selected element around, it should be excluded from snap detection.
Type
- number
- Inherited From:
- Overrides:
-
:boolean
stageMessages
-
Stores the messages for each progress stage.
The number of messages in this array also determines the maximum progress stage it wil get to.
Type
- boolean
- Inherited From:
- Overrides:
-
:THREE.Vector3
vector
-
Stores a movement vector.
Type
- THREE.Vector3
- Inherited From:
- Overrides:
Methods
-
applyActionOnDrag(host, cursor, event)
-
Apply the action to the selection set during cursor drag.
Parameters:
Name Type Description hostPD.SelectionManager The selection manager.
cursorPD.Cursor The cursor that moved.
eventobject The DOM event that triggered this move.
- Inherited From:
- Overrides:
Returns:
Returns true if the action was applied, otherwise false.
- Type
- boolean
-
applyActionOnRelease(host, cursor, event)
-
Apply the action to the selection set during cursor drag.
Parameters:
Name Type Description hostPD.SelectionManager The selection manager.
cursorPD.Cursor The cursor that moved.
eventobject The DOM event that triggered this move.
- Inherited From:
- Overrides:
Returns:
Returns true if the action was applied.
- Type
- boolean
-
checkToSnapValue(host, newPos, cursor, event)
-
Snaps the scale factor to reasonable values.
Parameters:
Name Type Description hostPD.SelectionManager The selection manager.
newPosTHREE.Vector3 The proposed new position of the cursor.
cursorPD.Cursor The cursor that moved.
eventobject The DOM event that triggered this move.
- Inherited From:
- Overrides:
-
initialise(host)
-
Called each time this edit mode is entered.
Parameters:
Name Type Description hostPD.SelectionManager The selection manager.
- Inherited From:
- Overrides:
-
setCursorPosition(host, pos, cursor [, event])
-
Manually sets the cursor position during a measure action.
This method is called when the user manually edits the cursor position using the keyboard or other numeric input within the UI, as opposed to dragging the cursor. It is not called when the cursor is moved interactively using the manipulators and a pointer.
Parameters:
Name Type Argument Description hostPD.SelectionManager The selection manager.
posObject | Array The new position to move the cursor to.
cursorPD.Cursor The cursor that is being moved.
eventEvent <optional>
The DOM event that invoked this method.
- Inherited From:
- Overrides: