Hylograph.Config.Scene
- Package
- purescript-hylograph-simulation
- Repository
- afcondon/purescript-hylograph-simulation
Simulation Setup Configuration Module
A SimulationSetup represents a complete D3 simulation configuration:
- Which forces are active
- Simulation parameters (alpha, decay rates, etc.)
Setups are composable and can be merged, filtered, or transformed.
#defaultSimParams Source
defaultSimParams :: SimulationParamsDefault simulation parameters (matches d3-force defaults)
#fastSimParams Source
fastSimParams :: SimulationParamsFast convergence parameters (for quick transitions)
#slowSimParams Source
slowSimParams :: SimulationParamsSlow convergence parameters (for smooth, gradual layouts)
#SimulationSetup Source
newtype SimulationSetupComplete scene configuration
Constructors
SimulationSetup { description :: Maybe String, forces :: Array ForceConfig, name :: String, simParams :: SimulationParams }
Instances
#setup Source
setup :: String -> Array ForceConfig -> SimulationSetupCreate a setup with default simulation parameters
#setupWithParams Source
setupWithParams :: String -> Array ForceConfig -> SimulationParams -> SimulationSetupCreate a setup with custom simulation parameters
#withDescription Source
withDescription :: String -> SimulationSetup -> SimulationSetupAdd description to a setup
#withSimParams Source
withSimParams :: SimulationParams -> SimulationSetup -> SimulationSetupUpdate simulation parameters
#withAlpha Source
withAlpha :: Number -> SimulationSetup -> SimulationSetupSet alpha (energy level) for a setup
#withAlphaTarget Source
withAlphaTarget :: Number -> SimulationSetup -> SimulationSetupSet alpha target (simulation runs until alpha ≤ target)
#addForce Source
addForce :: ForceConfig -> SimulationSetup -> SimulationSetupAdd a force to a setup
#removeForce Source
removeForce :: Label -> SimulationSetup -> SimulationSetupRemove a force from a setup by name
#keepForces Source
keepForces :: Array Label -> SimulationSetup -> SimulationSetupKeep only specified forces
#excludeForces Source
excludeForces :: Array Label -> SimulationSetup -> SimulationSetupRemove specified forces
#replaceForce Source
replaceForce :: ForceConfig -> SimulationSetup -> SimulationSetupReplace a force in a setup (by name)
#updateForce Source
updateForce :: Label -> (ForceConfig -> ForceConfig) -> SimulationSetup -> SimulationSetupUpdate a force in a setup using a transformation function
#mergeSetups Source
mergeSetups :: SimulationSetup -> SimulationSetup -> SimulationSetupMerge two setups Forces from the second setup override those with the same name from the first Simulation params from the second setup are used
#getForce Source
getForce :: Label -> SimulationSetup -> Maybe ForceConfigGet a force from a setup by name
#hasForce Source
hasForce :: Label -> SimulationSetup -> BooleanCheck if a setup has a force with the given name
#forceNames Source
forceNames :: SimulationSetup -> Array LabelGet all force names in a setup
#forceCount Source
forceCount :: SimulationSetup -> IntCount forces in a setup
- Modules
- Hylograph.
Config. Apply - Hylograph.
Config. Force - Hylograph.
Config. Scene - Hylograph.
ForceEngine - Hylograph.
ForceEngine. Core - Hylograph.
ForceEngine. Demo - Hylograph.
ForceEngine. Events - Hylograph.
ForceEngine. Links - Hylograph.
ForceEngine. Registry - Hylograph.
ForceEngine. Render - Hylograph.
ForceEngine. Setup - Hylograph.
ForceEngine. Setup. WASM - Hylograph.
ForceEngine. Simulation - Hylograph.
ForceEngine. Types - Hylograph.
ForceEngine. WASM - Hylograph.
ForceEngine. WASMEngine - Hylograph.
Scene. Engine - Hylograph.
Scene. Handle - Hylograph.
Scene. Rules - Hylograph.
Scene. Types - Hylograph.
Simulation - Hylograph.
Simulation. Emitter - Hylograph.
Simulation. HATS - Hylograph.
Simulation. Scene - Hylograph.
Transition. Consumers - Hylograph.
Transition. Example