anvil · documentation · gallery · llms.txt
Explanation

About choosing Lottie and three.js

anvil ships two renderers and routes between them on the spec's kind. The division of labour is the point: each renderer does the job the other does badly.

Lottie renders 2-D vector motion — spinners, checks, pulsing dots, animated icons. It is crisp at any size, small, and its native artifact is already JSON, which fits anvil's whole premise. three.js renders 3-D and WebGL — depth, lighting, particles, the things Lottie cannot do. Asking which is “better” is the wrong question; flat UI motion belongs in Lottie and a spinning lit knot belongs in three.js.

A natural third candidate is Remotion, and anvil deliberately does not use it in the runtime. Remotion is built to render React components to video frames. Its player is React-only, so it cannot mount in a Svelte page without dragging React alongside; its renderer needs headless Chromium, Node, and FFmpeg, so it cannot run on a Worker; and its licence requires a paid Company License for organisations above three employees. Every one of those constraints conflicts with anvil's stack. anvil's live tier stays MIT and Svelte-native.

Remotion solves a real but different problem: producing an mp4 file. That is an offline concern, off the Worker, and anvil keeps a documented seam for it in export/ — intentionally empty, and pointing at an MIT path that reuses the same SceneSpec rather than adopting Remotion. The runtime never touches it.