mirror of
https://github.com/centau/vide.git
synced 2026-08-20 14:41:37 +00:00
Update docs
This commit is contained in:
parent
94add5d452
commit
a3cc2dfbda
30 changed files with 850 additions and 770 deletions
|
|
@ -1,6 +1,6 @@
|
|||
# Animation API
|
||||
# Animation
|
||||
|
||||
## spring()
|
||||
## spring() <Badge type="tip" text="STABLE"><a href="/vide/api/reactivity-core#Scopes">REACTIVE</a></Badge>
|
||||
|
||||
Returns a new source with a value always moving torwards the input source value.
|
||||
|
||||
|
|
@ -18,8 +18,7 @@ Returns a new source with a value always moving torwards the input source value.
|
|||
|
||||
- **Details**
|
||||
|
||||
An effect is created to update the new source every frame based on the input
|
||||
source value.
|
||||
Creates a reactive scope internally to detect source updates.
|
||||
|
||||
The movement is physically simulated according to a
|
||||
[spring](https://en.wikipedia.org/wiki/Simple_harmonic_motion).
|
||||
|
|
@ -39,3 +38,7 @@ Returns a new source with a value always moving torwards the input source value.
|
|||
You can change when the solver runs by calling `vide.step(dt)`, which will
|
||||
advance the simulation time by `dt` seconds and automatically stop the
|
||||
solver running in heartbeat.
|
||||
|
||||
::: warning
|
||||
Large periods or damping ratios can break the spring.
|
||||
:::
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue