Actor > Effects


Read our article on Effects and Blend Modes for an explanation of these blocks.


Blend Modes

Set Blend Mode

blend-block

This block sets an actor's blend mode. Blend Modes control how a game draws semi-transparent graphics.

[ACTOR].setBlendMode([BLEND MODE]);

Add / Remove

Apply Effect

apply-fx-block

Applies the specified effect to the actor. Effects stack on each other in the order they were added.

[ACTOR].setFilter([[EFFECT]]);

Remove all Effects

remove-fx-block

Removes all effects from the actor.

[ACTOR].clearFilters();

Tint

Tint using Color

tint-block

Applies a "tinting" effect to an actor given a color and a percentage amount (where 0 means no tint and 100 means that the actor is completely colored).

createTintFilter([COLOR], [NUMBER]/100)

Hue

hue-block

Shifts the hue of the actor, given an amount in degrees. The full spectrum spans 0 - 360 degrees inclusive and wraps around if you exceed that in either direction.

createHueFilter([NUMBER])

Saturation

saturation-block

Adjust how "vivid" the actor's colors are in relative percentage amounts. 0% would make an actor grayscale. 100% would restore the default saturation. 200% would make it look very vivid.

createSaturationFilter([NUMBER])

Brightness

brightness-block

Adjust how bright (or dark) the actor is in relative percentage amounts. 0% means total darkness. 100% is the default. 200% would make it brighter than usual.

createBrightnessFilter([NUMBER])

Other

Grayscale

grayscale-block

Makes the actor draw in grayscale.

createGrayscaleFilter()

Negative

negative-block

Inverts the actor's colors.

createNegativeFilter()

Sepia

sepia-block

Applies an "old photograph" look to the actor. Sort of like grayscale but with a tinge of brown.

createSepiaFilter()