Napping Panda Missionaries

    okageo
    TypeScript icon, indicating that this package has built-in type declarations

    3.0.1 • Public • Published

    Main Coverage Status License: MIT

    okageo

    parse SVG to polygons

    demo(wip)

    https://miyanokomiya.github.io/okageo/

    usage

    yarn add okageo
    import * as okageo from 'okageo'
    
    // parse SVG to polygons
    const pathInfoList = okageo.parseSvgGraphicsStr(svgString)
    
    // move and resize
    const canvas = document.getElementById('canvas')
    const inRectList = okageo.fitRect(pathInfoList, 0, 0, canvas.width, canvas.height)
    
    // draw
    const ctx = canvas.getContext('2d')
    inRectList.forEach((info) => okageo.draw(ctx, info))

    commnad

    # install dependencies
    $ yarn install
    
    # lint
    $ yarn lint
    
    # test
    $ yarn test [--watch]
    
    # build
    $ yarn build
    
    # generate doc
    $ yarn doc
    
    # serve demo at localhost:1234
    $ yarn demo

    publish

    Update version in package.json, commit with a comment Release x.x.x and merge into the main branch.

    Keywords

    Install

    npm i okageo

    DownloadsWeekly Downloads

    111

    Version

    3.0.1

    License

    MIT

    Unpacked Size

    222 kB

    Total Files

    41

    Last publish

    Collaborators

    • miyanokomiya