greenlight-motion 0.2.0 → 0.2.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
@@ -17,16 +17,16 @@ The agent writes the video as data: a `project.json` and its files. The engine t
17
17
  ## Quick start
18
18
 
19
19
  ```bash
20
- npx greenlight-motion@0.2.0 doctor # Node 18+, Chrome or Edge, WebGPU, H.264: what's missing and how to fix it
21
- npx greenlight-motion@0.2.0 init my-video # a working starter: index.html, project.json, assets/
20
+ npx greenlight-motion@0.2.2 doctor # Node 18+, Chrome or Edge, WebGPU, H.264: what's missing and how to fix it
21
+ npx greenlight-motion@0.2.2 init my-video # a working starter: index.html, project.json, assets/
22
22
  # edit my-video/project.json, put pictures / video / sound in my-video/assets/
23
23
  # or: write my-video/script.json (a scene script, skill/references/scene-script.md), then
24
- npx greenlight-motion@0.2.0 script my-video # script.json → project.json with the Video Editor's own presets
25
- npx greenlight-motion@0.2.0 check my-video # what to fix: missing files, template mistakes, blank frames, broken plugins
26
- npx greenlight-motion@0.2.0 stills my-video # frames + a labelled contact sheet, to look at
27
- npx greenlight-motion@0.2.0 render my-video --fps 60 --motion-blur
28
- npx greenlight-motion@0.2.0 pack my-video # everything in ONE html file
29
- npx greenlight-motion@0.2.0 pack my-video --glvideo # ONE .glvideo: double-clicked, it opens in GreenLight Dash
24
+ npx greenlight-motion@0.2.2 script my-video # script.json → project.json with the Video Editor's own presets
25
+ npx greenlight-motion@0.2.2 check my-video # what to fix: missing files, template mistakes, blank frames, broken plugins
26
+ npx greenlight-motion@0.2.2 stills my-video # frames + a labelled contact sheet, to look at
27
+ npx greenlight-motion@0.2.2 render my-video --fps 60 --motion-blur
28
+ npx greenlight-motion@0.2.2 pack my-video # everything in ONE html file
29
+ npx greenlight-motion@0.2.2 pack my-video --glvideo # ONE .glvideo: double-clicked, it opens in GreenLight Dash
30
30
  ```
31
31
 
32
32
  Also: `trace` (every animated layer's values frame by frame, plus the layer's moments), `set key=value`
@@ -72,7 +72,7 @@ The engine is one classic script, so it runs from a double-clicked file, a CDN o
72
72
 
73
73
  ```html
74
74
  <div id="app"></div>
75
- <script src="https://cdn.jsdelivr.net/npm/greenlight-motion@0.2.0/dist/greenlight-motion.js"></script>
75
+ <script src="https://cdn.jsdelivr.net/npm/greenlight-motion@0.2.2/dist/greenlight-motion.js"></script>
76
76
  <script>
77
77
  GreenLightMotion.mountStudio(document.getElementById('app'), {
78
78
  project: { /* project.json */ },
package/cli/index.mjs CHANGED
@@ -314,6 +314,12 @@ async function check() {
314
314
  for (const p of await page.evaluate(async (proj) => window.GreenLightMotion.checkSoundCues(await window.GreenLightMotion.normalize(proj)), project)) {
315
315
  problems.push({ code: 'sound', detail: p, fix: 'fix project.sounds (npx greenlight-motion schema sounds lists the library)' });
316
316
  }
317
+ // a track matte's source is hidden only while a layer that uses it is on screen; outside that it draws as itself
318
+ for (const g of await page.evaluate((proj) => window.GreenLightMotion.matteGaps(proj), project)) {
319
+ problems.push({ code: 'matte-source', ref: g.source,
320
+ detail: `"${g.source}" shows on screen from ${g.from} s to ${g.to} s, when no layer that uses it as a track matte (${g.consumers.join(', ')}) is on screen`,
321
+ fix: `start and end "${g.source}" with the layer it cuts: the engine hides a matte source only while a layer that uses it is on screen` });
322
+ }
317
323
  if (!(duration > 0)) problems.push({ code: 'empty', detail: 'the project has no length', fix: 'add layers to channels[].items with clips that have a duration' });
318
324
  const blank = [];
319
325
  for (const t of parseTimes(duration).slice(0, 4)) {
@@ -571,6 +577,8 @@ function schema() {
571
577
  switch (topic) {
572
578
  case 'format': {
573
579
  const refs = path.join(PKG, 'skill', 'references');
580
+ const essentials = readFileSync(path.join(PKG, 'skill', 'SKILL.md'), 'utf8').split('## The project format — essentials')[1]?.split('\n## ')[0];
581
+ if (essentials) show(`# The project format — essentials${essentials.trimEnd()}\n`);
574
582
  show(`The project format is the GreenLight Dash Video Editor's. Read:
575
583
  ${path.join(PKG, 'skill', 'SKILL.md')} how to work, and the essentials
576
584
  ${refs}/ one file per topic: ${existsSync(refs) ? readdirSync(refs).map((f) => f.replace('.md', '')).join(', ') : '(missing)'}