ReferenceScene Graph

Scene Graph Entities

An entity is a thing in the Scene Graph — a container that holds components and a transform. Everything in a scene-graph world is an entity; you add behavior by attaching components to it.

Updated
The code on this reference page did not pass the latest compile check — verify it in your project.

In Scene Graph, everything in your world is an entity — a tree, a platform, a pickup. By itself an entity is just an empty container.

Picture a blueprint that stamps out objects. The bare entity only carries a transform — where it sits in the world. You make it DO something by snapping components onto it.

We define a bamboo_tree as a class that derives from entity. Then we attach a mesh_component to give it a visible body, and an audio_component so it can play sound. Same container, more behavior.

An entity holds the slots; components fill them. Want new behavior? Attach another component.

bamboo_tree := class(entity):
    @editable
    Mesh : mesh_component = mesh_component{}
    @editable
    Sound : audio_component = audio_component{}

Build your own lesson with scene_graph_entities

Generate a personalized, compile-checked lesson grounded in this exact reference.

Build a lesson →