Describe picking an object of the same scene (#258)

admin committed 2026-09-28 14:35:24 +02:00
1 parent 1ebead52fc
commit eadcc6cf97
2 files changed
+20 -6

No files matched your search

+19 -5
@@ -59,11 +59,25 @@ playing use the same two words.
reads the same object back: `Expand` gives the field back as the object, `Item at` the item.
`Raycast all` (#157) hands out a list of objects, and written into a list variable it stays one.
An object lives for the run only. At rest (in the file, a snapshot, the inspector) its place
always holds the empty object, stored as `{"$object": ""}` wherever it sits, and the inspector and
its inline lists show `(null)` and offer nothing to pick. During a run the object sits right in the
value, and every way out of the run empties it again (`core/graph/liveObjects.ts`,
`withoutObjects`): the values the editor run writes back into the scene as overrides, the save of
a persistent Variables asset, the live values the inspector shows and the test hooks. A struct
holds the empty object, stored as `{"$object": ""}` wherever it sits, or **an object of the same
scene picked on the placed behavior** (#258).
- **Picking one:** on a placed object the row of an object variable, an object field or an
object item is a dropdown with `None` and every object of the scene in hierarchy order, the
object itself included. The pick is stored as the object's id, `{"$object": "<id>"}`, and a run
reads the object itself. On the behavior asset there is no scene, so the row says `(null)` and
offers nothing; the default is always no object.
- **Inside a container** an object only gets the objects of the same container to choose from,
named by their template id. Every placement of the container then reaches its own copy.
- **The reference follows the object:** removing it empties the reference in the same undo step,
copying and pasting several objects points a reference among them at the copy (one out of them
stays), *Create container* and *Unpack* carry it along.
- An object that is gone reads as `(null)`, and the row shows `(missing)`.
During a run the object sits right in the value, and every way out of the run empties what a
graph wrote there again (`core/graph/liveObjects.ts`, `withoutObjects`): the values the editor run
writes back into the scene as overrides, the save of a persistent Variables asset, the live values
the inspector shows and the test hooks. A picked reference is left alone: a graph that writes
another object into the place keeps it for the run, and the scene keeps its pick. A struct
whose only change is an object therefore writes no override. A list that grew by an object does:
the scene learns the new item, as the empty object. A **destroyed** object reads as `(null)`,
alone as well as out of a list or a struct, as does one from a scene that was restarted or left.
+1 -1
@@ -15,7 +15,7 @@ npm run build # writes dist/ and regenerates index.html
php tools/make-user.php <name> <password> [admin|user] # an account; every tool signs in (see Accounts)
php tests/php/accounts.test.php # the API's account rules, no server needed (CI's gate job)
php tests/php/snapshots.test.php # the snapshot store (#231), the same way
node tools/seed-e2e.mjs && node tools/e2e.mjs # 1527 editor checks, screenshots in /tmp/gm-e2e-*.png
node tools/seed-e2e.mjs && node tools/e2e.mjs # 1532 editor checks, screenshots in /tmp/gm-e2e-*.png
GM_STEPS=20 node tools/e2e.mjs # or 1-12, or 6,20 — a subset while working on one step
./e2e.sh start [GM_STEPS] # the same run detached, see below
./e2e.sh status # live progress, or the last run's result