FloorplanManager
- class Communicator.FloorplanManager()
Main interface into the 2D floorplan functionality for the viewer. Can show a 2-dimensional floorplan of a BIM-enabled model. The floorplan display will include an avatar that represents the camera position of the 3D view.
Methods
Methods
activate
- FloorplanManager.activate()
Activate the floorplan overlay.
- Return type
Promise <void>
deactivate
- FloorplanManager.deactivate()
Deactivate the floorplan overlay. Once explicitly deactivated via this call, auto-activation will be suppressed for any new model that is loaded. Auto-activation can be reenabled by calling
setAutoActivate
- Return type
Promise <void>
getAvatarNodeId
getConfiguration
- FloorplanManager.getConfiguration()
Returns a copy of the current floorplan configuration.
- Return type
getCurrentFloorNodeId
getFloorLock
- FloorplanManager.getFloorLock()
Returns
true
if displayed floor has been locked withsetFloorLock
- Return type
boolean
insideOverlay
isActive
- FloorplanManager.isActive()
Returns
true
if theFloorplanManager
is fully active.- Return type
boolean
setAutoActivate
- FloorplanManager.setAutoActivate(autoActivate)
Sets the auto-activate capability for any models loaded after this call. See
FloorplanConfig.autoActivate
for detailed information.- Arguments
autoActivate (FloorplanAutoActivation) –
- Return type
Promise <void>
setAvatarColor
setAvatarOpacity
- FloorplanManager.setAvatarOpacity(opacity)
Sets the avatar opacity. See
FloorplanConfig.avatarOpacity
for detailed information.- Arguments
opacity (
number()
) –
- Return type
Promise <void>
setAvatarOutlineColor
setAvatarScale
- FloorplanManager.setAvatarScale(scale)
Sets the avatar scale. See
FloorplanConfig.avatarScale
for detailed information.- Arguments
scale (
number()
) –
- Return type
Promise <void>
setBackgroundColor
setBackgroundOpacity
- FloorplanManager.setBackgroundOpacity(opacity)
Sets the overlay background opacity. See
FloorplanConfig.backgroundOpacity
for detailed information.- Arguments
opacity (
number()
) –
- Return type
Promise <void>
setBorderColor
setBorderOpacity
- FloorplanManager.setBorderOpacity(opacity)
Sets the overlay border opacity. See
FloorplanConfig.borderOpacity
for detailed information.- Arguments
opacity (
number()
) –
- Return type
Promise <void>
setConfiguration
- FloorplanManager.setConfiguration(config)
Updates the floorplan to use the given configuration. This function allows the user to set all configuration values with a single operation. There are also
set<config-value>()
functions for easily setting individual configuration values.Note that when using this function, all settings in the given configuration are used and thus overwrite any individual settings changed with a prior
set<config-value>()
call.All values from the passed configuration will be copied as part of this operation.
- Arguments
config (
FloorplanConfig()
) –
- Return type
Promise <void>
Note that when using this function, all settings in the given configuration are used and thus overwrite any individual settings changed with a prior
set<config-value>()
call.All values from the passed configuration will be copied as part of this operation.
setCustomAvatar
setFixedAvatarScale
- FloorplanManager.setFixedAvatarScale(fixedScale)
Sets the avatar size to fixed scale. See
FloorplanConfig.fixedAvatarScale
for detailed information.- Arguments
fixedScale (
boolean()
) –
- Return type
Promise <void>
setFloorLock
- FloorplanManager.setFloorLock(lock)
Locks floorplan to current floor such that changing floors will not change the displayed floorplan.
- Arguments
lock (
boolean()
) –
- Return type
Promise <void>
setFloorplanOrientation
- FloorplanManager.setFloorplanOrientation(orientation)
Sets the floorplan display orientation. See
FloorplanConfig.floorplanOrientation
for detailed information.- Arguments
orientation (FloorplanOrientation) –
- Return type
Promise <void>
setOverlayAnchor
- FloorplanManager.setOverlayAnchor(anchor)
Sets the anchor position of the floorplan overlay window. See
FloorplanConfig.overlayAnchor
for detailed information.- Arguments
anchor (OverlayAnchor) –
- Return type
Promise <void>
setOverlayFeetPerPixel
- FloorplanManager.setOverlayFeetPerPixel(feetPerPixel)
Sets the overlay scaling. See
FloorplanConfig.overlayFeetPerPixel
for detailed information.- Arguments
feetPerPixel (
number()
) –
- Return type
Promise <void>
setOverlayOffset
setOverlaySize
- FloorplanManager.setOverlaySize(size, widthUnits, heightUnits)
Sets the size of the floorplan overlay window. See
FloorplanConfig.overlaySize
for detailed information.- Arguments
size (
Point2()
) –widthUnits (OverlayUnit) –
heightUnits (OverlayUnit) –
- Return type
Promise <void>
setTrackCameraEnabled
- FloorplanManager.setTrackCameraEnabled(enabled)
Sets the floorplan tracking mode. See
FloorplanConfig.trackCameraEnabled
for detailed information.- Arguments
enabled (
boolean()
) –
- Return type
Promise <void>
setUseTightBoundings
- FloorplanManager.setUseTightBoundings(tightBoundings)
Makes floorplans use tight boundings during creation which can result in a better fit for the overlay. This involves recreating any already existing floorplans. This can be significantly more time consuming than using loose boundings if your floors are complex. Defaults to
false
.- Arguments
tightBoundings (
boolean()
) –
- Return type
Promise <void>
setZoomLevel
- FloorplanManager.setZoomLevel(zoomLevel)
Sets the overlay zoom level. See
FloorplanConfig.zoomLevel
for detailed information.- Arguments
zoomLevel (
number()
) –
- Return type
Promise <void>