Releases: jdan/isomer
Bower and Component support
Isomer now supports both bower:
$ bower install isomer
and component:
$ component install jdan/isomer
Isomer also lists copyright information when built. You can see it in action here. Our build and test processes are also far simpler.
To buid:
$ npm run dist # or, simply, gulp dist
To test:
$ npm test
The test command uses beefy to automatically rebuild the project when any files have changed. The command also opens a browser window with a testing page that automatically refreshes when the project is rebuilt.
Simply run npm test
and leave it in the background as you develop. Everything will build automatically for you.
With <3,
@jdan
v0.2.1
Isomer is now built with Browserify!
Browserify allows you to use traditional require()
statements in your code, which is then bundled. Development is now significantly easier and cleaner.
There are now two gulp tasks, build & release.
- gulp build bundles the project using Browserify and produces
build/isomer.js
- gulp release minifies the build to
build/isomer.min.js
The test page references isomer.js, and includes a livereload script to be used with beefy.
This means that you will need to rebuild the project with every change, but you can have beefy do this for you, as well as reload the testing page automatically.
$ npm install -g beefy
$ beefy index.js:build/isomer.js --live
listening on http://localhost:9966/
Navigate to http://localhost:9966/test/
to check it out.
This pattern also makes it easy for Isomer to work with node-canvas for generating isometric graphics on the command line.
var Canvas = require('canvas');
var canvas = new Canvas(400, 400);
var Isomer = require('isomer'); // npm install isomer
var fs = require('fs');
var out = fs.createWriteStream('output.png');
var iso = new Isomer(canvas);
iso.add(Isomer.Shape.Prism(Isomer.Point.ORIGIN));
canvas.pngStream().pipe(out);
With <3,
@jdan