module Diorite

Overview

The Diorite debug drawing library for Godot Engine 4.8+.

Provides both a node-based scene system and an immediate-mode DSL for rendering 2D and 3D debug visualizations with maximum visual priority.

Defined in:

diorite/core/chart_builder.cr
diorite/core/ci_dsl.cr
diorite/core/ci_workflow.cr
diorite/core/debug_command.cr
diorite/core/debug_material.cr
diorite/core/dsl.cr
diorite/core/frame_arena_batch.cr
diorite/core/geometry_builder.cr
diorite/core/math_helpers.cr
diorite/core/telemetry_graph.cr
diorite/diorite.cr
diorite/nodes/debug_draw_manager.cr
diorite/nodes/debug_nodes_3d.cr
diorite/nodes/debug_shape_2d.cr
diorite/nodes/debug_shape_3d.cr

Constant Summary

VERSION = "0.1.25"

Current version of the Diorite debug library.

Class Method Summary

Class Method Detail

def self.frame(arena : Lapis::Core::FrameArena = Lapis::Core::FrameArena.current, cap_3d_on_top : Int32 = FrameDrawBuffers::DEFAULT_ON_TOP_3D_CAPACITY, cap_3d_depth : Int32 = FrameDrawBuffers::DEFAULT_DEPTH_3D_CAPACITY, cap_2d : Int32 = FrameDrawBuffers::DEFAULT_2D_CAPACITY, & : FrameBatchContext -> ) : FrameDrawBuffers #

Carves per-frame 2D/3D vertex and line batches from Lapis::Core::FrameArena and yields a FrameBatchContext for immediate zero-allocation geometry assembly.

Diorite.frame do |batch|
  batch.line(from, to, color)
  batch.box(aabb, color)
end

def self.scoped_frame(arena : Lapis::Core::FrameArena = Lapis::Core::FrameArena.current, cap_3d_on_top : Int32 = FrameDrawBuffers::DEFAULT_ON_TOP_3D_CAPACITY, cap_3d_depth : Int32 = FrameDrawBuffers::DEFAULT_DEPTH_3D_CAPACITY, cap_2d : Int32 = FrameDrawBuffers::DEFAULT_2D_CAPACITY, & : FrameBatchContext -> ) : Void #

Executes a scoped Diorite.frame batch inside arena.scope, automatically rewinding the FrameArena bump pointer when the block completes.