Minimalistic SVG library
=========================
(TXT) SVG Logo (.svg)
Introduction
-------------
Like stated in Simple SVG in Javascript creating SVGs doesn't have to be hard. I want to take this a little further and show how to create a minimalistic SVG library in JavaScript (but any language will do).
(DIR) Simple SVG in Javascript
Usage
------
Example usage:
Which renders an SVG which contains a circle, a line and a rectangle:
The library itself
-------------------
The code is almost 15 lines.
That's all. Can you make it smaller? Faster? Better? Leaner?
Extend it
----------
Create a primitive function to take out the guessing.
Or a function to create a group element:
No more guessing?
------------------
It takes some guessing RTFM to look up the parameters. SVG isn't very consistent (x/y? cx/cy? x1/y1? dx/dy? transform? what me worry?).
To mitigate this I am currently working on a SVG library in TypeScript that takes out the guessing. A preview: esveegee . Still I think a minimalistic library like this has its place.
(DIR) esveegee
Attribution
------------
The W3C SVG Logo including a link:
(HTM)
(TXT) W3C SVG Logo (.svg)
(DIR) previous Full-text document indexing - part Ⅰ
(DIR) next Unfriendly dates
Related
--------
(DIR) [Talk] <svg> - made by thee
(TXT) SVG element (.svg)
(DIR) Elmtris
(TXT) Tetris logo inspired by the Elm logo (.svg)
(DIR) Hextris
(IMG) Hextris (.png)
(DIR) Commodore 64 emulator
(TXT) /img/fallback.svg (.svg)
(DIR) JavaScript Tetris in 1.5 kB
(IMG) jstetris.html (.png)
(DIR) My SVG knowledge
(TXT) SVG element (.svg)
(DIR) One SVG to rule them all
(TXT) SVG element (.svg)
(DIR) Creating SVG from JavaScript
(TXT) W3 SVG Logo (.svg)