class Diorite::DebugCommandQueue

Overview

Centralized, high-throughput command queue managing both single-frame and timed debug primitives.

Thread-safe and designed to process thousands of queued items per frame with zero GC allocations.

Defined in:

diorite/core/debug_command.cr

Instance Method Summary

Instance Method Detail

def channel_enabled?(name : String) : Bool #

Returns true if the channel is currently enabled.


[View source]
def clear : Void #

Alias for #clear_all.


[View source]
def clear_all : Void #

Clears all active commands, trails, and telemetry graphs.


[View source]
def commands_2d : Array(Command2D) #

Active 2D primitives queued for rendering.


[View source]
def commands_3d : Array(Command3D) #

Active 3D primitives queued for rendering.


[View source]
def disable_channel(name : String) : Void #

Disables a filtered channel, suppressing all associated commands.


[View source]
def disabled_channels : Set(String) #

Explicitly disabled channel names.


[View source]
def enable_channel(name : String) : Void #

Enables a filtered channel.


[View source]
def enabled : Bool #

Master switch toggling all debug drawing on/off.


[View source]
def enabled=(enabled : Bool) #

Master switch toggling all debug drawing on/off.


[View source]
def frame_time_us : Float64 #

[View source]
def frame_time_us=(frame_time_us : Float64) #

[View source]
def freeze! : Void #

Freezes debug drawing decay for spatial inspection.


[View source]
def frozen : Bool #

Pauses frame decay allowing static freecam inspection of active debug shapes.


[View source]
def frozen=(frozen : Bool) #

Pauses frame decay allowing static freecam inspection of active debug shapes.


[View source]
def frozen? : Bool #

Returns whether the debug queue is frozen.


[View source]
def push_2d(cmd : Command2D) : Void #

Pushes a 2D primitive command into the rendering queue.


[View source]
def push_3d(cmd : Command3D) : Void #

Pushes a 3D primitive command into the rendering queue.


[View source]
def push_text_2d(cmd : TextCommand2D) : Void #

Pushes a 2D canvas text command into the queue.


[View source]
def push_text_3d(cmd : TextCommand3D) : Void #

Pushes a 3D billboard text command into the queue.


[View source]
def step_and_clean(delta : Float64) : Void #

Advances time on duration commands and purges expired or single-frame items.


[View source]
def telemetry_graphs : Hash(String, TelemetryGraph) #

Active real-time telemetry graphs indexed by metric title.


[View source]
def text_2d : Array(TextCommand2D) #

Active 2D canvas text labels.


[View source]
def text_3d : Array(TextCommand3D) #

Active 3D billboard text labels.


[View source]
def toggle_freeze! : Void #

Toggles freeze state.


[View source]
def trails : Hash(String, Array(Godot::Vector3)) #

Entity history trails indexed by unique entity ID.


[View source]
def unfreeze! : Void #

Unfreezes debug drawing decay.


[View source]
def update_graph(title : String, val : Float32, rect : Godot::Rect2, min_val : Float32, max_val : Float32, color : Godot::Color) : TelemetryGraph #

Pushes a new data sample val into telemetry graph title, creating the graph if needed.


[View source]
def update_trail(id : String, pt : Godot::Vector3, max_pts : Int32) : Array(Godot::Vector3) #

Appends a coordinate pt to the entity motion trail id, capping length at max_pts.


[View source]
def verts_2d_last_frame : Int32 #

[View source]
def verts_2d_last_frame=(verts_2d_last_frame : Int32) #

[View source]
def verts_3d_last_frame : Int32 #

Performance telemetry counters.


[View source]
def verts_3d_last_frame=(verts_3d_last_frame : Int32) #

Performance telemetry counters.


[View source]