class

PointClickEngine::Graphics::Effects::Effect

Inherits Reference < Object

Base class for all visual effects

Effects can be applied to objects, scenes, or cameras to create visual enhancements like glow, shake, transitions, etc.

Creating Custom Effects

class MyEffect < Effect
  def update(dt : Float32)
    super
    # Update effect state
  end

  def apply(context : EffectContext)
    # Apply visual changes
  end
end

Constructors

new(duration : Float32 = 0.0_f32)
Source

Instance methods

active

Effect properties

Source
active=(active : Bool)

Effect properties

Source
apply(context : EffectContext)

Apply effect to target (implemented by subclasses)

Source
duration
Source
duration=(duration : Float32)
Source
elapsed
Source
elapsed=(elapsed : Float32)
Source
fade_intensity(target : Float32, speed : Float32, dt : Float32) : Bool

Fade effect in/out over time

Source
finished?

Check if effect has finished

Source
intensity
Source
intensity=(intensity : Float32)
Source
parameters

Effect parameters (for serialization and configuration)

Source
parameters=(parameters : Hash(String, Float32 | Int32 | Bool | String | RL::Color))

Effect parameters (for serialization and configuration)

Source
progress

Get effect progress (0.0 to 1.0)

Source
remaining_time

Get remaining time

Source
reset

Reset effect to start

Source
stop

Stop effect immediately

Source
update(dt : Float32)

Update effect state

Source