Hylograph.Internal.Transition.Types
- Package
- purescript-hylograph-selection
- Repository
- afcondon/purescript-hylograph-selection
Internal: Transition configuration types.
Defines TransitionConfig for specifying animation timing:
duration: Total animation timedelay: Wait before startingstaggerDelay: Per-element incremental delay (for cascading effects)easing: Rate-of-change function (Linear, Cubic, Bounce, etc.)
Also provides the Easing ADT based on D3's easing functions.
Internal module - use Hylograph.Transition for the public API.
#TransitionConfig Source
type TransitionConfig = { delay :: Maybe Milliseconds, duration :: Milliseconds, easing :: Maybe Easing, staggerDelay :: Maybe Number }Configuration for a transition
Specifies timing and easing for animated attribute changes. All times are in milliseconds.
For staggered transitions, use staggerDelay to add incremental delay
per element: element i gets delay = baseDelay + (i * staggerDelay)
Example:
config = transition (Milliseconds 1500.0)
configWithDelay = transitionWith
{ duration: Milliseconds 1500.0
, delay: Just (Milliseconds 500.0)
, staggerDelay: Nothing
, easing: Just Linear
}
staggeredConfig = transitionWith
{ duration: Milliseconds 600.0
, delay: Nothing
, staggerDelay: Just 100.0 -- 100ms between each element
, easing: Nothing
}
#Easing Source
data EasingEasing functions control the rate of change during transitions
Based on D3's easing functions: https://d3js.org/d3-ease For more complex easing, use purescript-easings library
Note: We could integrate with purescript-easings in the future, but starting simple with D3's built-in easings.
Constructors
LinearCubicCubicInCubicOutCubicInOutQuadQuadInQuadOutQuadInOutSinSinInSinOutSinInOutExpExpInExpOutExpInOutCircleCircleInCircleOutCircleInOutElasticElasticInElasticOutElasticInOutBackBackInBackOutBackInOutBounceBounceInBounceOutBounceInOut
Instances
#transition Source
transition :: Milliseconds -> TransitionConfigCreate a simple transition with just duration
Uses default easing (Cubic) and no delay.
Example:
config = transition (Milliseconds 1000.0)
#staggeredTransition Source
staggeredTransition :: Milliseconds -> Number -> TransitionConfigCreate a staggered transition where each element delays incrementally
Element i gets delay = i * staggerMs
Example:
config = staggeredTransition (Milliseconds 600.0) 100.0
-- Element 0: 0ms delay, Element 1: 100ms delay, Element 2: 200ms delay...
#transitionWith Source
transitionWith :: TransitionConfig -> TransitionConfigCreate a transition with full configuration
Example:
config = transitionWith
{ duration: Milliseconds 1500.0
, delay: Just (Milliseconds 500.0)
, easing: Just ElasticOut
}
#defaultTransition Source
defaultTransition :: TransitionConfigDefault transition configuration
250ms duration, no delay, cubic easing (D3 default)
- 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