The .ws Language

Workshop (.ws) is a declarative language for motion graphics. You write what you want to say, set a mood, and the compiler handles typography, timing, animation physics, and color — producing a renderer-neutral video specification called a RenderGraph.

Structure

A .ws file has three levels: Film (global settings), Scenes (visual sections), and Elements (what appears on screen).

text
Film "My Video"
  mood: confident

Scene "Opening"
  show "Hello World"
    size: hero
    enter: rise

Indentation is meaningful. Film settings indent under Film. Scene settings and elements indent under Scene. Element modifiers indent under their show line. Use 2-space indentation.

Minimal Example

The shortest valid .ws file:

text
Film "Hello"
  mood: confident
Scene "A"
  show "Hello, Workshop!"

This compiles into a video with a single scene, one text element, mood-resolved colors and typography, automatically calculated timing, and a default fade entrance.

How It Compiles

The compiler pipeline transforms your .ws source through eight stages: lexing, parsing, normalization, mood resolution, timing calculation, layout solving, physics calculation, and RenderGraph emission. The output is a JSON specification that any rendering backend can consume.

Same input always produces the same output. The compilation is fully deterministic — there is no randomness anywhere in the pipeline.

Language Sections

This reference covers every construct in the language: