> ## Documentation Index
> Fetch the complete documentation index at: https://developer.synopsys.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Properties

The web component element supports several properties:

* **active**: If this is true, the 3D view will be active.  If false, the proxy image is displayed (if no proxy image is specified, a "blank" launch image will be presented). \
  &#x20;Note: The `active` property can be altered via the built-in getter/setter or via the native web API `.setAttribute('active', [true/false])`.
* **aspect-ratio**: the viewer does not support explicit width/height specification and will be sized to fill the parent element with one exception.  If 'aspect-ratio' is set, the height will be the (dynamic) width divided by the aspect-ratio value.  If 'aspect-ratio' is set to the string 'proxy', the aspect ratio of the proxy image will be used. \
  &#x20;Note: The `aspect_ratio` property can be altered via the built-in getter/setter or via the native web API `.setAttribute('aspect_ratio', [aspect ratio number])`.
* **guid**: a string property that is a unique identifier for the component instance. This defaults to a pseudo-guid that is unique only vs other ansys-nexus-viewer components in the same web page. This property may be set when the element is instantiated but cannot be changed afterward.
* **src**: A read/write property. URL to the source 3D geometry. Validity varies by renderer type.
  * a. The 'webgl' renderer supports: '.avz', '.dsco', '.scdoc', and '.scdocx' files.
  * b. The 'three' renderer supports '.glb' ,  '.obj' files.
  * c. The 'envnc' renderer supports '.evsn'.
    \
    &#x20;Note: The 'src' property can be altered via the built in getter/setter or via the native web API`.setAttribute('src', [src_path])`. The renderer would get changed dynamically based on the new file type.
* **src\_ext**: In some situations, **src** may be a data URI. In this situation, the component cannot determine the actual file format.  Setting this property to the
  natural filename extension allows a data URI to be used with **src**.  For example: setting **src\_ext='avz'** will allow an AVZ data URI to be passed to **src**.
* **proxy-img**: URL to a PNG image that should be used as the proxy image when the 3D component is not active.
* **renderer**: the back-end renderer to use.  'webgl' is the default and can support AVZ, SCDOC and DSCO format geometry.  'three' selects a render that supports geometry in the GLB file format.  'envnc' is supported in conjunction with \ref websocketserver\_cli local session configurations.  This property may only be   specified when the element is created.
* **renderer\_options**: a read-only property specified as a json string containing renderer specific options. Options are generally specific to a given renderer. Details may be found here [Renderer Options](#renderer-options).
* **parts**: a read-only property that returns a list of the part names present in the instance.  This property will change when the **src** changes and, depending on
  the nature of the geometry source may change organically.
* \_**sceneNodeVisibilityMap**: A read property for "webgl" renderer, showing a map of all the available nodes in the current scene, their initial visibility and the latest visibility (1: show / 0: hide). The visibility would get changed via the view panel where users can check and uncheck the individual node's visibility.
* \_**lastClickedSceneNode**: A read property for "webgl" renderer, showing the latest node interacted by the users in the current scene. It provides a map of relevant information such as displayedValue (1:show / 0:hide), lastClickedID (The node's id), lastClickedName (The node name).

## Renderer options

Each renderer may support a collection of renderer specific options.  These generally
allow for the customization of the renderer behavior and display.   The supported
options are listed here.  Note that the element **renderer\_options** property is
a JSON format string.  In this documentation, the properties in the resulting object
are lists.  For example, a property named **foo** would be specified to have the
value 'hello' as:

```html theme={null}
    <ansys-adr-viewer renderer_options='{"foo": "hello"}'> </ansys-adr-viewer>
```

Generally, renderers will ignore renderer\_options they do not recognize and the
options cannot be changed once the element has been realized.

### "webgl" Specific options

There are a number of "webgl" features that can be disabled using **renderer\_options**.  By
default (no **renderer\_options** specified) the following are enabled: **showFit**,
**showClip**, **showFull**.  If an empty **renderer\_options** is specified (renderer\_options='\{}'),
all the 'show' options will be enabled by default and one must specify which need to be
disabled by setting them to false.

| Option | Description |
| - | - |
| **showFit** | Enable the "fit" geometry option |
| **showHighlight** | Enable the body, face, edge selection modes |
| **showClip** | Enable the clipping mode |
| **showExplode** | Enable the "explode" geometry optiont |
| **showViewport** | Allow multiple viewports to be used |
| **showFull** | Enable the "fullscreen" option |
| **showLogo** | Include the Ansys logo in the render window |
| **showAbout** | Enable the "about" dialog |
| **showOptions** | Allow GUI control remapping |
| **showMarkup** | Enable annotation editting |
| **showFileOpen** | Allow the user to select and read local files |

Common collections of options might include.

The default interface:

```html theme={null}
renderer_options='{"showLogo": false, "showFileOpen": false, 
                   "showHighlight": false, "showAbout": false, 
                   "showMarkup": false, "showOptions": false,
                   "showViewport": false, "showClip": true, 
                   "showExplode": false, "showFull": true, 
                   "showFit": true}'
```

Common interface options:

```html theme={null}
renderer_options='{"showFileOpen": false, "showOptions": false,
                   "showLogo": false, "showAbout": false, 
                   "showMarkup": false, "showViewport": false, 
                   "showHighlight": false, "showClip": false, 
                   "showExplode": false, 
                   "showFull": true, "showFit": true}'
```
