fx
pykraken.fx Predefined effects for use with the Orchestrator.
At a glance
8 membersReference
PYTHON APIcall
functioncall(callback: Callable[[], None]) -> fx.EffectCreate an effect that calls a function.
Args
- callback (
callable) — Function to call when this step is reached.
Returns
- Effect — The call effect.
move_to
functionCreate a move-to effect.
Args
- pos (
Vec2) — Target position. - dur (
float) — Duration in seconds. - ease (
callable) — Easing function (t -> t).
Returns
- Effect — The move-to effect.
rotate_by
functionrotate_by(delta: float, clockwise: bool = True, dur: float = 0.0, ease: Callable[[float], float] | None = None) -> fx.EffectCreate a rotate-by effect.
Args
- delta (
float) — Delta angle in radians to rotate by in radians. - clockwise (
bool) — Direction of rotation. True for clockwise, False for counterclockwise. - dur (
float) — Duration in seconds. - ease (
callable) — Easing function (t -> t).
Returns
- Effect — The rotate-by effect.
rotate_to
functionrotate_to(angle: float, clockwise: bool = True, dur: float = 0.0, ease: Callable[[float], float] | None = None) -> fx.EffectCreate a rotate-to effect.
Args
- angle (
float) — Target angle in radians. - clockwise (
bool) — Direction of rotation. True for clockwise, False for counterclockwise. - dur (
float) — Duration in seconds. - ease (
callable) — Easing function (t -> t).
Returns
- Effect — The rotate-to effect.
scale_by
functionscale_by(scale: float, dur: float = 0.0, ease: Callable[[float], float] | None = None) -> fx.EffectCreate a scale-by effect.
Args
- scale (
float) — Delta scalar to apply to the scale. - dur (
float) — Duration in seconds. - ease (
callable) — Easing function (t -> t).
Returns
- Effect — The scale-by effect.
scale_to
functionCreate a scale-to effect.
Args
- scale (
Vec2) — Target scale exact dimensions. - dur (
float) — Duration in seconds. - ease (
callable) — Easing function (t -> t).
Returns
- Effect — The scale-to effect.
shake
functionshake(amp: float, freq: float, dur: float) -> fx.EffectCreate a shake effect.
Args
- amp (
float) — Shake amplitude in pixels. - freq (
float) — Shake frequency in Hz. - dur (
float) — Duration in seconds.
Returns
- Effect — The shake effect.
wait
functionwait(dur: float) -> fx.EffectCreate a wait/delay effect.
Args
- dur (
float) — Duration to wait in seconds.
Returns
- Effect — The wait effect.