Hylograph.Flow.Render.Transition
- Package
- purescript-hylograph-flow-render
- Repository
- afcondon/purescript-hylograph-flow-render
A watched change between two cuts: the stages of it, as layouts to be blended, and a transition of them by the ecosystem's own machinery (0.6).
When the layouts of two cuts differ, the reader keeps their place by seeing what moves move. A change is shown in stages, so that two kinds of motion are not on the page at once. Opening a group:
- make room: the closed picture, with every node the change does not touch going to where the open picture has it, and the group's bar going, whole, to where its parts will stand across the flow (nowhere, where they will stand within the span it has);
- unfold: the open picture, with the group's parts starting inside the bar (each where it will be across the flow, all where the bar is along it) and going out along the flow to their tiers.
Closing is the same two, backwards: fold, then close up. A stage in
which nothing moves is left out. So a pair that is Held has no stage
that makes room; and where the group's parts are in one tier it has no
stages at all: the parts take the bar's place at once, and there is
nothing to watch.
Every stage is two layouts of one projection and of one shape
(Reshape.sameShape), made with Reshape.reshaped, so every picture
part of the way through is Reshape.blend of the two, and conserves
what the two conserve: a ribbon is as broad as it was and stands
where it stood on its node's side all the way. What a picture part of
the way through does not keep is apartness: in the second stage the
parts start on top of one another, inside the bar.
Between the two stages the picture changes from the closed projection to the open one. Every untouched node is then in one place in both; the bar is replaced by its parts, within the span it had; and the ribbons that met the bar meet the parts, which is the one thing that is seen to jump (by less than the bar's breadth).
A change that opens some groups and closes others has no stages here: take it one group at a time. A change with no group opened or closed, between two layouts of one shape, is one stage.
THE MACHINERY is hylograph-transitions: watched gives a
TransitionSpec of layouts (its engine's, with its easings), whose
tick is pure. Nothing here keeps time, and nothing here runs: a page
runs the spec with that library's own consumer of a transition,
Hylograph.Transition.Consumers.transitionConsumer (in
hylograph-transitions since 0.1.1), on its Coordinator. Until 0.7
this module had a runner of its own, watch, because that consumer
lived in hylograph-simulation; it is gone, and this package depends
on no simulation.
#watched Source
watched :: forall wire. TransitionConfig -> Array (Stage wire) -> Maybe (TransitionSpec (Layout wire))The stages as one transition for hylograph-transitions' engine: its
duration and easing are each stage's, its delay the whole's.
Nothing where there are no stages (the change is then made at once).
- Modules
- Hylograph.
Flow. Render. Columns - Hylograph.
Flow. Render. Continuity - Hylograph.
Flow. Render. Engine - Hylograph.
Flow. Render. Internal. Bands - Hylograph.
Flow. Render. Keys - Hylograph.
Flow. Render. Laws - Hylograph.
Flow. Render. Layout - Hylograph.
Flow. Render. Measures - Hylograph.
Flow. Render. Motion - Hylograph.
Flow. Render. Present - Hylograph.
Flow. Render. Reshape - Hylograph.
Flow. Render. Route - Hylograph.
Flow. Render. Sankey - Hylograph.
Flow. Render. Signal - Hylograph.
Flow. Render. Text - Hylograph.
Flow. Render. Transition - Hylograph.
Flow. Render. Tree - Hylograph.
Flow. Render. Unfold