Module

Hylograph.Transition.Example

Package
purescript-hylograph-simulation
Repository
afcondon/purescript-hylograph-simulation

Coordinator Example

A simple example showing how to use the TickCoordinator with multiple transitions running simultaneously.

This module is for demonstration and testing purposes.

#runExample Source

runExample :: Effect Unit

Run a simple example with two transitions:

  • Opacity: 0 → 1 over 500ms
  • Radius: 5 → 20 over 1000ms

The opacity transition will complete first, then radius.

#exampleWithCallback Source

exampleWithCallback :: ({ opacity :: Number, x :: Number, y :: Number } -> Effect Unit) -> Effect { coordinator :: Coordinator, stop :: Effect Unit }

Run an example with a transition group (x, y, opacity together). Calls the provided callback with current values each frame.