easy-drawsvg

"A simple plugin to create svg ele"

Usage no npm install needed!

<script type="module">
  import easyDrawsvg from 'https://cdn.skypack.dev/easy-drawsvg';
</script>

README

var fs = require('fs')
// 引入easy-drawsvg
var sbn = require('easy-drawsvg')

// 中文动作(key)
var code = `纸 95
            笔 1
            线 50 15 85 80`

fs.writeFile("sbn_drawing.svg", sbn.compile(code), function(err) {
    console.log('SVG已生成!')
})

svg 例子