Module

Hylograph.ForceEngine.Demo

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

Force Engine Demo

A simple demo showing the pure force engine in action. This creates a small force-directed graph with nodes and links.

#runDemo Source

runDemo :: Effect (Ref DemoState)

Run the force engine demo Returns a ref to the demo state that updates on each tick

#DemoState Source

type DemoState = { links :: Array DemoLink, nodes :: Array DemoNode, tickCount :: Int }

Demo state for rendering

#DemoNode Source

type DemoNode = SimulationNode (index :: Int)

Demo node - extends SimulationNode with index