class Diorite::Command2D

Overview

Internal command payload representing an immediate-mode 2D draw request.

Defined in:

diorite/core/debug_command.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(kind : ShapeKind2D, color : Godot::Color = Godot::Color.new(1.0_f32, 1.0_f32, 1.0_f32, 1.0_f32), duration : Float64 = 0.0) #

Creates a new 2D command with default parameters.


Instance Method Detail

def b0 : Bool #

Boolean parameter 0 (e.g. horizontal bar chart orientation).


def b0=(b0 : Bool) #

Boolean parameter 0 (e.g. horizontal bar chart orientation).


def bar_data : Array(BarData) | Nil #

Bar elements for 2D bar chart or histogram.


def bar_data=(bar_data : Array(BarData) | Nil) #

Bar elements for 2D bar chart or histogram.


def channel : String #

Filter channel / layer category this command belongs to.


def channel=(channel : String) #

Filter channel / layer category this command belongs to.


def color : Godot::Color #

Modulate vertex color for this shape.


def color=(color : Godot::Color) #

Modulate vertex color for this shape.


def duration : Float64 #

Total lifetime duration in seconds (0.0 for single-frame).


def duration=(duration : Float64) #

Total lifetime duration in seconds (0.0 for single-frame).


def expired? : Bool #

Returns true if the command has exceeded its duration lifetime.


def f0 : Float32 #

Float parameter 0 (radius or arrowhead size).


def f0=(f0 : Float32) #

Float parameter 0 (radius or arrowhead size).


def f1 : Float32 #

Float parameter 1 (auxiliary float, e.g. inner radius or secondary size).


def f1=(f1 : Float32) #

Float parameter 1 (auxiliary float, e.g. inner radius or secondary size).


def f2 : Float32 #

Float parameter 2 (start angle or auxiliary float).


def f2=(f2 : Float32) #

Float parameter 2 (start angle or auxiliary float).


def f3 : Float32 #

Float parameter 3 (end angle or auxiliary float).


def f3=(f3 : Float32) #

Float parameter 3 (end angle or auxiliary float).


def filled : Bool #

Whether the 2D primitive is filled or wireframe.


def filled=(filled : Bool) #

Whether the 2D primitive is filled or wireframe.


def i0 : Int32 #

Integer parameter 0 (circle segment resolution).


def i0=(i0 : Int32) #

Integer parameter 0 (circle segment resolution).


def kind : ShapeKind2D #

The kind of 2D primitive to render.


def kind=(kind : ShapeKind2D) #

The kind of 2D primitive to render.


def p0 : Godot::Vector2 #

2D point 0 (start point or center coordinate).


def p0=(p0 : Godot::Vector2) #

2D point 0 (start point or center coordinate).


def p1 : Godot::Vector2 #

2D point 1 (end coordinate).


def p1=(p1 : Godot::Vector2) #

2D point 1 (end coordinate).


def pie_slices : Array(PieSlice) | Nil #

Chart slices for 2D pie or donut charts.


def pie_slices=(pie_slices : Array(PieSlice) | Nil) #

Chart slices for 2D pie or donut charts.


def points : Array(Godot::Vector2) | Nil #

Polyline vertex array.


def points=(points : Array(Godot::Vector2) | Nil) #

Polyline vertex array.


def points_slice : Slice(Godot::Vector2) #

Zero-allocation arena-backed 2D polyline or points slice.


def points_slice=(points_slice : Slice(Godot::Vector2)) #

Zero-allocation arena-backed 2D polyline or points slice.


def rect : Godot::Rect2 #

Bounding rectangle for 2D box or telemetry graph viewport.


def rect=(rect : Godot::Rect2) #

Bounding rectangle for 2D box or telemetry graph viewport.


def remaining_time : Float64 #

Remaining lifetime in seconds before this command expires.


def remaining_time=(remaining_time : Float64) #

Remaining lifetime in seconds before this command expires.


def step(delta : Float64) : Void #

Advances time by delta seconds, decaying remaining duration.


def title : String #

Chart title label.


def title=(title : String) #

Chart title label.