MonacoLabs.Presto 0.1.0-preview.1

This is a prerelease version of MonacoLabs.Presto.
dotnet add package MonacoLabs.Presto --version 0.1.0-preview.1
                    
NuGet\Install-Package MonacoLabs.Presto -Version 0.1.0-preview.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="MonacoLabs.Presto" Version="0.1.0-preview.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="MonacoLabs.Presto" Version="0.1.0-preview.1" />
                    
Directory.Packages.props
<PackageReference Include="MonacoLabs.Presto" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add MonacoLabs.Presto --version 0.1.0-preview.1
                    
#r "nuget: MonacoLabs.Presto, 0.1.0-preview.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package MonacoLabs.Presto@0.1.0-preview.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=MonacoLabs.Presto&version=0.1.0-preview.1&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=MonacoLabs.Presto&version=0.1.0-preview.1&prerelease
                    
Install as a Cake Tool

MonacoLabs.Presto

A framework-agnostic .NET animation engine inspired by, and initially ported from, anime.js v4.5.0: timers, animations, timelines, tweens, keyframes, eases, staggering, springs and full playback control, for any property of any object. It has no UI dependency and no package dependencies, so it suits a game loop, a view model or your own renderer.

For UI controls, add MonacoLabs.Presto.Avalonia, which builds on this package.

Install

dotnet add package MonacoLabs.Presto

Targets net10.0.

Quick start

using MonacoLabs.Presto;

Presto.RegisterTarget<Ship>();                          // needed when trimmed or NativeAOT; see below
var ship = new Ship();

var animation = Presto.Build()
    .Property(nameof(Ship.X), 320)                      // 0 → 320
    .Property(nameof(Ship.Opacity), from: 1, to: 0.2)   // explicit from → to
    .Duration(1250)
    .Ease(Eases.InOutQuint)
    .Loop(1)
    .Alternate()
    .OnUpdate(_ => Console.WriteLine($"{ship.X:0} {ship.Opacity:0.00}"))
    .Animate(ship);

await animation;                                        // anime.js .then()

sealed class Ship
{
    public double X { get; set; }
    public double Opacity { get; set; } = 1;
}

Frames come from the built-in StopwatchFrameSource, which posts to the SynchronizationContext of the thread that started it; tests swap in ManualFrameSource and call Advance(16). Time is always double milliseconds.

Trimming and NativeAOT

The package is marked IsTrimmable and IsAotCompatible and builds with no trim or AOT warnings. A plain object animated by member name has its members found by reflection, and a trimmed or NativeAOT app may have removed them, so register the type once before its first animation with Presto.RegisterTarget<T>(). The call does nothing at run time; its annotation tells the trimmer what to keep, and an unregistered type that lost its members throws ArgumentException naming RegisterTarget<T>(). Under NativeAOT a registered type's accessors run as interpreted expression trees; a type that needs allocation-free frames there registers an ITargetAdapter in Presto.Adapters instead. Details are in the Trimming and NativeAOT section.

More

License

MIT; see LICENSE. Presto is inspired by, and was initially ported from, anime.js by Julian Garnier, used under the MIT license.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net10.0

    • No dependencies.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on MonacoLabs.Presto:

Package Downloads
MonacoLabs.Presto.Avalonia

Avalonia bindings for MonacoLabs.Presto: frame pump, AvaloniaProperty targets, transforms, colors and control helpers.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.0-preview.1 657 10/22/2026