class

Opal::UI::Mesh3D

Inherits Opal::UI::Control < Opal::UI::InputHookable < Opal::UI::Element < Opal::UI::Themable < Reference < Object

Interactive 3D Mesh Control that renders rotatable, light-shaded 3D primitives (Cube, Sphere, Cylinder, Pyramid, Torus) in terminal character cells. Supports mouse drag rotation, wheel zooming, and keyboard controls.

Constructors

new(shape : Symbol = :cube, pitch : Float64 = 0.4, yaw : Float64 = 0.6, roll : Float64 = 0.0, scale : Float64 = 7.0, auto_rotate : Bool = false, wireframe : Bool = false, color : Color | Symbol | String = :cyan)
Source

Instance methods

auto_rotate=(auto_rotate : Bool)
Source
auto_rotate?
Source
color
Source
color=(color : Color)
Source
current_mesh

Returns the Mesh3DData instance for current shape

Source
handle_key(key : Terminal::KeyEvent) : Bool

Default key event handler. Override in subclasses if not using @default_input_proc.

Source
handle_mouse(event : Terminal::MouseEvent) : Bool

Default mouse event handler. Override in subclasses if not using @default_input_proc.

Source
pitch
Source
pitch=(pitch : Float64)
Source
preferred_size(available_w : Int32, available_h : Int32) : Tuple(Int32, Int32)
Source
render(buffer : Buffer, x : Int32, y : Int32, width : Int32, height : Int32) : Nil
Source
roll
Source
roll=(roll : Float64)
Source
scale
Source
scale=(scale : Float64)
Source
shape
Source
shape=(shape : Symbol)
Source
tick

Updates procedural rotation if auto_rotate is active

Source
wireframe=(wireframe : Bool)
Source
wireframe?
Source
yaw=(yaw : Float64)
Source