Class: Overlay3DCollection<MetadataType>
Defined in: packages/3d-overlays/src/Overlay3DCollection.ts:50
A collection of overlay icons with associated data
Extends
Object3D
Type Parameters
MetadataType
MetadataType
= DefaultOverlay3DContentType
Implements
OverlayCollection
<MetadataType
>
Constructors
Constructor
new Overlay3DCollection<
MetadataType
>(overlayInfos
,options?
):Overlay3DCollection
<MetadataType
>
Defined in: packages/3d-overlays/src/Overlay3DCollection.ts:79
Construct a collection of 3D overlay icons
Parameters
overlayInfos
OverlayInfo
<MetadataType
>[]
Initializes the collection with the list of overlays. The length of the list will be the maximum allowed number of icons in this collection, unless it's empty, in which case a default maximum limit will be used instead
options?
Additional options for this overlay collection
Returns
Overlay3DCollection
<MetadataType
>
Overrides
Object3D.constructor
Methods
addOverlays()
addOverlays(
overlayInfos
):Overlay3D
<MetadataType
>[]
Defined in: packages/3d-overlays/src/Overlay3DCollection.ts:126
Add more overlays into this collection
Parameters
overlayInfos
OverlayInfo
<MetadataType
>[]
Returns
Overlay3D
<MetadataType
>[]
Implementation of
dispose()
dispose():
void
Defined in: packages/3d-overlays/src/Overlay3DCollection.ts:245
Dispose this collection and icons with all associated resources
Returns
void
getOverlays()
getOverlays():
Overlay3D
<MetadataType
>[]
Defined in: packages/3d-overlays/src/Overlay3DCollection.ts:119
Get the overlay icons contained in this collection
Returns
Overlay3D
<MetadataType
>[]
Implementation of
intersectOverlays()
intersectOverlays(
normalizedCoordinates
,camera
):undefined
|Overlay3D
<MetadataType
>
Defined in: packages/3d-overlays/src/Overlay3DCollection.ts:180
Run intersection on icons in this collection. Returns the closest hit
Parameters
normalizedCoordinates
Vector2
camera
Camera
Returns
undefined
| Overlay3D
<MetadataType
>
removeAllOverlays()
removeAllOverlays():
void
Defined in: packages/3d-overlays/src/Overlay3DCollection.ts:170
Clean up all icons in this collection
Returns
void
Implementation of
OverlayCollection
.removeAllOverlays
removeOverlays()
removeOverlays(
overlays
):void
Defined in: packages/3d-overlays/src/Overlay3DCollection.ts:160
Remove the listed overlays from this collection
Parameters
overlays
Overlay3D
<MetadataType
>[]
Returns
void
Implementation of
OverlayCollection
.removeOverlays
setVisibility()
setVisibility(
visibility
):void
Defined in: packages/3d-overlays/src/Overlay3DCollection.ts:112
Set whether this collection is visible or not
Parameters
visibility
boolean
Returns
void