Getting Started - GeorgeGkas/isometricObelisk.js GitHub Wiki

Installation

Simply include isometricObelisk.js, (located under build folder in main project page) to your project:

<script src="//path/to/isometricObelisk.min.js"></script>

Note:

Development (Browser)

isometricObelisk.js can be used with browserify project. Simply, in your Javascript type:

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

First moves

You interface to the isometricObelisk functionality through an instance of the isometricObelisk class:

var _isometric = new isometricObelisk({`
    canvasId: 'testCanvas',
    PointX: 380,
    PointY: 430
});

Here we create an example class instance called _isometric. The constructor takes as parameter an object with the bellow keys:

canvasId: String('#id_of_Html_Canvas'),
PointX: Number,
PointY: Number

Here the PointX and PointY keys represent the main coordinates of your canvas, where all the built shapes will have as start point, O(0,0) in cartesian coordinates. From now on, when we refer to start point of an isometric shape we will associate it with the above values.

Thereafter, all the operations available are accessed via methods of this instance.

Important: Keep in mind that you can create as many isometric shapes as you like by using the same class instance over and over again.

⚠️ **GitHub.com Fallback** ⚠️