Chevron Down
Table of Contents
Chevron DownGetting Started
Chevron DownAPI Reference

Getting Started

To use in an application, simply install it using yarn:

yarn add

Note: While we'll use yarn for these instructions, as it's the tool we use for development, npm can be used as a drop-in substitute in most cases. A map of npm instructions to yarn is available here.

Using with Node.js is built to run using headless-gl under Node.js, which can be extremely useful for unit testing. It is important to note that headless-gl only supports WebGL 1 and few extensions, so not all of's features will be available.

Use yarn install gl to install headless-gl. will automatically use it when running under Node.js. You can then create a context using the createGLContext context function.

import '';
import {createGLContext, Model, ...} from '';
const gl = createGLContext({width, height, ...});

Interoperation with Other WebGL Applications is build to interoperate cleanly with other WebGL applications using the same WebGL context. This is critical in geospatial applications, where is often rendering over a base map drawn by another application.

The key to's interoperability is careful state management. will track GL context changes and restore them after operations are complete.

Using in Isorender Applications is designed to support isorender application, i.e. the library can be loaded without problems under Node.js, as long as the application doesn't actually try to use WebGL (i.e. create WebGL contexts). However when discovers that headless gl is not available it tries to give a helpful message explaining the situation. This can safely be ignored.

Remember that you can actually create WebGL contexts under Node.js, as long as the headless gl is installed in your node_modules directory. More information on using with Node.js.


We occasionally mark github issues that contain answers to questions that pop up repeatedly with the FAQ label.