create.module
This package holds more than this page lists. See all of its files in its world.
README.md
create
What the editor's Add menu creates. edui.create makes an empty entity,
each built-in primitive the mesh registry resolves (cube, sphere, plane,
...), a point light, a spot light and a camera, five metres along the
editor camera's view and no lower than half a metre above the ground, as
one undoable step, and selects what it made.
declare puts each of them in the editor command registry under the
add menu (add.cube, add.light.point, add.camera, add.empty, ...).
The top bar's Add menu and the Hierarchy's + menu both list every
command declared under add, so a world or a panel that declares one of
its own (commands.declare{ id, title, category, menu = "add", order, run })
appears in both.