retiam 1.0.0 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/readme.md CHANGED
@@ -1,145 +1,439 @@
1
- # Retiam
2
-
3
- Retiam is a TypeScript animation engine built on WebGPU. Write scenes for mathematical explanations, data visualizations, and 2D or 3D animation, then preview them in a browser, render video, or export an interactive web embed.
4
-
5
- **[Documentation](https://abhilasbiswas.github.io/retiam-docs/)** · [Getting started](https://abhilasbiswas.github.io/retiam-docs/getting-started/) · [Examples](https://abhilasbiswas.github.io/retiam-docs/examples-catalog/) · [API reference](https://abhilasbiswas.github.io/retiam-docs/api-core/)
6
-
7
- ## Features
8
-
9
- - **Scene authoring:** compose entities, groups, layouts, cameras, and interaction with TypeScript.
10
- - **Animation and timing:** choreograph transitions with asynchronous timelines, easing, tracks, and value trackers.
11
- - **Mathematical graphics:** create coordinate systems, plots, vector geometry, LaTeX equations, text, and highlighted code.
12
- - **Rendering:** combine 2D paths, 3D meshes, lighting, shadows, compute effects, and post-processing.
13
- - **Specialized libraries:** add charts, graphs, physics, procedural shapes, sketch styling, and emphasis animations through separate imports.
14
- - **Audio and output:** work with audio, narration, and subtitles; inspect snapshots, render video, or share scenes as web components.
15
-
16
- ## Getting started
17
-
18
- Install Retiam in your own TypeScript application:
19
-
20
- ```bash
21
- npm install retiam
22
- npm install --save-dev typescript vite @webgpu/types
23
- ```
24
-
25
- Follow the [installation guide](https://abhilasbiswas.github.io/retiam-docs/installation/) for the complete project structure, TypeScript configuration, and browser entry point. To use an unpublished checkout, run `npm pack` in this repository and install the generated `.tgz` file in your application.
26
-
27
- For Vite applications, preserve Retiam's packaged module and asset URLs by excluding it from dependency prebundling in `vite.config.ts`:
28
-
29
- ```typescript
30
- import { defineConfig } from "vite";
31
-
32
- export default defineConfig({
33
- optimizeDeps: { exclude: ["retiam"] },
34
- });
35
- ```
36
-
37
- Retiam requires a WebGPU-capable browser and compatible GPU. Serve browser applications over HTTPS or localhost.
38
-
39
- ### Your first scene
40
-
41
- Save this as `scenes/FirstScene.ts`. Scenes define their animation in an asynchronous `run()` method; durations are in milliseconds.
42
-
43
- ```typescript
44
- import { Scene, Circle, Create, FadeOut, CameraModel, hex } from "retiam";
45
-
46
- export default class FirstScene extends Scene {
47
- async run() {
48
- this.clearColor(hex("#090E1B"));
49
- this.camera.model = CameraModel.ORTHOGRAPHIC;
50
- this.camera.orthoScale = 12;
51
- this.camera.position.set([0, 0, 20]);
52
- this.camera.lookAt([0, 0, 0]);
53
-
54
- const circle = new Circle(1, { fill: hex("#38BDF8") });
55
- circle.move([-2, 0, 0]);
56
- this.add(circle);
57
-
58
- await this.play(new Create(circle, { duration: 1200 }));
59
- await this.play(circle.animate.move([2, 0, 0]), { duration: 1000 });
60
- await this.wait(800);
61
- await this.play(new FadeOut(circle, { duration: 600 }));
62
- await this.wait(400);
63
- }
64
- }
65
- ```
66
-
67
- Start the scene from your application's browser entry point, `src/main.ts`:
68
-
69
- ```typescript
70
- import FirstScene from "../scenes/FirstScene";
71
-
72
- const canvas = document.querySelector<HTMLCanvasElement>("#canvas");
73
- if (!canvas) throw new Error("Missing scene canvas.");
74
-
75
- const scene = new FirstScene();
76
- await scene.start(canvas);
77
- window.addEventListener("pagehide", () => scene.destroy(), { once: true });
78
- ```
79
-
80
- The host page needs a `<canvas id="canvas"></canvas>` with an explicit CSS display size. Continue with [your first scene](https://abhilasbiswas.github.io/retiam-docs/first-scene/) for animation, camera, and lifecycle guidance.
81
-
82
- ## CLI and video rendering
83
-
84
- Use the CLI to analyze scenes, capture PNG snapshots, and render video:
85
-
86
- ```bash
87
- npx retiam lint scenes/FirstScene.ts --json
88
- npx retiam snapshot scenes/FirstScene.ts --times 1.0,2.5,4.0 --json
89
- npx retiam render scenes/FirstScene.ts -w 1920 -h 1080 -f 60 -d 4000 -o outputs/video
90
- ```
91
-
92
- Render and snapshot commands require the optional Puppeteer dependency and a working Chrome/WebGPU setup. Video rendering also requires FFmpeg on your `PATH`.
93
-
94
- ```bash
95
- npm install --save-dev puppeteer
96
- ```
97
-
98
- For rendering and snapshots, your project must include an `index.html` host that loads the scene selected by the CLI's `file` query parameter. Use the host from the [installation guide](https://abhilasbiswas.github.io/retiam-docs/installation/#create-a-consumer-application). Render duration (`-d`) is in milliseconds; output (`-o`) is a directory.
99
-
100
- See [rendering and export](https://abhilasbiswas.github.io/retiam-docs/export/) for project setup and encoding options, or follow [package-based embeds](https://abhilasbiswas.github.io/retiam-docs/export/#embed-from-npm) to bundle a scene for another website. Run `npx retiam help` for the command reference.
101
-
102
- ## Libraries
103
-
104
- Import shared scene primitives from `retiam` and specialized functionality from its own entry point.
105
-
106
- | Import | Purpose |
107
- | --- | --- |
108
- | `retiam` | Scenes, entities, animations, cameras, geometry, text, and core math |
109
- | `retiam/shapes` | Procedural 2D paths and 3D meshes |
110
- | `retiam/charts` | Cartesian and polar charts, scales, themes, and tooltips |
111
- | `retiam/graphs` | Graphs, layouts, automata, and tapes |
112
- | `retiam/highlights` | Emphasis and attention animations |
113
- | `retiam/physics` | 2D and 3D physics integrations |
114
- | `retiam/rough` | Optional RoughJS styling integration |
1
+ # Retiam
2
+
3
+ Retiam is a TypeScript animation engine built on WebGPU. Write scenes for mathematical explanations, data visualizations, and 2D or 3D animation, then preview them in a browser, render video, or export an interactive web embed.
4
+
5
+ **[Documentation](https://abhilasbiswas.github.io/retiam-docs/)** · [Getting started](https://abhilasbiswas.github.io/retiam-docs/getting-started/) · [Examples](https://abhilasbiswas.github.io/retiam-docs/examples-catalog/) · [API reference](https://abhilasbiswas.github.io/retiam-docs/api-core/)
6
+
7
+ ## Features
8
+
9
+ - **Scene authoring:** compose entities, groups, layouts, cameras, and interaction with TypeScript.
10
+ - **Animation and timing:** choreograph transitions with asynchronous timelines, easing, tracks, and value trackers.
11
+ - **Mathematical graphics:** create coordinate systems, plots, vector geometry, LaTeX equations, text, and highlighted code.
12
+ - **Rendering:** combine 2D paths, 3D meshes, lighting, shadows, compute effects, and post-processing.
13
+ - **Specialized libraries:** add charts, graphs, physics, procedural shapes, sketch styling, and emphasis animations through separate imports.
14
+ - **Audio and output:** work with audio, narration, and subtitles; inspect snapshots, render video, or share scenes as web components.
15
+ - **Retiam Studio:** edit scenes alongside a live preview, tune supported values with inspectors, and control playback from your generated project.
16
+
17
+ ## Getting started
18
+
19
+ | Method | Use it for | Result |
20
+ | --- | --- | --- |
21
+ | [npm project and Studio](#create-a-project-with-studio) | Author and preview TypeScript scenes, then render video | Source project, MP4 and snapshots |
22
+ | [CDN modules](#use-retiam-from-a-cdn) | Add a live scene directly to a browser page | Interactive WebGPU canvas |
23
+ | [Embedded export](#export-an-independent-web-embed) | Share a finished animation on another website | Hosted web component and bundled assets |
24
+
25
+ ### Create a project with Studio
26
+
27
+ Use Node.js 20.19 or newer and a WebGPU-capable browser. The project generator
28
+ creates a TypeScript application, installs its dependencies, and opens Retiam
29
+ Studio with a **Write** animation of “Retiam”:
30
+
31
+ ```bash
32
+ npx create-retiam@latest my-animation
33
+ ```
34
+
35
+ The generated project declares
36
+ `"retiam": "latest"`. Its initial install uses npm's `latest` engine release;
37
+ the package manager's lockfile records the resolved version for later installs.
38
+
39
+ The editor opens below the preview. Drag the divider to resize it, or use the
40
+ layout control to dock it on the left or right. Studio remembers your choice.
41
+ Single-scene projects show the preview and editor; scene navigation and search
42
+ appear when more scenes are added and the page reloads.
43
+
44
+ Press Ctrl+C to stop the server. To reopen Studio:
45
+
46
+ ```bash
47
+ cd my-animation
48
+ npm run dev
49
+ ```
50
+
51
+ Edit `src/scenes/Retiam.ts` in your editor or Studio. The generated project also
52
+ includes `config.js` for CLI rendering, `studio/` for the local editor, and the
53
+ Vite and TypeScript configuration. In Studio, **Run** or **Ctrl/Command+Enter**
54
+ applies and saves edits. Add default-exported Scene classes under `src/scenes/`
55
+ to make them available in the scene browser after reloading.
56
+
57
+ | Generator option | Behavior |
58
+ | --- | --- |
59
+ | `--no-start` | Install dependencies without starting Studio |
60
+ | `--no-install` | Generate files without installing or starting |
61
+ | `--no-open` | Start the server without opening a browser |
62
+ | `--title "Hello"` | Change the starter animation text |
63
+ | `--pm npm\|pnpm\|yarn\|bun` | Choose the package manager |
64
+
65
+ The [`create-retiam` package](packages/create-retiam/README.md)
66
+ is released separately from the engine. Publish the engine version required by
67
+ its starter before publishing the generator. Generator updates apply to new
68
+ projects; existing projects keep their own Studio and configuration files.
69
+
70
+ ### Manual setup
71
+
72
+ Install Retiam in your own TypeScript application:
73
+
74
+ ```bash
75
+ npm install retiam
76
+ npm install --save-dev typescript "vite@^6.1.1" @webgpu/types
77
+ ```
78
+
79
+ Follow the [installation guide](https://abhilasbiswas.github.io/retiam-docs/installation/) for the complete project structure, TypeScript configuration, and browser entry point. To use an unpublished checkout, run `npm pack` in this repository and install the generated `.tgz` file in your application.
80
+
81
+ For Vite applications, preserve Retiam's packaged module and asset URLs by excluding it from dependency prebundling in `vite.config.ts`:
82
+
83
+ ```typescript
84
+ import { defineConfig } from "vite";
85
+
86
+ export default defineConfig({
87
+ optimizeDeps: { exclude: ["retiam"] },
88
+ });
89
+ ```
90
+
91
+ Retiam requires a WebGPU-capable browser and compatible GPU. Serve browser applications over HTTPS or localhost.
92
+
93
+ ### Your first scene
94
+
95
+ Save this as `scenes/FirstScene.ts`. Scenes define their animation in an asynchronous `run()` method; durations are in milliseconds.
96
+
97
+ ```typescript
98
+ import { Scene, Circle, Create, FadeOut, CameraModel, hex } from "retiam";
99
+
100
+ export default class FirstScene extends Scene {
101
+ async run() {
102
+ this.clearColor(hex("#090E1B"));
103
+ this.camera.model = CameraModel.ORTHOGRAPHIC;
104
+ this.camera.orthoScale = 12;
105
+ this.camera.position.set([0, 0, 20]);
106
+ this.camera.lookAt([0, 0, 0]);
107
+
108
+ const circle = new Circle(1, { fill: hex("#38BDF8") });
109
+ circle.move([-2, 0, 0]);
110
+ this.add(circle);
111
+
112
+ await this.play(new Create(circle, { duration: 1200 }));
113
+ await this.play(circle.animate.move([2, 0, 0]), { duration: 1000 });
114
+ await this.wait(800);
115
+ await this.play(new FadeOut(circle, { duration: 600 }));
116
+ await this.wait(400);
117
+ }
118
+ }
119
+ ```
120
+
121
+ Start the scene from your application's browser entry point, `src/main.ts`:
122
+
123
+ ```typescript
124
+ import FirstScene from "../scenes/FirstScene";
125
+
126
+ const canvas = document.querySelector<HTMLCanvasElement>("#canvas");
127
+ if (!canvas) throw new Error("Missing scene canvas.");
128
+
129
+ const scene = new FirstScene();
130
+ await scene.start(canvas);
131
+ window.addEventListener("pagehide", () => scene.destroy(), { once: true });
132
+ ```
133
+
134
+ The host page needs a `<canvas id="canvas"></canvas>` with an explicit CSS display size. Continue with [your first scene](https://abhilasbiswas.github.io/retiam-docs/first-scene/) for animation, camera, and lifecycle guidance.
135
+
136
+ ## Use Retiam from a CDN
137
+
138
+ Import Retiam directly in a browser page. The published module is available at
139
+ **[jsDelivr](https://cdn.jsdelivr.net/npm/retiam@latest/dist/retiam.es.min.js)**.
140
+ This example loads the core and charts entries through the latest release tag:
141
+
142
+ ```html
143
+ <!doctype html>
144
+ <html lang="en">
145
+ <head>
146
+ <meta charset="utf-8" />
147
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
148
+ <title>Retiam CDN animation</title>
149
+ <style>
150
+ html, body { margin: 0; width: 100%; height: 100%; }
151
+ canvas { display: block; width: 100%; height: 100%; }
152
+ </style>
153
+ <script type="importmap">
154
+ {
155
+ "imports": {
156
+ "retiam": "https://cdn.jsdelivr.net/npm/retiam@latest/dist/retiam.es.min.js",
157
+ "retiam/charts": "https://cdn.jsdelivr.net/npm/retiam@latest/dist/libs/charts/index.js"
158
+ }
159
+ }
160
+ </script>
161
+ </head>
162
+ <body>
163
+ <canvas id="canvas"></canvas>
164
+ <script type="module">
165
+ import { Scene, Circle, Create, CameraModel, hex } from 'retiam';
166
+
167
+ class BrowserScene extends Scene {
168
+ async run() {
169
+ this.clearColor(hex('#080C14'));
170
+ this.camera.model = CameraModel.ORTHOGRAPHIC;
171
+ this.camera.orthoScale = 12;
172
+ this.camera.position.set([0, 0, 20]);
173
+ this.camera.lookAt([0, 0, 0]);
174
+ const circle = new Circle(1, { fill: hex('#38BDF8') });
175
+ this.add(circle);
176
+ await this.play(new Create(circle, { duration: 1200 }));
177
+ await this.wait(1000);
178
+ }
179
+ }
180
+
181
+ const scene = new BrowserScene();
182
+ scene.start(document.querySelector('#canvas')).catch(console.error);
183
+ window.addEventListener('pagehide', () => scene.destroy(), { once: true });
184
+ </script>
185
+ </body>
186
+ </html>
187
+ ```
188
+
189
+ Serve the page over HTTPS or localhost, with a WebGPU-capable browser. No Retiam
190
+ npm installation is needed for this page. Add import-map entries for any other
191
+ sublibraries you use, such as `retiam/shapes`, with the same release tag. jsDelivr
192
+ serves the module's related chunks, fonts, workers and WASM assets. A CDN page
193
+ runs the animation live; the [npm CLI workflow](#cli-and-video-rendering) produces
194
+ video and snapshots.
195
+
196
+ ## Export an independent web embed
197
+
198
+ Bundle a finished scene into a custom element for a blog, documentation page or
199
+ another application. The exported files include the engine code and emitted
200
+ assets needed by that scene. The receiving site needs WebGPU and those files.
201
+
202
+ This recipe uses Vite 6, matching the generated project's toolchain. For a
203
+ generated npm project, save the following as `src/embed.ts`. Each element
204
+ owns its canvas and Scene, handles resizing, and cleans up when removed.
205
+
206
+ <details>
207
+ <summary>src/embed.ts</summary>
208
+
209
+ ```typescript
210
+ import MyScene from './scenes/Retiam';
211
+
212
+ // A separate name lets this bundle coexist with other scene components.
213
+ class MyRetiamSceneElement extends HTMLElement {
214
+ private cleanup?: () => void;
215
+
216
+ connectedCallback() {
217
+ this.cleanup?.();
218
+ const canvas = document.createElement('canvas');
219
+ canvas.style.cssText = 'display:block;width:100%;height:100%';
220
+ this.replaceChildren(canvas);
221
+ const scene = new MyScene();
222
+ let cancelled = false, started = false, resizeFrame = 0;
223
+ let observer: ResizeObserver | undefined;
224
+
225
+ this.cleanup = () => {
226
+ cancelled = true;
227
+ observer?.disconnect();
228
+ cancelAnimationFrame(resizeFrame);
229
+ if (started) scene.destroy();
230
+ // A pending initialization cleans up in its continuation below.
231
+ };
232
+ void scene.start(canvas).then(() => {
233
+ started = true;
234
+ if (cancelled) { scene.destroy(); return; }
235
+ observer = new ResizeObserver(() => {
236
+ cancelAnimationFrame(resizeFrame);
237
+ resizeFrame = requestAnimationFrame(() => {
238
+ // Current composer resizing listens to the window resize event.
239
+ window.dispatchEvent(new Event('resize'));
240
+ });
241
+ });
242
+ observer.observe(this);
243
+ this.dispatchEvent(new CustomEvent('scene-ready', { bubbles: true }));
244
+ }).catch(error => {
245
+ scene.destroy();
246
+ if (!cancelled) {
247
+ const message = document.createElement('p');
248
+ message.setAttribute('role', 'alert');
249
+ message.textContent = String(error);
250
+ this.replaceChildren(message);
251
+ }
252
+ });
253
+ }
254
+
255
+ disconnectedCallback() {
256
+ this.cleanup?.();
257
+ this.cleanup = undefined;
258
+ }
259
+ }
260
+
261
+ if (!customElements.get('my-retiam-scene')) {
262
+ customElements.define('my-retiam-scene', MyRetiamSceneElement);
263
+ }
264
+ ```
265
+
266
+ </details>
267
+
268
+ For a manual project, change the scene import to your scene module. The
269
+ [npm embed recipe](https://abhilasbiswas.github.io/retiam-docs/export/#embed-from-npm)
270
+ explains lifecycle handling, multiple instances and hosting.
271
+
272
+ Save this as `vite.embed.config.ts`:
273
+
274
+ ```typescript
275
+ import { defineConfig } from 'vite';
276
+
277
+ export default defineConfig({
278
+ base: './',
279
+ build: {
280
+ target: 'es2022',
281
+ outDir: 'outputs/embed',
282
+ lib: {
283
+ entry: 'src/embed.ts',
284
+ formats: ['es'],
285
+ fileName: 'my-scene',
286
+ },
287
+ },
288
+ });
289
+ ```
290
+
291
+ Build the component:
292
+
293
+ ```bash
294
+ npx vite build --config vite.embed.config.ts
295
+ ```
296
+
297
+ Copy the **whole** `outputs/embed` folder to your website, for example under
298
+ `/embeds/my-scene/`, then mount the custom element:
299
+
300
+ ```html
301
+ <script type="module" src="/embeds/my-scene/my-scene.js"></script>
302
+ <my-retiam-scene style="display:block;width:100%;height:540px"></my-retiam-scene>
303
+ ```
304
+
305
+ The receiving site needs no npm installation or separate Retiam CDN import.
306
+ Preserve emitted files and their relative paths. Assets or services explicitly
307
+ referenced by remote URLs still need hosting. Use a distinct custom-element name
308
+ for each different scene bundle. An MP4 is the alternative when the receiving
309
+ page only needs video playback.
310
+
311
+ The engine repository also provides an export CLI:
312
+
313
+ ```bash
314
+ npx retiam export scenes/MyScene.ts outputs/embed
315
+ ```
316
+
317
+ Its current implementation expects the engine repository's `src/engine` layout.
318
+ Use the package-based Vite recipe above for generated and other external npm
319
+ projects. See [repository export](https://abhilasbiswas.github.io/retiam-docs/export/#standalone-embeds)
320
+ for the CLI's script and `<retiam-scene>` usage.
321
+
322
+ ## CLI and video rendering
323
+
324
+ Run these commands from the generated project folder containing `package.json`
325
+ and `config.js`:
326
+
327
+ ```bash
328
+ npx retiam lint src/scenes/Retiam.ts --json
329
+ npx retiam snapshot src/scenes/Retiam.ts --times 1.0,2.5,4.0 --json
330
+ npx retiam render src/scenes/Retiam.ts
331
+ ```
332
+
333
+ Puppeteer is a required production dependency of Retiam and is installed automatically with the package. Render and snapshot commands need a working Chrome/WebGPU setup. Video rendering also requires FFmpeg on your `PATH`.
334
+
335
+ ### Render configuration
336
+
337
+ The generated [config.js](packages/create-retiam/starter/config.js) contains CLI
338
+ output and renderer quality settings with their defaults and comments. The default output
339
+ is 1920×1080 at 60 fps, MP4 at `20M`, in `outputs/video`. `maxDuration: 0` renders
340
+ until the scene finishes; set a limit for scenes that loop indefinitely.
341
+
342
+ For a smaller draft, edit the output fields in `config.js`:
343
+
344
+ ```javascript
345
+ export default {
346
+ width: 1280,
347
+ height: 720,
348
+ fps: 30,
349
+ videoBitrate: '8M',
350
+ outputFormat: 'mp4',
351
+ outputDir: './outputs/video',
352
+ maxDuration: 4000, // milliseconds
353
+ };
354
+ ```
355
+
356
+ The renderer starts with built-in defaults, loads `config.js` from the calling
357
+ project, then applies CLI flags. If `retiam.config.js` exists, it is used instead
358
+ of `config.js`. For example, this renders at 60 fps while retaining the other
359
+ file settings:
360
+
361
+ ```bash
362
+ npx retiam render src/scenes/Retiam.ts -f 60
363
+ ```
364
+
365
+ The complete file also covers anti-aliasing, transparency layers, shadows,
366
+ culling, raytracing, denoising, local server ports, and input replay.
367
+ See the [configuration reference](https://abhilasbiswas.github.io/retiam-docs/export/#render-configuration).
368
+
369
+ Choose surface appearance in scene code and materials:
370
+
371
+ ```typescript
372
+ import { CelShading, GoochShading } from 'retiam';
373
+
374
+ this.shading = new CelShading({ bands: 3 }); // Scene default
375
+ sphere.material.shading = new GoochShading({ warm: 0.6, cool: 0.4 });
376
+ ```
377
+
378
+ Each shading model supplies its own WGSL. Numeric parameters update through the
379
+ material buffer without recompiling shaders. These styles apply to rasterized
380
+ 3D models; raytracing uses its own physically based lighting.
381
+
382
+ For the manual setup above, use `scenes/FirstScene.ts` as the scene path. Rendering
383
+ and snapshots serve the project's `index.html`; a host that supports selecting
384
+ different scenes must load the CLI's `file` query parameter. The
385
+ [manual installation guide](https://abhilasbiswas.github.io/retiam-docs/installation/#create-a-consumer-application)
386
+ includes that bootstrap. Render duration (`-d`) is in milliseconds, snapshot
387
+ times are in seconds, and output (`-o`) is a directory. Render filenames include
388
+ a timestamp.
389
+
390
+ See [rendering and export](https://abhilasbiswas.github.io/retiam-docs/export/) for project setup and encoding options, or follow [package-based embeds](https://abhilasbiswas.github.io/retiam-docs/export/#embed-from-npm) to bundle a scene for another website. Run `npx retiam help` for the command reference.
391
+
392
+ ## Libraries
393
+
394
+ Import shared scene primitives from `retiam` and specialized functionality from its own entry point.
395
+
396
+ | Import | Purpose |
397
+ | --- | --- |
398
+ | `retiam` | Scenes, entities, animations, cameras, geometry, text, and core math |
399
+ | `retiam/shapes` | Procedural 2D paths and 3D meshes |
400
+ | `retiam/charts` | Cartesian and polar charts, scales, themes, and tooltips |
401
+ | `retiam/graphs` | Graphs, layouts, automata, and tapes |
402
+ | `retiam/highlights` | Emphasis and attention animations |
403
+ | `retiam/physics` | 2D and 3D physics integrations |
404
+ | `retiam/rough` | RoughJS styling integration |
115
405
  | `retiam/tts` | Microsoft Edge speech synthesis, narration, and subtitles |
116
-
117
- See the [library guide](https://abhilasbiswas.github.io/retiam-docs/libraries/) for import boundaries and examples. The RoughJS integration requires the optional `roughjs` peer dependency.
118
-
406
+
407
+ See the [library guide](https://abhilasbiswas.github.io/retiam-docs/libraries/) for import boundaries and examples. `roughjs` is a required production dependency and is installed automatically.
408
+
119
409
  Built-in fonts and imported engine assets are included in the library package. Application media is managed separately. Edge speech synthesis in the browser requires a compatible service. See [asset workflows](https://abhilasbiswas.github.io/retiam-docs/asset-workflows/) and [speech and subtitles](https://abhilasbiswas.github.io/retiam-docs/speech-subtitles/) for setup.
120
-
121
- ## Repository development
122
-
123
- Use Node.js 24, matching the documentation CI configuration.
124
-
125
- ```bash
126
- git clone https://github.com/abhilasbiswas/Retiam.git
127
- cd Retiam
128
- npm ci
129
- npm run dev
130
- ```
131
-
132
- Open the URL printed by Vite. Retiam Studio is available at `/studio/` on the same server. See the [tooling guide](https://abhilasbiswas.github.io/retiam-docs/tooling/) for the editor, inspector, and playback controls.
133
-
134
- ### Documentation development
135
-
136
- The viewer, authored guides, examples, assets, API reference data, and Pages workflow are maintained in the separate [retiam-docs repository](https://github.com/abhilasbiswas/retiam-docs). It installs, builds, and deploys independently of this engine checkout. See that repository's README and deployment guide for local development and publishing.
137
-
138
- ## Documentation and source
139
-
140
- - [Handbook](https://abhilasbiswas.github.io/retiam-docs/): guides, tutorials, examples, and API references.
141
- - [Compatibility notes](https://abhilasbiswas.github.io/retiam-docs/limitations/): current implementation boundaries and known differences from historical examples.
142
- - [Architecture notes](docs/README.md): detailed subsystem documentation.
143
- - [Example sources](examples/): repository scenes and integrations.
144
- - [Agent skill](.agents/skills/retiam/SKILL.md): scene-authoring guidance for coding assistants.
145
-
410
+
411
+ MSDF font generation runs in a browser worker using the WASM supplied by
412
+ `@zappar/msdf-generator`, a production dependency. The repository's font-baking
413
+ tools, including `msdf-bmfont-xml` and `msdf-atlas-gen`, remain development tools.
414
+
415
+ ## Repository development
416
+
417
+ Use Node.js 24, matching the documentation CI configuration.
418
+
419
+ ```bash
420
+ git clone https://github.com/abhilasbiswas/Retiam.git
421
+ cd Retiam
422
+ npm ci
423
+ npm run dev
424
+ ```
425
+
426
+ Open the URL printed by Vite. Retiam Studio is available at `/studio/` on the same server. See the [tooling guide](https://abhilasbiswas.github.io/retiam-docs/tooling/) for the editor, inspector, and playback controls.
427
+
428
+ ### Documentation development
429
+
430
+ The viewer, authored guides, examples, assets, API reference data, and Pages workflow are maintained in the separate [retiam-docs repository](https://github.com/abhilasbiswas/retiam-docs). It installs, builds, and deploys independently of this engine checkout. See that repository's README and deployment guide for local development and publishing.
431
+
432
+ ## Documentation and source
433
+
434
+ - [Handbook](https://abhilasbiswas.github.io/retiam-docs/): guides, tutorials, examples, and API references.
435
+ - [Compatibility notes](https://abhilasbiswas.github.io/retiam-docs/limitations/): current implementation boundaries and known differences from historical examples.
436
+ - [Architecture notes](docs/README.md): detailed subsystem documentation.
437
+ - [Example sources](examples/): repository scenes and integrations.
438
+ - [Agent skill](.agents/skills/retiam/SKILL.md): scene-authoring guidance for coding assistants.
439
+