Requirements

Installing and developing vtk.js is quite easy, there are just two dependencies:

  • Node.js
  • Git - only necessary for developing and committing to the library.

Instructions for installing these are located at the bottom of this page. If your computer already has these, congratulations!

To install vtk.js within your project:

$ npm install vtk.js --save
# or for the ESM build
$ npm install @kitware/vtk.js --save

If you’re developing for vtk.js, then clone the repository using git:

$ git clone https://github.com/kitware/vtk-js.git
$ cd vtk-js
$ npm install

Further instructions on vtk.js development can be found on the contributing page.

Git

  • Windows: Download & install git.
  • Mac: Install it with Homebrew, MacPorts or installer.
  • Linux (Ubuntu, Debian): sudo apt-get install git-core
  • Linux (Fedora, Red Hat, CentOS): sudo yum install git-core
For Mac users

You may encounter some problems when compiling. Please install Xcode from App Store first. After Xcode is installed, open Xcode and go to Preferences -> Download -> Command Line Tools -> Install to install command line tools.

Node.js

The best way to install Node.js is with nvm.