Comment by nequo

2 years ago

Yeah, the "draw_car" snippet quoted by parent is from the JS file that you linked.

It looks like maybe an SVG file converted into JS? Do you know if there is some standard tooling that generates this?

SVG paths translate pretty directly to canvas commands. If you have an SVG path parser, it's pretty straightforward to walk it and output the equivalent js.

  • But for that many paths it seems... tedious. Wondering if they had a better way.