Skip to content

Commit

Permalink
Use unload tiles plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
gkjohnson committed Dec 21, 2024
1 parent 85fabe4 commit fa90aab
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
6 changes: 5 additions & 1 deletion example/googleMapsExample.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,11 @@ function reinstantiateTiles() {

if ( params.useBatchedMesh ) {

tiles.registerPlugin( new BatchedTilesPlugin( { renderer } ) );
tiles.registerPlugin( new BatchedTilesPlugin( {
renderer,
discardOriginalContent: false,
instanceCount: 250,
} ) );

} else {

Expand Down
2 changes: 2 additions & 0 deletions example/r3f/atmosphere.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import {
TileCompressionPlugin,
TilesFadePlugin,
GLTFExtensionsPlugin,
UnloadTilesPlugin,
} from '3d-tiles-renderer/plugins';
import { DRACOLoader } from 'three/examples/jsm/loaders/DRACOLoader.js';

Expand Down Expand Up @@ -112,6 +113,7 @@ function App() {
<TilesPlugin plugin={ GLTFExtensionsPlugin } dracoLoader={ dracoLoader } />
<TilesPlugin plugin={ TileCompressionPlugin } />
<TilesPlugin plugin={ UpdateOnChangePlugin } />
<TilesPlugin plugin={ UnloadTilesPlugin } />
<TilesPlugin plugin={ TilesFadePlugin } />
<TilesPlugin plugin={ TileCreasedNormalsPlugin } />

Expand Down
2 changes: 2 additions & 0 deletions example/r3f/globe.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import {
TileCompressionPlugin,
TilesFadePlugin,
GLTFExtensionsPlugin,
UnloadTilesPlugin,
} from '3d-tiles-renderer/plugins';
import { DRACOLoader } from 'three/examples/jsm/loaders/DRACOLoader.js';

Expand Down Expand Up @@ -109,6 +110,7 @@ function App() {
<TilesPlugin plugin={ GLTFExtensionsPlugin } dracoLoader={ dracoLoader } />
<TilesPlugin plugin={ TileCompressionPlugin } />
<TilesPlugin plugin={ UpdateOnChangePlugin } />
<TilesPlugin plugin={ UnloadTilesPlugin } />
<TilesPlugin plugin={ TilesFadePlugin } />

{/* Controls */}
Expand Down

0 comments on commit fa90aab

Please sign in to comment.