Skip to content

Latest commit

 

History

History
23 lines (15 loc) · 546 Bytes

README.md

File metadata and controls

23 lines (15 loc) · 546 Bytes

SVG-Importer

This is a tool import a svg in the urpflanze scene

Install with npm

npm i -S @urpflanze/svg-importer

Import SVGImporter:

import { Scene } from '@urpflanze/core'
import { SVGImporter } from '@urpflanze/svg-importer'
// or const { SVGImporter } = require('@urpflanze/svg-importer')

const scene = new Urpflanze.Scene()

const imported = SVGImporter.parse(`<svg>...</svg>` /*, sideLength: 50, simplify = 0.01*/) // ShapeBuffer or Shape

scene.add(imported)