This texture generates plasma-like neon ligts. It overlaps up to three neon colors. 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/neon-lights.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 50mode
– additive or subtractive blending, default additivecolorA
– first neon color, default 0xFF0000 (red)colorB
– second neon color, default 0x00FF00 (green)colorC
– third neon color, default 0x0000FF (blue)background
– background color, default 0x000000 (black)In additive mode:
In subtractive mode:
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