test: lower canvas size
This commit is contained in:
@ -8,8 +8,8 @@ const handleResize = (canvas: HTMLCanvasElement) => {
|
|||||||
const dpr = window.devicePixelRatio || 1;
|
const dpr = window.devicePixelRatio || 1;
|
||||||
|
|
||||||
// Assuming the canvas takes up the whole window
|
// Assuming the canvas takes up the whole window
|
||||||
canvas.width = window.innerWidth * dpr;
|
canvas.width = window.innerWidth * dpr * 0.25;
|
||||||
canvas.height = window.innerHeight * dpr;
|
canvas.height = window.innerHeight * dpr * 0.25;
|
||||||
|
|
||||||
if (ctx) {
|
if (ctx) {
|
||||||
ctx.scale(dpr, dpr);
|
ctx.scale(dpr, dpr);
|
||||||
|
|||||||
@ -510,11 +510,11 @@ export class Editor {
|
|||||||
const dpr = window.devicePixelRatio || 1;
|
const dpr = window.devicePixelRatio || 1;
|
||||||
|
|
||||||
// Assuming the canvas takes up the whole window
|
// Assuming the canvas takes up the whole window
|
||||||
canvas.width = window.innerWidth * dpr;
|
canvas.width = window.innerWidth * dpr * 0.25;
|
||||||
canvas.height = window.innerHeight * dpr;
|
canvas.height = window.innerHeight * dpr * 0.25;
|
||||||
|
|
||||||
if (ctx) {
|
if (ctx) {
|
||||||
ctx.scale(dpr, dpr);
|
ctx.scale(dpr * 0.5, dpr * 0.5);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user