0.0.10 • Published 3 years ago

three-terrain v0.0.10

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

three-terrain

screenshot

A fast heightmap based voxelizer

Examples

Installation

npm install three-terrain

Usage

import { Scene } from 'three';
import Terrain from 'three-terrain';

const terrain = new Terrain({
  width: 640,
  height: 255,
  depth: 640,
  maps: {
    colorRGBheightAlpha: '/terrain.png',
    /*
      colorRGB: colormap from image RGB
      colorRGBheightAlpha: colormap from image RGB + heightmap from alpha channel
      colorRGBheightRGB: colormap from RGB + heightmap from RGB grayscale
      heightAlpha: heightmap from image alpha channel
      heightR: heightmap from image red channel
      heightRGB: heightmap from image RGB grayscale
    */
  },
});

const scene = new Scene();
scene.add(terrain);
0.0.10

3 years ago

0.0.9

3 years ago

0.0.8

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago