Convert the artboard constructor to an attribute kernel behind a footprint translate

This commit is contained in:
Dennis Kobert
2026-08-22 14:46:29 +00:00
parent 98dabd7ff5
commit 6635e0aeff
2 changed files with 64 additions and 35 deletions
@@ -297,7 +297,7 @@ fn document_node_definitions() -> HashMap<DefinitionIdentifier, DocumentNodeDefi
call_argument: generic!(T),
implementation: DocumentNodeImplementation::ProtoNode(artboard::create_artboard::IDENTIFIER),
inputs: vec![
NodeInput::import(concrete!(TaggedValue), 1),
NodeInput::node(NodeId(6), 0),
NodeInput::import(concrete!(TaggedValue), 2),
NodeInput::import(concrete!(TaggedValue), 3),
NodeInput::import(concrete!(TaggedValue), 4),
@@ -334,6 +334,17 @@ fn document_node_definitions() -> HashMap<DefinitionIdentifier, DocumentNodeDefi
implementation: DocumentNodeImplementation::ProtoNode(graphic::extend::IDENTIFIER),
..Default::default()
},
// Content coercion into a graphic level, evaluated within the artboard's footprint
DocumentNode {
inputs: vec![NodeInput::import(generic!(T), 1)],
implementation: DocumentNodeImplementation::ProtoNode(graphic::to_graphic::IDENTIFIER),
..Default::default()
},
DocumentNode {
inputs: vec![NodeInput::node(NodeId(5), 0), NodeInput::import(concrete!(TaggedValue), 2)],
implementation: DocumentNodeImplementation::ProtoNode(artboard::translate_footprint::IDENTIFIER),
..Default::default()
},
]
.into_iter()
.enumerate()
@@ -425,6 +436,22 @@ fn document_node_definitions() -> HashMap<DefinitionIdentifier, DocumentNodeDefi
},
..Default::default()
},
// 5: to_graphic
DocumentNodeMetadata {
persistent_metadata: DocumentNodePersistentMetadata {
node_type_metadata: NodeTypePersistentMetadata::node(IVec2::new(-35, -3)),
..Default::default()
},
..Default::default()
},
// 6: translate_footprint
DocumentNodeMetadata {
persistent_metadata: DocumentNodePersistentMetadata {
node_type_metadata: NodeTypePersistentMetadata::node(IVec2::new(-28, -3)),
..Default::default()
},
..Default::default()
},
]
.into_iter()
.enumerate()