-
var_float
A universal representation of IEEE 754 floating-point numbers convertible between arbitrary precisions.
-
SurveyJS
Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
-
KeenWrite
Discontinued Free, open-source, cross-platform desktop Markdown text editor with live preview, string interpolation, and math.
-
togetherness
A virtual and 🕊liberated🕊 tabletop. Make, play, and share your tabletop games with dice, cards, tokens, and more.
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
There's existing variable-length binary number formats [1] that already exist. SVG already has so many variable-length things in it that the downsides would probably be insignificant.
I don't know if any of the existing Protobuf-like things have these built in, though. I know some of them have variable integers in them but I don't know about variable floats.
[1] https://github.com/regexident/var_float
> If you need to generate basic shapes it's fairly straightforward.
You'd think so. While integrating TeX into my editor[0], using JMathTeX[1] as a starting point, I wanted to convert font glyphs to font paths. At the time, every Java-based SVG renderer (Batik, JFreeSVG, SVG Salamander) suffered from the exact same performance problem: they all used Java's DecimalFormat class to convert floating point numbers to strings. These strings were then concatenated as paths into the output document. Sometimes the strings were re-copied numerous times because of buffer re-allocations and other reasons. (My series on developing a TeX-oriented text editor covers this in more details in part 4, which will be out soon.[2])
To get great performance---in Java, at least---even to generate basic shapes requires a few things. First, a sufficiently large, reusable buffer that doesn't incur memory re-allocations. Second, using the Ryu algorithm[3] to convert floats to strings. See my implementation that converts glyph paths to SVG paths for details[4].
[0]: https://github.com/DaveJarvis/keenwrite (my editor)
[1]: https://github.com/DaveJarvis/JMathTeX/ (my fork)
[2]: https://bell-sw.com/announcements/2020/11/02/TeXnical-Writin... (my blog series)
[3]: https://github.com/ulfjack/ryu
[4]: https://github.com/DaveJarvis/JMathTeX/blob/d2d678717505765b...
I thought about migrating Radial Menu [1] to SVG once, after 1 hour fiddling with the code I kinda gave up. What a mess. I remember reading somewhere "if you are coming from canvas programming, you might find drawing a circle counter intuitive" - yeah, I did.
1 - https://github.com/victorqribeiro/radialMenu
Here's a full-on dice roller / Virtual Tabletop that takes advantage of this: https://github.com/sjbrown/togetherness
Take a look at SVG Injection. This may solve your problems, as the injector will add a unique id to your SVG:
https://github.com/iconfu/svg-inject
Along those lines, I recently encountered this project that enables the use of SVG to design maps etc for games developed with the Rust language game engine Bevy: https://github.com/carrascomj/bevy_svg_map
"The properties of the lines (color, opacity, fill...) can be used to programmatically add functionality..."