Skip to content

Commit 9bf5127

Browse files
committed
Add niltree/book to static/book
1 parent 9dc268d commit 9bf5127

19 files changed

+139
-3
lines changed

.gitmodules

-3
This file was deleted.
60.8 KB
Loading
19.1 KB
Loading
21.2 KB
Loading
9.9 KB
Loading
438 KB
Loading
13.7 KB
Loading
1.24 MB
Loading
16.9 KB
Loading
61.3 KB
Loading
505 KB
Loading
17.8 KB
Loading
19.4 KB
Loading
12.2 KB
Loading

static/book/.gitbook/assets/image.png

1.54 MB
Loading

static/book/LICENSE

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
MIT License
2+
3+
Copyright 2018 Shawn Presser
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6+
7+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8+
9+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
10+

static/book/README.md

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
description: 'Niltree Browser is a Javascript web browser for AR, VR, and WebGL sites.'
3+
---
4+
5+
# About
6+
7+
Get started with Niltree with [the five minute guide](guide.md).
8+
9+
Want to contribute? Head over to [our Github](https://github.com/niltree/niltree).
10+

static/book/SUMMARY.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Table of contents
2+
3+
* [About](README.md)
4+
* [Five Minute Guide](guide.md)
5+

static/book/guide.md

+114
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
# Five Minute Guide
2+
3+
## Getting Started
4+
5+
Niltree can run any kind of WebGL website, twice as fast as Chrome. You can get this up and running in under five minutes.
6+
7+
This guide will show you how to install Niltree and open a WebGL site.
8+
9+
### Installing Niltree
10+
11+
* Ensure you have [Node >= 9.9](https://nodejs.org/en/download/):
12+
13+
```text
14+
$ node --version
15+
v9.9.0
16+
```
17+
18+
{% hint style="info" %}
19+
If you don't have [Node >= 9.9](https://nodejs.org/en/download/), you can use [nvm](https://github.com/creationix/nvm) or [nvm-windows](https://github.com/coreybutler/nvm-windows) to install it.
20+
{% endhint %}
21+
22+
* If you're on **Windows**, install [windows-build-tools](https://www.npmjs.com/package/windows-build-tools) from a Powershell Admin prompt:
23+
24+
```text
25+
npm install --global --production windows-build-tools
26+
```
27+
28+
{% hint style="info" %}
29+
Right-click on PowerShell and run "as Administrator", then paste the above command.
30+
{% endhint %}
31+
32+
* Install niltree:
33+
34+
```
35+
npm i -g niltree
36+
```
37+
38+
### Viewing websites
39+
40+
Let's open a ThreeJS website in Niltree.
41+
42+
Go to the ThreeJS [examples](https://threejs.org/examples/) page using your web browser of choice \(Chrome, Firefox, etc\):
43+
44+
![https://threejs.org/examples](.gitbook/assets/image%20%281%29.png)
45+
46+
Most of these ThreeJS examples should run fine in Niltree. Let's try the first one, [animation/cloth](https://threejs.org/examples/#webgl_animation_cloth). Observe that this is a WebGL site, and that it renders fine in Chrome:
47+
48+
![A simple ThreeJS webpage: https://threejs.org/examples/\#webgl\_animation\_cloth](.gitbook/assets/image%20%286%29.png)
49+
50+
Now we're going to open this same site using Niltree.
51+
52+
* Open your terminal \(we like [hyper](https://hyper.is/)\):
53+
54+
![](.gitbook/assets/image%20%2812%29.png)
55+
56+
* If you're on Windows, type `niltree-win` and press enter.
57+
* Other platforms, type `niltree`.
58+
59+
![Niltree's default prompt](.gitbook/assets/image%20%289%29.png)
60+
61+
{% hint style="info" %}
62+
If you get an error about node module version, ensure `node --version` is >= 9.9:
63+
64+
`nvm install 9.9`
65+
66+
`nvm use 9.9`
67+
68+
and then try again. If you still get an error, re-run
69+
70+
`npm i -g niltree`
71+
{% endhint %}
72+
73+
* Paste the ThreeJS URL \([https://threejs.org/examples/\#webgl\_animation\_cloth](https://threejs.org/examples/#webgl_animation_cloth)\) and press enter.
74+
75+
Niltree will open and run the site:
76+
77+
![](.gitbook/assets/image%20%282%29.png)
78+
79+
![ThreeJS cloth simulation in Niltree \(https://threejs.org/examples/\#webgl\_animation\_cloth\)](.gitbook/assets/image.png)
80+
81+
Let's navigate to a different site.
82+
83+
* Pick out a different ThreeJS [example ](https://threejs.org/examples/)that you like:
84+
85+
![The ThreeJS geometry/minecraft demo](.gitbook/assets/image%20%2813%29.png)
86+
87+
* Switch back to Niltree's command prompt and paste the URL \(e.g. [https://threejs.org/examples/\#webgl\_geometry\_minecraft](https://threejs.org/examples/#webgl_geometry_minecraft)\):
88+
89+
![](.gitbook/assets/image%20%284%29.png)
90+
91+
![](.gitbook/assets/image%20%283%29.png)
92+
93+
94+
95+
### Niltree's command prompt
96+
97+
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`:
98+
99+
![Niltree's .help command](.gitbook/assets/image%20%287%29.png)
100+
101+
{% hint style="info" %}
102+
Pressing up and down will scroll through your REPL history.
103+
{% endhint %}
104+
105+
{% hint style="info" %}
106+
Under the hood, pasting a URL is shorthand for typing `.go <url>`.
107+
{% endhint %}
108+
109+
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`:
110+
111+
![window.location](.gitbook/assets/image%20%2811%29.png)
112+
113+
This covers the basics of using Niltree.
114+

0 commit comments

Comments
 (0)