Class: TextureGenerator

SQR.TextureGenerator()

new TextureGenerator()

Utility to generate procedural textures

Source:

Methods

(static) noise(w, h, canvas, min, max)

Returns a noise texture

Parameters:
Name Type Description
w Number

the width of the texture, default 512

h Number

the height of the texture, default 512

canvas HTMLCanvasElement

a canvas to draw the texture on, if omitted a new one is created

min Number

minimum color value for r,g,b channels [0-255], alpha is always 255

max Number

maximum color value for r,g,b channels [0-255], alpha is always 255

Source: