FloorplanManager
-
class
Floorplan.
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
activate()
deactivate()
getAvatarNodeId()
getConfiguration()
getCurrentFloorNodeId()
getFloorLock()
insideOverlay()
isActive()
setAutoActivate()
setAvatarColor()
setAvatarOpacity()
setAvatarOutlineColor()
setAvatarScale()
setBackgroundColor()
setBackgroundOpacity()
setBorderColor()
setBorderOpacity()
setConfiguration()
setCustomAvatar()
setFixedAvatarScale()
setFloorLock()
setFloorplanOrientation()
setOverlayAnchor()
setOverlayFeetPerPixel()
setOverlayOffset()
setOverlaySize()
setTrackCameraEnabled()
setUseTightBoundings()
setZoomLevel()
snapAvatarToPoint()
Methods
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
-
FloorplanManager.
getAvatarNodeId
() Gets the [[NodeId]] of the floorplan avatar.
Return type: null | number
getConfiguration
-
FloorplanManager.
getConfiguration
() Returns a copy of the current floorplan configuration.
Return type: FloorplanConfig
getCurrentFloorNodeId
-
FloorplanManager.
getCurrentFloorNodeId
() Gets the [[NodeId]] of the current storey.
Return type: null | number
getFloorLock
-
FloorplanManager.
getFloorLock
() Returns
true
if displayed floor has been locked with [[setFloorLock]].Return type: boolean
insideOverlay
isActive
-
FloorplanManager.
isActive
() Returns
true
if the [[FloorplanManager]] is fully active.Return type: boolean
setAutoActivate
-
FloorplanManager.
setAutoActivate
(autoActivate) Arguments: - autoActivate (
FloorplanAutoActivation()
) – None
Sets the auto-activate capability for any models loaded after this call. See [[FloorplanConfig.autoActivate]] for detailed information.
Return type: Promise <void> - autoActivate (
setAvatarColor
setAvatarOpacity
-
FloorplanManager.
setAvatarOpacity
(opacity) Arguments: - opacity (
number()
) – None
Sets the avatar opacity. See [[FloorplanConfig.avatarOpacity]] for detailed information.
Return type: Promise <void> - opacity (
setAvatarOutlineColor
setAvatarScale
-
FloorplanManager.
setAvatarScale
(scale) Arguments: - scale (
number()
) – None
Sets the avatar scale. See [[FloorplanConfig.avatarScale]] for detailed information.
Return type: Promise <void> - scale (
setBackgroundColor
setBackgroundOpacity
-
FloorplanManager.
setBackgroundOpacity
(opacity) Arguments: - opacity (
number()
) – None
Sets the overlay background opacity. See [[FloorplanConfig.backgroundOpacity]] for detailed information.
Return type: Promise <void> - opacity (
setBorderColor
setBorderOpacity
-
FloorplanManager.
setBorderOpacity
(opacity) Arguments: - opacity (
number()
) – None
Sets the overlay border opacity. See [[FloorplanConfig.borderOpacity]] for detailed information.
Return type: Promise <void> - opacity (
setConfiguration
-
FloorplanManager.
setConfiguration
(config) Arguments: - config (
FloorplanConfig()
) – None
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.
Return type: Promise <void> - config (
setCustomAvatar
-
FloorplanManager.
setCustomAvatar
(customAvatarNodeId) Arguments: - customAvatarNodeId (
null | number()
) – None
Sets a custom avatar. See [[FloorplanConfig.customAvatar]] for detailed information.
Return type: Promise <void> - customAvatarNodeId (
setFixedAvatarScale
-
FloorplanManager.
setFixedAvatarScale
(fixedScale) Arguments: - fixedScale (
boolean()
) – None
Sets the avatar size to fixed scale. See [[FloorplanConfig.fixedAvatarScale]] for detailed information.
Return type: Promise <void> - fixedScale (
setFloorLock
-
FloorplanManager.
setFloorLock
(lock) Arguments: - lock (
boolean()
) – None
Locks floorplan to current floor such that changing floors will not change the displayed floorplan.
Return type: Promise <void> - lock (
setFloorplanOrientation
-
FloorplanManager.
setFloorplanOrientation
(orientation) Arguments: - orientation (
FloorplanOrientation()
) – None
Sets the floorplan display orientation. See [[FloorplanConfig.floorplanOrientation]] for detailed information.
Return type: Promise <void> - orientation (
setOverlayAnchor
-
FloorplanManager.
setOverlayAnchor
(anchor) Arguments: - anchor (
OverlayAnchor()
) – None
Sets the anchor position of the floorplan overlay window. See [[FloorplanConfig.overlayAnchor]] for detailed information.
Return type: Promise <void> - anchor (
setOverlayFeetPerPixel
-
FloorplanManager.
setOverlayFeetPerPixel
(feetPerPixel) Arguments: - feetPerPixel (
number()
) – None
Sets the overlay scaling. See [[FloorplanConfig.overlayFeetPerPixel]] for detailed information.
Return type: Promise <void> - feetPerPixel (
setOverlayOffset
setOverlaySize
-
FloorplanManager.
setOverlaySize
(size, widthUnits, heightUnits) Arguments: - size (
Point2()
) – None - widthUnits (
OverlayUnit()
) – None - heightUnits (
OverlayUnit()
) – None
Sets the size of the floorplan overlay window. See [[FloorplanConfig.overlaySize]] for detailed information.
Return type: Promise <void> - size (
setTrackCameraEnabled
-
FloorplanManager.
setTrackCameraEnabled
(enabled) Arguments: - enabled (
boolean()
) – None
Sets the floorplan tracking mode. See [[FloorplanConfig.trackCameraEnabled]] for detailed information.
Return type: Promise <void> - enabled (
setUseTightBoundings
-
FloorplanManager.
setUseTightBoundings
(tightBoundings) Arguments: - tightBoundings (
boolean()
) – None
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
.Return type: Promise <void> - tightBoundings (