Skip to content

LÖVE 11.x · SVG · Lottie · ThorVG

Vector artwork,
alive in LÖVE.

Load SVG and Lottie through LÖVE's filesystem, render into reusable textures, and keep native details behind a compact Lua API.

One document, one durable object

love-thorvg reads asset bytes through love.filesystem, gives them to ThorVG's CPU renderer, and uploads the result into a reusable LÖVE texture. Unchanged frames stay untouched; animation, seeking, or resizing marks the document for another render.

Input

SVG and Lottie

Use vector artwork, animated JSON, relative PNG images, and explicitly mapped fonts.

Runtime

Ordinary LÖVE textures

Draw, transform, clip, cache, or compose the rendered result with the rest of your scene.

Distribution

No custom engine build

Copy the Lua module and the native library for your target platform into an existing game.

The smallest useful example

local thorvg = require('love_thorvg')
local animation

function love.load()
  animation = thorvg.new('assets/animation.json', {
    width = 256,
    height = 256,
    autoplay = true,
    loop = true,
  })
end

function love.update(dt) animation:update(dt) end
function love.draw() animation:draw(100, 100) end
function love.quit() animation:release() end

The same constructor loads static SVG files. Continue with the quick start to install a release and choose render dimensions, or open the complete Lua API.

Know the rendering tradeoff

ThorVG rasterizes on the CPU and LÖVE uploads changed frames to the GPU. That is a strong fit for UI illustrations, icons, loaders, maps, and a modest number of animations. It is not intended to update hundreds of large documents every frame. The performance guide explains sizing, caching, and measurement.