Skip to content

Commit

Permalink
Refactor the project with CommonJS module style
Browse files Browse the repository at this point in the history
  • Loading branch information
nosir committed Apr 16, 2016
1 parent 637096a commit f072e7e
Show file tree
Hide file tree
Showing 50 changed files with 4,324 additions and 4,360 deletions.
Empty file added .travis.yml
Empty file.
56 changes: 0 additions & 56 deletions Gruntfile.js

This file was deleted.

26 changes: 7 additions & 19 deletions LICENSE
@@ -1,20 +1,8 @@
The MIT License (MIT)
/*!
* obelisk.js - <%= version %>
* https://github.com/nosir/obelisk.js
* MIT licensed
*
* Copyright (C) 2012-2016 Max Huang https://github.com/nosir/
*/

Copyright (c) 2013 Max Huang

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
53 changes: 38 additions & 15 deletions README.md
Expand Up @@ -2,17 +2,20 @@

Obelisk.js is a JavaScript library for building isometric pixel objects.

With the simple and flexible API provided by it, you can easily add isometric pixel element like brick, cube, pyramid, slope onto HTML5 canvas. Obelisk.js strictly follows the pixel neat pattern: lines with 1:2 pixel dot arrangement, leading to an angle of 22.6 degrees.
With the simple and flexible API provided, you can easily add isometric pixel elements like brick, cube, pyramid and slope in HTML5 canvas. Obelisk.js strictly follows pixel neat pattern: lines with 1:2 pixel dot arrangement, leading to an angle of 22.6 degrees.

Also you should know obelisk.js is not for vector isometric graphics drawing. In fact it is not using any canvas graphic drawing API, instead, it manipulates all the things in pixel level to obtain precise pixel arrangement. Just try it out to pixelate something. Have fun.
Also you should know obelisk.js is not for vector isometric graphics drawing and rendering. Internally it does not use any canvas graphic drawing API, instead, it manipulates all the rendering in pixel level to obtain precise pixel arrangement. Just try it out to pixelate something. Have fun.

<img width="112" height="109" src="http://nosir.github.io/obelisk.js/images/logo.png"/>

## 1.2.0 Release
The newest version is written by CommonJS style, which means you can easily use it in browserify project. [See details here](#Development)

## Showcase

Origin:
- GIF Animation Rendering: http://codepen.io/nosir/details/mdiHe (Safari only)
- Input Text Rendering: http://codepen.io/nosir/details/IxBJn
- GIF Animation Rendering: http://codepen.io/nosir/details/mdiHe (Safari only)
- Pixel Isometirc Flappy Bird: http://codepen.io/nosir/details/rzaLA
- Cube Generator: http://codepen.io/nosir/details/ganrh

Expand Down Expand Up @@ -70,7 +73,37 @@ Sample code for building all primitives:
- SideX, SideY: http://jsfiddle.net/nosir/bLsew/
- SlopeNorth, SlopeEast, SlopeSouth, SlopeEast: http://jsfiddle.net/nosir/28B9G/

## Advanced Usage
## Development (Browser)
### Browserify

obelisk.js can be used from [browserify](https://github.com/substack/node-browserify) project. Simply:

```sh
$ npm install obelisk.js
```

```js
var obelisk = require('obelisk.js');
```

### Want to build the project locally?

```
$ git clone https://github.com/nosir/obelisk.js.git
$ npm install
```

Build
```
$ gulp build
```

Develop
```
$ gulp browserify:watch
```

## Advanced Usage (Node.js)
### Node.js

Also you can use it in your Node.js canvas project
Expand Down Expand Up @@ -106,16 +139,6 @@ canvas.createPNGStream().pipe(fs.createWriteStream('./figure.png'));

For more details, check the [Node.js Canvas example](https://github.com/pose/node-obelisk-example).

### Browserify

obelisk.js can also be used from a [browserify](https://github.com/substack/node-browserify) project. Simply:

```js
var obelisk = require('obelisk.js');
console.log(obelisk.Point)
// > function Point() { }
```

## Get in Touch

- Build any cool stuff? Please feel free to add it here: [User Contributed Showcase](https://github.com/nosir/obelisk.js/wiki/User-Contributed-Showcase)
Expand All @@ -124,7 +147,7 @@ console.log(obelisk.Point)

## Changelog

See details in the [release notes](https://github.com/nosir/obelisk.js/releases).
See details here: [release notes](https://github.com/nosir/obelisk.js/releases).

## References
Pixel art is a form of digital art, where images are edited and displayed on the pixel level. The isometric projection is commonly seen in games to provide a 3D view without using any real 3D processing.
Expand Down
9 changes: 5 additions & 4 deletions bower.json
Expand Up @@ -2,10 +2,10 @@
"name":"obelisk.js",
"homepage":"https://github.com/nosir/obelisk.js",
"authors":[
"max huang risonhuang@gmail.com"
"Max Huang risonhuang@gmail.com"
],
"description":"JavaScript Engine for Building Pixel Isometric Element with HTML5 Canvas",
"main":"build/obelisk.min.js",
"description":"JavaScript Library for Building Pixel Isometric Element with HTML5 Canvas",
"main":"build/obelisk.js",
"keywords":[
"javascript",
"canvas",
Expand All @@ -14,7 +14,8 @@
"game",
"graphic",
"art",
"2.5D"
"2.5D",
"3D"
],
"license":"MIT",
"ignore":[
Expand Down

0 comments on commit f072e7e

Please sign in to comment.