Skip to main content

Module nodes

Module nodes 

Source
Expand description

One file per node type. Each module owns its SCHEMA and PROPS.

Abstract classes (Control, CollisionObject2D, PhysicsBody2D) exist so subclasses inherit shared props without redeclaring them; the engine still registers them (for compatibility with existing scenes), but the editor’s add-node menu filters them out.

Modules§

animated_sprite2d
AnimatedSprite2D: plays 2D flipbook animations from a spritesheet atlas.
area2d
Area2D: trigger zones for overlap detection. Inherits collision_layer/collision_mask from CollisionObject2D.
button
Button: clickable UI element. Overrides Control’s color (slate background instead of white) and size (120×40 instead of 100×40); adds text and disabled.
camera2d
Camera2D: frames the view on its global position.
character_body2d
CharacterBody2D: kinematic physics body driven by move_and_slide(). collision_layer/collision_mask and friction/restitution are inherited from PhysicsBody2D.
collision_object2d
Abstract base for collision participants: collision_layer, collision_mask.
collision_shape2d
CollisionShape2D: geometric collider attached to a physics body or area.
control
Abstract base for UI elements: size, color, font size.
label
Label: draws text at its global position. font_size and color are inherited from Control.
node
Node: base class for every scene object. No transform, no props.
node2d
Node2D: 2D transform (position, rotation).
physics_body2d
Abstract base for solid bodies: friction, restitution. Area2D inherits CollisionObject2D directly (sensors have no friction).
rigid_body2d
RigidBody2D: dynamic physics body.
sprite2d
Sprite2D: draws a texture or one atlas frame at its global position.
static_body2d
StaticBody2D: immobile physics body. collision_layer/collision_mask come from CollisionObject2D, friction/restitution from PhysicsBody2D.
tilemap
TileMap2D: renders 2D tilemaps defined in an external .ptmap TOML sidecar.
timer
Timer: fires its engine-owned timeout signal every wait_time seconds (looping; non-positive never fires). current_elapsed is the rolling clock advanced by PyTimer::_process; exposed as a normal prop so scripts can inspect or reset it.

Statics§

ALL_NODES
Every node schema, concrete and abstract, in a stable order. pite-core::schema::NODE_SCHEMAS re-exports this.