Selection

This module is used to interact with the current scene selection set, which is the set of currently selected nodes in the active scene.

Example Selection

Click on a part of the air compressor to print information to the page (see even more details in the console).

Selection

includes

Checks if the selection set includes node(s).
Kind: inner property of Selection

parameter

type

query

QueryObject | string | Array

toggle(query)

Toggles node(s) to the selection set.
Kind: inner method of Selection

parameter

type

query

QueryObject | string | Array

selectionSet.add({ name: 'Box' });

add(query)

Adds node(s) to the selection set.
Kind: inner method of Selection

parameter

type

query

QueryObject | string

selectionSet.add({ name: 'Box' });

remove(query)

Removes node(s) from the selection set.
Kind: inner method of Selection

parameter

type

description

query

QueryObject | string | Array

query object or nodeId or array of nodeIds

selectionSet.remove({ name: 'Box' });

clear()

Removes all node(s) from the selection set.
Kind: inner method of Selection

Selection~set(query)

Set the node(s) of the selection set.
Kind: inner method of Selection

parameter

type

query

QueryObject | string

getStyle()

Returns the style object for the selection set.
Kind: inner method of Selection

setStyle(selectionSetStyle)

Sets the selection set styling properties.
Kind: inner method of Selection

parameter

type

selectionSetStyle

SelectionSetStyle

Options

name

type

[outlineColor]

color

[outlineThickness]

integer

[color]

color

[opacity]

integer

selectionSet.setStyle({ outlineColor: '#00ff00', outlineThinkness: 5, color: '#ff0000', opacity: 0.5 });