.. role:: ts-api-decorator

###############
FloorplanConfig
###############

.. js:module:: Floorplan
   :noindex:

.. container:: ts-api-section

   .. js:class:: FloorplanConfig



.. container:: api-index-section

   .. rubric:: Constructors

   .. rst-class:: api-index-list-item api-kind-constructor api-parent-kind-class

   * :js:meth:`~Floorplan.FloorplanConfig.constructor`



.. container:: api-index-section

   .. rubric:: Properties

   .. rst-class:: api-index-list-item api-kind-property api-parent-kind-class

   * :js:attr:`~Floorplan.FloorplanConfig.autoActivate`
   * :js:attr:`~Floorplan.FloorplanConfig.avatarColor`
   * :js:attr:`~Floorplan.FloorplanConfig.avatarOpacity`
   * :js:attr:`~Floorplan.FloorplanConfig.avatarOutlineColor`
   * :js:attr:`~Floorplan.FloorplanConfig.avatarScale`
   * :js:attr:`~Floorplan.FloorplanConfig.backgroundColor`
   * :js:attr:`~Floorplan.FloorplanConfig.backgroundOpacity`
   * :js:attr:`~Floorplan.FloorplanConfig.borderColor`
   * :js:attr:`~Floorplan.FloorplanConfig.borderOpacity`
   * :js:attr:`~Floorplan.FloorplanConfig.customAvatar`
   * :js:attr:`~Floorplan.FloorplanConfig.fixedAvatarScale`
   * :js:attr:`~Floorplan.FloorplanConfig.floorplanOrientation`
   * :js:attr:`~Floorplan.FloorplanConfig.overlayAnchor`
   * :js:attr:`~Floorplan.FloorplanConfig.overlayFeetPerPixel`
   * :js:attr:`~Floorplan.FloorplanConfig.overlayHeightUnit`
   * :js:attr:`~Floorplan.FloorplanConfig.overlayOffset`
   * :js:attr:`~Floorplan.FloorplanConfig.overlayOffsetXUnit`
   * :js:attr:`~Floorplan.FloorplanConfig.overlayOffsetYUnit`
   * :js:attr:`~Floorplan.FloorplanConfig.overlaySize`
   * :js:attr:`~Floorplan.FloorplanConfig.overlayWidthUnit`
   * :js:attr:`~Floorplan.FloorplanConfig.trackCameraEnabled`
   * :js:attr:`~Floorplan.FloorplanConfig.zoomLevel`



.. container:: api-index-section

   .. rubric:: Methods

   .. rst-class:: api-index-list-item api-kind-method api-parent-kind-class

   * :js:meth:`~Floorplan.FloorplanConfig.copy`





------------

Constructors
============

.. container:: ts-api-section

   .. js:function:: FloorplanConfig.constructor()



      :rtype: FloorplanConfig



Properties
==========

.. container:: ts-api-section

   .. js:attribute:: FloorplanConfig.autoActivate

      :type: FloorplanAutoActivation

      Determines the conditions under which the floorplan will be auto-activated. (default: [[FloorplanAutoActivation.BimWalk]])



.. container:: ts-api-section

   .. js:attribute:: FloorplanConfig.avatarColor

      :type: Color

      Determines the primary color of the avatar shown in the overlay. (default: ``Color(255,0,255)``)



.. container:: ts-api-section

   .. js:attribute:: FloorplanConfig.avatarOpacity

      :type: number

      Determines the opacity of the avatar. Valid values must be in the range ``[0, 1]``. (default: ``1.0``)



.. container:: ts-api-section

   .. js:attribute:: FloorplanConfig.avatarOutlineColor

      :type: Color

      Determines the outline color of the avatar shown in the overlay. (default: ``black``)



.. container:: ts-api-section

   .. js:attribute:: FloorplanConfig.avatarScale

      :type: number

      Determines the scale-factor of the avatar. Valid values must be in the range ``[0.1, 10]``. (default: ``1.0``)



.. container:: ts-api-section

   .. js:attribute:: FloorplanConfig.backgroundColor

      :type: Color

      Determines the background color of the overlay window. (default: ``white``)



.. container:: ts-api-section

   .. js:attribute:: FloorplanConfig.backgroundOpacity

      :type: number

      Determines the opacity of the overlay background. Valid values must be in the range ``[0, 1]``. (default: ``0.25``)



.. container:: ts-api-section

   .. js:attribute:: FloorplanConfig.borderColor

      :type: Color

      Determines the color of the overlay window border. (default: ``black``)



.. container:: ts-api-section

   .. js:attribute:: FloorplanConfig.borderOpacity

      :type: number

      Determines the opacity of the overlay window border. Valid values must be in the range ``[0, 1]``. (default: ``1.0``)



.. container:: ts-api-section

   .. js:attribute:: FloorplanConfig.customAvatar

      :type: null | number

      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``)



.. container:: ts-api-section

   .. js:attribute:: 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 is ``true``, the avatar will be the same size for all floorplans. (default: ``true``)



.. container:: ts-api-section

   .. js:attribute:: FloorplanConfig.floorplanOrientation

      :type: FloorplanOrientation

      Determines the drawing orientation of floorplan and avatar. (default: [[FloorplanOrientation.NorthUp]])



.. container:: ts-api-section

   .. js:attribute:: FloorplanConfig.overlayAnchor

      :type: OverlayAnchor

      The [[OverlayAnchor]] for the floorplan overlay window. See [[OverlayManager.setViewport]].
       (default: [[OverlayAnchor.LowerRightCorner]])



.. container:: ts-api-section

   .. js:attribute:: 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, while [[zoomLevel]] is used to
       easily change the zoom-level of the overlay



.. container:: ts-api-section

   .. js:attribute:: FloorplanConfig.overlayHeightUnit

      :type: OverlayUnit

      The [[OverlayUnit]] type for the [[overlaySize]] height. (default: [[OverlayUnit.ProportionOfOtherDimension]])



.. container:: ts-api-section

   .. js:attribute:: FloorplanConfig.overlayOffset

      :type: Point2

      The X/Y values used with [[OverlayManager.setViewport]]. (default: ``0, 0``)



.. container:: ts-api-section

   .. js:attribute:: FloorplanConfig.overlayOffsetXUnit

      :type: OverlayUnit

      The [[OverlayUnit]] type for the [[overlayOffset]] x coordinate. (default: [[OverlayUnit.Pixels]])



.. container:: ts-api-section

   .. js:attribute:: FloorplanConfig.overlayOffsetYUnit

      :type: OverlayUnit

      The [[OverlayUnit]] type for the [[overlayOffset]] y coordinate. (default: [[OverlayUnit.Pixels]])



.. container:: ts-api-section

   .. js:attribute:: FloorplanConfig.overlaySize

      :type: Point2

      Determines the size of the overlay. See [[OverlayManager.setViewport]] for an understanding
       of how the size and [[OverlayUnit]] values are used. (default: ``0.25, 1.0``)



.. container:: ts-api-section

   .. js:attribute:: FloorplanConfig.overlayWidthUnit

      :type: OverlayUnit

      The [[OverlayUnit]] type for the [[overlaySize]] width. (default: [[OverlayUnit.ProportionOfCanvas]])



.. container:: ts-api-section

   .. js:attribute:: FloorplanConfig.trackCameraEnabled

      :type: boolean

      Setting this to ``true`` will move the floorplan with the camera to keep the avatar centered.
      When this is ``false``, the floorplan will stay fixed in place, and the avatar will move.



.. container:: ts-api-section

   .. js:attribute:: 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
=======

.. rst-class:: ts-api-section

copy
----

.. js:method:: FloorplanConfig.copy()



   Per-floor information.

   :returns: Copy of this configuration object.


   :rtype: FloorplanConfig

