import {mkdirSync,writeFileSync,readFileSync} from 'node:fs'; const web=new URL('../web/',import.meta.url),directory=new URL('assets/planet-glyphs/',web);mkdirSync(directory,{recursive:true}); // Original angular letterforms; these are not traced or adapted from franchise pictograms. const alphabet={U:'M0 0V15L5 20H11L16 15V0',H:'M0 0V20M16 0V20M0 10H16',F:'M0 20V0H16M0 10H12',A:'M0 20L8 0 16 20M4 12H12',R:'M0 20V0H12L16 6 8 12H0M8 12L16 20',K:'M0 0V20M16 0L0 10 16 20',I:'M2 0H14M8 0V20M2 20H14',S:'M16 0H4L0 6 16 14 12 20H0',C:'M16 0H5L0 5V15L5 20H16',L:'M0 0V20H16',D:'M0 20V0H8L16 8V12L8 20Z',N:'M0 20V0L16 20V0',G:'M16 0H5L0 5V15L5 20H16V10H8',E:'M16 0H0V20H16M0 10H12',P:'M0 20V0H10L16 6 10 12H0',M:'M0 20V0L8 10 16 0V20',T:'M0 0H16M8 0V20',O:'M4 0H12L16 5V15L12 20H4L0 15V5Z',V:'M0 0L8 20 16 0'}; const planets=[ {id:'serevan',name:'Arrakduin',seed:'ARRAKDUIN',color:'#e9bc70',symbol:'M78 163L128 61 178 163M100 119H156M95 163L128 139 161 163M128 61V42M170 104L188 86'}, {id:'pelareth',name:'Kaladam',seed:'KALADAM',color:'#8bd4cb',symbol:'M167 77L128 52 87 77V142L128 174 167 142M128 52V174M87 110H167M104 126L128 107 151 126'}, {id:'varkesh',name:'Giedermark',seed:'GIEDERMARK',color:'#c6a4d9',symbol:'M86 62V164H167V117H127M86 62H167L142 87H106M127 117V68M127 68L178 94V148'}, {id:'orivane',name:'Kaiterhof',seed:'KAITERHOF',color:'#d6cc91',symbol:'M91 53V171M168 57L91 111 168 170M116 94L140 53 168 99M132 123V174M168 57H188'}, {id:'nivareth',name:'Sigmadraken IV',seed:'SIGMADRAKENIV',color:'#a9cee4',symbol:'M165 57H93L77 82 170 141 154 170H80M126 48V180M85 111L126 84 169 111M92 149L127 170 162 149'} ]; function art(planet){const ring=``; const letters=[...planet.seed].map((letter,index)=>{const angle=-100+index*(200/Math.max(1,planet.seed.length-1));return ``;}).join(''); return `${ring}${letters}`;} for(const planet of planets)writeFileSync(new URL(planet.id+'.svg',directory),`${planet.name} route sigil${art(planet)}`); const atlas=`VAERKRING · CELESTIAL ROUTE SIGILSFive worlds. One constellation alphabet.${planets.map((planet,index)=>`${art(planet)}${planet.name.toUpperCase()}`).join('')}dunerealms.com · Original angular ligatures · Shared website and game-menu artwork`; writeFileSync(new URL('atlas.svg',directory),atlas); const section='

VAERKRING / CELESTIAL ROUTES

Read the stars. Find your world.

Each world has an original angular route sigil, drawn from our own constellation alphabet. Match the symbol here with its icon in the planet travel menu. Labels identify destinations; the artwork does not change fares or access rules.

'+planets.map(p=>`
${p.name} route sigil
${p.name}
`).join('')+'
'; for(const name of ['arrakis.html']){const url=new URL(name,web);let html=readFileSync(url,'utf8').replace(/
/g,'').replace(/

[\s\S]*?<\/p>/g,'');html=html.replace(/(

[^<]*<\/h1>)/,'$1

Planet dial symbols →

');html=html.replace('