---
title: XRayVisualization
summary: Class in @bimworks/viewer3d.
order: 10
languages: [javascript]
sdk-package: JavaScript · @bimworks/viewer3d
---

# XRayVisualization

[[page:reference/javascript/api|API catalogue]] · `@bimworks/viewer3d` · Class

````typescript sdk=js sdk-namespace="@bimworks/viewer3d"
class XRayVisualization
````

How the ObjectStateManager's x-ray set is drawn (Viewer3d.setXRayVisualization): translucent
faces and edges through the scene, independent of selection and of XRaySelectionVisualization.
This is an overlay: the objects remain rendered normally underneath. Overlapping faces
accumulate opacity. The ghost set (ObjectStateManager.addToGhostSet) is drawn with it too:
ghosts are hidden, so for them the overlay is all there is.

## Members

| Member | Kind | Description |
|---|---|---|
| [[page:reference/javascript/bimworks-viewer3d/xrayvisualization-14341c39#member-constructor-e02b1305720b|constructor]] | Method |  |
| [[page:reference/javascript/bimworks-viewer3d/xrayvisualization-14341c39#member-color-23110db19972|color]] | Property | Normalized RGBA edge color. |
| [[page:reference/javascript/bimworks-viewer3d/xrayvisualization-14341c39#member-facecolor-380cf1205ff3|faceColor]] | Property | Normalized RGBA face color; alpha controls overlay opacity (clamped to 0..1 when rendered). |
| [[page:reference/javascript/bimworks-viewer3d/xrayvisualization-14341c39#member-facesenabled-5ed6a6d73091|facesEnabled]] | Property | Whether to draw the translucent faces. Defaults to true. |
| [[page:reference/javascript/bimworks-viewer3d/xrayvisualization-14341c39#member-wireframeenabled-e67eed172407|wireframeEnabled]] | Property | Whether to draw the edges. Defaults to true. |

## `constructor` {#member-constructor-e02b1305720b}

````typescript sdk=js sdk-namespace="@bimworks/viewer3d"
constructor(faceColor?: SelectionColor, wireframeColor?: SelectionColor)
````



### Parameters

| Name | Type | Description |
|---|---|---|
| `faceColor` | `SelectionColor` | Defaults to blue at 15% opacity. |
| `wireframeColor` | `SelectionColor` | Defaults to #cfe0ff. |

## `color` {#member-color-23110db19972}

````typescript sdk=js sdk-namespace="@bimworks/viewer3d"
color: Float32Array
````

Normalized RGBA edge color.

## `faceColor` {#member-facecolor-380cf1205ff3}

````typescript sdk=js sdk-namespace="@bimworks/viewer3d"
faceColor: Float32Array
````

Normalized RGBA face color; alpha controls overlay opacity (clamped to 0..1 when rendered).

## `facesEnabled` {#member-facesenabled-5ed6a6d73091}

````typescript sdk=js sdk-namespace="@bimworks/viewer3d"
facesEnabled: boolean
````

Whether to draw the translucent faces. Defaults to true.

## `wireframeEnabled` {#member-wireframeenabled-e67eed172407}

````typescript sdk=js sdk-namespace="@bimworks/viewer3d"
wireframeEnabled: boolean
````

Whether to draw the edges. Defaults to true.
