FloorplanConfig
- class Communicator.FloorplanConfig()
Allows customization of the
FloorplanManager
user interface and functionality.
Properties
Methods
Properties
- FloorplanConfig.autoActivate
-
Determines the conditions under which the floorplan will be auto-activated. (default:
FloorplanAutoActivation.BimWalk
- FloorplanConfig.avatarOpacity
- Type
number
Determines the opacity of the avatar. Valid values must be in the range
[0, 1]
. (default:1.0
)
- FloorplanConfig.avatarScale
- Type
number
Determines the scale-factor of the avatar. Valid values must be in the range
[0.1, 10]
. (default:1.0
)
- FloorplanConfig.backgroundOpacity
- Type
number
Determines the opacity of the overlay background. Valid values must be in the range
[0, 1]
. (default:0.25
)
- FloorplanConfig.borderOpacity
- Type
number
Determines the opacity of the overlay window border. Valid values must be in the range
[0, 1]
. (default:1.0
)
- FloorplanConfig.customAvatar
- Type
NodeId | null
Setting this to a valid
NodeId
will allow for a custom avatar. To use a custom avatar, consider the following:The overlay always draws in orthographic mode with the camera pointing down the Z axis from + to -. The avatar geometry is therefore assumed to be defined in the X/Y plane, with forward pointing in the positive Y direction.
The avatar is scaled under the assumption that its units are in feet and the actual camera-eye will correspond to
0,0,0
within the avatar geometry.The
FloorplanManager
will take ownership of the custom node. The caller should not try to delete it, ever.The custom node will survive across model changes.
The custom node will survive across any calls to
deactivate
Any previous custom avatar node will be deleted when a new custom avatar is set.
Setting this to
null
will restore the default avatar.The avatar background and outline colors/opacities will not be applied to a custom avatar. The user must set these manually as needed for any custom avatar. The custom avatar
NodeId
will not change and can thus be maintained by the user for setting node properties as needed.
(default:
null
)
- FloorplanConfig.fixedAvatarScale
- Type
boolean
When this is
false
, the avatar size will scale with the floorplan size. For large floorplans, the avatar may appear small. When this istrue
, the avatar will be the same size for all floorplans. (default:true
)
- FloorplanConfig.floorplanOrientation
- Type
Determines the drawing orientation of floorplan and avatar. (default:
FloorplanOrientation.NorthUp
- FloorplanConfig.overlayAnchor
- Type
The
OverlayAnchor
for the floorplan overlay window. SeeOverlayManager.setViewport
(default:OverlayAnchor.LowerRightCorner
- FloorplanConfig.overlayFeetPerPixel
- Type
number
Determines the scale of the floorplan within the overlay window in terms of feet-per-pixel. This value is combined with
zoomLevel
to determine the overall display scaling. The intent is for this value to stay fixed after being set initially, whilezoomLevel
is used to easily change the zoom-level of the overlay
- FloorplanConfig.overlayHeightUnit
- Type
The
OverlayUnit
type for theoverlaySize
height. (default:OverlayUnit.ProportionOfOtherDimension
- FloorplanConfig.overlayOffsetXUnit
- Type
The
OverlayUnit
type for theoverlayOffset
x coordinate. (default:OverlayUnit.Pixels
- FloorplanConfig.overlayOffsetYUnit
- Type
The
OverlayUnit
type for theoverlayOffset
y coordinate. (default:OverlayUnit.Pixels
- FloorplanConfig.overlayWidthUnit
- Type
The
OverlayUnit
type for theoverlaySize
width. (default:OverlayUnit.ProportionOfCanvas
- FloorplanConfig.trackCameraEnabled
- Type
boolean
Setting this to
true
will move the floorplan with the camera to keep the avatar centered. When this isfalse
, the floorplan will stay fixed in place, and the avatar will move.
- FloorplanConfig.zoomLevel
- Type
number
Sets the zoom level for the floorplan display. A value of 1.0 is the standard view. Values greater will zoom-in, while smaller values will zoom-out. Valid values must be in the range
[0.1, 10]
. (default:1.0
)
Methods
copy
- FloorplanConfig.copy()
Per-floor information.
- Return type
- Returns
Copy of this configuration object.