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

3.1.6 • Public • Published

Main Coverage Status License: MIT

okageo

Tools of Geometry and SVG.

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

# serve demo at localhost:1234
$ yarn demo

publish

Create new release on Github.

Readme

Keywords

Package Sidebar

Install

npm i okageo

Weekly Downloads

42

Version

3.1.6

License

MIT

Unpacked Size

1.7 MB

Total Files

29

Last publish

Collaborators

  • miyanokomiya