Skip to content

Commit

Permalink
Add to README
Browse files Browse the repository at this point in the history
  • Loading branch information
gkjohnson committed Dec 18, 2024
1 parent f275630 commit 89ffee3
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion example/src/plugins/UnloadTilesPlugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { estimateBytesUsed } from '../../../src/three/utilities.js';
// - Raycasting needs to be smarter and raycast against non-uploaded geometry
export class UnloadTilesPlugin {

constructor( options = {} ) {
constructor() {

this.tiles = null;
this.estimatedGpuBytes = 0;
Expand Down
14 changes: 14 additions & 0 deletions src/plugins/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -576,3 +576,17 @@ Available options are as follows:
material: null,
}
```

## UnloadTilesPlugin

_available in the examples directory_

Plugin that unloads geometry, textures, and materials of any given tile when the visibility changes to non-visible to save GPU memory. The model still exists on the CPU until it is completely removed from the cache.

### .estimatedGpuBytes

```js
estimatedGPUBytes : number
```

The number of bytes that are actually uploaded to the GPU for rendering compared to `lruCache.cachedBytes` which reports the amount of texture and geometry buffer bytes actually downloaded.

0 comments on commit 89ffee3

Please sign in to comment.