1.0.1 • Published 9 years ago

shapes.js v1.0.1

Weekly downloads
4
License
MIT
Repository
github
Last release
9 years ago

shapes.js

logo

stable

A creator for div with different shapes!

var Shapes = require('shapes.js');

var shapes = new Shapes();

//Creating a Triangle
var triangle = shapes.triangle({color: '#000333', size:'100px'});  
document.body.appendChild(triangle)  
  
//Creating a Square  
var square = shapes.square({color: '#0000ff', size:'100px', border:{width:'100px', color:'#ff0000', style: 'solid'}});  
document.body.appendChild(square)  

//Creating a Circle...
var circle = shapes.circle({color: '#000333', size:'100px', border:{width:'100px', color:'#ff0000', style: 'solid'}});
document.body.appendChild(circle)  
  
  
//NOTE: All options are optional, except for the size.

Future stuff...

I´m going to add rotation for all shapes!
... and maybe came with new shapes :)

Usage

NPM