Five Minute Guide

Getting Started

Niltree can run any kind of WebGL website, twice as fast as Chrome. You can get this up and running in under five minutes.

This guide will show you how to install Niltree and open a WebGL site.

Installing Niltree

$ node --version
v9.9.0
circle-info

If you don't have Node >= 9.9arrow-up-right, you can use nvmarrow-up-right or nvm-windowsarrow-up-right to install it.

npm install --global --production windows-build-tools
circle-info

Right-click on PowerShell and run "as Administrator", then paste the above command.

  • Install niltree:

npm i -g niltree

Viewing websites

Let's open a ThreeJS website in Niltree.

Go to the ThreeJS examplesarrow-up-right page using your web browser of choice (Chrome, Firefox, etc):

https://threejs.org/examples

Most of these ThreeJS examples should run fine in Niltree. Let's try the first one, animation/clotharrow-up-right. Observe that this is a WebGL site, and that it renders fine in Chrome:

A simple ThreeJS webpage: https://threejs.org/examples/#webgl_animation_cloth

Now we're going to open this same site using Niltree.

  • If you're on Windows, type niltree-win and press enter.

  • Other platforms, type niltree.

Niltree's default prompt
circle-info

If you get an error about node module version, ensure node --version is >= 9.9:

nvm install 9.9

nvm use 9.9

and then try again. If you still get an error, re-run

npm i -g niltree

Niltree will open and run the site:

ThreeJS cloth simulation in Niltree (https://threejs.org/examples/#webgl_animation_cloth)

Let's navigate to a different site.

The ThreeJS geometry/minecraft demo

Niltree's command prompt

The niltree command prompt is a NodeJS REPL. If you're a node developer, the interface should be quite familiar. Open niltree and run .help:

Niltree's .help command
circle-info

Pressing up and down will scroll through your REPL history.

circle-info

Under the hood, pasting a URL is shorthand for typing .go <url>.

Similar to Chrome's devtools, you can evaluate any expression you want in the context of the current website. Navigate somewhere and type window.location:

window.location

This covers the basics of using Niltree.

Last updated