---
title: setPlaneWidgetViewport
slug: viewer-3d/methods/setPlaneWidgetViewport
docTags: 
createdAt: 2024-03-01T14:17:48.684Z
---

Sets the position and size of the clipping plane widget.

## Example

::codepen{url="https://codepen.io/Catenda/embed/JjQbjdE"}

## Usage

```javascript
const viewport = {
  x: 0,
  y: 0,
  width: 150,
  height: 150
};

viewer3d.setPlaneWidgetViewport(viewport);
```

## Parameters

### viewport

Position and size of the clipping plane widget.

| **Type** | **Required** |
| -------- | ------------ |
| Object   | Yes          |

**Properties**

| **Name** | **Type** | **Required** | **Description**                               |
| -------- | -------- | ------------ | --------------------------------------------- |
| `height` | Number   | Yes          | Height of the widget in pixels                |
| `width`  | Number   | Yes          | Width of the widget in pixels                 |
| `x`      | Number   | Yes          | X coordinate of the widget position in pixels |
| `y`      | Number   | Yes          | Y coordinate of the widget position in pixels |

