Log inGet started
World

Builtin Library

Branchmain
Branchesmainpublish
Commitdd348ac6c3

README.md

sc (deprecated)

Deprecated — superseded by the entityOps / scene / appearance toolboxes. To spawn an entity that displays a mesh, use the entity API directly:

local e = entity.spawn({ name = "name" })
e.component.add("Model", { model = "<mesh>" })   -- model = a mesh name, asset.ref, or MeshHandle
e.position = { x, y, z }

The tools below remain for existing content that still calls them.

Scene-construction shortcuts — the operations you reach for constantly while authoring a scene: spawn things, find them, move them, tag them, and tear them down. Each tool composes several lower-level engine calls into one authoring step.

Spawn primitives (entity + components in one call)

  • spawnModel — an entity with a Model (or asset bundle) plus a Collider at a position; static physics by default.
  • spawnPhysics — the same as spawnModel but dynamic physics.
  • spawnCamera — an entity carrying a Camera component plus a nameplate gizmo.
  • spawnText — a 3D text entity with a brief pop-in.

Spawn layouts (batched placement)

  • spawnGrid — N entities laid out in a grid on the ground plane.
  • spawnCircle — N entities arranged around a circle.
  • spawnLine — N entities along an arbitrary direction.

Each layout hands back the array of generated ids, so a placement feeds straight into the batch operations below.

Finding entities and reading the scene structure is the scene toolbox (scene.tree, scene.find, scene.findAll, scene.findByComponent, scene.summary); component-state inspection is the debug toolbox's inspect tool.

Transform, hierarchy, components, visuals — single or batch

Set position / rotation / scale, add a positional delta, or snap to grid steps. Parent or unparent one or many entities. Add or remove a component across a selection. Blend a colour tint, set an outline glow, or clear both. Every batch operation accepts one entity or many, each written as an id, a display name, or an entity proxy, and the record array that find returns pipes in as-is — the uniformity is what lets a query pipe straight into a mutation. A name or id matching no entity is refused, naming it.

Despawn / scene

Despawn one or many entities, clear every non-camera entity in the active scene, or read a scene overview (root count, roots, active camera).

Position arguments

The single-entity spawn tools accept a position as individual numbers, a vector table, or fields inside the options table. The layout tools take their origin through the options table.