@vosjs/cli 0.53.0 → 0.53.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/dist/cli.js CHANGED
@@ -709,7 +709,7 @@ async function cmdCheck(argv) {
709
709
  return result.ok ? EXIT_OK : EXIT_ERROR;
710
710
  }
711
711
  async function delegate(argv, viaAlias = false) {
712
- const { run } = await import("./run-RFFLVLVQ.js");
712
+ const { run } = await import("./run-W5UTMIFU.js");
713
713
  if (viaAlias && argv[0]) {
714
714
  process.stderr.write(
715
715
  `note: "vos voila ${argv[0]}" is now "vos ${argv[0]}".
@@ -749,7 +749,7 @@ async function main() {
749
749
  const engine = HELP_ENGINE.split("\n").filter(
750
750
  (l) => l.startsWith(` vos ${cmd} `)
751
751
  );
752
- const { verbHelp } = await import("./run-RFFLVLVQ.js");
752
+ const { verbHelp } = await import("./run-W5UTMIFU.js");
753
753
  const take = verbHelp(cmd);
754
754
  process.stdout.write(
755
755
  `${engine.join("\n")}
@@ -781,7 +781,7 @@ ${take.includes("no such verb") ? "" : take}`
781
781
  main().then(async (code) => {
782
782
  if (code === EXIT_OK) {
783
783
  const verb = process.argv[2] ?? "";
784
- const { HELP } = await import("./run-RFFLVLVQ.js");
784
+ const { HELP } = await import("./run-W5UTMIFU.js");
785
785
  const documented = [
786
786
  ...helpFlagsFor(HELP_ENGINE, verb),
787
787
  ...helpFlagsFor(HELP, verb)
package/dist/index.js CHANGED
@@ -23,7 +23,7 @@ import {
23
23
  takePaths,
24
24
  validateActions,
25
25
  waitForPageDone
26
- } from "./chunk-WGBRKQPB.js";
26
+ } from "./chunk-ZARSNMVY.js";
27
27
  import {
28
28
  BrowserUnavailableError,
29
29
  apiError,
@@ -6,7 +6,7 @@ import {
6
6
  takeBackdrop,
7
7
  takeBrowserArgs,
8
8
  verbHelp
9
- } from "./chunk-WGBRKQPB.js";
9
+ } from "./chunk-ZARSNMVY.js";
10
10
  import "./chunk-PJX3XE7G.js";
11
11
  import "./chunk-6XPFWQKP.js";
12
12
  export {
@@ -17,4 +17,4 @@ export {
17
17
  takeBrowserArgs,
18
18
  verbHelp
19
19
  };
20
- //# sourceMappingURL=run-RFFLVLVQ.js.map
20
+ //# sourceMappingURL=run-W5UTMIFU.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vosjs/cli",
3
- "version": "0.53.0",
3
+ "version": "0.53.2",
4
4
  "description": "The vos CLI: record the real product from a scripted browser flow, auto-zoom from the cursor track, cut as data in doc.json, render deterministic video and stills, deliver a release's media per destination spec, and sync with vos.so. One binary, every verb, MIT.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -49,14 +49,14 @@
49
49
  "dependencies": {
50
50
  "mediabunny": "^1.55.7",
51
51
  "playwright": "^1.49.0",
52
+ "@vosjs/core": "^0.25.2",
52
53
  "@vosjs/editor": "^1.4.0",
53
- "@vosjs/core": "^0.25.0",
54
- "@vosjs/elements": "^0.8.2",
55
- "@vosjs/render-core": "^0.3.7",
56
- "@vosjs/shared": "^0.4.1",
57
- "@vosjs/studio-core": "^0.33.0",
58
- "@vosjs/tween": "^0.8.2",
59
- "@vosjs/timeline": "^0.4.1"
54
+ "@vosjs/elements": "^0.8.3",
55
+ "@vosjs/render-core": "^0.3.8",
56
+ "@vosjs/shared": "^0.5.0",
57
+ "@vosjs/studio-core": "^0.33.1",
58
+ "@vosjs/timeline": "^0.4.1",
59
+ "@vosjs/tween": "^0.8.2"
60
60
  },
61
61
  "devDependencies": {
62
62
  "@types/node": "^22",
package/skills/VERSION CHANGED
@@ -1 +1 @@
1
- 0.7.1
1
+ 0.9.0
@@ -23,7 +23,11 @@ Two ways to get this wrong, both seen in real ports:
23
23
  Read `references/intro-port.mjs` first: the Remotion showreel's intro scene,
24
24
  ported by these rules and checked against Remotion's own render. It is the
25
25
  shape every port takes: real functions, stringified into a `config.json`
26
- (`node intro-port.mjs` writes one beside it).
26
+ (`node intro-port.mjs` writes one beside it). Every field a config, an
27
+ element, `ctx` and an ease accept is in `references/elements-and-context.md`,
28
+ copied from the published declarations with the facts they leave out
29
+ (which props re-raster, what `vos check` says about eases): read it there,
30
+ not in `node_modules`.
27
31
 
28
32
  ## The rules (the port grammar)
29
33
 
@@ -72,18 +76,64 @@ shape every port takes: real functions, stringified into a `config.json`
72
76
  translateY }` in design pixels, never a `tl.set` on `props.x/y`, for any
73
77
  text whose content or colour changes live: every re-raster lays the
74
78
  element out again from its config and drops a tweened position.
75
- - **Bind a live text to its full words.** Text that `onFrame` writes each
76
- frame (a scramble, a counter) starts as `{ "$data": "subtitle" }`, never
77
- `' '`: a still capture (and so the vos.so thumbnail) misses what `onFrame`
78
- writes, and then shows the bound words instead of nothing.
79
+ - **Text that `onFrame` writes is missing from a still.** A scramble or a
80
+ counter written into `props.content` each frame shows in `vos render`
81
+ output (a frame late) and is BLANK in `vos still` and in the vos.so
82
+ thumbnail. Check it in a rendered frame, and set the program's cover
83
+ (`vos push --still <t>`, cli 0.53+) at a moment where that text is not the
84
+ point.
79
85
  - **Transform origin is the centre.** Remotion's `transformOrigin: 'right
80
86
  center'` with `scaleX` becomes a centre scale plus an `x` tween that keeps
81
87
  the right edge still: `{ scaleX: 0, x: x0 + (width / 2) * k }`.
82
88
 
89
+ ## Layering: where a painter goes (measured)
90
+
91
+ A frame draws in this order, and a painter joins it at the place it names:
92
+
93
+ 1. **The 3D scene** (`ctx.scene`, `ctx.camera`) first, `scene.background`
94
+ under all of it. A ground or a 3D object lives here, under every element.
95
+ 2. **Then the elements**, one overlay scene per distinct element `zIndex`
96
+ (default 100), lowest first, depth cleared between them, all drawn with
97
+ `ctx.overlayCamera`: orthographic, in RENDER pixels, centred on the frame
98
+ (x right, y up in three.js terms).
99
+ 3. **Inside an overlay scene, later wins**: element *i* of `config.elements`
100
+ has `renderOrder = zIndex + i × 0.01` (a split unit adds `0.001` per
101
+ unit). Order elements in the array the way the source stacks them.
102
+
103
+ A painter that must sit BETWEEN elements is a plane in `ctx.overlayScene`
104
+ (the lowest-zIndex overlay scene, so keep every element at the default
105
+ `zIndex`) with a `renderOrder` between its neighbours:
106
+
107
+ ```js
108
+ // createContent: a painter over element 1 and under element 2
109
+ const T = ctx.THREE
110
+ const canvas = document.createElement('canvas')
111
+ const tex = new T.CanvasTexture(canvas)
112
+ tex.colorSpace = T.SRGBColorSpace // or every colour renders lighter
113
+ const mesh = new T.Mesh(
114
+ new T.PlaneGeometry(1, 1),
115
+ new T.MeshBasicMaterial({ map: tex, transparent: true, depthTest: false, depthWrite: false }),
116
+ )
117
+ mesh.scale.set(ctx.resolution.width, ctx.resolution.height, 1) // full frame, render px
118
+ mesh.renderOrder = 100 + 1 * 0.01 + 0.005
119
+ mesh.frustumCulled = false
120
+ ctx.overlayScene.add(mesh)
121
+ // onFrame: paint `canvas` from ctx.time and ctx.data, then tex.needsUpdate = true
122
+ ```
123
+
124
+ Keep the slot numbers in `data` beside the scene table (`layers: { card:
125
+ 100.015, grain: 100.995 }`), computed from element indices in the build
126
+ script, so adding an element never silently reorders a painter. A painter
127
+ over everything (grain, a vignette) takes the highest slot; a CSS blend mode
128
+ is a custom `blending` on its material, stated in the push note as an
129
+ approximation.
130
+
83
131
  ## The mapping
84
132
 
85
133
  - Remotion: `references/remotion.md`.
86
134
  - HyperFrames: `references/hyperframes.md`.
135
+ - The target's types (elements, `ctx`, the timeline, eases):
136
+ `references/elements-and-context.md`.
87
137
  - A hand-rolled page (a single HTML file, its own canvas engine): read it as
88
138
  source with the same tables. What the page draws with DOM becomes
89
139
  elements; what it paints in a canvas is a painter, kept to the procedural