feat: add Paper Routes and package five design systems

Add the paper direction with thin tracks, outlined hexagons and line arrows, without exterior color markers or piece numbers. Add a unified catalog for five designs and their 25 themes, with direct review links.

Organize each design into an authored design.md, generated tokens.json and preview. Add Agent routing, shared integration guidance, a machine-readable manifest and an executable rendering example. Preserve legacy preview and document links.

Validation: 16 focused design, theme and package tests passed; npm run design and static build passed. Confirmed all eight authored documents survive generation unchanged. Browser checks covered mobile, tablet and desktop layouts, theme links and migrated previews. Native engine integration and visual verification remain pending.
This commit is contained in:
cabinw
2026-09-13 13:24:34 +08:00
parent e32a1616be
commit 10cf93a324
52 changed files with 3365 additions and 149 deletions
+9
View File
@@ -1,8 +1,17 @@
import { roundedHex } from './tile-shape.js';
import { hexPoints } from './path-math.js';
export function tint(hex,amount){return '#'+hex.slice(1).match(/../g).map(v=>Math.round(amount>=0?parseInt(v,16)+(255-parseInt(v,16))*amount:parseInt(v,16)*(1+amount)).toString(16).padStart(2,'0')).join('');}
export function drawStyledToken(p,x,y,r,tile,angle){
const fill=tile.fill,ink='#263A3A';
if(!fill||!tile.artStyle||tile.artStyle==='classic')return false;
if(tile.artStyle==='paper'){
const face=hexPoints(x,y,r),unit=r/.88;
p.polygon(face,fill);p.line([...face,face[0]],'#FFFFFFCC',unit*.035);
const rotate=points=>points.map(([u,v])=>({x:x+unit*(u*Math.cos(angle)-v*Math.sin(angle)),y:y+unit*(u*Math.sin(angle)+v*Math.cos(angle))}));
p.line(rotate([[-.3,0],[.3,0]]),tile.arrow,unit*.09);
p.line(rotate([[.08,-.17],[.3,0],[.08,.17]]),tile.arrow,unit*.09);
return true;
}
const face=roundedHex(x,y,r*.94),closed=[...face,face[0]];
let arrowY=y,arrowScale=.58;
if(tile.artStyle==='vivid'){