Hylograph.HATS.Transitions
- Package
- purescript-hylograph-selection
- Repository
- afcondon/purescript-hylograph-selection
HATS Tick-Driven Transitions
Provides tick-driven transition state management for HATS GUP animations. Instead of using Web Animations API, transitions are driven by explicit tick calls, allowing integration with force simulations and other tick sources.
Architecture note: The transition primitives (Tick, Easing, Interpolate, Engine) live in Hylograph.Transition.*. These are general-purpose and could potentially be extracted to a separate hylograph-transitions library in the future, mirroring D3's d3-ease/d3-interpolate/d3-transition structure.
Usage:
-- In your component, after rerender:
result <- HATS.rerenderWithTransitions selector tree
case result.transitions of
Nothing -> pure unit
Just ts -> startTickLoop ts
-- In your tick handler:
case tickTransitions deltaMs transitions of
Complete -> stopTickLoop
Running newTs -> continue with newTs
#HATSTransitions Source
newtype HATSTransitionsAll active HATS transitions Entering/updating elements just need attr updates Exiting elements need to be removed when complete
Constructors
HATSTransitions { entering :: Array ElementTransitions, exiting :: Array ElementTransitions, updating :: Array ElementTransitions }
#ElementTransitions Source
type ElementTransitions = { attrs :: Array AttrTransition, element :: Element }All transitions for one element
#tickTransitions Source
tickTransitions :: Number -> HATSTransitions -> Effect TransitionResultAdvance all transitions by deltaMs and apply current values to DOM
Returns Running with updated state, or Complete when all finished.
#isComplete Source
isComplete :: HATSTransitions -> BooleanCheck if all transitions are complete (without ticking)
- Modules
- Data.
DependencyGraph - Hylograph.
AST - Hylograph.
Axis. Axis - Hylograph.
Brush - Hylograph.
Brush. FFI - Hylograph.
Brush. Types - Hylograph.
Classify - Hylograph.
Data. Graph - Hylograph.
Data. Graph. Algorithms - Hylograph.
Data. Node - Hylograph.
Data. Tree - Hylograph.
Expr. Animation - Hylograph.
Expr. Attr - Hylograph.
Expr. Datum - Hylograph.
Expr. Expr - Hylograph.
Expr. Friendly - Hylograph.
Expr. Integration - Hylograph.
Expr. Interpreter. CodeGen - Hylograph.
Expr. Interpreter. Eval - Hylograph.
Expr. Interpreter. Meta - Hylograph.
Expr. Interpreter. PureSVG - Hylograph.
Expr. Interpreter. SVG - Hylograph.
Expr. Path - Hylograph.
Expr. Path. Generators - Hylograph.
Expr. Sugar - Hylograph.
Expr. Units - Hylograph.
HATS - Hylograph.
HATS. Friendly - Hylograph.
HATS. InterpreterTick - Hylograph.
HATS. Transitions - Hylograph.
Interaction. Brush - Hylograph.
Interaction. Coordinated - Hylograph.
Interaction. Pointer - Hylograph.
Interaction. Zoom - Hylograph.
Internal. Attribute - Hylograph.
Internal. Behavior. FFI - Hylograph.
Internal. Behavior. Types - Hylograph.
Internal. Capabilities. Selection - Hylograph.
Internal. Capabilities. Transition - Hylograph.
Internal. FFI - Hylograph.
Internal. Selection. Join - Hylograph.
Internal. Selection. Operations - Hylograph.
Internal. Selection. Operations. Conversions - Hylograph.
Internal. Selection. Operations. Helpers - Hylograph.
Internal. Selection. Operations. Selection - Hylograph.
Internal. Selection. Query - Hylograph.
Internal. Selection. Types - Hylograph.
Internal. Transition. FFI - Hylograph.
Internal. Transition. Manager - Hylograph.
Internal. Transition. Scene - Hylograph.
Internal. Transition. Types - Hylograph.
Internal. Types - Hylograph.
Interpreter. D3 - Hylograph.
Interpreter. English - Hylograph.
Interpreter. Mermaid - Hylograph.
Interpreter. MetaAST - Hylograph.
Interpreter. SemiQuine - Hylograph.
Interpreter. SemiQuine. TreeToCode - Hylograph.
Interpreter. SemiQuine. Types - Hylograph.
Render - Hylograph.
Scale - Hylograph.
Scale. FP - Hylograph.
Shape. Arc - Hylograph.
Shape. Pie - Hylograph.
Shape. Polygon - Hylograph.
Tooltip - Hylograph.
Transform - Hylograph.
TreeDSL - Hylograph.
TreeDSL. ShapeTree - Hylograph.
Unified - Hylograph.
Unified. Attribute - Hylograph.
Unified. DataDSL - Hylograph.
Unified. Display - Hylograph.
Unified. Examples - Hylograph.
Unified. Join - Hylograph.
Unified. Sugar