Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/phawk/js-rect-example

A tutorial on architecture on my blog. http://phawk.co.uk
https://github.com/phawk/js-rect-example

Last synced: 14 days ago
JSON representation

A tutorial on architecture on my blog. http://phawk.co.uk

Awesome Lists containing this project

README

        

# JS Rect object

Used to create coloured rectangles in the browser. This is a sample project build for a blog article on [my Architecture process]().

## Usage

```js
// Short form
var rect = new Rect(100, 100, 'red');
rect.position(50, 50);
rect.show();
rect.hide();

// Long form
var rect = new Rect();
rect.size(100, 100);
rect.color('red');
rect.position(50, 50);
rect.show();
rect.hide();
```