andrewisen-tikab / three-tunnel

A tunnel & grouting library for three.js

Home Page:https://andrewisen-tikab.github.io/three-tunnel/example/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

three-tunnel

three-tunnel is a tunnel & grouting library for three.js. It's also a part of Tunnel Sketcher is a free tool for visualizing geological structures and grouting in tunnels. Use parts of this library to create your own tunnel visualization tool.

Installation

npm install three-tunnel

Usage

Begin by adding a tunnel.

import { Tunnel3D } from 'three-tunnel';

const tunnel = new Tunnel3D();
scene.add(tunnel);

To help you design the tunnel, you can add a controller.

import { TunnelControls } from 'three-tunnel';
const tunnelControls = new TunnelControls();
tunnelControls.attach(this._tunnel);

You can now add grouts to the tunnel.

const grout1 = this.tunnelControls.addGrout();
const grout2 = this.tunnelControls.addGrout();
this.tunnelControls.update();

Example

A complete example can be found in the example folder. Or, you can run the demo at:

https://andrewisen-tikab.github.io/three-tunnel/example/

Docs

Auto-generated docs can be found here: https://andrewisen-tikab.github.io/three-tunnel/docs/

Status

This is a work in progress. It's not production ready.

About

A tunnel & grouting library for three.js

https://andrewisen-tikab.github.io/three-tunnel/example/


Languages

Language:TypeScript 94.3%Language:CSS 2.4%Language:HTML 2.4%Language:JavaScript 0.9%