731046d1f7
update example brushes; add builtin/dashes
2025-07-01 00:57:01 +02:00
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
15a1bf8036
make context menus appear above resize handles
...
i kinda hate how shoddy this has to be
2025-06-28 23:51:52 +02:00
d5e2fbd0cf
add scrollbar to error panel
2025-06-28 10:51:00 +02:00
1d2f98348f
add a bit of padding to the error box
2025-06-28 09:40:18 +02:00
0ddc42c00f
sidebar layout
...
switch the app from floating panels to a static sidebar on the right with resizable tools
expect more layout bugs from now on
2025-06-27 23:24:09 +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
a40480a464
add interpolation to cursor reticles
...
cursor reticles are now interpolated to the update interval, so they should be smooth at > 60 fps
2025-06-26 18:48:48 +02:00
bebc2daa95
alter color selection algorithm
...
it should be more fair i think. maybe
2025-06-26 18:48:28 +02:00
d445eb9915
debounce updateUrl; make debounce always execute a function call after at least one is dropped
...
this should also fix the issue where the cursor position sometimes ends up at the wrong position after you stop moving
2025-06-26 17:33:25 +02:00
2a783aba71
make zooming zoom toward the mouse cursor
2025-06-26 17:18:52 +02:00
385a691e3e
make the brush discard dialogue more clear
...
change text from 'Yes' to 'Discard changes and switch brush'
2025-06-26 01:22:15 +02:00
7a52dbebd0
fix some rough edges around stack traces
...
hide irrelevant CallFrames
fix span info for the implicit stack frame
2025-06-25 21:11:02 +02:00
e49885c83a
stack traces in the brush editor
...
after 35 thousand years it's finally here
good erro message
2025-06-25 20:51:45 +02:00
c1612b2a94
brush picker!
2025-06-19 13:48:12 +02:00
9b82b211b4
hide brush cost gauges if they're irrelevant
2025-06-17 00:18:48 +02:00
8b464d50f4
haku: more cleanups: remove old unused VM
...
also remove some leftover TODOs
2025-06-16 18:57:51 +02:00
c80cd1c7fe
haku1 API cleanups (removing 2 suffix)
2025-06-16 18:34:28 +02:00
00a48527ca
haku2: add stats + fix crash w uninit vm
2025-06-16 16:40:01 +02:00
e667c6336a
haku2: on the client
...
resource indicators are currently unimplemented
2025-06-15 21:30:37 +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
2b924c3efb
make squigglies render themselves correctly over multiple lines
...
turns out there was a stupid typo, and the diagnostic's firstLine was == its lastLine
2025-05-26 21:53:03 +02:00
6b82593414
add zoom indicator in lower left corner ( #39 )
...
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.
2025-05-26 20:23:26 +02:00
c4f6f80166
make Backspace delete the current selection correctly ( #108 )
2025-05-26 19:07:44 +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
273eaa6ce3
docs.css: fix the size of the left grid column
2024-10-25 23:36:54 +02:00
dd955b0649
code-editor: make Backspace remove full indents at the start of a line
2024-10-25 23:08:12 +02:00
10d384f3d7
brush-cost: prevent percentage values from overflowing
2024-10-25 21:46:05 +02:00
913d65b0a8
implement brush cost gauges
...
they're a little ugly at the moment, and can be a little useless for most simple brushes, but whatever we'll make them better later
2024-10-25 21:39:53 +02:00
718e574d3a
fix broken defaultBrush
in editor
...
JS interprets escape sequences in backtick literals
2024-10-23 21:21:09 +02:00
37ff06c704
remove unneeded console.log
2024-10-23 19:45:58 +02:00
d6bb4e9911
make code examples horizontally scrollable
2024-10-23 19:45:39 +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
8356b6c750
fix compilation errors not setting error flag in brush preview
2024-09-08 12:12:45 +02:00
37520f34f7
add brush preview
2024-09-08 12:09:21 +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
3cd0d4afb5
fix code editor gutter sizing
2024-09-05 22:13:19 +02:00
92e3b8fcb7
add line numbers to code editor
...
this is the sort of fancy stuff we can do now
2024-09-05 22:06:02 +02:00
09a81ec032
fix brush editor not saving your brush
2024-09-05 22:05:44 +02:00
b8d6b3edb3
introduce new code editor with support for extra shortcuts such as Tab
for indenting/unindenting lines
...
I'm sure this will yield _lots_ of bugs in the long run, but it's also a really exciting thing to have.
2024-09-05 21:30:47 +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
9b190165ff
fix resize handle setting the default size to NaN
...
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.
2024-09-04 20:39:48 +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
8f69552b02
resize the brush editor's text area whenever the brush editor is resized
...
this can now happen if you use the resize handle
2024-09-03 23:13:00 +02:00
a924147e26
force font size to 14px in the app
...
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
2024-09-03 22:58:08 +02:00
255511ac16
give the brush editor resize handle a maximum size
...
this is to prevent the size from going negative, which fucks a lot of things up (you end up not being able to drag it anymore 💀 )
2024-09-03 22:53:55 +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
bfbde0dee3
simplify CSS rules for brush editor overflow
2024-09-03 22:42:09 +02:00
5b22a50036
fix overflow in brush editor
2024-09-03 22:40:08 +02:00
83754a0282
new! fast! WebGL renderer
2024-09-03 22:16:40 +02:00