Your first scene
A scene (.esn) is the graph: it uses Kernel libraries, declares inputs, params and outputs, and places nodes. Continuing from the last page, create scene.esn in rings/:
use "kernels/";
param warmth: Float = 0.6;
node rings: demo.rings@1 { domain = vec2(256, 256); count = 8.0; }node tint: demo.tint@1 { source <- rings.result; warmth = warmth; }
output result <- tint.result;| Form | Meaning |
|---|---|
use "kernels/"; |
Every .ent in the directory (or one file, or a package: use "image.entpkg";). |
param warmth: Float = 0.6; |
A graph parameter the caller may override (--param, the protocol’s param). |
node rings: demo.rings@1 { … } |
A node referencing a published Kernel by id. |
domain = vec2(256, 256); |
A generator with no inputs needs a domain: an integer for Rows, vec2 for Grid, vec3 for Volume; or window(). |
count = 8.0; |
A node’s param value: a literal or a graph param by name, never an expression. |
source <- rings.result; |
A wire: reads rings’s output in this evaluation, a dependency. Wiring is written only at the consumer. |
output result <- tint.result; |
A named graph output. The first Image output is what the scene shows. |
Run it
Section titled “Run it”entelechy run scene.esn --out out.pngscene loadedpublished demo.rings@1 g1 from kernels/rings.entpublished demo.tint@1 g2 from kernels/rings.entevaluated in 1.32ms: executed [tint+rings], reused 0 -> out.png
executed [tint+rings] says the two nodes were fused into one run: tint samples rings only at its own element, so the intermediate is never written. graph shows the plan:
entelechy graph scene.esn// published: demo.rings@1 g1, demo.tint@1 g2, native.cover@1 g0, …// plan: 1 group(s)// tint + rings: fused.tint@1 vec2(256, 256)Override a param:
entelechy run scene.esn --out warm.png --param warmth=1.0Trace one element
Section titled “Trace one element”entelechy trace scene.esn --node tint --at 10 10tint (demo.tint@1), element (10, 10), as the evaluation at time 0 runs it c: Vec4 = vec4(0, 0, 1, 1) -> result: Vec4 = vec4(0, 0, 0.4, 1)trace runs one element on the interpreter, printing every let with its type and value; it commits nothing.
A replay test
Section titled “A replay test”tests/rings.replay:
scene ../scene.esn
frame 0.0expect count rings.result = 65536expect 128 128 = 0.0 0.0 0.4entelechy replay tests/rings.replaytests/rings.replay: ok (1 frames, 2 checks)The whole replay syntax is in Replay tests. This page’s three files are a download.
Next: Live swap — change it while it runs.

