class

PointClickEngine::Graphics::Layers::Layer

Inherits Reference < Object

Base class for rendering layers

Layers provide z-ordered rendering and can have independent properties like parallax scrolling, opacity, and effects.

Example

background = Layer.new("background", -100)
background.parallax_factor = 0.5 # Moves at half camera speed

foreground = Layer.new("foreground", 100)
foreground.opacity = 0.8

Constructors

new(name : String, z_order : Int32 = 0)
Source

Instance methods

Apply layer transformations for rendering

Source
effective_tint

Calculate effective tint with opacity

Source
name

Layer properties

Source
name=(name : String)

Layer properties

Source
offset

Layer offset (for scrolling effects independent of camera)

Source
offset=(offset : RL::Vector2)

Layer offset (for scrolling effects independent of camera)

Source
opacity
Source
opacity=(opacity : Float32)
Source
parallax_factor
Source
parallax_factor=(parallax_factor : Float32)
Source
reset_transform

Reset transformations

Source
should_render?

Check if layer should be rendered

Source
tint

Tint color for the entire layer

Source
tint=(tint : RL::Color)

Tint color for the entire layer

Source
update(dt : Float32)

Update layer (for animated properties)

Source
visible
Source
visible=(visible : Bool)
Source
z_order
Source
z_order=(z_order : Int32)
Source