Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/phawk/js-rect-example
- Owner: phawk
- Created: 2013-01-03T17:31:19.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2013-01-03T18:34:01.000Z (almost 12 years ago)
- Last Synced: 2024-10-25T01:39:32.492Z (2 months ago)
- Language: JavaScript
- Size: 148 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
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();
```