# UnloadTilesPlugin

class in `3d-tiles-renderer/three/plugins`

```js
import { UnloadTilesPlugin } from '3d-tiles-renderer/three/plugins';
```

Plugin that unloads geometry, textures, and materials of any given tile when its
visibility changes to non-visible, freeing GPU memory. The model data still exists on
the CPU until it is completely removed from the cache, allowing it to be re-uploaded
without re-fetching.

## Constructor

```js
new UnloadTilesPlugin( options?: Object )
```

- `options`, `Object`, optional
  - `delay`, `number`, optional, default `0`: Milliseconds to wait after a tile is hidden before freeing its GPU data. Useful to avoid thrashing when the camera is moving.
  - `bytesTarget`, `number`, optional, default `0`: Target GPU byte budget to unload down to. `0` means unload with no budget limit.

## Properties

### .estimatedGpuBytes: number

The number of bytes currently uploaded to the GPU for rendering. Compare to
`lruCache.cachedBytes` which reports all downloaded bytes including those not
yet on the GPU.
