|
@@ -104,20 +104,19 @@ function reinstantiateTiles() {
|
|
|
tiles.manager.addHandler( /\.gltf$/, loader );
|
|
|
offsetParent.add( tiles.group );
|
|
|
|
|
|
-
|
|
|
// Used with CUSTOM_COLOR_MODE
|
|
|
tiles.customColorCallback = ( tile, object ) => {
|
|
|
|
|
|
const depthIsEven = tile.__depth % 2 === 0;
|
|
|
const hex = depthIsEven ? 0xff0000 : 0xffffff;
|
|
|
object.traverse( c => {
|
|
|
-
|
|
|
+
|
|
|
if ( c.isMesh ) {
|
|
|
-
|
|
|
+
|
|
|
c.material.color.set( hex );
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
} );
|
|
|
|
|
|
};
|