This texture renderes marble surface with threads in it. The generated texture is intended 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/marble.js";
:
model.material.map = PET.texture( );
PET.material( model.material );
The parameters of the texture generator are:
width
– texture width in pixels, default 1024height
– texture height in pixels, default 512scale
– pattern size [0,100], default 50thickness
– thickness of threads [0,100], default 60noise
– noise of background [0,100], default 30color
– color of lines, default 0x4545D3 (blue)background
– color of background, default 0xF0F8FF (light blue)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