I'm trying to make a website that uses fabric js and have gotten some errors that suggest that I have too many canvases. It says "Total canvas memory use exceeds the maximum limit (480 MB)". So I'm trying to figure out a way to reduce the size of the canvases.
How can I make a very large fabric js canvas (eg the whole page) but with very low resolution? Basically, so it looks like MS Paint (I don't care at all about image quality). Eg if I set the width to 1px and the height to 1px and clicked on my page the whole page would just look black.
I tried to set the dimensions of the canvas really low like this:
canvas.setDimensions({
"width": 10,
"height": 10
});
and then in my css file make the canvas element really big, like so:
#canvas {
width: 1000px;
height: 1000px;
}
but the css does nothing and the canvas stays small.
I tried searching and couldn't find exactly what I was trying to achieve.