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: 6 months 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 (about 13 years ago)
- Default Branch: master
- Last Pushed: 2013-01-03T18:34:01.000Z (about 13 years ago)
- Last Synced: 2025-02-05T21:55:26.208Z (about 1 year 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();
```