Log inGet started
World

Builtin Library

Branchmain
Branchesmainpublish
Commit65083fe8f2

README.md

scene.create

Create a NEW scene from a template and load it.

Arguments: the new scene's name, the template, and an opts table. Naming a scene and omitting the template returns the template catalog.

template is typed: "empty" (blank canvas), "flat" (ground + lighting, no player), "player" (ground + lighting + the canonical reusable player a joining user's avatar replaces — prefer this over hand-rolling a player), "menu" (lighting only, no ground, no player). Omit the template to get the catalog of templates and what each contains; an unknown value errors with the valid choices. Pass opts.startup = true to also make the new scene the world's startup scene.

The scene is minted as a fresh asset and loaded. Returns { scene, template, contains, startup? }, or { templates } when the template is omitted.