Log inGet started
Package

create.tool

Newest version

This package holds more than this page lists. See all of its files in its world.

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), "clearing" (the campfire clearing a new world opens on: terrain with a path and a pond, a sky that runs through the day, clouds, plants, a campfire, seats, a lantern and the default player, all under one clearing entity that scene.remove { "clearing" } clears in one step). 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.