Commit graph

18 commits

Author SHA1 Message Date
bff899c9c0 removing server-side brush rendering
brush rendering is now completely client-side.
the server only receives edits the client would like to do, in the form of PNG images of chunks, that are then composited onto the wall

known issue: it is possible to brush up against the current 256 chunk edit limit pretty easily.
I'm not sure it can be solved very easily though. the perfect solution would involve splitting up the interaction into multiple edits, and I tried to do that, but there's a noticable stutter for some reason that I haven't managed to track down yet.
so it'll be kinda crap for the time being.
2025-06-30 18:55:53 +02:00
b4acab2c9c fix jank when moving the mouse cursor outside the canvas
mouse events are now consistently sourced from the window, so if you try to draw and move your mouse over the panel, it won't glitch out
2025-06-26 18:54:28 +02:00
2a783aba71 make zooming zoom toward the mouse cursor 2025-06-26 17:18:52 +02:00
598c0348f6 fix viewport shrinking permanently (#113)
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
2025-05-27 22:25:30 +02:00
39886291cf HiDPI support
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
2025-05-25 21:26:21 +02:00
5b7d9586ea introduce tags, structs, and reticles
this was meant to be split into smaller changes, but I realised I edited my existing revision too late.
2024-10-22 21:39:04 +02:00
ec773b7fe1 add error squiggles to brush editor
gosh I hate this code. CSS custom highlight API when, pleeeeeease Firefooooox
2024-09-06 22:51:19 +02:00
5e6b84bed5 cache busting
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
2024-09-04 21:50:30 +02:00
17f3f573b5 shader optimizations
- make the shader not compile for over a minute on Windows
- stop calculating matrices inside the shader, per vertex
2024-09-04 20:37:40 +02:00
740a62447e make canvas dragging a bit snappier by calculating the drag delta ourselves
I'm really thankful for `listen` here.
it makes this sort of logic super easy without having to add class fields.
2024-09-03 22:52:35 +02:00
83754a0282 new! fast! WebGL renderer 2024-09-03 22:16:40 +02:00
7465913944 make the app listen to hashchange and move the viewport accordingly, or reload the page when the wall changes 2024-08-25 14:15:24 +02:00
b1ee244eaa add option to pan with right mouse button instead of left mouse button
this is quite common in other apps with an infinite canvas - such as Miro
also on laptops middle-clicking is a pain in the ass, though we should add more proper touchpad support for that case
2024-08-25 14:06:46 +02:00
6eab20bb25 disable image smoothing, add support for wall fragment urls 2024-08-19 23:56:03 +02:00
70e979057c persistence in database
only maybe a little bit shitty but it works very well
still needs chunk unloading
2024-08-19 22:39:22 +02:00
2594afcc1b a more robust system for syncing chunks
as long as the server tells you there are more chunks, there are definitely more chunks.
just wait for them a bit.
2024-08-18 12:28:19 +02:00
2f7bcbb14e sync 2024-08-17 22:16:21 +02:00
26ba098183 a whole load of work in progress 2024-08-15 20:01:10 +02:00