class Godot::Node

Overview

=========================================================================== Node Idiomatic & Generic Extensions

Direct Known Subclasses

Defined in:

lapis/extras/operators.cr
lapis/extras/wildcards.cr
libgodot/classes/node.cr
libgodot/extensions/node.cr
libgodot/extensions/query.cr
libgodot/extensions/scene_tree.cr
libgodot/extensions/tween.cr
libgodot/generated/classes/classes_part1.cr
libgodot/timer.cr

Constant Summary

NOTIFICATION_ACCESSIBILITY_INVALIDATE = 3001_i64
NOTIFICATION_ACCESSIBILITY_UPDATE = 3000_i64
NOTIFICATION_APPLICATION_FOCUS_IN = 2016_i64
NOTIFICATION_APPLICATION_FOCUS_OUT = 2017_i64
NOTIFICATION_APPLICATION_PAUSED = 2015_i64
NOTIFICATION_APPLICATION_PIP_MODE_ENTERED = 2019_i64
NOTIFICATION_APPLICATION_PIP_MODE_EXITED = 2020_i64
NOTIFICATION_APPLICATION_RESUMED = 2014_i64
NOTIFICATION_CHILD_ORDER_CHANGED = 24_i64
NOTIFICATION_CRASH = 2012_i64
NOTIFICATION_DISABLED = 28_i64
NOTIFICATION_DRAG_BEGIN = 21_i64
NOTIFICATION_DRAG_END = 22_i64
NOTIFICATION_EDITOR_POST_SAVE = 9002_i64
NOTIFICATION_EDITOR_PRE_SAVE = 9001_i64
NOTIFICATION_ENABLED = 29_i64
NOTIFICATION_ENTER_TREE = 10_i64
NOTIFICATION_EXIT_TREE = 11_i64
NOTIFICATION_INTERNAL_PHYSICS_PROCESS = 26_i64
NOTIFICATION_INTERNAL_PROCESS = 25_i64
NOTIFICATION_MOVED_IN_PARENT = 12_i64
NOTIFICATION_OS_IME_UPDATE = 2013_i64
NOTIFICATION_OS_MEMORY_WARNING = 2009_i64
NOTIFICATION_PARENTED = 18_i64
NOTIFICATION_PATH_RENAMED = 23_i64
NOTIFICATION_PAUSED = 14_i64
NOTIFICATION_PHYSICS_PROCESS = 16_i64
NOTIFICATION_POST_ENTER_TREE = 27_i64
NOTIFICATION_PROCESS = 17_i64
NOTIFICATION_READY = 13_i64
NOTIFICATION_RESET_PHYSICS_INTERPOLATION = 2001_i64
NOTIFICATION_SCENE_INSTANTIATED = 20_i64
NOTIFICATION_TEXT_SERVER_CHANGED = 2018_i64
NOTIFICATION_TRANSLATION_CHANGED = 2010_i64
NOTIFICATION_UNPARENTED = 19_i64
NOTIFICATION_UNPAUSED = 15_i64
NOTIFICATION_VP_MOUSE_ENTER = 1010_i64
NOTIFICATION_VP_MOUSE_EXIT = 1011_i64
NOTIFICATION_WM_ABOUT = 2011_i64
NOTIFICATION_WM_CLOSE_REQUEST = 1006_i64
NOTIFICATION_WM_DPI_CHANGE = 1009_i64
NOTIFICATION_WM_GO_BACK_REQUEST = 1007_i64
NOTIFICATION_WM_MOUSE_ENTER = 1002_i64
NOTIFICATION_WM_MOUSE_EXIT = 1003_i64
NOTIFICATION_WM_OUTPUT_MAX_LINEAR_VALUE_CHANGED = 1013_i64
NOTIFICATION_WM_POSITION_CHANGED = 1012_i64
NOTIFICATION_WM_SIZE_CHANGED = 1008_i64
NOTIFICATION_WM_WINDOW_FOCUS_IN = 1004_i64
NOTIFICATION_WM_WINDOW_FOCUS_OUT = 1005_i64
STANDALONE_PARENTS = Hash(UInt64, Node).new

Constructors

Class Method Summary

Instance Method Summary

Instance methods inherited from class Godot::Object

==(other : Godot::Object) : Bool
==(other : Nil) : Bool
==
, _enter_tree : Void _enter_tree, _exit_tree : Void _exit_tree, _godot_bind_static_signals(force : Bool = false) : Void _godot_bind_static_signals, _godot_bind_static_signals_impl(tid : UInt64) : Void _godot_bind_static_signals_impl, _godot_call_tool_button(button_name : String) : Void _godot_call_tool_button, _godot_call_virtual(method_name : String, delta : Float64) : Void _godot_call_virtual, _godot_call_virtual_with_data(method_name : String, args : Pointer(Pointer(Void)), ret : Pointer(Void)) : Void _godot_call_virtual_with_data, _godot_get_property(prop_name : String, ret_ptr : Pointer(Void)) : Void _godot_get_property, _godot_set_property(prop_name : String, val_ptr : Pointer(Void)) : Void _godot_set_property, _mark_destroyed_by_engine! : Void _mark_destroyed_by_engine!, _physics_process(delta : Float64) : Void _physics_process, _process(delta : Float64) : Void _process, _ready : Void _ready, ~ : self ~, active? : Bool active?, add_user_signal(signal : String, arguments : Pointer(Void)) : Void add_user_signal, alive? : Bool alive?, as_a(type : T.class) : T forall T as_a, as_a?(type : T.class) : T | Nil forall T as_a?, as_g(type : T.class) : T forall T as_g, as_g?(type : T.class) : T | Nil forall T as_g?, as_t(type : T.class) : T forall T as_t, as_t?(type : T.class) : T | Nil forall T as_t?, await_signal(signal_name : String | Symbol, timeout_sec : Float64 | Nil = nil) : AwaitStatus(Array(Variant))
await_signal(signal_name : String | Symbol, timeout_sec : Number) : AwaitStatus(Array(Variant))
await_signal
, await_signal!(signal_name : String | Symbol, timeout_sec : Float64 | Nil = nil) : Array(Variant)
await_signal!(signal_name : String | Symbol, timeout_sec : Number) : Array(Variant)
await_signal!
, await_signal?(signal_name : String | Symbol, timeout_sec : Float64 | Nil = nil) : Array(Variant) | Nil
await_signal?(signal_name : String | Symbol, timeout_sec : Number) : Array(Variant) | Nil
await_signal?
, bind_property_list_changed(callback : Proc(R), once : Bool = false) : UInt64 forall R
bind_property_list_changed(once : Bool = false, &block : -> Void) : UInt64
bind_property_list_changed
, bind_script_changed(callback : Proc(R), once : Bool = false) : UInt64 forall R
bind_script_changed(once : Bool = false, &block : -> Void) : UInt64
bind_script_changed
, bind_static_signal(signal_name : String, callback : Proc(*T, R), once : Bool = false) : UInt64 forall T, R
bind_static_signal(signal_name : Symbol, callback : Proc(*T, R), once : Bool = false) : UInt64 forall T, R
bind_static_signal
, blocking_signals? : Bool blocking_signals?, build(&block : self -> Void) : self build, call(method : String, args : Array(Variant)) : Pointer(Void)
call(method : String, *args) : Pointer(Void)
call
, call_bool(method : String, *args) : Bool call_bool, call_deferred(method : String, *args) : Pointer(Void) call_deferred, call_f64(method : String, *args) : Float64 call_f64, call_i64(method : String, *args) : Int64 call_i64, call_obj(method : String, *args) : Node | Nil call_obj, call_obj_as(type : T.class, method : String, *args) : T | Nil forall T call_obj_as, call_str(method : String, *args) : String call_str, callv(method : String, arg_array : Pointer(Void)) : Pointer(Void) callv, can_translate_messages : Bool can_translate_messages, can_translate_messages? : Bool can_translate_messages?, cancel_free : Void cancel_free, cast_to(type : T.class) : T forall T cast_to, cast_to?(type : T.class) : T | Nil forall T cast_to?, check_alive! : Void check_alive!, class?(godot_class : String) : Bool class?, configure(&block : self -> Void) : self configure, connect(signal_name : String, flags : Godot::ConnectFlags = ::Godot::ConnectFlags::None, callback : Proc(Array(Variant), Void) | Nil = nil, receiver : Godot::Object | Nil = nil) : SignalSubscription
connect(signal_name : String, flags : Godot::ConnectFlags = ::Godot::ConnectFlags::None, receiver : Godot::Object | Nil = nil, &block : Array(Variant) -> Void) : SignalSubscription
connect(signal_name : Symbol, flags : Godot::ConnectFlags = ::Godot::ConnectFlags::None, &block : Array(Variant) -> Void) : SignalSubscription
connect(signal_name : String, listener_target : Godot::Object, method_name : Symbol, flags : Godot::ConnectFlags = ::Godot::ConnectFlags::None) : SignalSubscription
connect(signal : String, callable : Pointer(Void), flags : Int64 = 0_i64) : Godot::Error
connect
, connect_one_shot(signal_name : String, &block : Array(Variant) -> Void) : SignalSubscription connect_one_shot, connected?(signal : String, callable : Pointer(Void)) : Bool connected?, destroy : Void destroy, destroyed? : Bool destroyed?, disconnect(signal : String, callable : Pointer(Void)) : Void
disconnect(signal_name : String) : Void
disconnect(signal_name : Symbol) : Void
disconnect
, disconnect_all(signal_name : String | Symbol) : self
disconnect_all : self
disconnect_all
, editor_hint? : Bool editor_hint?, emit(signal_name : String | Symbol, *args) : self
emit(signal : BoundSignal, *args) : self
emit
, emit_property_list_changed : Void emit_property_list_changed, emit_script_changed : Void emit_script_changed, emit_signal(name : String) : Void
emit_signal(name : String, *args) : Void
emit_signal
, emit_static_signal(signal_name : String, *args : *T) : Int32 forall T
emit_static_signal(signal_name : Symbol, *args : *T) : Int32 forall T
emit_static_signal
, explicitly_freed? : Bool explicitly_freed?, frame_arena : Lapis::Core::FrameArena frame_arena, frame_buffer(type : T.class, max_elements : Int32) : Lapis::Core::ArenaBuffer(T) forall T frame_buffer, frame_scope(&block : Lapis::Core::FrameArena -> _) frame_scope, frame_slice(type : T.class, count : Int32) : Slice(T) forall T frame_slice, free : Void free, get(property : String) : Pointer(Void) get, get_class : String get_class, get_incoming_connections : Pointer(Void) get_incoming_connections, get_indexed(property_path : NodePath | String) : Pointer(Void) get_indexed, get_instance_id : Int64 get_instance_id, get_meta(name : String, default : Pointer(Void) | Nil = nil) : Pointer(Void)
get_meta(key : Symbol, default : Pointer(Void) | Nil = nil) : Pointer(Void)
get_meta(name : String, default : Pointer(Void) | Nil = nil) : Pointer(Void)
get_meta(name : String, default : Pointer(Void) | Nil = nil) : Pointer(Void)
get_meta(key : Symbol, default : Pointer(Void) | Nil = nil) : Pointer(Void)
get_meta(name : String, default : Pointer(Void) | Nil = nil) : Pointer(Void)
get_meta
, get_meta_color(key : String | Symbol) : Color get_meta_color, get_meta_f64(key : String | Symbol) : Float64 get_meta_f64, get_meta_i64(key : String | Symbol) : Int64 get_meta_i64, get_meta_list : Pointer(Void) get_meta_list, get_meta_str(key : String | Symbol) : String get_meta_str, get_meta_transform3d(key : String | Symbol) : Transform3D get_meta_transform3d, get_meta_vector2(key : String | Symbol) : Vector2 get_meta_vector2, get_meta_vector3(key : String | Symbol) : Vector3 get_meta_vector3, get_method_argument_count(method : String) : Int64 get_method_argument_count, get_method_list : Pointer(Void) get_method_list, get_property_list : Pointer(Void) get_property_list, get_script : Pointer(Void) get_script, get_signal_connection_list(signal : String) : Pointer(Void) get_signal_connection_list, get_signal_list : Pointer(Void) get_signal_list, get_translation_domain : String get_translation_domain, godot_as(type : T.class) : T forall T godot_as, godot_as?(type : T.class) : T | Nil forall T godot_as?, has_connections(signal : String) : Bool has_connections, has_connections?(signal : String) : Bool has_connections?, has_meta(name : String) : Bool
has_meta(key : String | Symbol) : Bool
has_meta
, has_meta?(name : String) : Bool has_meta?, has_method(method : String) : Bool has_method, has_method?(method : String) : Bool has_method?, has_signal(signal : String) : Bool has_signal, has_signal?(signal_name : String) : Bool has_signal?, has_user_signal(signal : String) : Bool has_user_signal, has_user_signal?(signal : String) : Bool has_user_signal?, hash(hasher) hash, if_alive : self | Nil if_alive, inspect(io : IO) : Void inspect, instance_id : UInt64 instance_id, is_blocking_signals : Bool is_blocking_signals, is_blocking_signals? : Bool is_blocking_signals?, is_class(godot_class : String) : Bool is_class, is_class?(godot_class : String) : Bool is_class?, is_connected(signal : String, callable : Pointer(Void)) : Bool is_connected, is_connected?(signal : String, callable : Pointer(Void)) : Bool is_connected?, is_queued_for_deletion : Bool is_queued_for_deletion, is_queued_for_deletion? : Bool is_queued_for_deletion?, is_valid? : Bool is_valid?, link_class_script : Void link_class_script, not_null? : Bool not_null?, notification(what : Int64, reversed : Bool = false) : Void notification, notify_property_list_changed : Void notify_property_list_changed, null? : Bool null?, pointer : Pointer(Void) pointer, pointer=(val : Pointer(Void)) pointer=, print(*args) print, printerr(*args) printerr, property_can_revert(property : String) : Bool property_can_revert, property_can_revert?(property : String) : Bool property_can_revert?, property_get_revert(property : String) : Pointer(Void) property_get_revert, property_list_changed : Godot::TypedSignal() property_list_changed, property_list_changed=(val : Godot::BoundSignal) : Godot::BoundSignal property_list_changed=, property_list_changed_signal_hash : UInt64 property_list_changed_signal_hash, property_list_changed_slot : Lapis::Core::StaticSignalSlot() property_list_changed_slot, puts(*args) puts, queued_for_deletion? : Bool queued_for_deletion?, queued_for_deletion_fast? : Bool queued_for_deletion_fast?, rebind_static_signals! : Void rebind_static_signals!, remove_meta(name : String) : Void
remove_meta(key : String | Symbol) : Void
remove_meta
, remove_user_signal(signal : String) : Void remove_user_signal, script_changed : Godot::TypedSignal() script_changed, script_changed=(val : Godot::BoundSignal) : Godot::BoundSignal script_changed=, script_changed_signal_hash : UInt64 script_changed_signal_hash, script_changed_slot : Lapis::Core::StaticSignalSlot() script_changed_slot, set(property : String, value : Pointer(Void)) : Void
set(property : String | Symbol, value : T) : Void forall T
set
, set_block_signals(enable : Bool) : Void set_block_signals, set_deferred(property : String, value : Pointer(Void)) : Void set_deferred, set_indexed(property_path : NodePath | String, value : Pointer(Void)) : Void set_indexed, set_message_translation(enable : Bool) : Void set_message_translation, set_meta(key : String | Symbol, value : String | Int32 | Int64 | Float32 | Float64 | Bool | Symbol | Vector2 | Vector2i | Vector3 | Vector3i | Color | Transform3D | Basis | AABB | Quaternion | Plane | Rect2) : Void
set_meta(key : String | Symbol, value : Godot::Object) : Void
set_meta(name : String, value : Pointer(Void)) : Void
set_meta(key : Symbol, value : Pointer(Void)) : Void
set_meta(key : String | Symbol, value : Variant) : Void
set_meta
, set_script(script : Pointer(Void)) : Void set_script, set_translation_domain(domain : String) : Void set_translation_domain, signal(name : String) : Godot::BoundSignal
signal(sym : Symbol) : Godot::BoundSignal
signal
, signal_connection_count(signal_name : String) : Int32 signal_connection_count, signal_target_id : UInt64 signal_target_id, static_signal_slot(signal_name : String, *types : *T) forall T
static_signal_slot(signal_name : Symbol, *types : *T) forall T
static_signal_slot
, to_s(io : IO) : Void to_s, to_string : String to_string, to_unsafe : Pointer(Void) to_unsafe, tr(message : String, context : String = "") : String tr, tr_n(message : String, plural_message : String, n : Int64, context : String = "") : String tr_n, try? : self | Nil
try?(&)
try?
, unbind_property_list_changed(callback : Proc(R)) : Bool forall R
unbind_property_list_changed(token : UInt64) : Bool
unbind_property_list_changed
, unbind_script_changed(callback : Proc(R)) : Bool forall R
unbind_script_changed(token : UInt64) : Bool
unbind_script_changed
, unbind_static_signal(signal_name : String, callback : Proc(*T, R)) : Bool forall T, R
unbind_static_signal(signal_name : Symbol, callback : Proc(*T, R)) : Bool forall T, R
unbind_static_signal(token : UInt64) : Bool
unbind_static_signal

Constructor methods inherited from class Godot::Object

~ : self ~, create : self
create(&block : self -> ) : self
create
, new(pointer : Pointer(Void) = Pointer(Void).null)
new(&block : self -> ) : self
new

Class methods inherited from class Godot::Object

_godot_has_virtual_method(method_name : String) : Bool _godot_has_virtual_method, cast_to(obj : Object, type : T.class) : T forall T cast_to, cast_to?(obj : Object, type : T.class) : T | Nil forall T cast_to?, find_script_info_for_node(node : Godot::Object) : NamedTuple(path: String, line: Int32, class_name: String, parent_name: String, is_tool: Bool) | Nil find_script_info_for_node, find_script_location_for_class(target_cls : String) : Tuple(String, Int32) find_script_location_for_class, find_script_path_for_class(target_cls : String) : String find_script_path_for_class, is_instance_id_valid(id : Int | UInt64) : Bool is_instance_id_valid, is_internal_or_brush_class?(cls_name : String) : Bool is_internal_or_brush_class?

Instance methods inherited from class Object

try?(&)
try?
try?

Constructor Detail

def self.~ : self #

Class unary ~ returns typed instance looked up from active NodeContext (by name first, then searching children)


def self.instantiate(path_or_scene : String | PackedScene, edit_state : Int64 = 0_i64, cached : Bool = true) : self #

Instantiates a PackedScene (.tscn) from path or scene instance directly as this Node type. When cached is true (default), leverages PreloadCache to prevent redundant disk I/O.


def self.instantiate(path_or_scene : String | PackedScene, edit_state : Int64 = 0_i64, cached : Bool = true, &block : self -> Void) : self #

Instantiates a PackedScene (.tscn) from path or scene instance directly as this Node type and configures it in a block.


def self.new(pointer : Pointer(Void) = Pointer(Void).null) #

Class Method Detail

def self.cast_to?(node : Node, type : T.class) : T | Nil forall T #

Attempts to downcast or wrap this node as type T. Returns nil if node does not inherit from T.


def self.decompose_node_path(raw_path : String) : Tuple(Bool, String, String | Nil) #

Decomposes a raw path string, stripping leading '$' and extracting unique root prefix if present. Returns {is_unique, root_name, subpath}


def self.get_orphan_node_ids : Pointer(Void) #

def self.instantiate?(path_or_scene : String | PackedScene, edit_state : Int64 = 0_i64, cached : Bool = true) : self | Nil #

Safe nilable variant: instantiates a PackedScene directly as this Node type, returning nil on load failure or type mismatch.


def self.instantiate?(path_or_scene : String | PackedScene, edit_state : Int64 = 0_i64, cached : Bool = true, &block : self -> Void) : self | Nil #

Safe nilable variant configuring the instance in a block when not nil.


def self.print_orphan_nodes : Void #

Instance Method Detail

def %(unique_name : String | NodePath) : Node #

Scene Unique Node operator (mirrors GDScript %): node % "HealthBar"


def %(type : T.class) : T forall T #

Typed Scene Unique Node operator: node % ProgressBar


def *(tuple : Tuple(String, T.class)) : Array(T) forall T #

Multi-node typed wildcard glob query operator: self * {"Node/*/Mesh", MeshInstance3D}


def *(tuple : Tuple(Regex, T.class)) : Array(T) forall T #

Multi-node typed regex query operator: self * {/^HitBox_\d+$/, Area3D}


def *(pattern : String) : Array(Node) #

Multi-node wildcard glob query operator: self * "Node/*/Mesh"


def *(regex : Regex) : Array(Node) #

Multi-node regex query operator: self * /^HitBox_\d+$/


def /(path : String | NodePath) : Node #

Path traversal operator: node / "Camera3D" or node / node_path!("Camera3D")


def /(type : T.class) : T forall T #

Typed path traversal operator: node / Sprite2D


def <<(child : Godot::Node) : self #

Appends child to this node, enabling fluent chaining (parent << child1 << child2)


def <<(type : T.class) forall T #

Typed ancestor navigation: hitbox << Player


def [](path : String | NodePath, type : ::Array(T).class) : Array(T) forall T #

Multi-node typed glob query returning Array(T)


def [](path : String | NodePath, type : T.class) : T forall T #

Typed path lookup: self["Visuals/Sprite2D", Sprite2D]


def [](type : ::Array(T).class, path : String | NodePath) : Array(T) forall T #

Flexible type-first overloads for Array(T)


def [](type : T.class, path : String | NodePath) : T forall T #

Flexible type-first overload: self[Sprite2D, "Visuals/Sprite2D"]


def [](path : String) : Node #

Indexer syntactic sugar for retrieving a child node by path (e.g. self["Camera3D"])


def [](path : NodePath) : Node #

NodePath indexers


def [](type : T.class) : T forall T #

Type-inferred typed indexer: self[Sprite2D] -> looks up "Sprite2D" cast to Sprite2D


def []?(path : String | NodePath, type : ::Array(T).class) : Array(T) | Nil forall T #

Safe multi-node typed glob query returning nil if the result array would have been empty


def []?(path : String | NodePath, type : T.class) : T | Nil forall T #

Safe typed path lookup: self["Visuals/Sprite2D", Sprite2D]?


def []?(type : ::Array(T).class, path : String | NodePath) : Array(T) | Nil forall T #

def []?(type : T.class, path : String | NodePath) : T | Nil forall T #

Safe flexible type-first overload: self[Sprite2D, "Visuals/Sprite2D"]?


def []?(path : String) : Node | Nil #

Safe indexer returning nil if node not found (e.g. self["Camera3D"]?)


def []?(path : NodePath) : Node | Nil #

def []?(type : T.class) : T | Nil forall T #

Safe type-inferred indexer: self[Sprite2D]? -> returns Sprite2D? or nil if not found


def _enter_tree : Void #

Lifecycle callback called when the node enters the tree hierarchy.


def _exit_tree : Void #

Lifecycle callback called when the node exits the tree hierarchy.


def _physics_process(delta : Float64) : Void #

Fixed-rate physics process callback receiving delta timestep in seconds (Float64).


def _process(delta : Float64) : Void #

Per-frame process callback receiving delta timestep in seconds (Float64).


def _ready : Void #

Lifecycle callback called when the node enters the active scene tree.


def ~ : self #

Instance unary ~ returns self, allowing ~self or nested unary chaining


def add_child(type : T.class, force_readable_name : Bool = false, internal : InternalMode | Int = 0, &block : T -> Void) : T forall T #

Overload: Instantiates a Node of class T, configures it in block, adds it as child, and returns it.


def add_child(type : T.class, force_readable_name : Bool = false, internal : InternalMode | Int = 0) : T forall T #

Overload: Instantiates a Node of class T, adds it as child, and returns it.


def add_child(scene : PackedScene, force_readable_name : Bool = false, internal : InternalMode | Int = 0) : Node #

Overload: Instantiates a PackedScene as Node, adds it as child, and returns it.


def add_child(node : T, force_readable_name : Bool = false, internal : InternalMode | Int = 0) : T forall T #

Adds a child node. Falls back to local children array when running standalone. Enforces thread-safety: off-thread calls raise ThreadAffinityError when attached to SceneTree. Returns concrete instance type T for seamless chaining and assignment.


def add_child(scene : PackedScene, force_readable_name : Bool = false, internal : InternalMode | Int = 0, &block : Node -> Void) : Node #

Overload: Instantiates a PackedScene as Node, configures it in block, adds it as child, and returns it.


def add_child(node : T, force_readable_name : Bool = false, internal : InternalMode | Int = 0, &block : T -> Void) : T forall T #

Overload: Adds an existing child node, configures it in block, and returns concrete instance type T.


def add_child(path_or_scene : String | PackedScene, type : T.class, force_readable_name : Bool = false, internal : InternalMode | Int = 0, &block : T -> Void) : T forall T #

Overload: Instantiates a scene at path or PackedScene as type T, configures in block, adds as child, and returns it.


def add_child(scene : PackedScene, *, as type : T.class, force_readable_name : Bool = false, internal : InternalMode | Int = 0, &block : T -> Void) : T forall T #

Overload: Instantiates a PackedScene as type T, configures it in block, adds it as child, and returns it.


def add_child(path_or_scene : String | PackedScene, type : T.class, force_readable_name : Bool = false, internal : InternalMode | Int = 0) : T forall T #

Overload: Instantiates a scene at path or PackedScene as type T, adds as child, and returns it.


def add_child(scene : PackedScene, *, as type : T.class, force_readable_name : Bool = false, internal : InternalMode | Int = 0) : T forall T #

Overload: Instantiates a PackedScene as type T, adds it as child, and returns it.


def add_child(scene_path : String, *, as type : T.class, force_readable_name : Bool = false, internal : InternalMode | Int = 0, &block : T -> Void) : T forall T #

Overload: Loads scene at path, instantiates as type T, configures in block, adds as child, and returns it.


def add_child(scene_path : String, *, as type : T.class, force_readable_name : Bool = false, internal : InternalMode | Int = 0) : T forall T #

Overload: Loads scene at path, instantiates as type T, adds as child, and returns it.


def add_sibling(type : T.class, force_readable_name : Bool = false, &block : T -> Void) : T forall T #

Overload: Instantiates a Node of class T, configures it in block, adds it as sibling, and returns it.


def add_sibling(type : T.class, force_readable_name : Bool = false) : T forall T #

Overload: Instantiates a Node of class T, adds it as sibling, and returns it.


def add_sibling(scene : PackedScene, force_readable_name : Bool = false) : Node #

Overload: Instantiates a PackedScene as Node, adds it as sibling, and returns it.


def add_sibling(sibling : T, force_readable_name : Bool = false) : T forall T #

def add_sibling(scene : PackedScene, force_readable_name : Bool = false, &block : Node -> Void) : Node #

Overload: Instantiates a PackedScene as Node, configures it in block, adds it as sibling, and returns it.


def add_sibling(sibling : T, force_readable_name : Bool = false, &block : T -> Void) : T forall T #

Overload: Adds an existing sibling node, configures it in block, and returns concrete type T.


def add_sibling(path_or_scene : String | PackedScene, type : T.class, force_readable_name : Bool = false, &block : T -> Void) : T forall T #

Overload: Instantiates a scene at path or PackedScene as type T, configures in block, adds as sibling, and returns it.


def add_sibling(scene : PackedScene, *, as type : T.class, force_readable_name : Bool = false, &block : T -> Void) : T forall T #

Overload: Instantiates a PackedScene as type T, configures it in block, adds it as sibling, and returns it.


def add_sibling(path_or_scene : String | PackedScene, type : T.class, force_readable_name : Bool = false) : T forall T #

Overload: Instantiates a scene at path or PackedScene as type T, adds as sibling, and returns it.


def add_sibling(scene : PackedScene, *, as type : T.class, force_readable_name : Bool = false) : T forall T #

Overload: Instantiates a PackedScene as type T, adds it as sibling, and returns it.


def add_sibling(scene_path : String, *, as type : T.class, force_readable_name : Bool = false, &block : T -> Void) : T forall T #

Overload: Loads scene at path, instantiates as type T, configures in block, adds as sibling, and returns it.


def add_sibling(scene_path : String, *, as type : T.class, force_readable_name : Bool = false) : T forall T #

Overload: Loads scene at path, instantiates as type T, adds as sibling, and returns it.


def add_to_group(group : String, persistent : Bool = false) : Void #

Adds this node to the specified group (with default non-persistent flag)


def after(delay : ::Time::Span | Number, &block : TimerHandle -> Void) : TimerHandle #

Schedules a one-shot delay scoped to this node's lifecycle


def ancestor(type : T.class) : T forall T #

Walks up the parent hierarchy to find the nearest ancestor of type T, raising NodeNotFoundError if not found.


def ancestor?(pattern : String, type : T.class, case_sensitive : Bool = true) : T | Nil forall T #

Walks up the parent hierarchy to find the nearest ancestor matching the pattern and type.


def ancestor?(type : T.class) : T | Nil forall T #

Walks up the parent hierarchy to find the nearest ancestor of type T, returning nil if not found.


def ancestor?(pattern : String, case_sensitive : Bool = true) : Node | Nil #

Walks up the parent hierarchy to find the nearest ancestor matching pattern.


def ancestor_in_group?(group : String) : Node | Nil #

Returns the nearest ancestor node (or nil) belonging to #group.


def ancestor_in_group?(group : Symbol) : Node | Nil #

def ancestor_of?(node : Node) : Bool #

Predicate alias for #is_ancestor_of


def ancestors(type : T.class) : Array(T) forall T #

Returns an Array containing all ancestor nodes up to the root cast to type T.


def ancestors : Array(Node) #

Returns an Array containing all ancestor nodes up to the root.


def atr(message : String, context : String = "") : String #

def atr_n(message : String, plural_message : String, n : Int64, context : String = "") : String #

def auto_translate_mode #

Property #auto_translate_mode getter


def auto_translate_mode=(val : Int | Enum) #

Property #auto_translate_mode setter


def bind_child_entered_tree(callback : Proc(Node, R), once : Bool = false) : UInt64 forall R #

def bind_child_entered_tree(once : Bool = false, &block : Node -> Void) : UInt64 #

def bind_child_exiting_tree(callback : Proc(Node, R), once : Bool = false) : UInt64 forall R #

def bind_child_exiting_tree(once : Bool = false, &block : Node -> Void) : UInt64 #

def bind_child_order_changed(callback : Proc(R), once : Bool = false) : UInt64 forall R #

def bind_child_order_changed(once : Bool = false, &block : -> Void) : UInt64 #

def bind_editor_description_changed(callback : Proc(Node, R), once : Bool = false) : UInt64 forall R #

def bind_editor_description_changed(once : Bool = false, &block : Node -> Void) : UInt64 #

def bind_editor_state_changed(callback : Proc(R), once : Bool = false) : UInt64 forall R #

def bind_editor_state_changed(once : Bool = false, &block : -> Void) : UInt64 #

def bind_ready(callback : Proc(R), once : Bool = false) : UInt64 forall R #

def bind_ready(once : Bool = false, &block : -> Void) : UInt64 #

def bind_renamed(callback : Proc(R), once : Bool = false) : UInt64 forall R #

def bind_renamed(once : Bool = false, &block : -> Void) : UInt64 #

def bind_replacing_by(callback : Proc(Node, R), once : Bool = false) : UInt64 forall R #

def bind_replacing_by(once : Bool = false, &block : Node -> Void) : UInt64 #

def bind_tree_entered(callback : Proc(R), once : Bool = false) : UInt64 forall R #

def bind_tree_entered(once : Bool = false, &block : -> Void) : UInt64 #

def bind_tree_exited(callback : Proc(R), once : Bool = false) : UInt64 forall R #

def bind_tree_exited(once : Bool = false, &block : -> Void) : UInt64 #

def bind_tree_exiting(callback : Proc(R), once : Bool = false) : UInt64 forall R #

def bind_tree_exiting(once : Bool = false, &block : -> Void) : UInt64 #

def busy_setting_up_children? : Bool #

Returns true if Godot currently has this parent node locked (data.blocked > 0) while propagating #_enter_tree or #_ready to its descendants, during which synchronous #add_child fails in Godot.


def can_auto_translate : Bool #

def can_auto_translate? : Bool #

Predicate alias for #can_auto_translate


def can_process : Bool #

def can_process? : Bool #

Predicate alias for #can_process


def change_scene!(path : String) : Nil #

Changes running scene via the active SceneTree


def change_scene!(scene : PackedScene) : Nil #

Changes running scene to PackedScene via the active SceneTree


def child_count : Int32 #

Idiomatic child count getter


def child_entered_tree : Godot::TypedSignal(Node) #

def child_entered_tree=(val : Godot::BoundSignal) : Godot::BoundSignal #

Identity setter enabling compound operator sugar (node.child_entered_tree += ->handler, node.child_entered_tree -= ->handler)


def child_entered_tree_signal_hash : UInt64 #

def child_entered_tree_slot : Lapis::Core::StaticSignalSlot(Node) #

def child_exiting_tree : Godot::TypedSignal(Node) #

def child_exiting_tree=(val : Godot::BoundSignal) : Godot::BoundSignal #

Identity setter enabling compound operator sugar (node.child_exiting_tree += ->handler, node.child_exiting_tree -= ->handler)


def child_exiting_tree_signal_hash : UInt64 #

def child_exiting_tree_slot : Lapis::Core::StaticSignalSlot(Node) #

def child_order_changed : Godot::TypedSignal() #

def child_order_changed=(val : Godot::BoundSignal) : Godot::BoundSignal #

Identity setter enabling compound operator sugar (node.child_order_changed += ->handler, node.child_order_changed -= ->handler)


def child_order_changed_signal_hash : UInt64 #

def child_order_changed_slot : Lapis::Core::StaticSignalSlot() #

def children(include_internal : Bool = false) : Array(Node) #

Alias for #get_children (falls back to local children array when running standalone)


def clear_children(include_internal : Bool = false) : Void #

Removes and frees all child nodes under this node.


def create_child(type : T.class, &block : T -> ) : T forall T #

Idiomatic alias for spawn_child


def create_child(type : T.class) : T forall T #

Idiomatic alias for spawn_child


def create_tween : Tween #

def current_scene_as(type : T.class) : T | Nil forall T #

Returns the current running scene cast to wrapper type T


def defer_add_child(node : Node, force_readable_name : Bool = false, internal : InternalMode | Int = 0) : Void #

Explicit cross-thread helper that safely defers addition via Godot's MessageQueue


def defer_move_child(child_node : Node, to_position : Int64 | Int32) : Void #

Explicit cross-thread helper that safely defers moving child via Godot's MessageQueue


def defer_queue_free : Void #

Explicit cross-thread helper that safely queues deletion via Godot's MessageQueue


def defer_remove_child(node : Node) : Void #

Explicit cross-thread helper that safely defers removal via Godot's MessageQueue


def defer_reparent(new_parent : Node, keep_global_transform : Bool = true) : Void #

Explicit cross-thread helper that safely defers reparenting via Godot's MessageQueue


def descendants(type : T.class) : Array(T) forall T #

Returns all descendant nodes of this node matching or cast to type T.


def descendants : Array(Node) #

Returns all descendant nodes of this node as Array(Node).


def destroy : Void #

Safely destroys this node, unregistering parent references in standalone mode.


def displayed_folded? : Bool #

Predicate alias for #is_displayed_folded


def duplicate(flags : Int64 = 15_i64) : Node #

def each_child(include_internal : Bool = false, &block : Node -> Void) : Void #

Yields each child node without allocating an intermediate array.


def each_descendant(type : T.class, &) : Void forall T #

Streaming iteration over all descendants cast to type T with receiver and argument scoping.

Example:

each_descendant(Light3D) do
  light_energy = 0.0_f32
end

def each_descendant(&) : Void #

Streaming iteration over all descendants with receiver and argument scoping.

Uses with node yield node to provide receiver scoping, block parameters, or block-pass shorthand.

Examples:

# Receiver scoping:
each_descendant do
  hide if is_a?(Godot::VisualInstance3D)
end

# Block-pass shorthand:
each_descendant(&.queue_free)

def each_node(pattern : String, case_sensitive : Bool = true, &) : Void #

Streams through all nodes matching pattern, scoping each node as both self and the block argument.

Uses with node yield node, allowing three distinct calling styles:

  1. Receiver-scoped block (implicit self dispatch):
    each_node("Enemies/*") do
      queue_free
    end
  2. Block parameter syntax:
    each_node("Enemies/*") do |enemy|
      enemy.queue_free
    end
  3. Block-pass shorthand:
    each_node("Enemies/*", &.queue_free)

def each_node(pattern : String, type : T.class, case_sensitive : Bool = true, &) : Void forall T #

Streams through all nodes matching pattern cast to type T, scoping each node as both self and the block argument.


def editable_instance?(node : Node) : Bool #

Predicate alias for #is_editable_instance


def editor_description #

Property #editor_description getter


def editor_description=(val) #

Property #editor_description setter


def editor_description_changed : Godot::TypedSignal(Node) #

def editor_description_changed=(val : Godot::BoundSignal) : Godot::BoundSignal #

Identity setter enabling compound operator sugar (node.editor_description_changed += ->handler, node.editor_description_changed -= ->handler)


def editor_description_changed_signal_hash : UInt64 #

def editor_description_changed_slot : Lapis::Core::StaticSignalSlot(Node) #

def editor_state_changed : Godot::TypedSignal() #

def editor_state_changed=(val : Godot::BoundSignal) : Godot::BoundSignal #

Identity setter enabling compound operator sugar (node.editor_state_changed += ->handler, node.editor_state_changed -= ->handler)


def editor_state_changed_signal_hash : UInt64 #

def editor_state_changed_slot : Lapis::Core::StaticSignalSlot() #

def emit_child_entered_tree(*args) : Void #

def emit_child_exiting_tree(*args) : Void #

def emit_child_order_changed : Void #

def emit_editor_description_changed(*args) : Void #

def emit_editor_state_changed : Void #

def emit_ready : Void #

def emit_renamed : Void #

def emit_replacing_by(*args) : Void #

def emit_tree_entered : Void #

def emit_tree_exited : Void #

def emit_tree_exiting : Void #

def engine_add_child(node : Node, force_readable_name : Bool = false, internal : InternalMode | Int = 0) : Void #

def engine_add_sibling(sibling : Node, force_readable_name : Bool = false) : Void #

def every(interval : ::Time::Span | Number, &block : TimerHandle -> Void) : TimerHandle #

Schedules a recurring timer scoped to this node's lifecycle


def find_ancestor_as(type : T.class) : T | Nil forall T #

Searches upward in the scene hierarchy (through parents) for an ancestor of type T. Returns the ancestor cast to T, or nil if not found.


def find_ancestor_as!(type : T.class) : T forall T #

Searches upward in the scene hierarchy for an ancestor of type T. Raises NodeNotFoundError if not found.


def find_child(pattern : String, recursive : Bool = true, owned : Bool = true) : Node #

Finds an existing child node matching pattern.


def find_child(regex : Regex, recursive : Bool = true) : Node | Nil #

Finds the first child or descendant matching the regex pattern


def find_child?(pattern : String, recursive : Bool = true, owned : Bool = false) : Node | Nil #

Finds child node matching pattern, returning nil if not found


def find_child_as(type : T.class, pattern : String, recursive : Bool = true, owned : Bool = false) : T | Nil forall T #

Finds child node matching pattern and casts to T, returning nil if not found


def find_child_by_regex(regex : Regex, recursive : Bool = true) : Node | Nil #

Alias for find_child(regex)


def find_children(pattern : String, get_type : String = "", recursive : Bool = true, owned : Bool = true) : Pointer(Void) #

def find_children(regex : Regex, recursive : Bool = true) : Array(Node) #

Finds all children or descendants matching the regex pattern


def find_children(regex : Regex, type : T.class, recursive : Bool = true) : Array(T) forall T #

Finds all children or descendants matching the regex pattern filtered and cast to Array(T)


def find_children_by_regex(regex : Regex, recursive : Bool = true) : Array(Node) #

Alias for find_children(regex)


def find_parent(pattern : String) : Node #

def first_child?(type : T.class) : T | Nil forall T #

Returns the first child node cast to type T, or nil if none found.


def first_child? : Node | Nil #

Returns the first child node, or nil if this node has no children.


def first_node(pattern : String, case_sensitive : Bool = true) : Node #

Returns the first node matching pattern, raising NodeNotFoundError if not found.


def first_node(pattern : String, type : T.class, case_sensitive : Bool = true) : T forall T #

Returns the first node matching pattern cast to type T, raising NodeNotFoundError if not found.


def first_node?(pattern : String, case_sensitive : Bool = true) : Node | Nil #

Returns the first node matching pattern, or nil if none found.


def first_node?(pattern : String, type : T.class, case_sensitive : Bool = true) : T | Nil forall T #

Returns the first node matching pattern cast to type T, or nil if none found or type mismatch.


def first_node_in_group(group : String, type : T.class) : T forall T #

Returns the first node in the given group cast to type T, raising NodeNotFoundError if none found.


def first_node_in_group(group : String) : Node #

Returns the first node in the given group, raising NodeNotFoundError if none found.


def first_node_in_group?(group : String, type : T.class) : T | Nil forall T #

Returns the first node in the given group cast to type T, or nil if none found.


def first_node_in_group?(group : String) : Node | Nil #

Returns the first node in the given group, or nil if none found.


def get_accessibility_element : Int64 #

def get_auto_translate_mode : AutoTranslateMode #

def get_child(idx : Int64, include_internal : Bool = false) : Node #

Returns the child node at index idx. Falls back to local standalone children list when unparented/headless.


def get_child(idx : Int, include_internal : Bool = false) : Node #

def get_child?(idx : Int, include_internal : Bool = false) : Node | Nil #

Retrieves child at specified index, or nil if not found


def get_child_as(type : T.class, idx : Int, include_internal : Bool = false) : T | Nil forall T #

Retrieves child at specified index cast to type T, or nil if not found or not matching type


def get_child_count(include_internal : Bool = false) : Int64 #

Returns the number of child nodes belonging to this node. Falls back to local standalone children list when unparented/headless.


def get_children(include_internal : Bool = false) : Array(Node) #

Returns an Array containing all child nodes belonging to this node.


def get_children_as(type : T.class, include_internal : Bool = false) : Array(T) forall T #

Returns all children of this node matching or cast to type T.


def get_editor_description : String #

def get_groups : Pointer(Void) #

def get_index(include_internal : Bool = false) : Int64 #

def get_last_exclusive_window : Window #

def get_multiplayer : MultiplayerAPI #

def get_multiplayer_authority : Int64 #

def get_name : String #

Returns the node name


def get_node(path : String) : Node #

Retrieves a child or sibling node by NodePath string. Returns the Node if found, or produces an error if the node does not exist.


def get_node(path : NodePath) : Node #

Overloads for NodePath


def get_node(path : NodePath | String) : Node #

def get_node?(path : String) : Node | Nil #

Retrieves a child or sibling node by NodePath string, or returns nil if not found. Transparently supports leading '$', scene-unique '%' prefixes, '%UniqueRoot/sub/path', and wildcard patterns.


def get_node?(path : NodePath) : Node | Nil #

def get_node_and_resource(path : NodePath | String) : Pointer(Void) #

def get_node_as(path : String | NodePath, type : T.class) : T forall T #

Retrieves a child node cast to the specified Crystal class type T. Returns the node cast to T, or produces an error if the node does not exist or cannot be cast.


def get_node_as?(path : String | NodePath, type : T.class) : T | Nil forall T #

Retrieves a child node cast to the specified Crystal class type T, or nil if not found or type mismatch.


def get_node_or_null(path : String) : Node | Nil #

Fetches a node by String path. Similar to #get_node, but returns nil if path does not point to a valid node.


def get_node_or_null(path : NodePath) : Node | Nil #

def get_node_or_null(path : NodePath | String) : Node #

def get_node_rpc_config : Pointer(Void) #

def get_nodes(pattern : String, case_sensitive : Bool = true) : Array(Node) #

Returns all child/descendant nodes matching the glob pattern.

Example:

all_coins = get_nodes("Coins/*")

def get_nodes(pattern : String, type : T.class, case_sensitive : Bool = true) : Array(T) forall T #

Returns all nodes matching the glob pattern filtered and cast to Array(T). Only nodes inheriting from or matching type T are returned.

Example:

enemies = get_nodes("Enemies/*", Enemy)
enemies.each(&.alert!)

def get_orphan_node_ids : Pointer(Void) #

Instance convenience delegator for static method #get_orphan_node_ids


def get_owner : Node #

def get_parent : Node #

Returns the parent Node. Falls back to local standalone parents map when running without engine host.


def get_parent? : Node | Nil #

Returns the parent Node, or nil if orphan


def get_parent_as(type : T.class) : T | Nil forall T #

Returns the parent node cast to T, or nil if parent is not of type T or is null


def get_path : NodePath #

def get_path_to(node : Node, use_unique_path : Bool = false) : NodePath #

def get_physics_interpolation_mode : PhysicsInterpolationMode #

def get_physics_process_delta_time : Float64 #

def get_physics_process_priority : Int64 #

def get_process_delta_time : Float64 #

def get_process_mode : ProcessMode #

def get_process_priority : Int64 #

def get_process_thread_group : ProcessThreadGroup #

def get_process_thread_group_order : Int64 #

def get_process_thread_messages : ProcessThreadMessages #

def get_scene_file_path : String #

def get_scene_instance_load_placeholder : Bool #

def get_scene_instance_load_placeholder? : Bool #

def get_tree : SceneTree #

def get_tree? : SceneTree | Nil #

Returns the SceneTree containing this node, or nil if not inside the tree


def get_tree_string : String #

def get_tree_string_pretty : String #

def get_unique_node_as(unique_name : String, type : T.class) : T | Nil forall T #

Returns the scene unique node with name %unique_name cast to T


def get_viewport : Viewport #

def get_viewport? : Viewport | Nil #

Returns the viewport this node is attached to, or nil if detached/orphan


def get_window : Window #

def greater_than?(node : Node) : Bool #

Predicate alias for #is_greater_than


def group(name : String | Symbol) : GroupQuery #

Returns a fluent GroupQuery for the specified node group.


def has_node(path : NodePath | String) : Bool #

def has_node?(path : NodePath | String) : Bool #

Predicate alias for #has_node


def has_node_and_resource(path : NodePath | String) : Bool #

def has_node_and_resource?(path : NodePath | String) : Bool #

Predicate alias for #has_node_and_resource


def in_group?(group_name : String) : Bool #

Returns true if this node belongs to the given node group.


def in_group?(group_name : Symbol) : Bool #

Returns true if this node belongs to the given node group specified as a Symbol.


def in_group?(group_name : String | Symbol) : Bool #

Returns true if this node belongs to the given node group specified as String or Symbol.


def in_group?(*groups : String | Symbol) : Bool #

Returns true if this node belongs to any of the specified groups.

Supports both String and Symbol identifiers interchangeably.

Examples:

if enemy.in_group?(:bosses, :minions)
  trigger_combat_music
end

def in_group_or_ancestor?(group : String) : Bool #

Checks if this node, or any ancestor above it in the scene tree, belongs to #group.


def in_group_or_ancestor?(group : Symbol) : Bool #

def inside_tree? : Bool #

Predicate alias for #is_inside_tree


def is_ancestor_of(node : Node) : Bool #

def is_ancestor_of?(node : Node) : Bool #

Predicate alias for #is_ancestor_of


def is_displayed_folded : Bool #

def is_displayed_folded? : Bool #

Predicate alias for #is_displayed_folded


def is_editable_instance(node : Node) : Bool #

def is_editable_instance?(node : Node) : Bool #

Predicate alias for #is_editable_instance


def is_greater_than(node : Node) : Bool #

def is_greater_than?(node : Node) : Bool #

Predicate alias for #is_greater_than


def is_in_group(group : String) : Bool #

def is_in_group?(group : String) : Bool #

Predicate alias for #is_in_group


def is_inside_tree : Bool #

def is_inside_tree? : Bool #

Predicate alias for #is_inside_tree


def is_multiplayer_authority : Bool #

def is_multiplayer_authority? : Bool #

Predicate alias for #is_multiplayer_authority


def is_node_ready : Bool #

def is_node_ready? : Bool #

Predicate alias for #is_node_ready


def is_part_of_edited_scene : Bool #

def is_part_of_edited_scene? : Bool #

Predicate alias for #is_part_of_edited_scene


def is_physics_interpolated : Bool #

def is_physics_interpolated? : Bool #

Predicate alias for #is_physics_interpolated


def is_physics_interpolated_and_enabled : Bool #

def is_physics_interpolated_and_enabled? : Bool #

def is_physics_processing : Bool #

def is_physics_processing? : Bool #

Predicate alias for #is_physics_processing


def is_physics_processing_internal : Bool #

def is_physics_processing_internal? : Bool #

Predicate alias for #is_physics_processing_internal


def is_processing : Bool #

def is_processing? : Bool #

Predicate alias for #is_processing


def is_processing_input : Bool #

def is_processing_input? : Bool #

Predicate alias for #is_processing_input


def is_processing_internal : Bool #

def is_processing_internal? : Bool #

Predicate alias for #is_processing_internal


def is_processing_shortcut_input : Bool #

def is_processing_shortcut_input? : Bool #

Predicate alias for #is_processing_shortcut_input


def is_processing_unhandled_input : Bool #

def is_processing_unhandled_input? : Bool #

Predicate alias for #is_processing_unhandled_input


def is_processing_unhandled_key_input : Bool #

def is_processing_unhandled_key_input? : Bool #

def is_unique_name_in_owner : Bool #

def is_unique_name_in_owner? : Bool #

Predicate alias for #is_unique_name_in_owner


def last_child?(type : T.class) : T | Nil forall T #

Returns the last child node cast to type T, or nil if none found.


def last_child? : Node | Nil #

Returns the last child node, or nil if this node has no children.


def local_groups : Set(String) #

def move_child(child_node : Node, to_index : Int64) : Void #

Moves child node to a new index in the parent's child list. Enforces thread-safety: off-thread calls raise ThreadAffinityError when attached to SceneTree.


def move_child(child_node : Node, to_index : Int) : Void #

def multiplayer #

Property #multiplayer getter


def multiplayer_authority? : Bool #

Predicate alias for #is_multiplayer_authority


def name : String #

def name=(val : String) #

def next_sibling?(type : T.class) : T | Nil forall T #

Returns the next sibling node cast to type T, or nil if none found.


def next_sibling? : Node | Nil #

Returns the next sibling node in the parent's child list, or nil if this is the last child or an orphan.


def node_as(path : String | NodePath, type : T.class) : T forall T #

Shorthand for get_node_as


def node_as?(path : String | NodePath, type : T.class) : T | Nil forall T #

Shorthand for get_node_as?


def node_ready? : Bool #

Predicate alias for #is_node_ready


def nodes_in_group(group : String, type : T.class) : Array(T) forall T #

Returns all nodes in the given group from the active scene tree (or local subtree in standalone mode) cast to type T.


def nodes_in_group(group : String) : Array(Node) #

Returns all nodes in the given group from the active scene tree (or local subtree in standalone mode) as Array(Node).


def notify_deferred_thread_group(what : Int64) : Void #

def notify_thread_safe(what : Int64) : Void #

def owner : Node | Nil #

Returns the scene owner node responsible for serialization packing.


def owner=(o : Node | Nil) #

Sets the scene owner node for serialization packing.


def part_of_edited_scene? : Bool #

Predicate alias for #is_part_of_edited_scene


def physics_interpolated? : Bool #

Predicate alias for #is_physics_interpolated


def physics_interpolated_and_enabled? : Bool #

def physics_interpolation_mode #

Property #physics_interpolation_mode getter


def physics_interpolation_mode=(val : Int | Enum) #

Property #physics_interpolation_mode setter


def physics_processing? : Bool #

Predicate alias for #is_physics_processing


def physics_processing_internal? : Bool #

Predicate alias for #is_physics_processing_internal


def play_sound(stream_or_path : AudioStream | String, at : Vector2 | Vector3 | Nil = nil, pitch_scale : Float64 = 1.0, volume_db : Float64 = 0.0, bus : String = "Master", &block : Node -> Void) : Node | Nil #

Context-aware one-shot audio playback helper on Node


def play_sound(stream_or_path : AudioStream | String, at : Vector2 | Vector3 | Nil = nil, pitch_scale : Float64 = 1.0, volume_db : Float64 = 0.0, bus : String = "Master") : Node | Nil #

def previous_sibling?(type : T.class) : T | Nil forall T #

Returns the previous sibling node cast to type T, or nil if none found.


def previous_sibling? : Node | Nil #

Returns the previous sibling node in the parent's child list, or nil if this is the first child or an orphan.


def print_orphan_nodes : Void #

Instance convenience delegator for static method #print_orphan_nodes


def print_tree : Void #

def print_tree_pretty : Void #

def process_mode #

Property #process_mode getter


def process_mode=(val : Int | Enum) #

Property #process_mode setter


def process_physics_priority #

Property #process_physics_priority getter


def process_physics_priority=(val : Int | Enum) #

Property #process_physics_priority setter


def process_priority #

Property #process_priority getter


def process_priority=(val : Int | Enum) #

Property #process_priority setter


def process_thread_group #

Property #process_thread_group getter


def process_thread_group=(val : Int | Enum) #

Property #process_thread_group setter


def process_thread_group_order #

Property #process_thread_group_order getter


def process_thread_group_order=(val : Int | Enum) #

Property #process_thread_group_order setter


def process_thread_messages #

Property #process_thread_messages getter


def process_thread_messages=(val : Int | Enum) #

Property #process_thread_messages setter


def processing? : Bool #

Predicate alias for #is_processing


def processing_input? : Bool #

Predicate alias for #is_processing_input


def processing_internal? : Bool #

Predicate alias for #is_processing_internal


def processing_shortcut_input? : Bool #

Predicate alias for #is_processing_shortcut_input


def processing_unhandled_input? : Bool #

Predicate alias for #is_processing_unhandled_input


def processing_unhandled_key_input? : Bool #

def propagate_call(method : String, args : Pointer(Void), parent_first : Bool = false) : Void #

def propagate_notification(what : Int64) : Void #

def queue_accessibility_update : Void #

def queue_free : Void #

Deallocates node cleanly at frame end on the Main Thread. Enforces thread-safety: off-thread calls on SceneTree nodes either raise ThreadAffinityError or auto-defer.


def ready : Godot::TypedSignal() #

Identity setter enabling compound operator sugar (node.ready += ->handler, node.ready -= ->handler)


def ready_signal_hash : UInt64 #

def ready_slot : Lapis::Core::StaticSignalSlot() #

def reload_scene! : Nil #

Reloads running scene via the active SceneTree


def remove_child(node : Node) : Void #

Removes a child node. Falls back to local children array when running standalone. Enforces thread-safety: off-thread calls raise ThreadAffinityError when attached to SceneTree.


def remove_from_group(group : String) : Void #

Removes this node from the specified group


def remove_from_tree : Void #

Removes this node from its parent if currently inside a parent hierarchy.


def renamed : Godot::TypedSignal() #

def renamed=(val : Godot::BoundSignal) : Godot::BoundSignal #

Identity setter enabling compound operator sugar (node.renamed += ->handler, node.renamed -= ->handler)


def renamed_signal_hash : UInt64 #

def renamed_slot : Lapis::Core::StaticSignalSlot() #

def reparent(new_parent : Node, keep_global_transform : Bool = true) : Void #

Reparents this node to a new parent. Enforces thread-safety: off-thread calls raise ThreadAffinityError when attached to SceneTree.


def replace_by(node : Node, keep_groups : Bool = false) : Void #

Replaces this node with another node in the tree. Enforces thread-safety: off-thread calls raise ThreadAffinityError when attached to SceneTree.


def replacing_by : Godot::TypedSignal(Node) #

def replacing_by=(val : Godot::BoundSignal) : Godot::BoundSignal #

Identity setter enabling compound operator sugar (node.replacing_by += ->handler, node.replacing_by -= ->handler)


def replacing_by_signal_hash : UInt64 #

def replacing_by_slot : Lapis::Core::StaticSignalSlot(Node) #

def request_ready : Void #

def reset_physics_interpolation : Void #

def rpc(method : String | Symbol, *args) : Godot::Error #

Calls an RPC method on this node across the multiplayer network.


def rpc_config(method : String, config : Pointer(Void)) : Void #

def rpc_id(peer_id : Int32 | Int64, method : String | Symbol, *args) : Godot::Error #

Calls an RPC method on a specific peer ID across the multiplayer network.


def safe_queue_free : Void #

Safe queue free that checks alive? before dispatching


def scene_file_path #

Property #scene_file_path getter


def scene_file_path=(val) #

Property #scene_file_path setter


def scene_root : Node #

Alias to #topmost_parent


def self_or_ancestor(type : T.class) : T forall T #

Traverses upward starting from self, returning the first node matching type T, or raising NilAssertionError.


def self_or_ancestor?(type : T.class) : T | Nil forall T #

Traverses upward starting from self, returning the first node matching type T, or nil if none found.


def set_auto_translate_mode(mode : AutoTranslateMode | Int) : Void #

def set_deferred_thread_group(property : String, value : Pointer(Void)) : Void #

def set_display_folded(fold : Bool) : Void #

def set_editable_instance(node : Node, is_editable : Bool) : Void #

def set_editor_description(editor_description : String) : Void #

def set_multiplayer_authority(id : Int64, recursive : Bool = true) : Void #

def set_name(name : String) : Void #

Sets the name of the node safely via dynamic reflection


def set_owner(owner : Node) : Void #

def set_physics_interpolation_mode(mode : PhysicsInterpolationMode | Int) : Void #

def set_physics_process(enable : Bool) : Void #

def set_physics_process_internal(enable : Bool) : Void #

def set_physics_process_priority(priority : Int64) : Void #

def set_process(enable : Bool) : Void #

def set_process_input(enable : Bool) : Void #

def set_process_internal(enable : Bool) : Void #

def set_process_mode(mode : ProcessMode | Int) : Void #

def set_process_priority(priority : Int64) : Void #

def set_process_shortcut_input(enable : Bool) : Void #

def set_process_thread_group(mode : ProcessThreadGroup | Int) : Void #

def set_process_thread_group_order(order : Int64) : Void #

def set_process_thread_messages(flags : ProcessThreadMessages | Int) : Void #

def set_process_unhandled_input(enable : Bool) : Void #

def set_process_unhandled_key_input(enable : Bool) : Void #

def set_scene_file_path(scene_file_path : String) : Void #

def set_scene_instance_load_placeholder(load_placeholder : Bool) : Void #

def set_thread_safe(property : String, value : Pointer(Void)) : Void #

def set_translation_domain_inherited : Void #

def set_unique_name_in_owner(enable : Bool) : Void #

def siblings(type : T.class) : Array(T) forall T #

Returns all sibling nodes cast to type T, excluding this node.


def siblings : Array(Node) #

Returns all sibling nodes sharing this node's parent, excluding this node.


def spawn(type : T.class, &block : T -> ) : T forall T #

Fluent alias for spawn_child


def spawn(type : T.class) : T forall T #

Fluent alias for spawn_child


def spawn_child(type : T.class, &block : T -> ) : T forall T #

Spawns a child node of type T, configures it in a block, and attaches it to this node


def spawn_child(type : T.class) : T forall T #

Spawns a child node of type T and attaches it to this node


def spawn_node(type : T.class, &block : T -> ) : T forall T #

Idiomatic alias for spawn_child


def spawn_node(type : T.class) : T forall T #

Idiomatic alias for spawn_child


def topmost_parent : Node #

Walks upward to find the topmost ancestor node, or the SceneTree root if attached.


def tree_entered : Godot::TypedSignal() #

def tree_entered=(val : Godot::BoundSignal) : Godot::BoundSignal #

Identity setter enabling compound operator sugar (node.tree_entered += ->handler, node.tree_entered -= ->handler)


def tree_entered_signal_hash : UInt64 #

def tree_entered_slot : Lapis::Core::StaticSignalSlot() #

def tree_exited : Godot::TypedSignal() #

def tree_exited=(val : Godot::BoundSignal) : Godot::BoundSignal #

Identity setter enabling compound operator sugar (node.tree_exited += ->handler, node.tree_exited -= ->handler)


def tree_exited_signal_hash : UInt64 #

def tree_exited_slot : Lapis::Core::StaticSignalSlot() #

def tree_exiting : Godot::TypedSignal() #

def tree_exiting=(val : Godot::BoundSignal) : Godot::BoundSignal #

Identity setter enabling compound operator sugar (node.tree_exiting += ->handler, node.tree_exiting -= ->handler)


def tree_exiting_signal_hash : UInt64 #

def tree_exiting_slot : Lapis::Core::StaticSignalSlot() #

def tween(&) : Godot::Tween #

Builds a tween using an expressive builder DSL


def unbind_child_entered_tree(callback : Proc(Node, R)) : Bool forall R #

def unbind_child_entered_tree(token : UInt64) : Bool #

def unbind_child_exiting_tree(callback : Proc(Node, R)) : Bool forall R #

def unbind_child_exiting_tree(token : UInt64) : Bool #

def unbind_child_order_changed(callback : Proc(R)) : Bool forall R #

def unbind_child_order_changed(token : UInt64) : Bool #

def unbind_editor_description_changed(callback : Proc(Node, R)) : Bool forall R #

def unbind_editor_description_changed(token : UInt64) : Bool #

def unbind_editor_state_changed(callback : Proc(R)) : Bool forall R #

def unbind_editor_state_changed(token : UInt64) : Bool #

def unbind_ready(callback : Proc(R)) : Bool forall R #

def unbind_ready(token : UInt64) : Bool #

def unbind_renamed(callback : Proc(R)) : Bool forall R #

def unbind_renamed(token : UInt64) : Bool #

def unbind_replacing_by(callback : Proc(Node, R)) : Bool forall R #

def unbind_replacing_by(token : UInt64) : Bool #

def unbind_tree_entered(callback : Proc(R)) : Bool forall R #

def unbind_tree_entered(token : UInt64) : Bool #

def unbind_tree_exited(callback : Proc(R)) : Bool forall R #

def unbind_tree_exited(token : UInt64) : Bool #

def unbind_tree_exiting(callback : Proc(R)) : Bool forall R #

def unbind_tree_exiting(token : UInt64) : Bool #

def unique_as(name : String | NodePath, type : T.class) : T forall T #

Shorthand for retrieving a scene unique node cast to type T


def unique_as?(name : String | NodePath, type : T.class) : T | Nil forall T #

Safe shorthand for retrieving a scene unique node cast to type T, or nil if not found or type mismatch


def unique_name_in_owner #

Property #unique_name_in_owner getter


def unique_name_in_owner=(val) #

Property #unique_name_in_owner setter


def unique_name_in_owner? : Bool #

Predicate alias for #is_unique_name_in_owner


def update_configuration_warnings : Void #

def with_context(&) #

Executes block with this node as the active NodeContext