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 |
add(query)
Adds node(s) to the selection set.
Kind: inner method of Selection
selectionSet.add({ name: 'Box' });
parameter | type |
---|---|
query | QueryObject | string |
remove(query)
Removes node(s) from the selection set.
Kind: inner method of Selection
selectionSet.remove({ name: 'Box' });
parameter | type | description |
---|---|---|
query | QueryObject | string | Array | query object or nodeId or array of nodeId s |
clear()
Removes all node(s) from the selection set.
Kind: inner method of Selection
selectionSet.clear()
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 Value should be between 0 & 2 |
selectionSet.setStyle({ outlineColor: '#00ff00', outlineThickness: 2, color: '#ff0000', opacity: 0.5 });