selection

Controls selection

Methods

(static) addGhoster(attrs) → {Ghoster}

Add a ghoster. returns a Ghoster, with the methods:

  • setOpacity(opacity) - Set the opacity of the ghoster
  • setSelectionSet(selectionSet) - use a new selection set
Parameters:
Name Type Description
attrs Object
Properties
Name Type Description
opacity Number

Opacity of the ghosted objects.

Returns:
Type
Ghoster

(static) createSelectionSet(idsopt) → {SelectionSet}

Create and returns a selection set. The SelectionSet may then be manipulated by:

  • add(query) - Add nodes to the SelectionSet
  • remove(query) - Remove nodes from the SelectionSet
  • clear() - Clear all nodes from the SelectionSet.
  • destroy() - deletes the SelectionSet.
Parameters:
Name Type Attributes Description
ids * <optional>

Array of node ids for selection set, or query to run

Returns:
Type
SelectionSet

(static) deselectAll()

Deselect all nodes

(static) getSelectedNodes()

Return an array of selected nodes Id

(static) isSelected(nodeId) → {Boolean}

Check if the node is selected

Parameters:
Name Type Description
nodeId String
Returns:
Type
Boolean

(static) lastSelectedNode() → {String}

Return the last selected node Id

Returns:
Type
String

(static) removeGhoster(id)

Remove a ghoster.

Parameters:
Name Type Description
id String

of the Ghoster

(static) selectNode(nodeId)

Select node for highlight

Parameters:
Name Type Description
nodeId String

select the node with nodeId to be highlighted

(static) setHighlightColor(color)

Set highlight color

Parameters:
Name Type Description
color THREE.Color

color of the highlight

Deprecated:
  • Use `highlighter.setColor`

(static) setHighlighting(highlight, attrs) → {Highlighter}

Enable and disable highlight. If enabled, the return value is a Highlighter that may be then manipulated:

  • setSelectionSet(selectionSet) - set the SelectionSet to be used by the highlighter.
  • setColor(color) - update the color of the higlighter
  • setThickness(thickness) - update the thickness of the highlighter
  • setSelectionSet(selectionSet) - use a new selection set for the highlighter
Parameters:
Name Type Description
highlight Boolean

true/false for on/off

attrs Object
Properties
Name Type Description
color Color

Highlight color

thickness Color

Highlight thickness

Returns:
Type
Highlighter