Parse
Tokenize the plain-text source and turn it into an explicit syntax tree.
source → ASTA language for motion / 0.1
VGL describes scenes, shapes, and time as plain text. It runs in the browser or inside an app—staying sharp when the viewport moves, scales, or zooms.
No export step. No timeline UI. Just a scene that can run.
scene "hello" {
size 960 540
duration 6s
circle ball {
x 160
radius 54
animate x
from 160
to 800
during 4s
}
}The premise
Pixel video records what every frame looked like. VGL records what exists, where it is, and how it changes. The host renders the scene at the size it needs.
A VGL document is a scene. A scene has a size, a duration, and named nodes. Nodes hold properties. Animations change one property over time.
scene "name" {
size width height
duration time
circle name { ... }
}The root timeline and coordinate space. Duration accepts ms, s, or m.
A named rect, circle, line, or text.
One property interpolated from a starting value to an ending value.
02 / Pipeline
The format is small on purpose. Renderers can grow without changing the authoring model.
Tokenize the plain-text source and turn it into an explicit syntax tree.
source → ASTValidate names, properties, and time values into a portable scene graph.
AST → graphLet a browser or app renderer draw the current state at native resolution.
graph → SVG / GPUVGL runs in the browser through the vgl-motion package. Keep the .vgl file as a normal asset and let the player compile it into a live SVG scene.
npm install vgl-motionimport { VGLPlayer } from "vgl-motion";
const stage = document.querySelector("#stage");
await VGLPlayer.fromSource("/scenes/hello.vgl", stage);Add vgl-motion to any Vite, React, or JavaScript website.
Give the player a container such as <div id="stage"></div>.
Serve the site over HTTP so the browser can fetch the .vgl scene.
04 / Playground
04 / Examples
Start with the shape. Add time when the shape is clear.
rect card {
x 80
y 80
width 320
height 180
radius 12
fill "#1d2a25"
}text label {
value "Hello, vector world"
x 480
y 280
size 32
align center
}animate x
from 80
to 720
during 2s
easing ease-in-out