Skip to content

vosjs/vos

Repository files navigation

vos

The open visual operating system — turn a function into deterministic, resolution-independent, mixed-media video, and render it anywhere.

CI License: MIT

A video is just inputs and a function, rendered. vos is a programmatic video engine for the web: it takes a JSON description of an animation — scenes, cameras, post-processing, GSAP timelines, and overlay elements — and compiles it into a self-contained template that renders identical motion graphics every time, anywhere a browser can run: the browser, Node, or a Cloudflare Worker. The core is pure (no DOM dependencies), and three / gsap stay optional peers you bring yourself.

vos — short for Visual Operating System, and Latin for you — is the open engine. vosso is the platform built on it: a visual operating system for generated video, where every app is powered by vos.

Packages

Package npm Description
@vosjs/core npm The engine: config compiler, validation schema (Zod), runtime template generator, addon registry, and types.
@vosjs/elements npm The element system: text / image / SVG / video / audio renderers for Three.js overlays, shipped as a typed ESM factory and an injectable IIFE bundle.
@vosjs/timeline npm Deterministic timeline math for video editing: keyframe sampling, GSAP-compatible pure easings, source-time remapping (trim/split).
@vosjs/editor npm Headless video-editor infrastructure: patch-based document store (undo/redo), live-edit classifier, editor bridge client, timeline view-model math.

three and gsap are optional peer dependencies — you bring your own versions, and the engine never bundles them.

Install

pnpm add @vosjs/core three gsap

Quick start

import { compileVosConfig, vosConfigJsonSchema } from '@vosjs/core'

const config = {
  version: 2,
  scene: { background: '#000' },
  camera: { type: 'perspective', position: [0, 0, 5] },
  // functions are authored as strings, compiled into executable code
  createContent: '(ctx) => { /* build your Three.js scene with ctx.THREE */ }',
}

// validate, then compile to a runnable template string
vosConfigJsonSchema.parse(config)
const template = compileVosConfig(config)

The compiled template is an HTML/JS document you can render in an iframe, capture to video, or snapshot to an image — the same template powers playback, export, and server rendering.

Subpath exports (@vosjs/core)

Import What it gives you
@vosjs/core compileVosConfig, schemas, addon registry, types
@vosjs/core/compiler The compiler and code generators
@vosjs/core/runtime generateRenderTemplate, transformModuleCode, render limits
@vosjs/core/schema Zod schemas, validators, config migrations
@vosjs/core/addons Three.js addon / post-processing registry
@vosjs/core/extract Config extraction from LLM/text output
@vosjs/core/types Pure type definitions

Development

This is a pnpm + Turborepo monorepo.

pnpm install
pnpm build       # build all packages
pnpm typecheck
pnpm test
pnpm lint

Releases are managed with Changesets. To propose a release, run pnpm changeset and commit the generated file with your PR.

Roadmap

  • Plugin SDK (@vosjs/plugin-sdk) — a unified definePlugin() contract so addons, element renderers, schema extensions, and codegen hooks can be contributed by third-party packages.
  • Browser adapter (@vosjs/web) — a Vite-friendly dynamic addon loader whose import map is plugin-contributed.
  • CLI & scaffolding (@vosjs/cli, create-vos).

License

MIT © vosso

About

Programmatic video engine for the web — compile a declarative config into deterministic motion graphics and video (Three.js, GSAP, 2D, HTML). The open engine behind vos.so.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

3 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors