Package

purescript-hylograph-simulation-halogen

Repository
afcondon/purescript-hylograph-simulation-halogen
License
MIT
Uploaded by
pacchettibotti
Published on
2026-02-04T21:00:08Z

Halogen integration for Hylograph force simulations.

Overview

Provides utilities for integrating Hylograph force simulations with Halogen applications, including event emitters that work with Halogen's subscription system.

Installation

spago install hylograph-simulation-halogen

Usage

import Hylograph.ForceEngine.Halogen (toHalogenEmitter)

handleAction Initialize = do
  { handle, events } <- liftEffect $ runSimulation config
  halogenEmitter <- liftEffect $ toHalogenEmitter events
  void $ H.subscribe $ halogenEmitter <#> SimEvent

handleAction (SimEvent (Tick { alpha })) =
  H.modify_ _ { alpha = alpha }

Modules

  • Hylograph.ForceEngine.Halogen - Halogen emitter adapter

Part of Hylograph

  • hylograph-simulation-halogen - Halogen integration (this package)
  • hylograph-simulation - Core simulation API
  • hylograph-d3-kernel - D3 physics engine

License

MIT

Modules
Hylograph.ForceEngine.Halogen
Dependencies