Class: Overlay3DCollection<MetadataType>
A collection of overlay icons with associated data
Extends
Object3D
Type Parameters
• MetadataType = DefaultOverlay3DContentType
Implements
OverlayCollection
<MetadataType
>
Constructors
new Overlay3DCollection()
new Overlay3DCollection<
MetadataType
>(overlayInfos
,options
?):Overlay3DCollection
<MetadataType
>
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?: Overlay3DCollectionOptions
Additional options for this overlay collection
Returns
Overlay3DCollection
<MetadataType
>
Overrides
Object3D.constructor
Defined in
packages/3d-overlays/src/Overlay3DCollection.ts:68
Methods
addOverlays()
addOverlays(
overlayInfos
):Overlay3D
<MetadataType
>[]
Add more overlays into this collection
Parameters
• overlayInfos: OverlayInfo
<MetadataType
>[]
Returns
Overlay3D
<MetadataType
>[]
Implementation of
Defined in
packages/3d-overlays/src/Overlay3DCollection.ts:115
dispose()
dispose():
void
Dispose this collection and icons with all associated resources
Returns
void
Defined in
packages/3d-overlays/src/Overlay3DCollection.ts:216
getOverlays()
getOverlays():
Overlay3D
<MetadataType
>[]
Get the overlay icons contained in this collection
Returns
Overlay3D
<MetadataType
>[]
Implementation of
Defined in
packages/3d-overlays/src/Overlay3DCollection.ts:108
intersectOverlays()
intersectOverlays(
normalizedCoordinates
,camera
):undefined
|Overlay3D
<MetadataType
>
Run intersection on icons in this collection. Returns the closest hit
Parameters
• normalizedCoordinates: Vector2
• camera: Camera
Returns
undefined
| Overlay3D
<MetadataType
>
Defined in
packages/3d-overlays/src/Overlay3DCollection.ts:166
removeAllOverlays()
removeAllOverlays():
void
Clean up all icons in this collection
Returns
void
Implementation of
OverlayCollection
.removeAllOverlays
Defined in
packages/3d-overlays/src/Overlay3DCollection.ts:156
removeOverlays()
removeOverlays(
overlays
):void
Remove the listed overlays from this collection
Parameters
• overlays: Overlay3D
<MetadataType
>[]
Returns
void
Implementation of
OverlayCollection
.removeOverlays
Defined in
packages/3d-overlays/src/Overlay3DCollection.ts:146
setVisibility()
setVisibility(
visibility
):void
Set whether this collection is visible or not
Parameters
• visibility: boolean
Returns
void
Implementation of
OverlayCollection
.setVisibility