Skip to content

Commit

Permalink
Remove non ASCII from texture diagrams (gpuweb#4008)
Browse files Browse the repository at this point in the history
Even in 2024 Google/Chromium's infra can't handle unicode 🀬
  • Loading branch information
greggman authored and teoxoy committed Oct 25, 2024
1 parent 916e404 commit 3b58c42
Showing 1 changed file with 35 additions and 35 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2857,23 +2857,23 @@ const kFaceNames = ['+x', '-x', '+y', '-y', '+z', '-z'] as const;
* Example:
*
* 0 1 2 3 4 5 6 7
* β”Œβ”€β”€β”€β”¬β”€β”€β”€β”¬β”€β”€β”€β”¬β”€β”€β”€β”¬β”€β”€β”€β”¬β”€β”€β”€β”¬β”€β”€β”€β”¬β”€β”€β”€β”
* 0 β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚
* β”œβ”€β”€β”€β”Όβ”€β”€β”€β”Όβ”€β”€β”€β”Όβ”€β”€β”€β”Όβ”€β”€β”€β”Όβ”€β”€β”€β”Όβ”€β”€β”€β”Όβ”€β”€β”€β”€
* 1 β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ a β”‚
* β”œβ”€β”€β”€β”Όβ”€β”€β”€β”Όβ”€β”€β”€β”Όβ”€β”€β”€β”Όβ”€β”€β”€β”Όβ”€β”€β”€β”Όβ”€β”€β”€β”Όβ”€β”€β”€β”€
* 2 β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ b β”‚
* β”œβ”€β”€β”€β”Όβ”€β”€β”€β”Όβ”€β”€β”€β”Όβ”€β”€β”€β”Όβ”€β”€β”€β”Όβ”€β”€β”€β”Όβ”€β”€β”€β”Όβ”€β”€β”€β”€
* 3 β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚
* β”œβ”€β”€β”€β”Όβ”€β”€β”€β”Όβ”€β”€β”€β”Όβ”€β”€β”€β”Όβ”€β”€β”€β”Όβ”€β”€β”€β”Όβ”€β”€β”€β”Όβ”€β”€β”€β”€
* 4 β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚
* β”œβ”€β”€β”€β”Όβ”€β”€β”€β”Όβ”€β”€β”€β”Όβ”€β”€β”€β”Όβ”€β”€β”€β”Όβ”€β”€β”€β”Όβ”€β”€β”€β”Όβ”€β”€β”€β”€
* 5 β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚
* β”œβ”€β”€β”€β”Όβ”€β”€β”€β”Όβ”€β”€β”€β”Όβ”€β”€β”€β”Όβ”€β”€β”€β”Όβ”€β”€β”€β”Όβ”€β”€β”€β”Όβ”€β”€β”€β”€
* 6 β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚
* β”œβ”€β”€β”€β”Όβ”€β”€β”€β”Όβ”€β”€β”€β”Όβ”€β”€β”€β”Όβ”€β”€β”€β”Όβ”€β”€β”€β”Όβ”€β”€β”€β”Όβ”€β”€β”€β”€
* 7 β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚
* β””β”€β”€β”€β”΄β”€β”€β”€β”΄β”€β”€β”€β”΄β”€β”€β”€β”΄β”€β”€β”€β”΄β”€β”€β”€β”΄β”€β”€β”€β”΄β”€β”€β”€β”˜
* +---+---+---+---+---+---+---+---+
* 0 | | | | | | | | |
* +---+---+---+---+---+---+---+---+
* 1 | | | | | | | | a |
* +---+---+---+---+---+---+---+---+
* 2 | | | | | | | | b |
* +---+---+---+---+---+---+---+---+
* 3 | | | | | | | | |
* +---+---+---+---+---+---+---+---+
* 4 | | | | | | | | |
* +---+---+---+---+---+---+---+---+
* 5 | | | | | | | | |
* +---+---+---+---+---+---+---+---+
* 6 | | | | | | | | |
* +---+---+---+---+---+---+---+---+
* 7 | | | | | | | | |
* +---+---+---+---+---+---+---+---+
* a: at: [7, 1], weights: [R: 0.75000]
* b: at: [7, 2], weights: [R: 0.25000]
*/
Expand Down Expand Up @@ -3016,15 +3016,15 @@ async function identifySamplePoints<T extends Dimensionality>(
layerEntries.set(xyId, weight);
}

// β”Œβ”€β”€β”€β”¬β”€β”€β”€β”¬β”€β”€β”€β”¬β”€β”€β”€β”
// β”‚ a β”‚ β”‚ β”‚ β”‚
// β”œβ”€β”€β”€β”Όβ”€β”€β”€β”Όβ”€β”€β”€β”Όβ”€β”€β”€β”€
// β”‚ β”‚ β”‚ β”‚ β”‚
// β”œβ”€β”€β”€β”Όβ”€β”€β”€β”Όβ”€β”€β”€β”Όβ”€β”€β”€β”€
// β”‚ β”‚ β”‚ β”‚ β”‚
// β”œβ”€β”€β”€β”Όβ”€β”€β”€β”Όβ”€β”€β”€β”Όβ”€β”€β”€β”€
// β”‚ β”‚ β”‚ β”‚ b β”‚
// β””β”€β”€β”€β”΄β”€β”€β”€β”΄β”€β”€β”€β”΄β”€β”€β”€β”˜
// +---+---+---+---+
// | a | | | |
// +---+---+---+---+
// | | | | |
// +---+---+---+---+
// | | | | |
// +---+---+---+---+
// | | | | b |
// +---+---+---+---+
const lines: string[] = [];
const letter = (idx: number) => String.fromCodePoint(idx < 30 ? 97 + idx : idx + 9600 - 30); // 97: 'a'
let idCount = 0;
Expand Down Expand Up @@ -3063,39 +3063,39 @@ async function identifySamplePoints<T extends Dimensionality>(
lines.push(line);
}
{
let line = ' β”Œ';
let line = ' +';
for (let x = 0; x < width; x++) {
line += x === width - 1 ? '───┐' : '───┬';
line += x === width - 1 ? '---+' : '---+';
}
lines.push(line);
}
for (let y = 0; y < height; y++) {
{
let line = `${y.toString().padEnd(2)}β”‚`;
let line = `${y.toString().padEnd(2)}|`;
for (let x = 0; x < width; x++) {
const texelIdx = x + y * texelsPerRow;
const weight = layerEntries.get(texelIdx);
if (weight !== undefined) {
line += ` ${letter(idCount + orderedTexelIndices.length)} β”‚`;
line += ` ${letter(idCount + orderedTexelIndices.length)} |`;
orderedTexelIndices.push(texelIdx);
} else {
line += ' β”‚';
line += ' |';
}
}
lines.push(line);
}
if (y < height - 1) {
let line = ' β”œ';
let line = ' +';
for (let x = 0; x < width; x++) {
line += x === width - 1 ? '────' : '───┼';
line += x === width - 1 ? '---+' : '---+';
}
lines.push(line);
}
}
{
let line = ' β””';
let line = ' +';
for (let x = 0; x < width; x++) {
line += x === width - 1 ? 'β”€β”€β”€β”˜' : '───┴';
line += x === width - 1 ? '---+' : '---+';
}
lines.push(line);
}
Expand Down

0 comments on commit 3b58c42

Please sign in to comment.