import { tokenLayer } from "semiotic/recipes" const SERVER_SIGN = { viewBox: [40, 40], anchor: [0.5, 1], // feet land on (x, y) parts: [ { d: "M8 3h24v34H8z", fill: "color" }, { d: "M12 9h16v5H12z…", fill: "accent" }, ], } // inside any custom layout: describe the token semantics, then stamp glyphs const serverLayer = tokenLayer({ input: site.powerMW, encoding: { tokenType: "glyph", tokenSemantics: "unitized-measure", countStrategy: "unitized", unitValue: 100, unitMeaning: "one server sign = 100 MW", }, options: { x, y: terrainY - 40, columns: 4, cellWidth: 12, cellHeight: 12, anchor: [0.5, 1], tokenSize: 11, glyph: SERVER_SIGN, color: statusColor, accent: "#fff", ghostColor: paperDeep, datum: site, idPrefix: site.id, }, }) nodes.push( ...serverLayer.nodes, ) // the same definition, as React chrome (legends, overlays, prose): import { Glyph } from "semiotic/recipes" <Glyph def={SERVER_SIGN} size={14} color="#34383b" />