class

Plankton::Texture

Inherits Reference < Object

Constructors

new(graph : Graph, id : Int32)
Source

Instance methods

add(other : Texture, amount : Scalar = 1.0) : Texture

Add another texture.

Source
blend(other : Texture, amount : Scalar = 0.5) : Texture

Interpolate between two textures.

Source
brightness(amount : Scalar = 0.0) : Texture

Add to RGB channels.

Source
color(r : Scalar = 1.0, g : Scalar = 1.0, b : Scalar = 1.0, a : Scalar = 1.0) : Texture

Multiply RGBA channels.

Source
colorama(amount : Scalar = 0.1) : Texture

Shift hue and fold saturation/brightness.

Source
contrast(amount : Scalar = 1.0) : Texture

Adjust contrast about 0.5.

Source
diff(other : Texture) : Texture

Absolute color difference.

Source
graph
Source
hue(amount : Scalar = 0.0) : Texture

Shift hue in turns.

Source
invert(amount : Scalar = 1.0) : Texture

Mix with the inverted color.

Source
kaleid(sides : Scalar = 4.0) : Texture

Mirror radial sectors into a kaleidoscope.

Source
layer(other : Texture) : Texture

Alpha-composite another texture over this texture.

Source
luma(threshold : Scalar = 0.5, tolerance : Scalar = 0.1) : Texture

Turn luminance into an alpha mask.

Source
mask(other : Texture) : Texture

Use another texture’s luminance and alpha as a mask.

Source
modulate(other : Texture, amount : Scalar = 0.1) : Texture

Warp coordinates using centered red/green channels.

Source
modulate_pixelate(other : Texture, multiple : Scalar = 10.0, offset : Scalar = 3.0) : Texture

Modulate the pixel grid resolution.

Source
modulate_rotate(other : Texture, amount : Scalar = 1.0, offset : Scalar = 0.0) : Texture

Rotate coordinates using another texture.

Source
modulate_scale(other : Texture, amount : Scalar = 0.5, offset : Scalar = 1.0) : Texture

Scale coordinates using another texture.

Source
mult(other : Texture, amount : Scalar = 1.0) : Texture

Multiply by another texture.

Source
out(output : Output = Output.new(0)) : Texture
Source
pixelate(x : Scalar = 20.0, y : Scalar = 20.0) : Texture

Quantize coordinates into a grid.

Source
posterize(bins : Scalar = 3.0, gamma : Scalar = 1.0) : Texture

Reduce the number of color levels.

Source
repeat(x : Scalar = 3.0, y : Scalar = 3.0) : Texture

Repeat a texture in a grid.

Source
rotate(angle : Scalar = 0.0, speed : Scalar = 0.0) : Texture

Rotate by radians, with optional radians per second.

Source
saturate(amount : Scalar = 1.0) : Texture

Adjust saturation about luminance.

Source
scale(amount : Scalar = 1.0, x : Scalar = 1.0, y : Scalar = 1.0) : Texture

Scale around the center; amount is the common factor.

Source
scroll_x(amount : Scalar = 0.0, speed : Scalar = 0.0) : Texture

Horizontal offset and scrolling speed.

Source
scroll_y(amount : Scalar = 0.0, speed : Scalar = 0.0) : Texture

Vertical offset and scrolling speed.

Source
sub(other : Texture, amount : Scalar = 1.0) : Texture

Subtract another texture.

Source
thresh(threshold : Scalar = 0.5, tolerance : Scalar = 0.04) : Texture

Black/white luminance threshold.

Source