The default scene β what a new project opens to
When you open a fresh vgai project thereβs already a minimal box scene on screen β the smallest useful starting point. There are actually two minimal starters: the one the template ships as a file, and the one the browser build seeds in code. This is a terminal look at both (real captured output below).
# transcript pending capture β run: node site/media/capture-cli.mjs site/media/capture-cli.mjs -
The templateβs default scene. The template ships
public/scenes/default.vscn.json(nameDefault) β the file the hosted/desktop editor fetches. Parsing it shows five entities: a hemisphere ambient light, a directional Sun (with shadows), a Ground box, a blue Box to look at, and a Camera. Nothing depends on external assets β it loads instantly. -
How itβs chosen β and the browser starter.
initial-scene.tsloadsproject.config.defaultScene ?? 'scenes/default.vscn.json'. The browser build doesnβt ship a file βseed.ts(seedIfEmpty) writes its own inline minimal scene (nameStarterβ a camera, a directional Sun + a hemisphere fill light, a ground plane, and a box) to that same path after the user explicitly chooses Create a new game, plus a default input map and a project manifest. A fresh hosted visit shows the intent router and writes nothing.seedIfEmptyis also self-healing: if the stored scene ever fails to parse, it re-seeds a valid one. Both are minimal box scenes; they differ in the small details, not the idea.
Recap
New functionality
- Listed the template default scene's five entities
- Saw how the default is resolved and how explicit browser creation seeds its own starter
New concepts & skills
- the template ships scenes/default.vscn.json (Default); browser Create seeds an inline Starter scene in code
- both are asset-free minimal box scenes (lights, ground, box, camera) β they differ only in details
- initial-scene.ts resolves project.config.defaultScene ?? scenes/default.vscn.json
Next lesson β Scene I/O