texture-generator

Procedural Equirectangular Textures

utils.js

Module. Collects utility functions useful for custom patterns.

retexture(…)

Function. Adjusts the parameters of a texture generator, by collecting values provided by the user and the default values of the generator. Then creates a texture. Returns the texture. This function is used internally by the texture generators.

retexture( opt, defaults, options, pattern )

where:

map(…)

Function. Calculates linear mapping of a value from one interval (called input) to another interval (called output). Returnes the mapped value.

map( x )
map( x, toMin, toMax )
map( x, toMin, toMax, fromMin, fromMax )

where:

Note: Function map is similar to THREE.MathUtils.mapLinear but the intervals are swapped.

mapExp(…)

Function. Calculates exponential mapping of a value from one interval (called input) to another interval (called output). Returnes the mapped value.

mapExp( x )
mapExp( x, toMin, toMax )
mapExp( x, toMin, toMax, fromMin, fromMax )

where:

Source

src/utils.js

Back