Repository navigation
Ariadne: repeat: on scene nodes, copies that follow a live count (§5.4) - #1230
Merged
Merged
Conversation
transfix
enabled auto-merge (squash)
November 14, 2026 19:32
transfix
force-pushed
the
feat/ariadne-scene-repeat
branch
from
November 14, 2026 19:35
255ab46 to
cd371f4
Compare
This was referenced Nov 14, 2026
transfix
force-pushed
the
feat/ariadne-scene-repeat
branch
from
November 14, 2026 20:15
cd371f4 to
f0bdadc
Compare
A scene node with `repeat:` is a template drawn as copies beside one another, as a widget's
repeat: draws its instances. The count is a whole number, a state key holding one (a list's
node holds its length), or a read-lane expression, counted as a widget's is.
- Copy k is the template with {i} = k in its id, visible: and material: { opacity } binds,
tags, sources, texture, clip offset binds, props and children (scene_node_instance). An id
without {i} gets _{i}.
- tick_scene counts every repeated node each frame (sync_scene_repeats) and adds or removes
copies to match, without a reload. A copy takes what it brought to the RealizedScene with it:
its node, created entry, tagged nodes, visibility, clip and opacity bindings, tickers, data
bindings (the data indices a bound opacity holds move down with them), height fields and its
custom_ticks range, whose later ranges move down.
- A copy made when the count grows starts at the pose its node's position, rotation and scale
keys hold, so a program can write a new copy's count and position in one step. The scene's
publisher is flushed before copies go, so a leaving copy's queued pose cannot land over that.
- Under a group the copies are its children. A repeat: inside a repeated node counts its own
copies in each and goes with its outer copy.
- body: and world: are dropped from a repeated subtree with a warning: the physics world and
the worlds are built once from the declared nodes.
- Expressions are counted on the document's read lane: Runtime::eval_count, which AppRuntime
hands its SceneAdapter (SceneAdapter::set_count_fn) and takes back when it goes. AriRuntime's
adapter and TerminalScene pass it to realize_scene as RealizeOptions::count. Without one a
number or a key still counts, and an expression draws none and warns.
Tests: ariadne_loader_test (RepeatParsedOntoNode, RepeatCountKinds,
RepeatInstanceSubstitutesIndex, RepeatInstanceBindsItsOwnOpacity,
RepeatDropsBodiesAndWarnsNested, RepeatThatIsNotAScalarWarns), ariadne_runtime_test
(AriadneAppRuntime.SceneRepeatCountsOnTheReadLane) and a new cvcgl_ariadne_repeat
(realize_scene + tick_scene over a key, an expression, a custom type's ticks, a nested repeat
and per-copy bound opacity, then a document in AriRuntime). docs/ARIADNE.md §5.4.
transfix
force-pushed
the
feat/ariadne-scene-repeat
branch
from
November 15, 2026 02:20
f0bdadc to
01fc177
Compare
transfix
added a commit
that referenced
this pull request
Nov 15, 2026
- app_runtime.cpp: the constructor hands the scene its repeat: count function (#1230), then takes the verb table's lock as before. - e2ee_intrinsics.cpp (#1191): the e2ee-* provider registers its async functions on the calling program's host (*ictx.host, else the app's), as every provider on this branch does (B30), so an isolated document's e2ee-backup and e2ee-restore park on its own group. - STATE_EXEC_THREADED.md: the e2ee provider in the provider table and the file list.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Widgets take
repeat:; scene nodes did not, so a pool of markers sized by a list in state had to bea fixed pool of hidden nodes. This gives a scene node
repeat:: the node is a template, drawn ascopies beside one another, and the copies follow the count while the scene runs.
The document
state-set-treeandhost.set_tablewrite it), or a read-lane expression counted as a widget'sis (
Runtime::eval_count: clamped to 0..4096, last good count on a budget skip). A key that holdsno number counts 0.
{i}filled in: its id,visible:bind, tags,source:(file, asset, data and item),
material: { texture }, clip offset binds, every string in itsprops, and its children's (
cvc::ariadne::scene_node_instance). An id without{i}gets_{i}. Copies keep the template'stransform:,tags:,visible:and children.tick_scenecounts each repeated node every frame (sync_scene_repeats) and adds orremoves copies, the last ones first, with no reload. A copy takes with it what it brought to the
RealizedScene: its node andcreatedentry, itsnodestag entries, its visibility and clipbindings, its tickers and data bindings, its height fields, and its range of
custom_ticks(later ranges move down; what those closures held is released).
position,rotationandscalekeys. A copy made when the count grows starts at the pose those keysalready hold, so a program can write a new marker's count and position in one step. Before
copies go, the scene's publisher is flushed, so a leaving copy's queued pose can't land on top of
the next write.
repeat:inside a repeated node counts itsown copies in each copy and goes with it; its
{i}is its own (the loader warns, as for widgets).body:andworld:. The physics world and the worlds are built once from thedeclared nodes, so the loader drops them from a repeated subtree, with a warning.
Hosts.
AppRuntimehands itsSceneAdapterthe document's read lane(
SceneAdapter::set_count_fn, cleared when the runtime goes).AriRuntime's adapter (so arigl,arigl-web, ariglx and pycvc_gl's Host) and
TerminalScenepass it torealize_sceneasRealizeOptions::count. A host callingrealize_sceneitself without one still counts numbers andkeys; an expression there draws no copies and warns.
Tests
ariadne_loader_test:RepeatParsedOntoNode,RepeatCountKinds,RepeatInstanceSubstitutesIndex,RepeatDropsBodiesAndWarnsNested,RepeatThatIsNotAScalarWarns.ariadne_runtime_test:AriadneAppRuntime.SceneRepeatCountsOnTheReadLane(the count functionAppRuntime gives its adapter, and that it is cleared when the runtime goes).
cvcgl_ariadne_repeat(new): a key's count growing and shrinking withcreated,nodesandvisibilitykept in step; a kept pose; a custom type's ticks coming and going (and released)with a later node's tick still running; copies under a group by an expression; a nested repeat;
an expression with no read lane; then a
repeat: (int (state-get "n"))document inAriRuntime.38 checks, 32 of 32 parallel runs pass locally.
Locally (Linux, Release):
ariadne_loader_test,ariadne_runtime_test,ariadne_requires_test,ariadne_server_document_test,ariadne_ftxui_test,cvcgl_ariadne_realize,cvcgl_ariadne_physics,cvcgl_ariadne_data,cvcgl_ari_switchand the cvcGL scene / stream /terminal ctest entries all pass, with pycvc built. Rebased 2026-11-14 onto master f8863fd (after
#1225 fixed master's build); the one conflict was the core source list.
Docs: docs/ARIADNE.md §5.4, "Repeated nodes".