

This texture generates the surface colors of a planet. There are seven types of terrains groups into three clusters: water (deep and shallow), land (beach, low land and high land) and mountains (rocky and snowy parts). The generated texture is for color maps. Click on a snapshot to open it online.
Code template of parameters with their default values.
import * as PET from "pet/patterns/planet.js";
:
model.material.map = PET.texture( );
PET.material( model.material );
The parameters of the texture generator are:
width – texture width in pixels, default 512height – texture height in pixels, default 256scale – pattern size [0,100], default 50Ocean parameters:
colorDeep – color of deep ocean water, default 0x4682B4 (blue)sizeDeep – size of deep ocean water, default 40colorShallow – color of shallow coastal water, default 0x87CEEB (light blue)sizeShallow – size of shallow coatsel water, default 20Land parameters:
colorBeach – color of beach sand, default 0xFFFACD (light yellow)sizeBeach – size of beach sand, default 5colorGrass – color of low land grass, default 0x3CB371 (green)sizeGrass – size of low land grass, default 40colorForest – color of high land forest, default 0x2E8B57 (dark green)sizeForest – size of high land forest, default 40Mountain parameters:
colorRock – color of rocky part of mountains, default 0x404040 (dark gray)sizeRock – size of rocky part of mountains, default 50colorSnow – color of snowy mountains peaks, default 0xF0FFFF (almost white)All texture modules share the same API.
pattern( x, y, z, color, options ) – pattern implementationtexture( {params} ) – generator for a texture with given parametersdefaults – object with default parametersmaterial( ... ) – material shader patcher