A tea tin with no model file
The tin's body is a LatheGeometry: a profile curve spun through 96 segments. Its label isn't an image either. At runtime the label is drawn onto a 1024×1024 2D canvas (brand mark, tea name, a hairline rule and a leaf glyph in the product's accent colour), wrapped in a CanvasTexture, and projected onto the tin as a decal.
Each of the four teas gets its own label from the same function, so a new product is a name and a colour. The canvas only renders while on screen (an IntersectionObserver switches the frameloop to on-demand), and visitors with reduced motion or no WebGL get an SVG tin instead.
function makeLabelTexture(name: string, accent: string, sub = 'ILAM · NEPAL · 1,900 m'): LabelTex {
// …
const size = 1024;
const c = document.createElement('canvas');
c.width = size;
c.height = size;
const ctx = c.getContext('2d')!;
ctx.fillStyle = '#F4F0E8';
roundRect(ctx, 60, 160, size - 120, size - 320, 16);
ctx.fill();
ctx.textAlign = 'center';
ctx.fillStyle = '#1A1714';
ctx.font = "500 64px 'Fraunces', 'Playfair Display', Georgia, serif";
ctx.fillText('Chai & Co.', size / 2, 300);
// … rule, tea name, leaf glyph, origin line
const t = new THREE.CanvasTexture(c);
t.colorSpace = THREE.SRGBColorSpace;
t.anisotropy = 8;
t.needsUpdate = true;
return { tex: t, key };
}