Commit graph

46 commits

Author SHA1 Message Date
liquidex 8356b6c750 fix compilation errors not setting error flag in brush preview 2024-09-08 12:12:45 +02:00
liquidex 37520f34f7 add brush preview 2024-09-08 12:09:21 +02:00
liquidex 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
liquidex 3cd0d4afb5 fix code editor gutter sizing 2024-09-05 22:13:19 +02:00
liquidex 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
liquidex 09a81ec032 fix brush editor not saving your brush 2024-09-05 22:05:44 +02:00
liquidex 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
liquidex 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
liquidex 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
liquidex 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
liquidex 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
liquidex 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
liquidex 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
liquidex 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
liquidex bfbde0dee3 simplify CSS rules for brush editor overflow 2024-09-03 22:42:09 +02:00
liquidex 5b22a50036 fix overflow in brush editor 2024-09-03 22:40:08 +02:00
liquidex 83754a0282 new! fast! WebGL renderer 2024-09-03 22:16:40 +02:00
liquidex bf4d538651 add ping/pong between client and server
the purpose of this is to hopefully prevent nginx from reaping the connection, since there's data flowing through it every so often
2024-09-02 23:17:35 +02:00
liquidex b3911b7af1 add resize handle to brush editor 2024-09-02 22:38:12 +02:00
liquidex 26d3b8ed8a add a lot more logging to both client and server to analyze #81
> #81 Compiling brush doesn't seem to finish correctly sometimes, which causes loss of data
> Sometimes it seems like the client state can get desynced (server render thread dies due to a panic?) and then the server starts dropping all requests for drawing the brush.
> These panics should never happen of course, but we need better logging first to determine the exact cause.
2024-09-02 20:15:28 +02:00
liquidex 6cfbc4f05f fix nickname in cursor reticle being able to wrap onto multiple lines 2024-09-01 20:03:04 +02:00
liquidex d1a6fb364e fix more syntax v2 bugs, update docs 2024-09-01 18:55:16 +02:00
liquidex bf37d7305c update default brush
I started updating the docs but v2 is really not ready for general use yet (we're missing lists!)
2024-09-01 10:09:53 +02:00
liquidex a3e5e8bd10 change fonts to Atkinson Hyperlegible and a custom-built variant of Iosevka 2024-08-27 20:44:39 +02:00
liquidex ca25f27b4b fix horizontal scrollbar in docs
maybe putting domain-specific rules in your shared css doesn't make sense
2024-08-27 14:24:18 +02:00
liquidex 3380498441 add a menu bar; and also a favicon because there's now a logo 2024-08-27 14:13:19 +02:00
liquidex 879d17d904 docs; rendering docs from .dj to .html
still no in-app link to these docs though
2024-08-26 23:26:03 +02:00
liquidex 8aa38ae4c4 change layout of brush editor side panel to limit its height and scroll when it gets too big 2024-08-25 14:37:20 +02:00
liquidex 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
liquidex 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
liquidex 0d831698e2 add proper error and disconnect handling
error handling shows you the error and offers the ability to reload;
disconnect handling shows you that the page will reload in a few seconds.
it uses exponential backoff with some random sprinkled into it to prevent overwhelming the server once people's clients decide to reconnect.
2024-08-25 12:55:07 +02:00
liquidex 84abba3e0b add loading screens instead of dropping the user into an app that's not ready to use 2024-08-25 00:06:49 +02:00
liquidex 7f78d0ce1b remove some leftover code 2024-08-24 22:03:23 +02:00
liquidex ba89b6eb04 fix haku-wasm/haku.js errors not resetting properly sometimes 2024-08-24 18:40:33 +02:00
liquidex 4761fd40ba fix sizing of the brush-editor textarea 2024-08-24 17:54:59 +02:00
liquidex 3a438359c3 replace the accursed contenteditable text box with an ordinary textarea
you could paste discord convos into it.

discord.
conversations.
and they'd render.
like in Discord.

lmao.

I still do wonder how to do syntax highlighting on it, but I've seen prism-code-editor, which I _think_ hides the textarea's text and overlays a non user-interactable syntax highlighted version on top.
what's cool is that we could theoretically have many such overlays - for things like highlights too
but we'll see how that goes
2024-08-24 17:50:06 +02:00
liquidex be6a47ae13 user authentication through a secret token (NOT AUDITED FOR SECURITY. DO NOT RELY ON THIS CODE.)
it's probably okay, but it's incredibly easy to read localStorage from the frontend and get a hold of the secret
would be nice (would it?) to have more proper session tokens I guess but we're not doing that right now

I'm not entirely sure if generating the password on the server is legit like this, but it leads to an incredibly frictionless experience and I'd like to keep it. if possible.
I don't really see a difference compared to password managers generating passwords for you and showing them in plaintext
obviously actual passwords are stored within the manager which requires a master password, but like. do we really need that. the secret isn't shown to the user and it's very long.
too bad the browser secure storage API or whatever isn't ready yet
2024-08-23 19:50:42 +02:00
liquidex 6ce1389d12 replace console.info with console.debug for received chunk data 2024-08-22 21:50:26 +02:00
liquidex 4ebd150e59 add some logs, fix frontend memory leak with users not deallocating their haku
closes #28
2024-08-22 21:39:31 +02:00
liquidex 1c0fa7197c rudimentary error reporting 2024-08-20 23:00:29 +02:00
liquidex 6eab20bb25 disable image smoothing, add support for wall fragment urls 2024-08-19 23:56:03 +02:00
liquidex 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
liquidex 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
liquidex 2f7bcbb14e sync 2024-08-17 22:16:21 +02:00
liquidex 26ba098183 a whole load of work in progress 2024-08-15 20:01:10 +02:00
liquidex caec0b8ac9 initial commit 2024-08-10 23:10:22 +02:00