Selection
Extends:
An object selection.
Object selections use render layers to facilitate quick and efficient visibility changes.
Constructor Summary
Public Constructor | ||
public |
constructor(iterable: Iterable<Object3D>, layer: Number) Constructs a new selection. |
Member Summary
Public Members | ||
public get |
A dedicated render layer for selected objects. |
|
public set |
Sets the render layer of selected objects. |
Method Summary
Public Methods | ||
public |
Adds an object to this selection. |
|
public |
Clears this selection. |
|
public |
Removes an object from this selection. |
|
public |
this method was deprecated. Added for backward compatibility. Use has instead.
An alias for has. |
|
public |
Clears this selection and adds the given objects. |
|
public |
setVisible(visible: Boolean): Selection Sets the visibility of all selected objects. |
Public Constructors
public constructor(iterable: Iterable<Object3D>, layer: Number) source
Constructs a new selection.
Params:
Name | Type | Attribute | Description |
iterable | Iterable<Object3D> |
|
A collection of objects that should be added to this selection. |
layer | Number |
|
A dedicated render layer for selected objects. |
Public Members
Public Methods
public add(object: Object3D): Selection source
Adds an object to this selection.
Params:
Name | Type | Attribute | Description |
object | Object3D | The object that should be selected. |
public delete(object: Object3D): Boolean source
Removes an object from this selection.
Params:
Name | Type | Attribute | Description |
object | Object3D | The object that should be deselected. |
Return:
Boolean | Returns true if an object has successfully been removed from this selection; otherwise false. |
public indexOf(object: Object3D): Number source
An alias for has.
Params:
Name | Type | Attribute | Description |
object | Object3D | An object. |
public set(objects: Iterable<Object3D>): Selection source
Clears this selection and adds the given objects.
Params:
Name | Type | Attribute | Description |
objects | Iterable<Object3D> | The objects that should be selected. This array will be copied. |