def snapshot
bendvy-ecs-core@0.1.0.4 · hierarchy_provider.bend:27
import bendvy-ecs-core@0.1.0.4/hierarchy_provider.bend as HierarchyProvider
import Base
import bendvy-ecs-core@0.1.0.4/relation_types.bend as G
import bendvy-ecs-core@0.1.0.4/relation_graph.bend as Graph
import bendvy-ecs-core@0.1.0.4/relation_providers.bend as Relations
import bendvy-ecs-core@0.1.0.4/world.bend as W
import bendvy-ecs-core@0.1.0.4/hierarchy_traversal.bend as T
27def snapshot(~S:Data,+graph:G.Graph<S>,+descriptor:G.Descriptor<S>,target:W.Handle<S>) -> Frame<S>:
28 match target:
29 case W.Handle{+namespace,+id}: Frame{W.Handle{namespace,id},handle(~S,Graph.target(~S,graph,descriptor,id),namespace),Relations.handle_ids(~S,Graph.inverse(~S,graph,descriptor,id),namespace),path(~S,T.ancestors(~S,graph,descriptor,id),namespace),handle(~S,T.root(T.ancestors(~S,graph,descriptor,id),id),namespace),path(~S,T.descendants(~S,graph,descriptor,id,T.Depth{}),namespace),path(~S,T.descendants(~S,graph,descriptor,id,T.Breadth{}),namespace)}