loading

MCP server

This demo ships a Model Context Protocol server, so an AI agent can write Bmotion code from what the library actually is rather than from what it remembers. Half of its tools answer from this build's own text - the guide, the XML documentation compiled into the assembly, the source of every page you have been reading. The other half answer by running the real animation engine off-screen and reporting what it did. That second half is the reason it exists: no amount of documentation can tell you that Bm.Spring(stiffness: 400, damping: 2) wobbles for five seconds, or that animating height stops moving the moment your app is served over Blazor Server.

Why an animation library needs one

Almost every way of getting an animation wrong is silent. There is no compiler error, no exception, and nothing in the browser console - the page simply does not move, or moves differently in production than it did on your machine. Three examples this server answers directly:

It works locally, not in production

The animation touches a property the browser compositor cannot own, so it needs the C# frame loop - which does not exist on Blazor Server.

AnalyzeBmotionAnimation
The exit animation never plays

Blazor removed the element the moment the condition flipped. Exit needs a presence component to hold it in the DOM.

ReviewBmotionCode
The spring feels wrong and the numbers do not help

Stiffness and damping do not describe motion out loud. How long it takes and how far it overshoots are consequences, not settings.

SimulateBmotionTransition

Connect your agent

The server speaks MCP over HTTP at /mcp. Run this demo, then point any MCP client at it. The same methods are also plain GET endpoints under /api/mcp/..., so you can open any of them in a browser tab - which is exactly what the panels further down this page do.

One command, from anywhere in your project.

Razor

The transition lab

SimulateBmotionTransition plays a transition on the real engine with no browser involved, and reports what the motion does. Nothing in a transition states its own settle time - a spring's, and how far it overshoots, fall out of the physics - so this is the only way to know what one feels like before shipping it. Pass several at once, separated by semicolons, and it measures them side by side.

The box below is not an approximation: it replays the exact per-frame values the server measured, handed back as keyframes.

Will it work on Blazor Server?

Only animations the browser compositor can own play on Blazor Server; everything else needs the C# per-frame loop, which does not exist there, and becomes an instant jump. AnalyzeBmotionAnimation does not consult a table - it starts the animation on the real engine and watches which path the engine takes.

Review your markup

ReviewBmotionCode is the pass that closes the loop after an agent writes code. It looks for the mistakes that compile cleanly and then do nothing - an Exit with no presence component around it, a @foreach with no @key, a spring whose duration the engine ignores. The sample below contains several on purpose.

One search across everything

An agent rarely knows which corpus holds the answer. SearchBmotion covers the guide, every public member, the animatable properties, the easing presets, the recipes, the setup guides and the demo's sources at once - and every hit carries the exact follow-up call that returns it in full.

Tools

Loading the catalog...

Prompts

Prompts are the workflows: the order to call the tools in for a whole task. They exist because the failure mode of an agent holding eighteen tools is not ignorance - it is calling them in a sequence that skips the check which would have caught the bug.

Resources

The same knowledge as URIs, for clients that attach documentation to a conversation up front or let a person browse and pin it. They read the same catalogs the tools do, so neither can go stale relative to the other.

How it stays true

Documentation that is written down separately drifts, and an agent cannot tell a stale answer from a fresh one. So nothing here is written down twice:

  • The API reference is reflected out of the shipped assembly and paired with the XML documentation compiled into it. A new component parameter appears the moment it is written, with the default value it actually has - read off a freshly constructed instance. In an animation library the defaults are the behaviour.
  • The guide, the demo pages and their sources are embedded into the server assembly, so the tools keep working from a published deployment and always hand out the same text this site renders.
  • The motion is measured, not described. A headless IBmotionInterop lets the server construct a real BmotionAnimationEngine with no DOM anywhere and advance its frame clock itself. A three-second spring is simulated in microseconds.
  • The compositor verdict is observed. The engine decides whether an animation can go to the browser through a long rule set; restating that rule set here would mean maintaining a second copy of it and being wrong in exactly the cases that matter. Instead the server starts the animation and records whether the engine reached for the Web Animations API - including for every animatable property, once, to build the table behind GetBmotionAnimatableProperties.
Razor
Bmotion 0 el ยท 0 active
An unhandled error has occurred. Reload ๐Ÿ—™