Kraken Logo

Kraken Engine

DocumentationGuidesShowcaseCommunity
Ctrl
K
Navigating the Docs
Building Docs
Overview
Camera
Color
Draw
Ease
Event
Fx
Gamepad
Input
Log
Math
Mixer
Mouse
Physics
Pixel Array
Renderer
Shaders
Time
Transform
Ui
Viewport
Window

Built bydurkisneer1.Kraken Engine is open source and available onGitHub.

  1. Docs
  2. Functions
  3. Fx

Fx

Predefined effects for use with the Orchestrator.


Move To

move_to(pos: Vec2, dur: float = 0.0, ease: Callable[[float], float] | None = None) → Effectmove_to(pos: Vec2, dur: float = 0.0, ease: Callable[[float], float] | None = None) → Effect

Create a move-to effect.

Args

  • pos : Target position.
  • dur : Duration in seconds.
  • ease : Easing function (t -> t).

Returns

Effect : The move-to effect.

Scale To

scale_to(scale: Vec2, dur: float = 0.0, ease: Callable[[float], float] | None = None) → Effectscale_to(scale: Vec2, dur: float = 0.0, ease: Callable[[float], float] | None = None) → Effect

Create a scale-to effect.

Args

  • scale : Target scale exact dimensions.
  • dur : Duration in seconds.
  • ease : Easing function (t -> t).

Returns

Effect : The scale-to effect.

Scale By

scale_by(scale: float, dur: float = 0.0, ease: Callable[[float], float] | None = None) → Effectscale_by(scale: float, dur: float = 0.0, ease: Callable[[float], float] | None = None) → Effect

Create a scale-by effect.

Args

  • scale : Delta scalar to apply to the scale.
  • dur : Duration in seconds.
  • ease : Easing function (t -> t).

Returns

Effect : The scale-by effect.

Rotate To

rotate_to(angle: float, clockwise: bool = True, dur: float = 0.0, ease: Callable[[float], float] | None = None) → Effectrotate_to(angle: float, clockwise: bool = True, dur: float = 0.0, ease: Callable[[float], float] | None = None) → Effect

Create a rotate-to effect.

Args

  • angle : Target angle in radians.
  • clockwise : Direction of rotation. True for clockwise, False for counterclockwise.
  • dur : Duration in seconds.
  • ease : Easing function (t -> t).

Returns

Effect : The rotate-to effect.

Rotate By

rotate_by(delta: float, clockwise: bool = True, dur: float = 0.0, ease: Callable[[float], float] | None = None) → Effectrotate_by(delta: float, clockwise: bool = True, dur: float = 0.0, ease: Callable[[float], float] | None = None) → Effect

Create a rotate-by effect.

Args

  • delta : Delta angle in radians to rotate by in radians.
  • clockwise : Direction of rotation. True for clockwise, False for counterclockwise.
  • dur : Duration in seconds.
  • ease : Easing function (t -> t).

Returns

Effect : The rotate-by effect.

Shake

shake(amp: float, freq: float, dur: float) → Effectshake(amp: float, freq: float, dur: float) → Effect

Create a shake effect.

Args

  • amp : Shake amplitude in pixels.
  • freq : Shake frequency in Hz.
  • dur : Duration in seconds.

Returns

Effect : The shake effect.

Call

call(callback: Callable[[], None]) → Effectcall(callback: Callable[[], None]) → Effect

Create an effect that calls a function.

Args

  • callback : Function to call when this step is reached.

Returns

Effect : The call effect.

Wait

wait(dur: float) → Effectwait(dur: float) → Effect

Create a wait/delay effect.

Args

  • dur : Duration to wait in seconds.

Returns

Effect : The wait effect.

PreviousEvent
NextGamepad

On this page

Move ToScale ToScale ByRotate ToRotate ByShakeCallWait