Skip to content

Commit ec71b02

Browse files
authored
Merge pull request #83 from theprototype-app/docs-85-nodes
Nodes 85: 14 node pages + recipe: a furnished room (ships with 1.64)
2 parents fe461fa + 69905bc commit ec71b02

17 files changed

Lines changed: 527 additions & 0 deletions

‎docs/furnished-room.md‎

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# Recipe: A Furnished Room
2+
3+
A room that feels alive, built from nodes — a door you open, a lamp you switch, a doorbell you press, a sofa you sit on,
4+
a cat that wanders, plants in a breeze and a little pond. Every piece is the same for everyone in the session, and an
5+
agent can build all of it for you (see [Ask an agent](#ask-an-agent) at the end). *Since 1.64.*
6+
7+
Each step gives the object its own flow: select the object, open the node editor, add the nodes there (an effect node
8+
in an object's own flow drives that object; no Object Selector needed).
9+
10+
## A door that swings on its hinge
11+
12+
1. A tall thin box for the door. Add **On Click** and **[Rotate To](nodes/rotateto.md)**: angle 90, axis y,
13+
**pivot left**, duration 1.
14+
2. Wire On Click into Rotate To's **toggle**.
15+
16+
Press Play and click it: it swings open on its left edge, and shut on the next click.
17+
18+
**Opens by itself:** wire any boolean into **open** instead of the click — a [Proximity](nodes/proximity.md) between
19+
the door and a character or a cart, or a Toggle on a wall switch — and the door opens while it is true and closes again
20+
after.
21+
22+
## A lamp you switch
23+
24+
A lamp model with a Point light inside (or just a Point light). **On Click** into **[Light Switch](nodes/lightswitch.md)**
25+
**toggle**, fade 0.4. Its glowing shade dims with the light. For a party, add a
26+
**[Light Colour Cycle](nodes/lightcycle.md)** to a second light.
27+
28+
## A doorbell you can press
29+
30+
A small box on the wall by the door:
31+
32+
1. **[Highlight](nodes/highlight.md)** (leave **on** unwired) — it lights up while you point at it, in VR or with the
33+
Play crosshair.
34+
2. **On Click** into **[Press Button](nodes/pressbutton.md)** (axis -z for a button facing +z out of the wall) and
35+
into a **[Sound](nodes/sound.md)** node's trigger with a chime from the Explorer.
36+
37+
Every player hears the chime and sees the button go in.
38+
39+
## A sofa to sit on
40+
41+
Put a flat box on each cushion, make it invisible, and give each a **[Sit Spot](nodes/sitspot.md)** facing the room.
42+
Click a cushion to sit; any move key (or the stick) stands you up.
43+
44+
## A cat that lives there
45+
46+
A cat model (or any animal from the packs) with **[Ambient Animal](nodes/ambientanimal.md)**: rx 3, rz 2, rest 0.6,
47+
restTime 5, lookRadius 3. It strolls, sits, and turns to watch whoever comes near. Raise **fleeRadius** to 1.5 for a
48+
shy one.
49+
50+
## Plants in a breeze, a flag outside
51+
52+
**[Wind Sway](nodes/windsway.md)** on each plant (plant, anchor bottom, strength 0.2) and on the flag (flag, anchor
53+
left). The gusts are the same for everyone.
54+
55+
## A little pond
56+
57+
A flat box with the **Water** material preset and **[Flowing Water](nodes/waterflow.md)** (speed 0.15, swell 0.02).
58+
59+
## A mug you can pick up
60+
61+
**[Grabbable](nodes/grabbable.md)** on the mug, release **stay** — players carry it in Play without a physics
62+
simulation. On a remote control that should always go back to the coffee table: release **return**.
63+
64+
## Ask an agent
65+
66+
Through the [Claude connector](ai/claude-connector.md) or the in-app assistant, describe the room: *"Make the door swing
67+
open when clicked, a lamp I can switch, a button that rings a bell, a sofa I can sit on and a cat that wanders around."*
68+
The agent places the same nodes with `create_flow_nodes` — it finds them by name or by everyday words (door, lamp,
69+
button, seat, sofa, cat, pet, flag, river) and `describe_node_types` tells it every input and setting.

‎docs/nodes.md‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ node with code (Script, Behaviour, a module's node) opens that code — see
6161
| [**Controller Buzz**](nodes/hapticpulse.md) | Buzzes the VR controllers with a named pattern (tap, bump, success...) when a pulse arrives - only in Interact or Play, never while editing. |
6262
| [**Game Music**](nodes/gamemusic.md) | Plays a looping built-in music preset while you are in Interact or Play - always, or only during a round; wire 'on' to switch it by a condition. |
6363
| [**Game Setting**](nodes/gamesetting.md) | Declares one row in the game's Settings (a toggle, a range or a choice) and outputs this player's value - saved on this device for this game, never shared. |
64+
| [**Grabbable**](nodes/grabbable.md) | Lets players carry the connected object without a physics simulation; on letting go it stays or glides back home. |
65+
| [**Sit Spot**](nodes/sitspot.md) | Makes the connected object a seat: click it to sit on it facing its front, move to stand up. |
6466
| [**Point Grab**](nodes/pointgrab.md) | While 'enabled' reads off, players cannot pick objects up by pointing at them (the VR grip ray, the desktop carry); a hand touching an object still moves it. |
6567
| [**On Clap**](nodes/onclap.md) | Fires a pulse when a VR player brings both hands together and holds them - with where they met (point) and whether it was you (byMe); wire 'enabled' to a setting to switch it. |
6668
| [**Game Time**](nodes/gametime.md) | Seconds since the game (or the round) started, the same on every peer - a clock that pauses with the game. |
@@ -138,12 +140,19 @@ node with code (Script, Behaviour, a module's node) opens that code — see
138140
| [**Rotate / Motor**](nodes/rotor.md) | Turns the connected object about its own local axis (and its origin, so a wheel turns on its hub) at a set rpm with a spin-up. Paddles and scoops it turns carry water from Fluid emitters. On a dynamic physics body during a simulation it becomes a real motor: torque-limited, so a load slows it. |
139141
| [**Float Along Flow**](nodes/flowfloat.md) | Carries the connected object along a Flow path - a leaf, a toy boat - from where you placed it, at the path's speed, bobbing and turning with the current, looping at the end. Uses the nearest Flow path unless one is wired. |
140142
| [**Bounce**](nodes/bounce.md) | Bounces the connected object up and down off its resting height, like a dribbled ball. |
143+
| [**Oscillate / Swing**](nodes/oscillate.md) | Swings or bobs the connected object back and forth on one axis about its origin or a face - a hanging sign, a pendulum, a struck bell that dies away. |
144+
| [**Move To**](nodes/moveto.md) | Moves the connected object to a point and back with easing - a lift, a sliding door, a drawer - on a pulse, a toggle, a boolean or a number. |
145+
| [**Rotate To**](nodes/rotateto.md) | Turns the connected object to an angle and back about a face - a door on its hinge, a lid, a lever. |
146+
| [**Scale To**](nodes/scaleto.md) | Grows or shrinks the connected object to a size and back - a pop-up, a growing plant. |
141147
| [**Orbit**](nodes/orbit.md) | Circles the connected object around its resting position on the horizontal plane. |
142148
| [**Path patrol**](nodes/pathpatrol.md) | Walks the connected object along a series of waypoints you click into the scene, facing along the path. |
143149
| [**Follow Path**](nodes/followpath.md) | Moves the connected object along a smooth path - a drawn Spline, a Flow path or its own waypoints - at a speed, looping, ping-ponging or once, facing along it and leaning into the turns. An offset spreads several riders out along one path. |
144150
| [**Wander**](nodes/wander.md) | Drifts the connected object around a smooth, never-repeating target inside an area object (a water volume, a room) or a box around where it was placed - fish, birds, fireflies, idle drones. |
151+
| [**Ambient Animal**](nodes/ambientanimal.md) | Makes the connected object live: it wanders, rests, looks at the nearest player and can shy away; animated models play idle / walk / run. |
145152
| [**Orient to Velocity**](nodes/orientvelocity.md) | Turns the connected object to face the way it is moving, smoothly, leaning into turns - put it after Wander, Orbit or any mover so it looks where it goes. |
146153
| [**Body Wave**](nodes/bodywave.md) | Bends the connected object with a wave travelling along its body - a swimming fish, a snake, a flag, a tail - stronger and faster the faster it moves, curving into turns. A shader effect: physics and picking keep the rest pose. |
154+
| [**Wind Sway**](nodes/windsway.md) | Bends the connected object in gusts of wind - plants from their roots, a flag from its pole. A shader effect that adds to the others. |
155+
| [**Flowing Water**](nodes/waterflow.md) | Makes the connected surface flow - scrolling ripples and a gentle swell. Pair it with the Water material preset. |
147156
| [**Animation Finished**](nodes/animfinished.md) | Fires a pulse when the connected object's animation clip reaches its end. |
148157
| [**Animation Marker**](nodes/animmarker.md) | Fires a pulse when the connected object's animation passes a named marker. |
149158
| [**Animation State**](nodes/animstate.md) | Reads the connected object's animation transport as a number - playing, position or progress. |
@@ -177,6 +186,11 @@ object) and an **other** output (the body it touched) — see [Contact filters](
177186
|---|---|
178187
| [**Pulse**](nodes/pulse.md) | Throbs the connected object's scale in and out around its resting size. |
179188
| [**Blink**](nodes/blink.md) | Flashes the connected object on and off at a steady rate. |
189+
| [**Light Switch**](nodes/lightswitch.md) | Switches the lights in the connected object on and off with a fade, glowing parts too - a lamp you click. |
190+
| [**Light Intensity**](nodes/lightintensity.md) | Fades the lights in the connected object to a level - a dimmer. |
191+
| [**Light Colour Cycle**](nodes/lightcycle.md) | Walks the light's colour round the wheel or through a list - a disco light, a beacon. |
192+
| [**Highlight**](nodes/highlight.md) | Makes the connected object glow while you point at it (VR laser, Play crosshair) or while a boolean is true. |
193+
| [**Press Button**](nodes/pressbutton.md) | Pushes the connected object in and springs it back on each pulse - a button, a key, a pressure plate. |
180194
| [**Sound**](nodes/sound.md) | Plays an Explorer audio clip on the connected object when a pulse arrives - spatial, replicated, by content hash. |
181195
| [**Particles**](nodes/particle.md) | Emits a particle effect from the connected object - a preset burst, a stream, a trail. |
182196
| [**Jiggle**](nodes/jiggle.md) | Makes the connected object jiggle - it lags behind when moved, wobbles like jelly on impact and sways in the wind; skinned models swing their bone chains. |

‎docs/nodes/ambientanimal.md‎

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Ambient Animal
2+
3+
Makes the connected object live: it wanders inside a box or an **area** object, stops to rest, turns to look at the nearest player while it rests, and — if you want — shies away from a player who comes close. Animated models play their idle, walk and run clips on their own.
4+
5+
*Since 1.64.*
6+
7+
**Output:** effect (wire into an [Object Selector](objectselector.md), or leave it in an object's own flow)
8+
9+
## Inputs
10+
11+
| Handle | Type | Meaning |
12+
|---|---|---|
13+
| area | object | stay inside this object (a pen, a tank). Unwired: a box of `rx` × `ry` × `rz` around where it was placed |
14+
15+
## Parameters
16+
17+
| Parameter | Default | Range |
18+
|---|---|---|
19+
| speed | 0.3 | 0 – 3, how fast it wanders |
20+
| rest | 0.35 | 0 – 0.9, the share of time it stands still (0 = never rests) |
21+
| restTime | 3 | seconds per rest |
22+
| lookRadius | 4 | metres: while resting it looks at a player this close (0 = never) |
23+
| fleeRadius | 0 | metres: it shies away from a player this close (0 = tame) |
24+
| fleeDistance | 2 | metres it moves away |
25+
| rx, ry, rz | 3, 0.3, 3 | the box when no area is wired |
26+
| seed | 0 | 0 = from the object, so a herd does not move in step |
27+
| turnSpeed | 4 | how quickly it turns |
28+
| forward | +z | which way the model faces |
29+
| ground | on | walk on the floor (off: fish, birds) |
30+
| clips | on | play its idle / walk / run clips (see [Characters & Motion](../characters-and-motion.md)) |
31+
32+
Where it walks and when it rests come from the shared clock, so every player sees the same animal in the same place.
33+
34+
## Practical example
35+
36+
A cat in the living room: give the cat model an **Ambient Animal**, rx 3, rz 2, rest 0.6, restTime 5, lookRadius 3. It strolls, sits, and watches you when you come near.

‎docs/nodes/grabbable.md‎

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Grabbable
2+
3+
Lets players pick the connected object up and carry it **without a physics simulation** — a mug, a tool, a book. On letting go it stays where it was put, or glides back to where it was taken from.
4+
5+
*Since 1.64.*
6+
7+
**Output:** none — a declaration (wire it into an [Object Selector](objectselector.md), or leave it in the object's own flow)
8+
9+
## Parameters
10+
11+
| Parameter | Default | Range |
12+
|---|---|---|
13+
| release | stay | stay (where you put it down) or return (glides home) |
14+
| returnAfter | 1 | seconds before it glides home |
15+
| returnTime | 0.6 | seconds the glide takes |
16+
17+
In Play, aim the crosshair at it and press; the wheel moves it nearer or further. In VR (Interact), squeeze the grip
18+
on it. Everyone sees it carried, and **return** works the same from either: let go and it glides back. Catch it on its
19+
way back and it still goes home to the first spot. A dynamic physics body in a running simulation is still carried by
20+
the physics as before.
21+
22+
## Practical example
23+
24+
A tool on a hook that always goes back: **Grabbable**, release return, returnAfter 2.

‎docs/nodes/highlight.md‎

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Highlight
2+
3+
Makes the connected object glow while **you** point at it — the VR laser or the Play crosshair — or while a boolean wired into **on** is true. Each player sees what they point at; nothing is sent.
4+
5+
*Since 1.64.*
6+
7+
**Output:** effect (wire into an [Object Selector](objectselector.md), or leave it in an object's own flow)
8+
9+
## Inputs
10+
11+
| Handle | Type | Meaning |
12+
|---|---|---|
13+
| on | boolean | glow while true. Unwired: while you point at it |
14+
15+
## Parameters
16+
17+
| Parameter | Default | Range |
18+
|---|---|---|
19+
| color | #ffd54a | the glow's colour |
20+
| strength | 0.6 | 0 – 3, how bright |
21+
| fade | 0.15 | seconds to light up and go out |
22+
23+
Works on materials that can glow (standard, physical, lambert, phong). The object's own glow comes back exactly, and a
24+
save writes it.
25+
26+
## Practical example
27+
28+
See [Press Button](pressbutton.md).

‎docs/nodes/lightcycle.md‎

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Light Colour Cycle
2+
3+
Walks the colour of the lights in the connected object round the colour wheel, or through a list of colours — a disco light, a warning beacon, a mood lamp.
4+
5+
*Since 1.64.*
6+
7+
**Output:** effect (wire into an [Object Selector](objectselector.md), or leave it in an object's own flow)
8+
9+
## Parameters
10+
11+
| Parameter | Default | Range |
12+
|---|---|---|
13+
| mode | rainbow | rainbow (the whole wheel) or list |
14+
| period | 4 | seconds for one full cycle |
15+
| saturation | 1 | 0 – 1 (rainbow) |
16+
| colors | #ff3b30, #ffcc00, #34c759, #0a84ff | the list, comma separated |
17+
| step | off | jump between the list colours instead of blending |
18+
| glow | on | tint the glowing parts too |
19+
20+
The colour comes from the shared clock: every player sees the same colour at the same moment.
21+
22+
## Practical example
23+
24+
A party light: a Point light with a **Light Colour Cycle** in list mode, colours red, yellow, green, blue, period 2, step on.

‎docs/nodes/lightintensity.md‎

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Light Intensity
2+
3+
Fades the lights in the connected object to a level — a dimmer, a sunrise, lights that dim when the film starts. Level 1 is the light's own brightness.
4+
5+
*Since 1.64.*
6+
7+
**Output:** effect (wire into an [Object Selector](objectselector.md), or leave it in an object's own flow)
8+
9+
## Inputs
10+
11+
| Handle | Type | Meaning |
12+
|---|---|---|
13+
| level | number | wire a Slider, a Map Range or a variable to drive it |
14+
| fade | number | seconds |
15+
16+
## Parameters
17+
18+
| Parameter | Default | Range |
19+
|---|---|---|
20+
| level | 1 | 0 – 10, times the light's own intensity |
21+
| fade | 0.5 | 0 – 10 seconds each time the level changes |
22+
| glow | on | dim the glowing parts too |
23+
24+
## Practical example
25+
26+
A dimmer: wire a **Slider** (0 – 1) into **level**. Each change fades over half a second.

‎docs/nodes/lightswitch.md‎

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Light Switch
2+
3+
Switches the lights in the connected object on and off with a fade — a light object, or a lamp model with a light inside. With **glow** on its glowing parts (emissive materials) dim with it, so a bulb goes dark with its light.
4+
5+
*Since 1.64.*
6+
7+
**Output:** effect (wire into an [Object Selector](objectselector.md), or leave it in an object's own flow)
8+
9+
## Inputs
10+
11+
| Handle | Type | Meaning |
12+
|---|---|---|
13+
| trigger | event | switch on |
14+
| back | event | switch off |
15+
| toggle | event | flip it (On Click into here = a lamp you click) |
16+
| on | boolean | on while true — wire a Toggle, a Proximity, a variable |
17+
18+
## Parameters
19+
20+
| Parameter | Default | Range |
21+
|---|---|---|
22+
| on | on | the state before any pulse (on at start) |
23+
| fade | 0.3 | 0 – 5 seconds |
24+
| glow | on | dim the glowing parts too |
25+
26+
The switch's pulses replicate, so every player's lamp is on or off together. A save always writes the light's own
27+
intensity — a scene saved with the lamp off still has a lamp — and an Inspector edit while it is switched off becomes
28+
the new brightness.
29+
30+
## Practical example
31+
32+
A desk lamp you click:
33+
34+
1. Give the lamp model (with a Point light inside) an **On Click** wired into a **Light Switch**'s **toggle**.
35+
2. Press Play and click it: it fades out; click again and it comes back.

‎docs/nodes/moveto.md‎

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Move To
2+
3+
Moves the connected object to a point and back — a lift, a sliding door, a drawer, a drawbridge.
4+
5+
*Since 1.64.*
6+
7+
**Output:** effect (wire into an [Object Selector](objectselector.md), or leave it in an object's own flow)
8+
9+
## Inputs
10+
11+
| Handle | Type | Meaning |
12+
|---|---|---|
13+
| trigger | event | go to the goal |
14+
| back | event | go back to where it started |
15+
| toggle | event | go if it is at rest, come back if it is at the goal (On Click into here = a door) |
16+
| open | boolean | go while true, come back while false (a Toggle, a Proximity, a Gate) |
17+
| amount | number | 0 – 1, how far along: wire a Slider or a variable to drive it directly |
18+
| to | object | an [Object Selector](objectselector.md) — go to (match) that object instead of the numbers |
19+
20+
## Parameters
21+
22+
| Parameter | Default | Range |
23+
|---|---|---|
24+
| x, y, z | 0, 1, 0 | the goal |
25+
| space | offset | offset (from where it rests), world (an absolute point) |
26+
| duration | 1 | seconds for the whole way |
27+
| easing | smooth | smooth, linear, ease in, ease out, back (a little past and back), bounce, elastic |
28+
| repeat | none | none, loop or pingpong (keeps going while triggered) |
29+
30+
A reverse halfway through turns round from where it is, never jumps. Every event is a replicated pulse and the motion
31+
is a pure function of the shared clock, so two players see the same pose at the same moment.
32+
33+
## Practical example
34+
35+
A lift that goes up while a switch is on:
36+
37+
1. Give the platform a **Move To** node: y 3, space offset, duration 2, easing smooth.
38+
2. Wire a **Toggle** (or a [Proximity](proximity.md)) into **open**.
39+
3. Switch it on: the lift rises 3 m; off, it comes back down.

0 commit comments

Comments
 (0)