Marey.Anim
0.7.0
dotnet add package Marey.Anim --version 0.7.0
NuGet\Install-Package Marey.Anim -Version 0.7.0
<PackageReference Include="Marey.Anim" Version="0.7.0" />
<PackageVersion Include="Marey.Anim" Version="0.7.0" />
<PackageReference Include="Marey.Anim" />
paket add Marey.Anim --version 0.7.0
#r "nuget: Marey.Anim, 0.7.0"
#:package Marey.Anim@0.7.0
#addin nuget:?package=Marey.Anim&version=0.7.0
#tool nuget:?package=Marey.Anim&version=0.7.0
Marey.Anim
Animation for Marey, a dimensionally-typed visualization system for F#. An animation is a pure function of time, not a mutation.
#r "nuget: Marey.Anim"
open Marey
let zoom = Anim.tween 2.0<s> 0.0<m> 100.0<m> |> Anim.ease Ease.cubicInOut
zoom |> Anim.at 1.0<s> // 50.0<m>, and the type says so
zoom |> Anim.atFraction 0.25 // seek anywhere, in any order, any number of times
An Anim<'a> is a duration and a function from a time to a value. Nothing is stepped, nothing
accumulates, and nothing has to be played from the start to see frame 900 — which is what a
mutable scene graph cannot offer, and what a scrubbable timeline needs.
What is in it
- The algebra.
pure',map,map2,andThen,stretch,easeandtween, built overofSecondsandofFraction— with the associativity, identity and composition laws property-tested rather than asserted in a comment. - A seek that is total.
Anim.atclamps its argument to[0, duration], so a shorter component of amap2holds its final value through the tail instead of running off, andandThenis well-defined at every instant. The normalised clock is deliberately not clamped, which is what makes an overshooting ease overshoot. - Twenty-eight easing functions — quad, cubic, quart, sine, expo, circ, back, elastic and
bounce, each in, out and in-out, plus linear. The law that every one of them starts at 0 and
ends at 1 is quantified over the whole catalogue by reflection, so a new one cannot be added
without being checked.
Ease.backOutovershoots past its target and comes back, because nothing clamps the fraction. - Arc-length path morphing.
Morph.pathsflattens twoPathSeg[]to a common arc-length parameterisation, pairs their subpaths, and interpolates — so a square becomes a triangle at a steady speed rather than at a steady vertex index. The pairing, sample count and closure policy are stated inMorphOptionsrather than hidden. - Interpolation of anything
Marey.Corecan interpolate, including affine transforms, which tween through a decomposition into translate/rotate/scale/skew — so a half-turn rotates rather than collapsing through the zero matrix.
Rendering one
Marey.Anim is generic in what it animates and mentions no Figure: tweening a float<m>
does not make you install the grammar. To render an Anim<Figure>, lay out once for the
whole shot and draw each frame inside that arrangement:
let shot = Chart.arrangeUnion 32 TextMeasure.approx extent (fun u -> Anim.atFraction u anim)
let frame u = Chart.toSceneIn TextMeasure.approx shot (Anim.atFraction u anim)
Re-laying out per frame makes the panel breathe — the plot rectangle is what is left after the
widest tick label has taken its room, so a domain gaining a digit moves the axis while the data
is what is supposed to be moving. arrangeUnion sizes the gutters against every sampled state at
once and pins the unit prefix to the same union, so neither the panel nor the axis title steps
mid-shot.
Depends only on Marey.Core, and is
Fable-compatible.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.1 is compatible. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.1
- FSharp.Core (>= 8.0.100)
- Marey.Core (>= 0.7.0)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on Marey.Anim:
| Package | Downloads |
|---|---|
|
Marey.Plot
Themes, palettes, constraint layout, and the axis/legend compiler that turns figures into Scene IR. |
|
|
Marey.Sim
Simulation for Marey: ODE integrators typed by units of measure (Euler, RK4, Dormand-Prince, velocity Verlet, leapfrog), trajectories that seek like any other animation, invariants, events and collisions, Poincare sections, pathlines and particles, finite-difference heat, wave and Poisson solvers, and fluids by stable fluids and lattice Boltzmann. |
GitHub repositories
This package is not used by any popular GitHub repositories.