jondot/logolang.org

Implement an SVG renderer and download sketch

Open

#6 aberto em 9 de jan. de 2023

Ver no GitHub
 (0 comments) (0 reactions) (0 assignees)TypeScript (0 forks)github user discovery
Reactgood first issue🦀 Rust

Métricas do repositório

Stars
 (11 stars)
Métricas de merge de PR
 (Métricas PR pendentes)

Description

To support downloading sketches and using them in professional scenarios, we can render to SVG easily (its quite like canvas anyway).

This task is open ended because you can do it in two ways:

  • Do it on the Rust side (build SVG from a Vec of commands), just make sure WASM is happy about it (wasm size, and compatible SVG building library if you choose not to do it by hand)
  • Do it on the JS side, where you use run and not draw on the Rust API, and you'll get an array of commands, from there, you just build an SVG. You can use the js-canvas renderer as a reference.

I believe in such a way, there's no need to draw the arrow head, so that makes it even easier.

Lastly, to use this, just add a "download" button on the toolbar

Guia do colaborador