I2Djs-v5
  • Introduction to I2Djs
  • Getting Started
    • Installation
    • Quick Start
    • Resources
  • Guide
    • Canvas: Create-animate
    • SVG: Create-animate
    • WebGL: Create-animate
    • PDF: Create
    • Data Join-Action
    • Animation-Chaining
    • Canvas: Textures & Sprite animation
    • Canvas: Heatmap
    • WebGL: Heatmap
    • WebGL: Custom Shaders
    • Canvas: GeoWorld Map with D3 modules
    • Canvas: Clipping, Masking, Pattern
    • SVG: Clipping, Masking, Pattern
    • I2Djs + Physics Engine - MatterJs
  • API Reference
    • Layers
      • Canvas Layer
      • SVG Layer
      • WebGL Layer
    • Elements API
    • Canvas additional features
    • WebGL additional features
      • Custom Shader
      • Geometry
      • Render Target
      • Texture Object
    • Join Action
    • Animation
    • Chaining
    • Path
    • Events
    • Behaviour
      • Zoom and Pan
      • Drag
  • Examples
    • PDF
    • Canvas
    • SVG
    • WebGL
Powered by GitBook
On this page
  • Source Code:
  • <script> Tag:
  • npm package:
  • ES6 module Importing.
  1. Getting Started

Installation

Simple and easy to follow

PreviousGetting StartedNextQuick Start

Last updated 10 months ago

I2Djs source code is written using ES6 Modules. It provides bundles to support different JS environments - ESM and UMD formats.

Source Code:

You can download the source code of I2Djs from the Repository.

  • - UMD syntax.

  • [ ] - ES6 module standards.

Also, it provides minified versions for all the above-mentioned formats.

<script> Tag:

To use directly in the browser

<script src= 'https://raw.githubusercontent.com/I2Djs/I2Djs/master/dist/i2d.js'></script>

npm package:

I2Djs npm package can be installed using the below cmd.

$ npm install i2djs --save

ES6 module Importing.

Import modules into the namespace.

import * as i2d from 'i2djs'

Import individual modules:

import {canvasLayer} from 'i2djs';
import {svgLayer} from 'i2djs';
import {webglLayer} from 'i2djs';
import {pdfLayer} 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';

gitHub
i2d.js
i2d.esm.js
i2d.esm.min.js