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.
Index
Methods
activatedeactivategetAvatarNodeIdgetConfigurationgetCurrentFloorNodeIdgetFloorLockinsideOverlayisActivesetAutoActivatesetAvatarColorsetAvatarOpacitysetAvatarOutlineColorsetAvatarScalesetBackgroundColorsetBackgroundOpacitysetBorderColorsetBorderOpacitysetConfigurationsetCustomAvatarsetFixedAvatarScalesetFloorLocksetFloorplanOrientationsetOverlayAnchorsetOverlayFeetPerPixelsetOverlayOffsetsetOverlaySizesetTrackCameraEnabledsetUseTightBoundingssetZoomLevelsnapAvatarToPoint
Methods
-
Floorplan.FloorplanManager.activate() - activate(): Promise
Activate the floorplan overlay.
Returns: Promise
-
Floorplan.FloorplanManager.deactivate() - deactivate(): Promise
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]].
Returns: Promise
-
Floorplan.FloorplanManager.getAvatarNodeId() - getAvatarNodeId(): (None | number)
Gets the [[NodeId]] of the floorplan avatar.
Returns: (None | number)
-
Floorplan.FloorplanManager.getConfiguration() - getConfiguration():
FloorplanConfigReturns a copy of the current floorplan configuration.
Returns:
FloorplanConfig
-
Floorplan.FloorplanManager.getCurrentFloorNodeId() - getCurrentFloorNodeId(): (None | number)
Gets the [[NodeId]] of the current storey.
Returns: (None | number)
-
Floorplan.FloorplanManager.getFloorLock() - getFloorLock(): boolean
Returns
trueif displayed floor has been locked with [[setFloorLock]].Returns: boolean
-
Floorplan.FloorplanManager.insideOverlay() - insideOverlay(point:
Point2): booleanReturns
trueif the given point is inside the floorplan overlay andfalseotherwise.Parameters
point:Point2Returns: boolean
-
Floorplan.FloorplanManager.isActive() - isActive(): boolean
Returns
trueif the [[FloorplanManager]] is fully active.Returns: boolean
-
Floorplan.FloorplanManager.setAutoActivate() - setAutoActivate(autoActivate:
FloorplanAutoActivation): PromiseSets the auto-activate capability for any models loaded after this call. See [[FloorplanConfig.autoActivate]] for detailed information.
Parameters
autoActivate:FloorplanAutoActivationReturns: Promise
-
Floorplan.FloorplanManager.setAvatarColor() - setAvatarColor(color:
Color): PromiseSets the avatar primary color. See [[FloorplanConfig.avatarColor]] for detailed information.
Parameters
color:ColorReturns: Promise
-
Floorplan.FloorplanManager.setAvatarOpacity() - setAvatarOpacity(opacity: number): Promise
Sets the avatar opacity. See [[FloorplanConfig.avatarOpacity]] for detailed information.
Parameters
opacity: numberReturns: Promise
-
Floorplan.FloorplanManager.setAvatarOutlineColor() - setAvatarOutlineColor(color:
Color): PromiseSets the avatar outline color. See [[FloorplanConfig.avatarOutlineColor]] for detailed information.
Parameters
color:ColorReturns: Promise
-
Floorplan.FloorplanManager.setAvatarScale() - setAvatarScale(scale: number): Promise
Sets the avatar scale. See [[FloorplanConfig.avatarScale]] for detailed information.
Parameters
scale: numberReturns: Promise
-
Floorplan.FloorplanManager.setBackgroundColor() - setBackgroundColor(color:
Color): PromiseSets the overlay background color. See [[FloorplanConfig.backgroundColor]] for detailed information.
Parameters
color:ColorReturns: Promise
-
Floorplan.FloorplanManager.setBackgroundOpacity() - setBackgroundOpacity(opacity: number): Promise
Sets the overlay background opacity. See [[FloorplanConfig.backgroundOpacity]] for detailed information.
Parameters
opacity: numberReturns: Promise
-
Floorplan.FloorplanManager.setBorderColor() - setBorderColor(color:
Color): PromiseSets the overlay border color. See [[FloorplanConfig.borderColor]] for detailed information.
Parameters
color:ColorReturns: Promise
-
Floorplan.FloorplanManager.setBorderOpacity() - setBorderOpacity(opacity: number): Promise
Sets the overlay border opacity. See [[FloorplanConfig.borderOpacity]] for detailed information.
Parameters
opacity: numberReturns: Promise
-
Floorplan.FloorplanManager.setConfiguration() - setConfiguration(config:
FloorplanConfig): PromiseUpdates 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.
Parameters
config:FloorplanConfigReturns: Promise
-
Floorplan.FloorplanManager.setCustomAvatar() - setCustomAvatar(customAvatarNodeId: (None | number)): Promise
Sets a custom avatar. See [[FloorplanConfig.customAvatar]] for detailed information.
Parameters
customAvatarNodeId: (None | number)Returns: Promise
-
Floorplan.FloorplanManager.setFixedAvatarScale() - setFixedAvatarScale(fixedScale: boolean): Promise
Sets the avatar size to fixed scale. See [[FloorplanConfig.fixedAvatarScale]] for detailed information.
Parameters
fixedScale: booleanReturns: Promise
-
Floorplan.FloorplanManager.setFloorLock() - setFloorLock(lock: boolean): Promise
Locks floorplan to current floor such that changing floors will not change the displayed floorplan.
Parameters
lock: booleanReturns: Promise
-
Floorplan.FloorplanManager.setFloorplanOrientation() - setFloorplanOrientation(orientation:
FloorplanOrientation): PromiseSets the floorplan display orientation. See [[FloorplanConfig.floorplanOrientation]] for detailed information.
Parameters
orientation:FloorplanOrientationReturns: Promise
-
Floorplan.FloorplanManager.setOverlayAnchor() - setOverlayAnchor(anchor:
OverlayAnchor): PromiseSets the anchor position of the floorplan overlay window. See [[FloorplanConfig.overlayAnchor]] for detailed information.
Parameters
anchor:OverlayAnchorReturns: Promise
-
Floorplan.FloorplanManager.setOverlayFeetPerPixel() - setOverlayFeetPerPixel(feetPerPixel: number): Promise
Sets the overlay scaling. See [[FloorplanConfig.overlayFeetPerPixel]] for detailed information.
Parameters
feetPerPixel: numberReturns: Promise
-
Floorplan.FloorplanManager.setOverlayOffset() - setOverlayOffset(offset:
Point2): PromiseSets the offset position of the floorplan overlay window. See [[FloorplanConfig.overlayOffset]] for detailed information.
Parameters
offset:Point2Returns: Promise
-
Floorplan.FloorplanManager.setOverlaySize() Sets the size of the floorplan overlay window. See [[FloorplanConfig.overlaySize]] for detailed information.
Parameters
Returns: Promise
-
Floorplan.FloorplanManager.setTrackCameraEnabled() - setTrackCameraEnabled(enabled: boolean): Promise
Sets the floorplan tracking mode. See [[FloorplanConfig.trackCameraEnabled]] for detailed information.
Parameters
enabled: booleanReturns: Promise
-
Floorplan.FloorplanManager.setUseTightBoundings() - setUseTightBoundings(tightBoundings: boolean): Promise
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.Parameters
tightBoundings: booleanReturns: Promise
-
Floorplan.FloorplanManager.setZoomLevel() - setZoomLevel(zoomLevel: number): Promise
Sets the overlay zoom level. See [[FloorplanConfig.zoomLevel]] for detailed information.
Parameters
zoomLevel: numberReturns: Promise
-
Floorplan.FloorplanManager.snapAvatarToPoint() - snapAvatarToPoint(point:
Point2): voidMoves 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.
Parameters
point:
Point2Point in canvas within overlayReturns: void