Name the render layer of an object and change it from a graph (#305)

Concepts now says how a graph moves an object to another render
layer and changes what a camera sees.

- Concepts: a Properties node sets Render layer (-1 is Inherit) and
  a Properties node of type Camera sets Sees. The picture follows
  from the next frame. The new Render layer of node names the layer
  in effect, inherited ones included. The measurement from e2e 63
  stands next to the one from #304.
- Behaviors: Render layer of joins the list of data nodes.
- Development: the e2e sum is 1731.
admin committed 2026-10-03 19:26:09 +02:00
1 parent bfbab14701
commit 6fec7ee674
3 files changed
+10 -4

No files matched your search

+1 -1
@@ -231,7 +231,7 @@ the inspector).
float noise, a relative 1e-9, so `time - late == 6` holds without a `Round`; `Equals` does the
same for two numbers, and for a number against a typed text that is a number, like `130`), `And/Or/Not`, `Key is down`,
`Key was pressed` and `Key was released` (true for the one frame in which the key went down or came up, the frame `On key down` and `On key up` fire in; a key that stays held is not pressed again),
`Mouse position`, `Mouse button`, `Is hovered`, `Is touching`, `Layer of` (the collision layer of an object by name and number, see [Colliders](Colliders)), `Animation playing` (whether an animation runs on an object, its progress and time left) and `Animation length` (see [Animations](Animations)), `Get velocity`, `Joint position` (how far a hinge or a slider stands from how it was placed, see [Physics](Physics#joints)), `Current state` (name and id), `Is in state` (one boolean per state) ·
`Mouse position`, `Mouse button`, `Is hovered`, `Is touching`, `Layer of` (the collision layer of an object by name and number, see [Colliders](Colliders)), `Render layer of` (the render layer an object is drawn on, inherited or its own, see [Concepts](Concepts)), `Animation playing` (whether an animation runs on an object, its progress and time left) and `Animation length` (see [Animations](Animations)), `Get velocity`, `Joint position` (how far a hinge or a slider stands from how it was placed, see [Physics](Physics#joints)), `Current state` (name and id), `Is in state` (one boolean per state) ·
actions `Move` (dx, dy, scale, dt — connect an event's dt for per-second movement; in the object's own axes, which a turned parent turns too; with *Collide with solids* it slides along what it hits, less friction, and outputs `blocked x/y`, `hit` and the contact `normal x/y`, see [Colliders](Colliders)), `Move toward` (x, y in world units, speed, dt: steps the object toward that point by at most speed times dt and stops exactly on it, also below a moved or turned parent; with *Collide with solids* it moves the way `Move` does; outputs `arrived`, the `distance` still left and `hit`. The way to walk an enemy to a spot, home or after the player), `Set position`, `Spawn`
(asset input + x/y/z, optional parent → outputs the new object; the asset is picked on the node or arrives over an edge, from an `Asset` node, a variable or a list item. A pick saved while it was still a setting reads as that input's value, so older projects spawn as before; the same holds for the asset of `Is asset`), `Destroy` (removes the object with everything below it; with **keep children** on, only the object goes: its children move up to its parent (top level when it had none) and keep their place, rotation and size in the world, and the output `children` is the list of them, nearest level only. Its behaviors, its rigidbody and its joints go with it either way. In the editor run, children that are content of a placed container move up for the run only: their place belongs to the template, so the scene does not learn it), `Add joint` (ties an object to another while the game runs: the picked Joint asset is placed on *object* at x/y and connected to *connected*, the scene when nothing arrives; outputs the new joint, which `Destroy` lets go again, see [Physics](Physics#joints)), `Emit` (starts a particle source over, see *Particles*),
`Play sound` / `Stop sound` (see [Sounds](Sounds): the asset says how loud and whether it loops, the node's
+8 -2
@@ -55,7 +55,12 @@ that is made the main one, with the game camera as an overlay. The main camera d
of the picture and the zoom of the tab; an overlay camera is fitted into that picture without
distortion, so one of the same size and zoom covers it exactly. The mouse is reported through the
main camera; `Mouse position` and `Is hovered` ask another one through their `camera` input
(#304, see *Mouse* in [Behaviors](Behaviors)). Two cameras switched on without *Overlay* draw as
(#304, see *Mouse* in [Behaviors](Behaviors)). A graph changes both while the game runs (#305): a
`Properties` node of the object's type with **Render layer** switched to *Set* moves it (a number,
or -1 for *Inherit*), one of type *Camera* with **Sees** changes what a camera shows, and the next
picture follows. **Render layer of** answers the layer an object is drawn on, inherited or its
own, by `name` and `number`; for an object that is not drawn the name is empty and the number -1.
Two cameras switched on without *Overlay* draw as
before: through the first one only. The Scene tab shows every layer. A camera can also wear a
shader over its picture (#299, see *Wearing a shader* in [Shaders](Shaders)); it works on that
camera's picture alone, before the pictures are laid on top of each other.
@@ -64,7 +69,8 @@ of the main camera at `z` 1000, a `UI` sprite in front of the main camera and a
front of the overlay stay away, and the same holds in the running game. With the overlay camera
zoomed 2x, the real mouse 30 units right of the centre of the picture lies 15 units right of the
overlay camera's centre (2015 at a camera on 2000): `Is hovered` through it finds the green
sprite, through the main camera not.
sprite, through the main camera not. Moved onto `UI` by a graph on start, the red sprite leaves
the main camera's picture, and `Render layer of` names it `UI` and 1.
**A clip area cuts what is below it** (#260). It is an object of its own (*Clip area*, `+`
menu) with a `width` x `height`, and it turns, scales and mirrors with its parent like a sprite.
+1 -1
@@ -18,7 +18,7 @@ php tests/php/accounts.test.php # the API's accoun
# has and the web server's container has not (SKIP there)
php tests/php/snapshots.test.php # the snapshot store (#231), the same way
php tests/php/releases.test.php # the release store (#266), the same way
node tools/seed-e2e.mjs && node tools/e2e.mjs # 1730 editor checks, screenshots in /tmp/gm-e2e-*.png
node tools/seed-e2e.mjs && node tools/e2e.mjs # 1731 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