tsl-textures

TSL Textures

Planet

This texture generates the surface colors of a planet. There are six types of terrains groups into three clusters: water area, land area and highlang (mountaneous) area. The generated texture is for color maps. Click on a snapshot to open it online.

Code template

import { planet } from "tsl-textures/planet.js";

model.material.colorNode = planet ( {
	scale: 2,
	iterations: 5,
	levelSea: 0.3,
	levelMountain: 0.7,
	balanceWater: 0.3,
	balanceSand: 0.2,
	balanceSnow: 0.8,
	colorDeep: new THREE.Color(4948895),
	colorShallow: new THREE.Color(12642550),
	colorBeach: new THREE.Color(16776680),
	colorGrass: new THREE.Color(8772274),
	colorForest: new THREE.Color(30720),
	colorSnow: new THREE.Color(16318463),
	seed: 0
} );

Parameters

Water parameters:

Land parameters:

Highland parameters:

Online generator

online/planet.html

Source

src/planet.js

Home