Convert mirror to a fold emitter and bridge levels into the erased list

This commit is contained in:
Dennis Kobert
2026-08-22 22:15:03 +00:00
parent 3126a5b278
commit c33f8ae75b
2 changed files with 234 additions and 37 deletions

View File

@@ -151,6 +151,18 @@ fn node_registry() -> HashMap<ProtoNodeIdentifier, Vec<RegistryEntry>> {
.into_iter()
.map(|entry| (graphene_std::vector::assign_colors::IDENTIFIER.clone(), entry)),
);
// The mirror's plain vector rows, served under its identifier.
node_types.extend(
graphene_std::graphic::mirror_vector_entries()
.into_iter()
.map(|entry| (graphene_std::graphic::mirror::IDENTIFIER.clone(), entry)),
);
// The morph's plain vector rows, served under its identifier.
node_types.extend(
graphene_std::vector::morph_vector_entries()
.into_iter()
.map(|entry| (graphene_std::vector::morph::IDENTIFIER.clone(), entry)),
);
// Element-wise coercion into `Graphic` for single-typed leveled inputs,
// served by the to_graphic rows.
node_types.extend(
@@ -167,6 +179,12 @@ fn node_registry() -> HashMap<ProtoNodeIdentifier, Vec<RegistryEntry>> {
.zip(["List<Graphic>", "List<Vector>", "List<Raster<CPU>>", "List<Raster<GPU>>", "List<Color>", "List<GradientStops>", "List<String>"])
.map(|(entry, target)| (ProtoNodeIdentifier::with_owned_string(format!("graphene_core::ops::ConvertNode<{target}>")), entry)),
);
// The same bridge into the attribute family's type-erased list.
node_types.extend(
graphene_std::graphic::level_to_list_dyn_entries()
.into_iter()
.map(|entry| (ProtoNodeIdentifier::new("graphene_core::ops::ConvertNode<ListDyn>"), entry)),
);
// =============
// CONVERT NODES
// =============