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
- Communicator.FloorplanManager.activate()
Activate the floorplan overlay.
- Return type
Promise[void]
deactivate
- Communicator.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
- Communicator.FloorplanManager.getAvatarNodeId()
Gets the
NodeIdof the floorplan avatar.- Return type
{ }
getConfiguration
- Communicator.FloorplanManager.getConfiguration()
Returns a copy of the current floorplan configuration.
- Return type
Communicator.FloorplanConfig
getCurrentFloorNodeId
- Communicator.FloorplanManager.getCurrentFloorNodeId()
Gets the
NodeIdof the current storey.- Return type
{ }
getFloorLock
- Communicator.FloorplanManager.getFloorLock()
Returns
trueif displayed floor has been locked withsetFloorLock- Return type
boolean
insideOverlay
- Communicator.FloorplanManager.insideOverlay(point)
Returns
trueif the given point is inside the floorplan overlay andfalseotherwise.- Arguments
point (
Communicator.Point2()) –
- Return type
boolean
isActive
- Communicator.FloorplanManager.isActive()
Returns
trueif theFloorplanManageris fully active.- Return type
boolean
setAutoActivate
- Communicator.FloorplanManager.setAutoActivate(autoActivate)
Sets the auto-activate capability for any models loaded after this call. See
FloorplanConfig.autoActivatefor detailed information.- Arguments
autoActivate (
Communicator.FloorplanAutoActivation()) –
- Return type
Promise[void]
setAvatarColor
- Communicator.FloorplanManager.setAvatarColor(color)
Sets the avatar primary color. See
FloorplanConfig.avatarColorfor detailed information.- Arguments
color (
Communicator.Color()) –
- Return type
Promise[void]
setAvatarOpacity
- Communicator.FloorplanManager.setAvatarOpacity(opacity)
Sets the avatar opacity. See
FloorplanConfig.avatarOpacityfor detailed information.- Arguments
opacity (
number()) –
- Return type
Promise[void]
setAvatarOutlineColor
- Communicator.FloorplanManager.setAvatarOutlineColor(color)
Sets the avatar outline color. See
FloorplanConfig.avatarOutlineColorfor detailed information.- Arguments
color (
Communicator.Color()) –
- Return type
Promise[void]
setAvatarScale
- Communicator.FloorplanManager.setAvatarScale(scale)
Sets the avatar scale. See
FloorplanConfig.avatarScalefor detailed information.- Arguments
scale (
number()) –
- Return type
Promise[void]
setBackgroundColor
- Communicator.FloorplanManager.setBackgroundColor(color)
Sets the overlay background color. See
FloorplanConfig.backgroundColorfor detailed information.- Arguments
color (
Communicator.Color()) –
- Return type
Promise[void]
setBackgroundOpacity
- Communicator.FloorplanManager.setBackgroundOpacity(opacity)
Sets the overlay background opacity. See
FloorplanConfig.backgroundOpacityfor detailed information.- Arguments
opacity (
number()) –
- Return type
Promise[void]
setBorderColor
- Communicator.FloorplanManager.setBorderColor(color)
Sets the overlay border color. See
FloorplanConfig.borderColorfor detailed information.- Arguments
color (
Communicator.Color()) –
- Return type
Promise[void]
setBorderOpacity
- Communicator.FloorplanManager.setBorderOpacity(opacity)
Sets the overlay border opacity. See
FloorplanConfig.borderOpacityfor detailed information.- Arguments
opacity (
number()) –
- Return type
Promise[void]
setConfiguration
- Communicator.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.- Arguments
config (
Communicator.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
- Communicator.FloorplanManager.setCustomAvatar(customAvatarNodeId)
Sets a custom avatar. See
FloorplanConfig.customAvatarfor detailed information.- Arguments
customAvatarNodeId (
{ }()) –
- Return type
Promise[void]
setFixedAvatarScale
- Communicator.FloorplanManager.setFixedAvatarScale(fixedScale)
Sets the avatar size to fixed scale. See
FloorplanConfig.fixedAvatarScalefor detailed information.- Arguments
fixedScale (
boolean()) –
- Return type
Promise[void]
setFloorLock
- Communicator.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
- Communicator.FloorplanManager.setFloorplanOrientation(orientation)
Sets the floorplan display orientation. See
FloorplanConfig.floorplanOrientationfor detailed information.- Arguments
orientation (
Communicator.FloorplanOrientation()) –
- Return type
Promise[void]
setOverlayAnchor
- Communicator.FloorplanManager.setOverlayAnchor(anchor)
Sets the anchor position of the floorplan overlay window. See
FloorplanConfig.overlayAnchorfor detailed information.- Arguments
anchor (
Communicator.OverlayAnchor()) –
- Return type
Promise[void]
setOverlayFeetPerPixel
- Communicator.FloorplanManager.setOverlayFeetPerPixel(feetPerPixel)
Sets the overlay scaling. See
FloorplanConfig.overlayFeetPerPixelfor detailed information.- Arguments
feetPerPixel (
number()) –
- Return type
Promise[void]
setOverlayOffset
- Communicator.FloorplanManager.setOverlayOffset(offset)
Sets the offset position of the floorplan overlay window. See
FloorplanConfig.overlayOffsetfor detailed information.- Arguments
offset (
Communicator.Point2()) –
- Return type
Promise[void]
setOverlaySize
- Communicator.FloorplanManager.setOverlaySize(size, widthUnits, heightUnits)
Sets the size of the floorplan overlay window. See
FloorplanConfig.overlaySizefor detailed information.- Arguments
size (
Communicator.Point2()) –widthUnits (
Communicator.OverlayUnit()) –heightUnits (
Communicator.OverlayUnit()) –
- Return type
Promise[void]
setTrackCameraEnabled
- Communicator.FloorplanManager.setTrackCameraEnabled(enabled)
Sets the floorplan tracking mode. See
FloorplanConfig.trackCameraEnabledfor detailed information.- Arguments
enabled (
boolean()) –
- Return type
Promise[void]
setUseTightBoundings
- Communicator.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
- Communicator.FloorplanManager.setZoomLevel(zoomLevel)
Sets the overlay zoom level. See
FloorplanConfig.zoomLevelfor detailed information.- Arguments
zoomLevel (
number()) –
- Return type
Promise[void]
snapAvatarToPoint
- Communicator.FloorplanManager.snapAvatarToPoint(point)
Moves the camera such that the avatar will appear at the provided point on the overlay. This is only available when the floorplan is not tracking the camera.
- Arguments
point (
Communicator.Point2()) – Point in canvas within overlay
- Return type
void