The _Chromatin 3D Visualizer_ is capable of displaying its models in **XR**
(Extended or Mixed Reality). However, there are certain limitations to
what device can use this visualization (see [Requirements](#requirements)).
When the requirements are met, a button will be displayed that, when clicked, will open
the visualization on the device in **XR**.
### Chapters
* [Requirements](#requirements)
* [View in XR](#view-in-xr)
* [Controlling the model in XR](#controlling-the-model-in-xr)
* [Changing Configs in XR](#changing-configs-in-xr)

The **XR button** (visible in the bottom left corner of the _viewer_ tab (see [Tabs](Tabs.md) for more info))
will only be clickable, once a trajectory has been loaded.
> **Note:** If you are loading the application for the first time or with a new browser, when clicking the **XR button**, you might be asked whether you want to allow the application to access **WebXR**. You must allow that access if you want to use the **XR** visualization.
## Requirements
Due to limitations of the technology, there are certain requirements that
have to be met before the **XR**-view-mode can be offered by the application:
* A **VR** capable device must be plugged in or host the application
* **WebXR** is allowed and enabled in your browser
* There should be Controllers or alternatively (if your headset supports hand tracking) your hands
> **Note:** This view mode was originally developed for the _Microsoft HoloLens 2_, so the best results will be achieved with that device. The view was not tested for any other VR or mixed reality headset, so it cannot be guaranteed that the mode will work well on these devices!
## View in XR
Once the XR-mode is entered, the model that was displayed in the browser prior,
will now be displayed on your VR capable device. Any changes to the model that
you want to make (such as recoloring the _Linker DNA segments_) should be applied
before entering the XR view mode as you cannot change these settings within that mode.
> **Note:** The model currently loaded in the application will likely look different in the XR mode since that mode was optimized to run well on the _Microsoft HoloLens 2_ and its hardware capabilities. Therefore, the model quality was reduced heavily, so that even the biggest models could still be displayed with good performance.
### Controlling the model in XR
_For this section the controllers of your headset or the alternative your device uses
(hand tracking etc.) will be referred to as controllers. When these are mentioned, simply
substitute your specific controlling alternative._
When you have entered the XR mode and are using controllers or your headset supports
hand tracking, you should see virtual controllers overlaid over your physical controllers.
There should also be lines emanating from these virtual controllers, which show you their
orientation and what they are aiming at.
If you aim at the model and activate your controller you can move it around
by moving the controller as long as you hold down the button. The model
can be moved without limitations in terms of direction or distance. When
you let go of the selection, the model will remain in the position you left it in.
### Changing Configs in XR
If the following two conditions are met:
* A fibre that includes multiple configurations was loaded into the application
* The XR mode is not entered when the last configuration is selected / shown
a `config change` button should be displayed directly in front of the 3D model. If you click that button (via
the use of your controllers (similarly to how you [move the model](#controlling-the-model-in-xr)))
the next configuration will be loaded directly in XR.
The button only allows you to "go forward by one step", meaning that you can only
switch to the next direct configuration at a time. You cannot go backwards through
the configurations, and you cannot skip multiple configuration with one press of the button.
However, when using the button multiple times, you will move through multiple configurations
if possible.
> **Note:** When the last configuration is reached, the button will no longer be displayed. If you want to move back to a previous configuration, you will have to close the XR view mode, then select a previous configuration and re-enter the XR mode.