Skip to content

Commit f834d3c

Browse files
committed
update demo
1 parent 48a4ba4 commit f834d3c

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

example/three/googleMapsExample.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ const params = {
4040
enableCacheDisplay: false,
4141
enableRendererStats: false,
4242
useBatchedMesh: Boolean( new URLSearchParams( window.location.hash.replace( /^#/, '' ) ).get( 'batched' ) ),
43+
useFadePlugin: true,
4344
displayTopoLines: false,
4445
errorTarget: 20,
4546

@@ -66,7 +67,6 @@ function reinstantiateTiles() {
6667
tiles.registerPlugin( new TileCompressionPlugin() );
6768
tiles.registerPlugin( new UpdateOnChangePlugin() );
6869
tiles.registerPlugin( new UnloadTilesPlugin() );
69-
tiles.registerPlugin( new TilesFadePlugin() );
7070
tiles.registerPlugin( new TopoLinesPlugin( { projection: 'ellipsoid' } ) );
7171
tiles.registerPlugin( new GLTFExtensionsPlugin( {
7272
// Note the DRACO compression files need to be supplied via an explicit source.
@@ -76,6 +76,12 @@ function reinstantiateTiles() {
7676
tiles.optimizedLoadStrategy = params.optimizedLoadStrategy;
7777
tiles.loadSiblings = params.loadSiblings;
7878

79+
if ( params.useFadePlugin ) {
80+
81+
tiles.registerPlugin( new TilesFadePlugin() );
82+
83+
}
84+
7985
if ( params.useBatchedMesh ) {
8086

8187
tiles.registerPlugin( new BatchedTilesPlugin( {
@@ -162,12 +168,15 @@ function init() {
162168
const mapsOptions = gui.addFolder( 'Google Photorealistic Tiles' );
163169
if ( new URLSearchParams( window.location.search ).has( 'showOptimizedSettings' ) ) {
164170

171+
params.optimizedLoadStrategy = true;
172+
tiles.optimizedLoadStrategy = true;
165173
mapsOptions.add( params, 'optimizedLoadStrategy' ).listen();
166174
mapsOptions.add( params, 'loadSiblings' ).listen();
167175

168176
}
169177

170178
mapsOptions.add( params, 'useBatchedMesh' ).listen();
179+
mapsOptions.add( params, 'useFadePlugin' ).listen();
171180
mapsOptions.add( params, 'reload' );
172181

173182
const exampleOptions = gui.addFolder( 'Example Options' );

0 commit comments

Comments
 (0)