Skip to content

Commit

Permalink
Improve cube-array error logging (#3931)
Browse files Browse the repository at this point in the history
Before:

     layer: 6 (undefined)

After:

     layer: 6, cube-layer: 1 (+x)

The issue was the layer is in 2d layers not cube layers
Cube layers = six 2d layers. So, now it prints both,
and it prints the correct face name (+x, -x, +y, ...)
for the face when layer > 6
  • Loading branch information
greggman authored Sep 3, 2024
1 parent e3a6ae6 commit d861142
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2346,7 +2346,12 @@ async function identifySamplePoints<T extends Dimensionality>(
const orderedTexelIndices: number[] = [];
lines.push('');
const unSampled = layerEntries ? '' : 'un-sampled';
lines.push(`layer: ${layer}${isCube ? ` (${kFaceNames[layer]})` : ''} ${unSampled}`);
if (isCube) {
const face = kFaceNames[layer % 6];
lines.push(`layer: ${layer}, cube-layer: ${(layer / 6) | 0} (${face}) ${unSampled}`);
} else {
lines.push(`layer: ${unSampled}`);
}

if (!layerEntries) {
continue;
Expand Down

0 comments on commit d861142

Please sign in to comment.