Skip to content

Visual Effects

Visual effects are composed from GFFEffectCommon plus a GFFTarget and a GFFTweener.

Registered shortcuts: flash, color, alpha.

Flash

GFFFlashTweener drives a short blink toward flash_color.

CanvasItem bleach (2D / UI)

On CanvasItem trees (including a parent Node2D with a child Sprite2D), flash uses a temporary canvas shader that mixes texture RGB toward flash_color. That means a white flash can turn a sprite fully white — including assets that are already mostly white — which plain modulate multiplication cannot do.

GameFeelFlow.play("flash", $Sprite2D, {"duration": 0.2, "color": Color.WHITE})

Or build it explicitly:

var flash = GFFEffectCommon.new()
flash.target = GFFColorTarget.new()
flash.tweener = GFFFlashTweener.new()
flash.tweener.flash_color = Color.WHITE
flash.duration = 0.15
GameFeelFlow.play(flash, $Subject)

Non-canvas fallback

For targets that are not CanvasItem, flash falls back to multiplying modulate / color toward flash_color (legacy path). Prefer a tinted flash color there if the mesh/material is already bright.

Flash Bleach

Color

Tweens modulate (CanvasItem) toward target_color.

var effect = GFFEffectCommon.new()
effect.target = GFFColorTarget.new()
effect.target.target_color = Color(0.35, 0.85, 1.0)
effect.tweener = GFFColorTweener.new()
effect.duration = 0.35
effect.restore_after_play = true
effect.restore_mode = GFFEffect.RestoreMode.GRADUAL
effect.restore_duration = 0.35
GameFeelFlow.play(effect, $Sprite2D)

Alpha

Tweens opacity via GFFAlphaTarget.target_alpha (default registered effect fades toward 0.0 and restores).

GameFeelFlow.play("alpha", $Sprite2D, {"duration": 0.4, "target_alpha": 0.0})

Or:

var effect = GFFEffectCommon.new()
effect.target = GFFAlphaTarget.new()
effect.target.target_alpha = 0.0
effect.tweener = GFFLinearTweener.new()
effect.duration = 0.35
effect.restore_after_play = true
effect.restore_mode = GFFEffect.RestoreMode.GRADUAL
GameFeelFlow.play(effect, $Sprite2D)

Parent vs child

Playing on a parent Node2D cascades modulate / alpha to children. Bleach flash installs materials on drawable descendants (Sprite2D, AnimatedSprite2D, TextureRect, …).