https://github.com/gandi/zaxxon
A library to make isometric map in SVG
https://github.com/gandi/zaxxon
Last synced: about 1 year ago
JSON representation
A library to make isometric map in SVG
- Host: GitHub
- URL: https://github.com/gandi/zaxxon
- Owner: Gandi
- License: gpl-2.0
- Created: 2013-11-18T15:45:17.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2014-06-13T16:06:32.000Z (about 12 years ago)
- Last Synced: 2025-04-12T03:14:40.846Z (about 1 year ago)
- Language: JavaScript
- Size: 912 KB
- Stars: 11
- Watchers: 27
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
zaxxon
======
> A library to make isometric map in SVG
## Getting started
This plugin requires Grunt `>=0.4.1`
```shell
npm install
bower install
grunt build
```
"npm install" will install grunt plugins.
"bower install" will install qunit framework test.
## Using Zaxxon
### Overview
Simply create an instance (or more) of Zaxxon.
```html
```
```js
var myzaxxon = new Zaxxon();
```
### Usage Examples
```html
```
```js
var myzaxxon = new Zaxxon({ container: 'mymap' });
var svg1 = document.createElementNS('http://www.w3.org/2000/svg', 'rect');
svg1.setAttributeNS(null, 'width', '200');
svg1.setAttributeNS(null, 'height', '300');
svg1.setAttributeNS(null, 'fill', '#FF0000');
var x1 = 2;
var y1 = 4;
myzaxxon.addItem(svg1, x1, y1);
var svg2 = document.createElementNS('http://www.w3.org/2000/svg', 'rect');
svg2.setAttributeNS(null, 'width', '200');
svg2.setAttributeNS(null, 'height', '300');
svg2.setAttributeNS(null, 'fill', '#FF0000');
var x2 = 10;
var y2 = 8;
myzaxxon.addItem(svg2, x2, y2);
myzaxxon.connect([x1,y1], [x2,y2], { color: '#00FF00', size: 80, particlesQuantity: 10, particlesSpeed: 20 });
```