jondot/logolang.org

Implement an SVG renderer and download sketch

Open

#6 创建于 2023年1月9日

在 GitHub 查看
 (0 评论) (0 反应) (0 负责人)TypeScript (0 fork)github user discovery
Reactgood first issue🦀 Rust

仓库指标

Star
 (11 star)
PR 合并指标
 (PR 指标待抓取)

描述

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

贡献者指南