the goal is to rewrite haku completely, starting with the VM---because it was the most obvious point of improvement
the reason is because Rust is kinda too verbose for low level stuff like this. compare the line numbers between haku1 and haku2's VM and how verbose those lines are, and it's kind of an insane difference
it also feels like Zig's compilation model can work better for small wasm binary sizes
and of course, I also just wanted an excuse to try out Zig :3
what was happening is we were setting style.width and style.height which overrode the styles from CSS that gave us the BoundingClientRect from which we were calculating the canvas size
I also added a sendViewportUpdate to prevent chunk jank
it looks like this:
- 3200% +
I'm giving up on the 100% zoom button from the original idea, because rkgk's scaling curve makes it easy to go back to 100% if you need to.
the main canvas is now DPI-aware; it should no longer be pixelated on 4k
this couldn't be done for the brush preview, so it's just kinda pixelated
also fixed the horrendous scrollbar that could appear on HiDPI for some reason
this can occur if tiny_skia decides it doesn't like the path (e.g. circle with negative radius)
i don't really care to render these since they're degenerate cases anyways
my VPS has 8 gigabytes of RAM. it's not exactly out of the question to buy a larger one, and in the future we could just, y'know, not preallocate _all_ the memory, and instead reallocate if a certain threshold is reached
parser events don't take up enough memory to warrant a stricter limit.
I do wonder if this limit is actually reachable with a 65536 character limit though.
for faster load times, and seamless updates.
because for some reason ServeDir can't do it correctly, and it tells the client "yeah hey nothing changed" even if something changed
I hate NaN
I hate NaN
I hate NaN
I hate NaN
I hate NaN
I hate NaN
I hate NaN
can someone put a NaN to good use for once and store a pointer to some helpful metadata in it.
please.
I beg you.
I've been (hotly) debating this with myself today and I _think_ this is the right decision for an app.
note that I'm not changing the font size in the docs; that I think is valuable to have be user-controllable, but I'd really prefer if users would see the app the way _I_ design it to look