Back to Body Journal
SOURCE / PINNED RELEASE

Made of little things.

Body Journal

Release
e8049f8da4e2…
Author-recorded commit
61c04bf0e8aa…
License
LICENSE
Author’s source reference
nostr://npub182jczunncwe0jn6frpqwq3e0qjws7yqqnc3auccqv9nte2dnd63scjm4rf/wss%3A%2F%2Fgit.napplet.soy%2F/n-6c4554844c7

Archive hash verified: 4369d778da046a8b…. The source-to-build association is the author’s claim; it has not been independently rebuilt.

src/vision-challenge.ts
export function visionChallenge():{image:string;answer:string} {
  const alphabet='ABCDEFGHJKLMNPQRSTUVWXYZ23456789';
  const answer=Array.from(crypto.getRandomValues(new Uint8Array(6)),n=>alphabet[n%alphabet.length]).join('');
  const canvas=document.createElement('canvas'); canvas.width=360;canvas.height=120;
  const ctx=canvas.getContext('2d'); if(!ctx) throw new Error('Image testing is unavailable in this browser.');
  ctx.fillStyle='#fff';ctx.fillRect(0,0,360,120);ctx.fillStyle='#111';ctx.font='bold 54px monospace';ctx.textAlign='center';ctx.textBaseline='middle';ctx.fillText(answer,180,60);
  return {image:canvas.toDataURL('image/png'),answer};
}