[{"name":"Spring","comment":" A simple spring simulation for smooth, physically-inspired animations.\n\nThis module provides a spring model that moves a value toward a target over time,\nbased on configurable tension and friction. It can be used to animate values like\npositions, sizes, or any other continuous quantity.\n\n\n# Spring\n\n@docs Spring, create, update, value, equilibrium\n\n\n# Configuration\n\n@docs Config, config, setEquilibriumThreshold\n\n","unions":[{"name":"Config","comment":" Configuration for a spring simulation.\n\nIncludes:\n\n  - `tension`: how strongly the spring is pulled toward the target\n  - `friction`: how much resistance slows the spring down\n  - `equilibriumThreshold`: how close is “close enough” to be considered settled\n\n","args":[],"cases":[]},{"name":"Spring","comment":" A `Spring` represents a value that moves toward a target using spring dynamics.\n\nIt holds the current value, the target value, and the velocity of the spring.\n\n","args":[],"cases":[]}],"aliases":[],"values":[{"name":"config","comment":" Create a basic `Config` using the given tension and friction values.\n\nThe `equilibriumThreshold` is set to a default of `0.05`, which defines how close the\nspring’s value and velocity must be to the target and zero, respectively, before\nit is considered at rest.\n\n    config { tension = 100, friction = 15 }\n\n","type":"{ tension : Basics.Float, friction : Basics.Float } -> Spring.Config"},{"name":"create","comment":" Create a new `Spring` given an initial value and a target.\n\nThe initial velocity will be zero.\n\n    create { value = 0, target = 100 }\n\n","type":"{ value : Basics.Float, target : Basics.Float } -> Spring.Spring"},{"name":"equilibrium","comment":" Check if a `Spring` is at equilibrium.\n\nThis returns `True` if the value equals the target and the velocity is zero.\n\n    equilibrium mySpring\n\n","type":"Spring.Spring -> Basics.Bool"},{"name":"setEquilibriumThreshold","comment":" Override the `equilibriumThreshold` of a given `Config`.\n\nThis can be useful if you want to change how strictly the spring checks for rest.\n\n    config { tension = 100, friction = 15 }\n        |> setEquilibriumThreshold 0.01\n\n","type":"Basics.Float -> Spring.Config -> Spring.Config"},{"name":"update","comment":" Step the spring simulation forward by a given number of milliseconds.\n\nApplies the configured spring dynamics to update the value and velocity.\n\nIf the spring is close enough to equilibrium (as defined by the threshold in the config),\nit snaps to rest.\n\n    update myConfig 16 mySpring\n\n","type":"Spring.Config -> Basics.Float -> Spring.Spring -> Spring.Spring"},{"name":"value","comment":" Get the current value of a `Spring`.\n\n    value mySpring\n\n","type":"Spring.Spring -> Basics.Float"}],"binops":[]}]