greenlight-motion 0.2.1 → 0.2.3
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 +9 -9
- package/cli/index.mjs +8 -0
- package/dist/greenlight-motion-script.mjs +2026 -8
- package/dist/greenlight-motion.js +463 -463
- package/dist/greenlight-motion.mjs +18782 -18730
- package/dist/script-inputs.json +1 -0
- package/package.json +1 -1
- package/skill/SKILL.md +20 -10
- package/skill/references/scene-script.md +13 -2
- package/skill/references/video-3d.md +4 -2
- package/skill/references/video-backgrounds.md +4 -2
- package/skill/references/video-camera.md +4 -2
- package/skill/references/video-effects.md +5 -3
- package/skill/references/video-grid.md +4 -2
- package/skill/references/video-keyframes.md +5 -3
- package/skill/references/video-particles.md +4 -2
- package/skill/references/video-paths.md +5 -3
- package/skill/references/video-projects.md +20 -18
- package/skill/references/video-shapes.md +4 -2
- package/skill/references/video-text-kinetic.md +4 -2
- package/skill/references/video-text-presets.md +4 -2
- package/skill/references/video-text.md +4 -2
- package/skill/references/video-transitions.md +4 -2
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.
|
|
21
|
-
npx greenlight-motion@0.2.
|
|
20
|
+
npx greenlight-motion@0.2.3 doctor # Node 18+, Chrome or Edge, WebGPU, H.264: what's missing and how to fix it
|
|
21
|
+
npx greenlight-motion@0.2.3 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.
|
|
25
|
-
npx greenlight-motion@0.2.
|
|
26
|
-
npx greenlight-motion@0.2.
|
|
27
|
-
npx greenlight-motion@0.2.
|
|
28
|
-
npx greenlight-motion@0.2.
|
|
29
|
-
npx greenlight-motion@0.2.
|
|
24
|
+
npx greenlight-motion@0.2.3 script my-video # script.json → project.json with the Video Editor's own presets
|
|
25
|
+
npx greenlight-motion@0.2.3 check my-video # what to fix: missing files, template mistakes, blank frames, broken plugins
|
|
26
|
+
npx greenlight-motion@0.2.3 stills my-video # frames + a labelled contact sheet, to look at
|
|
27
|
+
npx greenlight-motion@0.2.3 render my-video --fps 60 --motion-blur
|
|
28
|
+
npx greenlight-motion@0.2.3 pack my-video # everything in ONE html file
|
|
29
|
+
npx greenlight-motion@0.2.3 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.
|
|
75
|
+
<script src="https://cdn.jsdelivr.net/npm/greenlight-motion@0.2.3/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)'}
|