This switches the rendering of the layout from using HTML and CSS to
using a canvas (technically it's two). This not only should improve the
performance but also brings the rendering in line with our native
renderers, enabling new features such as vertical resizing and
horizontal layouts. This also removes a lot of code specific to the HTML
rendering and thus greatly simplifies the codebase. There is one slight
regression in that the layout editor doesn't allow clicking and dragging
the individual components directly on the layout anymore. This is
however something we can explore directly in `livesplit-core` in the
future, so other frontends can benefit from it as well.
This allows stepping through the Rust code. `wasm-bindgen` 0.2.89 just
got released and it finally properly allows keeping the debug symbols
that Rust creates around fully. Thankfully `webpack` does not pose a
problem here and the debug symbols now properly work in Chrome, allowing
us to step through the Rust code in the developer tools.
This attempts to use the Screen Wake Lock API to prevent the screen from
turning off. This is available in iOS 16.4 now, however at least when
adding the app to the home screen as a PWA, the functionality seems to
be broken. Regardless, that's not something we can fix. We can instead
simply always try to activate it and hopefully Apple fixes the bug soon.
https://bugs.webkit.org/show_bug.cgi?id=254545
With Safari / iOS 16.4 having released, WebAssembly SIMD is now
available on all browsers. This should help with parsing performance.
While the update released just today, we do tell people to update iOS if
they haven't already, so I believe it's fine to already publish this.
https://webkit.org/blog/13966/webkit-features-in-safari-16-4/
Turns out that `wasm-bindgen` `v0.2.84` really requires us to import the
main module as that's where they now dynamically set the wasm file.
Additionally this improves our CI a little, by downloading a prebuilt
version of `wasm-bindgen-cli`.
This implements the following settings / features for the Detailed
Timer:
1. The ability to set / override the colors of the timer, segment timer,
segment name, comparison names and comparison times.
2. The ability to turn off the gradient of the timer and segment timer.
3. The ability to set the accuracy of the comparison times.
This also updates all the npm packages to their latest versions.
This updates `livesplit-core` such that we can resolve the key codes
with its built-in resolving code. Also since `livesplit-core` introduced
a `max-opt` profile, we make use of that now and on top of that also
introduce `virtual-function-elimination` for the nightly / CI builds.
This is an additional LLVM pass that tries to eliminate as many function
pointers as possible by analyzing the whole program. Locally this
reduced the size of the function pointer table from around 500 to around
400 entries. There's also a flag for using WebAssembly SIMD
instructions, as that works perfectly fine on all browsers except
Safari. Of course we won't use it for deploying until Safari supports
those instructions, but it may be useful for some local testing.
Also with this `livesplit-core` update `SpeedRunIGT` splits can now be
parsed.
We generally want the wasm file to be as compact as possible. However
because there's so many paths in Rust code that could panic, but don't
ever in practice as they are meant to signal bugs, the wasm file has to
keep around all those panic paths, and even worse, all the code for
formatting the panic messages for all those different types that could
be involved in a panic. This bloats the binary a lot. There's a nightly
feature to build the standard library as part of your compilation and
with that you can pass various features to the standard library, just
like with any other crate. And one of those features is to remove all
the formatting machinery from the panics and just immediately abort,
resulting in smaller binaries. On top of that by building the standard
library ourselves we also get to build it with all our target features,
meaning that its code will make use of all the additional WebAssembly
instructions that have been added since the MVP. So this essentially is
a big win. However this forces us to use the nightly compiler, but it
usually is actually quite stable. We won't be using any nightly features
of the language itself and only optionally use the compiler in our CI,
so the stable compiler continues to work just fine for local
development.
This adds support for hotkey modifiers, such as Ctrl, Alt, Shift and the
Meta key. On top of that I ran `npm update` to truly update all the
packages to their latest semver compatible versions, which `dependabot`
doesn't seem to do for us. This also includes other updates in
`livesplit-core` that were done since the last update, such as the
precise formatting and parsing of the time stamps.
This updates all the remaining dependencies that I was able to update.
React is still at version 16 because some of the components I use
apparently haven't been updated to support more recent versions of
React.