@effect-motion/export 0.3.2 → 0.4.0

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/dist/Video.d.ts CHANGED
@@ -13,14 +13,13 @@ type SceneInternalR = SceneRunner | Scope.Scope;
13
13
  * engine is acquired internally (Node SW layer), so callers wire nothing.
14
14
  */
15
15
  /**
16
- * Scene settings honored by the export path — a subset of the runner's
17
- * settings, passed through to `Scene.stream`. Framerate and dimensions set
18
- * here become the video's framerate and dimensions.
16
+ * Playback settings honored by the export path — a subset of the runner's
17
+ * settings, passed through to `Scene.stream`. The video's dimensions come
18
+ * from the SCENE's own composition config (`Scene.make(gen, { width, height })`);
19
+ * a framerate set here becomes the video's framerate.
19
20
  */
20
21
  export interface VideoSceneSettings {
21
22
  readonly frameRate?: number;
22
- readonly width?: number;
23
- readonly height?: number;
24
23
  /** Set to `Infinity` for an intentionally infinite scene (with `frames`). */
25
24
  readonly maxFrames?: number;
26
25
  }
package/dist/Video.js CHANGED
@@ -9,16 +9,16 @@ import * as PngExporter from "effect-motion/PngExporter";
9
9
  import * as Ffmpeg from "./Ffmpeg.js";
10
10
  // The ThorVG engine (global font registry) plus a render session (the canvas
11
11
  // Renderer.render draws each frame onto). The session canvas is resized per
12
- // frame, so the seed size only has to be valid — the settings dimensions when
13
- // given, else a 1×1 placeholder the first frame's resize corrects.
14
- const fontedLayer = (scene, settings) => {
12
+ // frame, so the seed size only has to be valid — the scene's own comp
13
+ // dimensions (the canvas is resized to each frame's size regardless).
14
+ const fontedLayer = (scene) => {
15
15
  const fonts = {
16
16
  "sans-serif": Font.DEFAULT_FONT_URL,
17
17
  ...Fonts.urlMap(scene),
18
18
  };
19
19
  return Layer.provideMerge(Session.layer({
20
- width: settings?.width ?? 1,
21
- height: settings?.height ?? 1,
20
+ width: scene.width,
21
+ height: scene.height,
22
22
  fonts,
23
23
  }), EngineNode.layer("sw", fonts));
24
24
  };
@@ -70,4 +70,4 @@ export const render = (scene, outPath, options = {}) => Effect.scoped(Effect.gen
70
70
  // the scene's declared url fonts, merged over the default sans, so text
71
71
  // in a declared family renders (design D3); path-only entries skipped.
72
72
  // Fonts go to both the engine (global registry) and the render session.
73
- Effect.provide(fontedLayer(scene, options.settings)));
73
+ Effect.provide(fontedLayer(scene)));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@effect-motion/export",
3
- "version": "0.3.2",
3
+ "version": "0.4.0",
4
4
  "description": "Node-only export tools for effect-motion: render scenes to PNG frames (ThorVG) and encode to video (ffmpeg)",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -34,8 +34,8 @@
34
34
  },
35
35
  "dependencies": {
36
36
  "ffmpeg-static": "^5.3.0",
37
- "@effect-motion/thorvg": "^0.1.0",
38
- "effect-motion": "^0.3.2"
37
+ "@effect-motion/thorvg": "^0.2.0",
38
+ "effect-motion": "^0.4.0"
39
39
  },
40
40
  "peerDependencies": {
41
41
  "effect": ">=4.0.0-beta.98"