0.1.0 • Published 6 years ago

bs-geometric-forms v0.1.0

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

bs-geometric-forms

NPM

Installation

npm i bs-geometric-forms

Usage

const { rectangle } = require('bs-geometric-forms');

const svg = d3.select('#app').append('svg');

const xPosition = 0;
const yPosition = 0;
const width = 100;
const height = 200;

svg.attr('height', 400);
svg.attr('width', 400);

rectangle(xPosition, yPosition, width, height, svg);

Example

npm run example then go to http://localhost:1234

Feature list

This package allow you to create the following forms:

  • Rectangle via rectangle function
  • Circle via circle function
  • Line via line function
  • Arc via arc function