Installation
Simple and easy to follow
Last updated
Was this helpful?
Simple and easy to follow
Last updated
Was this helpful?
Was this helpful?
I2Djs source code is written using ES6 Modules. It provides bundles to support different JS environments - anonymous AMD, CommonJS, ESM, and Vanilla JS.
You can download the source code of I2Djs from the gitHub Repository.
i2d.js [ i2d.min.js ] - ES6 syntax without modules support.
i2d.esm.browser.js [ i2d.esm.browser.min.js ] - Follows ES module standards.
i2d.legacy.js [ i2d.legacy.min.js ] - For older versions of javascript.
Also, it provides minified versions for all the above-mentioned formats.
To use directly in the browser
<script src= 'https://raw.githubusercontent.com/I2Djs/I2Djs/master/dist/i2d.js'></script>
I2Djs npm package can be installed using the below cmd.
$ npm install i2djs --save
Import modules into the namespace.
import * as i2d from 'i2djs'
Import individual modules:
import {canvasLayer} from 'i2djs';
import {canvasNodeLayer} from 'i2djs';
import {svgLayer} from 'i2djs';
import {webglLayer} from 'i2djs';
import {behaviour} from 'i2djs';
import {path} from 'i2djs';
import {geometry} from 'i2djs';
import {color} from 'i2djs';
import {queue} from 'i2djs';
import {chain} from 'i2djs';