Fixing ugly canvas. now full browser window, fixing dpi blurry issue
This commit is contained in:
parent
86996ed4ef
commit
58715f42bf
4 changed files with 45 additions and 11 deletions
10
src/main.ts
10
src/main.ts
|
|
@ -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');
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue