Add face-aware plank grain to magenta wood wall masks.
Sides use horizontal plank bands with outer/inner swap; south gets vertical boards; tops get lighter grain. Pattern follows the authored thick 1×1 so all connect states tint cleanly per wood tier.
The contents of this binary file are not shown.
The contents of this binary file are not shown.
The contents of this binary file are not shown.
The contents of this binary file are not shown.
The contents of this binary file are not shown.
The contents of this binary file are not shown.
The contents of this binary file are not shown.
The contents of this binary file are not shown.
The contents of this binary file are not shown.
The contents of this binary file are not shown.
The contents of this binary file are not shown.
The contents of this binary file are not shown.
The contents of this binary file are not shown.
The contents of this binary file are not shown.
The contents of this binary file are not shown.
The contents of this binary file are not shown.
The contents of this binary file are not shown.
The contents of this binary file are not shown.
The contents of this binary file are not shown.
The contents of this binary file are not shown.
The contents of this binary file are not shown.
The contents of this binary file are not shown.
The contents of this binary file are not shown.
The contents of this binary file are not shown.
The contents of this binary file are not shown.
The contents of this binary file are not shown.
The contents of this binary file are not shown.
The contents of this binary file are not shown.
The contents of this binary file are not shown.
The contents of this binary file are not shown.
The contents of this binary file are not shown.
The contents of this binary file are not shown.
@@ -386,19 +386,89 @@ function isSameFace (faceRgba, x, y, role, shapePrefix)
function woodMagenta (role)
{
// R≈B, G<R — lightness encodes face.
// Flat fallback (role only) — prefer woodShade for textured planks.
const L = {
O: 55,
S: 95,
E: 120,
W: 155,
T: 185,
N: 210
E: 113,
W: 143,
T: 177,
N: 205
}[role] ?? 140;
const gHi = role === "N" || role === "T" ? Math.min(L - 20, 50) : 0;
return rgba(L, gHi, L);
}
/** Magenta (R=B, G<R) with face-aware plank grain, matching authored thick 1×1. */
function mag (L, g = 0)
{
const lit = Math.max(1, Math.min(255, L | 0));
const gv = Math.max(0, Math.min(lit - 1, g | 0));
return rgba(lit, gv, lit);
}
/**
* Wood planks by face (from thick-wood-wall/0.png reference):
* - S: vertical boards (~4px), alternating grain by board+row
* - W/E: horizontal plank bands; outer/inner columns swap each band (diagonal step)
* - T: N–S boards with brighter center grain + slight G highlight
* - N: bright rim, two-tone split
*/
function woodShade (x, y, role, shapePrefix, faceRgba)
{
if (role === "O")
{ return mag(55); }
if (role === "S")
{
const board = Math.floor(x / 4);
const light = ((board + y) & 1) !== 0;
return mag(light ? 102 : 95);
}
if (role === "W" || role === "E")
{
const lo = role === "W" ? 143 : 113;
const hi = role === "W" ? 155 : 120;
// Plank bands ~5px tall, aligned like authored alone (y2–6, y7–11, …).
const band = Math.floor(Math.max(0, y - 2) / 5);
const outer = role === "W"
? !isSameFace(faceRgba, x - 1, y, role, shapePrefix)
: !isSameFace(faceRgba, x + 1, y, role, shapePrefix);
const swap = (band & 1) !== 0;
let useHi;
if (outer)
{ useHi = swap; }
else
{ useHi = !swap; }
return mag(useHi ? hi : lo);
}
if (role === "T" || (shapePrefix.startsWith("thin") && role === "N"))
{
const rowTone = (y & 1) !== 0;
const leftEdge = !isSameFace(faceRgba, x - 1, y, role, shapePrefix);
const rightEdge = !isSameFace(faceRgba, x + 1, y, role, shapePrefix);
const edge = leftEdge || rightEdge;
let L;
if (edge)
{ L = rowTone ? 161 : 159; }
else
{ L = rowTone ? 177 : 168; }
const g = rowTone ? 20 : 0;
return mag(L, g);
}
if (role === "N")
{
// Thick north bevel: split highlight
const L = x < 8 ? 200 : 210;
return mag(L, x < 8 ? 47 : 50);
}
return woodMagenta(role);
}
/**
* Cliff magenta tops: thick = plateau only (N is a dirt north face).
* Thin has no separate T — ridge top is role N.
@@ -448,7 +518,7 @@ function paintPixel (variant, prefix, g, x, y, faceRgba = null)
if (variant === "brick")
{ return brickShade(x, y, role, prefix, faceRgba); }
if (variant === "wood")
{ return woodMagenta(role); }
{ return woodShade(x, y, role, prefix, faceRgba); }
if (variant === "cliff")
{ return cliffShade(x, y, role, prefix); }
throw new Error(`Unknown variant ${variant}`);
@@ -386,19 +386,89 @@ function isSameFace (faceRgba, x, y, role, shapePrefix)function woodMagenta (role)function woodMagenta (role){{ // R≈B, G<R — lightness encodes face. // Flat fallback (role only) — prefer woodShade for textured planks. const L = { const L = { O: 55, O: 55, S: 95, S: 95, E: 120, E: 113, W: 155, W: 143, T: 185, T: 177, N: 210 N: 205 }[role] ?? 140; }[role] ?? 140; const gHi = role === "N" || role === "T" ? Math.min(L - 20, 50) : 0; const gHi = role === "N" || role === "T" ? Math.min(L - 20, 50) : 0; return rgba(L, gHi, L); return rgba(L, gHi, L);}}/** Magenta (R=B, G<R) with face-aware plank grain, matching authored thick 1×1. */function mag (L, g = 0){ const lit = Math.max(1, Math.min(255, L | 0)); const gv = Math.max(0, Math.min(lit - 1, g | 0)); return rgba(lit, gv, lit);}/** * Wood planks by face (from thick-wood-wall/0.png reference): * - S: vertical boards (~4px), alternating grain by board+row * - W/E: horizontal plank bands; outer/inner columns swap each band (diagonal step) * - T: N–S boards with brighter center grain + slight G highlight * - N: bright rim, two-tone split */function woodShade (x, y, role, shapePrefix, faceRgba){ if (role === "O") { return mag(55); } if (role === "S") { const board = Math.floor(x / 4); const light = ((board + y) & 1) !== 0; return mag(light ? 102 : 95); } if (role === "W" || role === "E") { const lo = role === "W" ? 143 : 113; const hi = role === "W" ? 155 : 120; // Plank bands ~5px tall, aligned like authored alone (y2–6, y7–11, …). const band = Math.floor(Math.max(0, y - 2) / 5); const outer = role === "W" ? !isSameFace(faceRgba, x - 1, y, role, shapePrefix) : !isSameFace(faceRgba, x + 1, y, role, shapePrefix); const swap = (band & 1) !== 0; let useHi; if (outer) { useHi = swap; } else { useHi = !swap; } return mag(useHi ? hi : lo); } if (role === "T" || (shapePrefix.startsWith("thin") && role === "N")) { const rowTone = (y & 1) !== 0; const leftEdge = !isSameFace(faceRgba, x - 1, y, role, shapePrefix); const rightEdge = !isSameFace(faceRgba, x + 1, y, role, shapePrefix); const edge = leftEdge || rightEdge; let L; if (edge) { L = rowTone ? 161 : 159; } else { L = rowTone ? 177 : 168; } const g = rowTone ? 20 : 0; return mag(L, g); } if (role === "N") { // Thick north bevel: split highlight const L = x < 8 ? 200 : 210; return mag(L, x < 8 ? 47 : 50); } return woodMagenta(role);}/**/** * Cliff magenta tops: thick = plateau only (N is a dirt north face). * Cliff magenta tops: thick = plateau only (N is a dirt north face). * Thin has no separate T — ridge top is role N. * Thin has no separate T — ridge top is role N.@@ -448,7 +518,7 @@ function paintPixel (variant, prefix, g, x, y, faceRgba = null) if (variant === "brick") if (variant === "brick") { return brickShade(x, y, role, prefix, faceRgba); } { return brickShade(x, y, role, prefix, faceRgba); } if (variant === "wood") if (variant === "wood") { return woodMagenta(role); } { return woodShade(x, y, role, prefix, faceRgba); } if (variant === "cliff") if (variant === "cliff") { return cliffShade(x, y, role, prefix); } { return cliffShade(x, y, role, prefix); } throw new Error(`Unknown variant ${variant}`); throw new Error(`Unknown variant ${variant}`);