From fa90aab551a17fc72339b5ea4f70555997a2e110 Mon Sep 17 00:00:00 2001 From: Garrett Johnson Date: Sat, 21 Dec 2024 15:38:41 +0900 Subject: [PATCH] Use unload tiles plugin --- example/googleMapsExample.js | 6 +++++- example/r3f/atmosphere.jsx | 2 ++ example/r3f/globe.jsx | 2 ++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/example/googleMapsExample.js b/example/googleMapsExample.js index 6993d3921..f4f8786d5 100644 --- a/example/googleMapsExample.js +++ b/example/googleMapsExample.js @@ -74,7 +74,11 @@ function reinstantiateTiles() { if ( params.useBatchedMesh ) { - tiles.registerPlugin( new BatchedTilesPlugin( { renderer } ) ); + tiles.registerPlugin( new BatchedTilesPlugin( { + renderer, + discardOriginalContent: false, + instanceCount: 250, + } ) ); } else { diff --git a/example/r3f/atmosphere.jsx b/example/r3f/atmosphere.jsx index a3695e0d2..8ab1dab4a 100644 --- a/example/r3f/atmosphere.jsx +++ b/example/r3f/atmosphere.jsx @@ -18,6 +18,7 @@ import { TileCompressionPlugin, TilesFadePlugin, GLTFExtensionsPlugin, + UnloadTilesPlugin, } from '3d-tiles-renderer/plugins'; import { DRACOLoader } from 'three/examples/jsm/loaders/DRACOLoader.js'; @@ -112,6 +113,7 @@ function App() { + diff --git a/example/r3f/globe.jsx b/example/r3f/globe.jsx index f21b47518..2554e9fba 100644 --- a/example/r3f/globe.jsx +++ b/example/r3f/globe.jsx @@ -19,6 +19,7 @@ import { TileCompressionPlugin, TilesFadePlugin, GLTFExtensionsPlugin, + UnloadTilesPlugin, } from '3d-tiles-renderer/plugins'; import { DRACOLoader } from 'three/examples/jsm/loaders/DRACOLoader.js'; @@ -109,6 +110,7 @@ function App() { + {/* Controls */}