Fixing ugly canvas. now full browser window, fixing dpi blurry issue

This commit is contained in:
Dustin Swan 2026-02-03 13:28:20 -07:00
parent 86996ed4ef
commit 58715f42bf
No known key found for this signature in database
GPG key ID: 30D46587E2100467
4 changed files with 45 additions and 11 deletions

View file

@ -13,10 +13,7 @@ import textInputCode from './textinput-test.cg?raw';
import testCode from './test.cg?raw';
import counterApp from './counter.cg?raw';
const canvas = document.createElement('canvas');
canvas.width = 800;
canvas.height = 600;
canvas.style.border = "1px solid #000";
const canvas = document.createElement('canvas') as HTMLCanvasElement;
document.body.appendChild(canvas);
const cgCode = stdlibCode + '\n' + designTokensCode + '\n' + uiComponentsCode + '\n' + textInputCode;
@ -27,13 +24,8 @@ const ast = parser.parse();
console.log(ast);
const env: Env = new Map(Object.entries(builtins));
// const res = evaluate(ast, env);
// console.log(res);
const appRecord = evaluate(ast, env);
console.log(appRecord);
if (appRecord.kind !== 'record')
throw new Error('Expected record');