Skip to content

Commit

Permalink
Add display for batched mesh instances
Browse files Browse the repository at this point in the history
  • Loading branch information
gkjohnson committed Dec 25, 2024
1 parent 0ebcf5c commit cb80f32
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions example/googleMapsExample.js
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,28 @@ function updateHtml() {
const programCount = renderer.info.programs.length;
str += `Geometries: ${ memory.geometries } Textures: ${ memory.textures } Programs: ${ programCount } Draw Calls: ${ render.calls }`;

const batchPlugin = tiles.getPluginByName( 'BATCHED_TILES_PLUGIN' );
const fadePlugin = tiles.getPluginByName( 'FADE_TILES_PLUGIN' );
if ( batchPlugin ) {

let tot = 0;
let totFade = 0;
batchPlugin.batchedMesh._instanceInfo.forEach( info => {

if ( info.visible && info.active ) tot ++;

} );

fadePlugin.batchedMesh._instanceInfo.forEach( info => {

if ( info.visible && info.active ) totFade ++;

} );

str += ', Batched: ' + tot + ', Fade Batched: ' + totFade;

}

}

if ( statsContainer.innerHTML !== str ) {
Expand Down

0 comments on commit cb80f32

Please sign in to comment.