Installation
Veena requires Node.js 20 or later. One install includes the renderer, Playwright Chromium, FFmpeg, React, Three.js, TypeScript, and tsx.
Install the package​
mkdir my-animation
cd my-animation
npm init -y
npm pkg set type=module
npm install veena-engine
Create a scene file, then preview or export it:
npx veena render hello.ts --preview
npx veena render hello.ts
npx tsx hello.ts
npx veena render bundles the scene file itself. npx tsx runs a file that calls render(import.meta.url, ...), and that path needs "type": "module".
Chromium and FFmpeg download during npm install when dependency install scripts are allowed to run. npm 12, npm install -g, and --ignore-scripts skip those scripts. Veena downloads the missing browser and encoder on the first render, so the scene still runs after a plain install. Approve the scripts when you want that download to finish during install instead:
npm install-scripts approve @playwright/browser-chromium ffmpeg-static esbuild
Set PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 only when the environment already provides the matching Chromium.
veena-engine@0.1.0 is published, and the latest tag points at it. npm blocks the shorter name veena because that name is too similar to lerna.
Run from the repository​
git clone https://github.com/murali-engine/veena.git
cd veena
npm install
npm run example -- hello-shapes --preview
Remove --preview to render the configured output:
npm run example -- hello-shapes
List every available example with npm run example -- --list.
LaTeX requirements​
Latex, LatexMorph, and FormulaOutline use a native LaTeX and dvisvgm toolchain during scene bundling. Plain MathText and FormulaMorph do not require that toolchain.
Verify the setup​
import { render } from "veena-engine";
import { Scene } from "veena-engine/core";
import { Circle } from "veena-engine/primitives";
class Hello extends Scene {
override construct() {
this.add(Circle().radius(1).fill("#7c3aed"));
this.wait(1);
}
}
render(import.meta.url, Hello, { output: "./output/hello.mp4" });
If preview works but export does not, check output-directory permissions. A missing Chromium or FFmpeg binary is downloaded on the next render unless PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD is set.
tsc --init turns on skipLibCheck. Leave that on. @types/three references WebGPU types that a strict check of library declarations reports as GPUTexture.