Repository navigation
ariadne(lsystem): live per-node tweak panels as reusable components (Phase 5) - #566
Merged
Merged
Conversation
…Phase 5)
Add windows that let the user tweak each lsystem node's procedural settings LIVE, as reusable .ari
components — one per node type. The node realizers now read their params from BOUND STATE KEYS
(forest.* / sea.* / sky.*) that they SEED from the authored .ari props, so a control panel bound to
the same keys starts at the document's values and then drives the node live.
Live response in lsystem_nodes.cpp:
- wave_sea — reads sea.wave_amp / sea.sea_level on every refill (the depth field is re-filled each
frame anyway) → FULLY live, no regeneration.
- cloud_sky — reads sky.drift / sky.morph (scroll + crossfade speed) and sky.shadow (toggles the
cloud→ground dappling; turning it off re-bakes the plain band albedo once) each stride. The cloud
SHAPE stays baked (regenerating it is seconds, not a live slider).
- forest_trees — wind is applied every frame; the STRUCTURAL params (count/seed/species/span/
sea_level/scale/length/radius/levels/branches/pine_scale) regenerate the mesh on change —
grow_forest → GeometryNode::setGeometry(wood)+(needle) + rebuilt route-C wind buffers. Ariadne
sliders commit on release, so that's ONE regen per edit, not per drag-frame. The needle node is
always created (even for a branchy-only forest) so a live species change to pine can fill it.
Reusable components (src/cvc/ariadne/components/): forest_controls.ari (count/seed/species-combo/
span/sea_level/levels/branches/pine_scale/wind), sea_controls.ari (wave_amp/sea_level),
sky_controls.ari (shadow/drift/morph). lsystem_forest.ari imports + arranges them in a second panel
column.
Verified in the browser (wasm, generic ariadne_hello host): the three panels appear seeded from the
.ari values; dragging Tree count 80 → 13 re-grows the forest live. Tests: cvcgl_ariadne_realize +2
(the realizers seed forest.count / sea.wave_amp from their props); realize suite green; native +
wasm compile.
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.
What
Adds windows to tweak each lsystem node's procedural settings live, as reusable
.aricomponents — one per node type. The node realizers now read their params from bound state keys (forest.*/sea.*/sky.*) that they seed from the authored.ariprops, so a control panel bound to the same keys starts at the document's values and then drives the node live.Live response (
lsystem_nodes.cpp)wave_sea— readssea.wave_amp/sea.sea_levelon every refill (the field re-fills each frame anyway) → fully live, no regen.cloud_sky—sky.drift/sky.morph(scroll + crossfade speed) andsky.shadow(toggles the ground dappling; off re-bakes plain albedo once). Cloud shape stays baked (regen is seconds, not a slider).forest_trees—windevery frame; the structural params (count/seed/species/span/levels/…) regenerate the mesh on change (grow_forest→GeometryNode::setGeometry+ rebuilt route-C wind buffers). Ariadne sliders commit on release, so that's one regen per edit, not per drag-frame. The needle node is always created so a live species change to pine can fill it.Reusable components (
src/cvc/ariadne/components/)forest_controls.ari,sea_controls.ari,sky_controls.ari—lsystem_forest.ariimports + arranges them in a second panel column.Verified
In the browser (wasm, generic
ariadne_hello): the three panels appear seeded from the.arivalues; dragging Tree count 80 → 13 re-grows the forest live. Tests:cvcgl_ariadne_realize+2 (realizers seedforest.count/sea.wave_ampfrom props); realize suite green; native + wasm compile.