|
|
|
|
|
by emmanueloga_
2009 days ago
|
|
This looks amazing. Can the author explain the implementation choices? * Why WASM? * Why Canvas? From what I could see, it seems to repaint the whole canvas every frame, so I'm guessing this uses a custom implementation of immediate mode GUI. |
|
Why WASM:
One of the primary goal of NoteCalc is to be easily accessible (e.g. it was mainly born because Soulver is MacOS only). So the browser-based client was obvious choice, and I chosed WASM for
- performance reasons
- to be able to use rust
- to avoid as much JS (and related technologies) as possible
Why Canvas:
I answered here: https://github.com/bbodi/notecalc3/issues/6#issuecomment-749...
In a previous versions, only the changed areas were re-rendered, but the code was much more complex and error-prone, and it did not bring any performance improvement, so now I just rerender everything, still excellent performance but much simpler code. However this is different for calculations, only changed/affected lines are reparsed and recalculated.