main.scene
- .build.state16 B
- .metadata17 B
- README.md2.6 KB
- authoring
- build.luau4.0 KB
- entrypoint.luau4.9 KB
- scene.json1.9 MB
README.md
main
The world's starting scene: a wide ground slab with a collider and a stone
fountain whose ring turns, both modelled in build.luau with the quick
geometry nouns (Mesh, BoxGeometry(...):round(...), LatheGeometry,
MeshStandardMaterial), lit by a scene setup (a procedural afternoon sky, a
light that follows it, an ambient light and a thin height fog). Two lamp posts
stand beside the spawn, and a red crate with dynamic physics is shared by every
player in the world.
It sets up play for whoever joins: a player prototype with a humanoid avatar and an orbiting follow camera, and the spawn point where each player arrives.
build.luau states all of it as code, and scene.json holds the baked result,
so the scene is there the moment the world opens. A new object for the scene
(a table, a house, a cart) is modelled the way the fountain is: parts with
rounded edges, turned profiles and cut-outs, written in content(), or in a
.sceneModule the scene places when it holds several of them. The
quickGeometry guide lists every noun
(guides { path: "systems/quickGeometry/documentation/quickGeometry" }).
Lighting is a scene setup
The lighting entity places the scene setup
@builtin::examples.lighting.example_sky_drives_lights.example_sky_drives_lights:
its Asset component links the setup, and its SceneSetup component holds
this scene's own overrides. The setup applies its members (a sky, a light
that follows it, an ambient light and fog) to the scene as a whole, live
whenever the scene is.
- Place:
build.luau's:instantiate(nil, { name = "lighting" })line places it; dragging any.sceneSetupinto the viewport does the same. - Tune: select
lightingand edit a member's value, or callentity.find("lighting").component.get("SceneSetup"):set("sun/intensity", 1.4). The override is this scene's own: stored on thelightingentity, saved and synced, and leaving the setup asset and every other scene as they are. - Reset:
:reset(path)returns a value to what the setup says. - Swap: name another setup on
build.luau's instantiate line; the rebuild places it on the samelightingentity. Pointing theAssetcomponent'ssourceat another setup in the Inspector is an edit of this scene's own, saved and kept over every rebuild. While it holds, a rebuild names it in itsauthoredlist with the call that releases it (sceneAuthoringreleaseAuthored), after whichlightingfollowsbuild.luauagain.
The sceneSetup type's README describes what a setup is and how one is made.