Skip to content

Ariadne components: the node a panel drives is an arg; viewer_settings - #990

Merged
transfix merged 2 commits into
masterfrom
ariadne/components-params
Nov 3, 2026
Merged

transfix merged 2 commits into
masterfrom
ariadne/components-params

Conversation

@transfix

@transfix transfix commented Nov 3, 2026 •

Copy link
Copy Markdown
Owner

What

The node-scoped components in src/cvc/ariadne/components/ bound one hardcoded node (bunny_volume, mesh, domain) or one scene-wide key root (forest.*, sea.*, sky.*, world.*). So a second node of a kind meant copying the file. Each one now takes what it drives as a unit arg. The default is the name it always bound, so a bare include: and every existing document load unchanged.

component new args (defaults)
volren_controls, volslice_controls node (bunny_volume), title, id
mesh_tools node (mesh), title, id
fe_controls node (domain), title, id
forest_controls, sea_controls, sky_controls, world_controls keys (forest / sea / sky / world), title, id
raster_view keys (raster), title, id
camera_controls viewer (main), title, id
scene_controls title, id

keys: on a node. The forest, sea, sky and world realizers read scene-wide keys. A node's new keys: prop moves them under a root of its own (cvc::ariadne::node_key in scene.h), which the panel's keys arg names:

windows:
  - include: forest_controls                       # forest.*
  - include: forest_controls
    args: { keys: north, title: North wood, id: north_forest }
scene:
  nodes:
    - { node: south, type: forest_trees }
    - { node: north, type: forest_trees, keys: north }   # north.count, north.seed, ...

viewer_settings.ari (new) is one window for a viewer (arg viewer, default main). It holds:

  • the FpsHud readout (viewers.<v>.hud.enabled / .fps) and the UI size (viewers.<v>.ui.scale);
  • grid, origin axis and scene bounds (graphics.root.children.grid.visible, .axis.visible, graphics.root.show_bbox);
  • the camera and shadows sections.

It reuses camera_controls' and scene_controls' widgets through their new window-less units, camera_settings and shadow_settings.

terrain_lab.ari uses it: Settings > Viewer replaces its Camera and Scene windows.

Compatibility

One instance id changes. The tf_editor inside mesh_tools and fe_controls was mesh_field_colors / fe_field_colors; it is now {id}_colors (mesh_tools_colors / fe_controls_colors), so that two includes don't share one editor's view state. The only effect is that a saved zoom and layer toggles for that editor start over. Nothing in the repo refers to the old ids.

Tests

On Windows Release, with cvcGL off:

  • New tests in ariadne_loader_test.
    • AriadneComponents.NodeComponentsTakeTheirNodeAsAnArg: each of the 10 components is included both bare and with args. Every bind, script and id has its args filled in, and the default name is gone where an arg replaced it.
    • AriadneComponents.ViewerSettingsBindsTheViewersKeys.
    • AriadneScene.NodeKeysPropRootsATypesLiveKeys.
  • Existing tests, all passing. ShippedComponentsLoadClean now covers viewer_settings. Suite totals: loader 217, runtime 248, host 42, media 34, requires 15, tf_editor 38, plus the bind, scene_tf and doc_fetch suites.
  • Not built locally: the cvcGL side, lsystem_nodes.cpp / world_nodes.cpp, and the new cvcgl_ariadne_realize check (a cloud_sky with keys: storm seeds storm.*). CI builds and runs both.
  • clang-format is clean on the changed lines.
  • The state_exec parse corpus is a frozen snapshot, last regenerated in state_exec: grammar spec, conformance cases and parse corpus (grammar P0) #644, so it is not regenerated here.

The node-scoped components bound one hardcoded node, so a second node of
a kind meant copying the file. They take it as an arg now, defaulting to
the name they always bound, so every existing document loads unchanged:

- volren_controls, volslice_controls, mesh_tools, fe_controls: node
- forest/sea/sky/world_controls, raster_view: keys (the key root)
- camera_controls: viewer
- each window component: title and id

forest_trees, wave_sea, cloud_sky and generated_world keep their live
keys scene-wide (forest.* ...). A node's `keys:` prop now moves them under
a root of its own (cvc::ariadne::node_key), which the panel's keys arg
names, so two forests have two panels.

viewer_settings is one window for a viewer: the FpsHud readout, the UI
size, the grid / origin axis / scene bounds, the camera and the shadows.
It reuses camera_controls' and scene_controls' widgets through their new
window-less units (camera_settings, shadow_settings).
…e_controls

Settings > Viewer opens one window with the frame-rate readout, UI size,
grid / axis / scene bounds, camera and shadows. Sky moves to a second
column, since the stack below the taller window would run off a laptop
screen.
@transfix
transfix merged commit f87f6f3 into master Nov 3, 2026
27 of 28 checks passed
@transfix
transfix deleted the ariadne/components-params branch November 3, 2026 18:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant