@hraness/slopcamera 3.2.5 → 3.2.7

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.
Files changed (35) hide show
  1. package/README.md +5 -2
  2. package/apps/desktop/application/operation.ts +1 -1
  3. package/apps/desktop/cli/args.ts +8 -0
  4. package/apps/desktop/cli/command-host-resources.ts +3 -0
  5. package/apps/desktop/cli/commands.ts +10 -1
  6. package/apps/desktop/cli/help.ts +13 -3
  7. package/apps/desktop/cli/html-scene.ts +368 -0
  8. package/apps/desktop/cli/main.ts +6 -1
  9. package/apps/desktop/cli/media-ingest-model.ts +2 -0
  10. package/apps/desktop/cli/media-ingest-program.ts +9 -4
  11. package/apps/desktop/cli/portable-surface.ts +1 -0
  12. package/apps/desktop/cli/recording-controller.ts +1 -1
  13. package/apps/desktop/cli/root-help-intro.ts +14 -0
  14. package/apps/desktop/dist/cli/main.js +241 -222
  15. package/apps/desktop/html-overlay/contracts.ts +3 -0
  16. package/apps/desktop/html-overlay/index.ts +19 -0
  17. package/apps/desktop/html-overlay/music-clock.ts +126 -0
  18. package/apps/desktop/html-overlay/rigged-glb.ts +429 -0
  19. package/apps/desktop/html-overlay/runtime.ts +2 -0
  20. package/apps/desktop/html-overlay/scaffolds.ts +2 -1
  21. package/apps/desktop/html-overlay/scene.ts +47 -0
  22. package/dist/cli.js +1 -1
  23. package/dist/{index-7tzd9155.js → index-rvghzt7b.js} +1 -1
  24. package/dist/index.js +1 -1
  25. package/docs/README.md +1 -0
  26. package/examples/html/music-video.html +514 -0
  27. package/examples/html/music-video.json +16 -0
  28. package/examples/studio/vgpu/README.md +1 -1
  29. package/package.json +3 -1
  30. package/skills/slopcamera/SKILL.md +2 -1
  31. package/skills/slopcamera/references/install.md +1 -1
  32. package/skills/slopcamera/references/music-video.md +149 -0
  33. package/skills/slopcamera/references/video-projects.md +6 -2
  34. package/skills/slopcamera/references/workflows-sdk.md +1 -1
  35. package/src/version.ts +1 -1
@@ -14,7 +14,7 @@ command -v slopcamera
14
14
 
15
15
  A restricted shell can omit package-manager paths. Check known host installation paths before declaring a tool unavailable. If Bun is genuinely absent, follow its official [installation guide](https://bun.sh/docs/installation) within the user’s authorized setup scope. Do not switch package managers or pipe an unreviewed installer into a shell.
16
16
 
17
- Slopcamera installs from its verified release archive: `bun add --global https://github.com/hraness/slopcamera/releases/download/v3.2.4/hraness-slopcamera-3.2.4.tgz`, then `slopcamera doctor --json`. Building from source is the contributor path. Historical Atet archives do not install the renamed CLI; never substitute `slopcamera` into an old archive URL.
17
+ Slopcamera installs from its verified release archive: `bun add --global https://github.com/hraness/slopcamera/releases/download/v3.2.6/hraness-slopcamera-3.2.6.tgz`, then `slopcamera doctor --json`. Building from source is the contributor path. Historical Atet archives do not install the renamed CLI; never substitute `slopcamera` into an old archive URL.
18
18
 
19
19
  Use an existing compatible source build when available. Otherwise follow the [complete source-install guide](https://github.com/hraness/slopcamera/blob/main/docs/how-to/use-current-source.md): clone into a new directory, record its exact commit, install locked dependencies without lifecycle scripts, build the SDK and source CLI, then define the shell command against that checkout. A clone or skill installation alone does not install the executable. Do not alter an existing active checkout to satisfy this path.
20
20
 
@@ -0,0 +1,149 @@
1
+ # Render a music video from an authored scene
2
+
3
+ Use this workflow for a complete HTML or Three.js music video with a local track,
4
+ including dancing characters, changing landscapes, and musical light accents.
5
+ The export retains the source and creates an ordinary editable project with
6
+ separate scene video and original music.
7
+
8
+ ## Confirm the input and local capability
9
+
10
+ Use the user's selected track and supplied tempo. Establish an explicit duration,
11
+ beat-zero offset, and beats per bar from the task or relevant audio inspection.
12
+ The first version does not detect tempo, downbeats, or track duration. Do not
13
+ replace explicit musical timing with an unsupported automatic-analysis claim.
14
+
15
+ Check the installed command and host before preparing exact source:
16
+
17
+ ```sh
18
+ slopcamera help html
19
+ slopcamera doctor --json
20
+ ```
21
+
22
+ The current-source CLI must list `html render`. Rendering needs the admitted local
23
+ Chrome runtime and FFmpeg/FFprobe. Follow [installation and readiness](install.md)
24
+ if the installed version lacks the command. The HTML render stays local; it does
25
+ not require uploading the user's music to a generation service.
26
+
27
+ ## Keep the source reproducible
28
+
29
+ Create an HTML document in the task workspace. For core Three.js, start with
30
+ `slopcamera html scaffold three --output scenes/music-video.html`. The source
31
+ repository also includes an original articulated robot and island scene at
32
+ [`examples/html/music-video.html`](https://github.com/hraness/slopcamera/blob/main/examples/html/music-video.html)
33
+ with a matching scene request. The example uses core Three.js and no external
34
+ assets. Its supplied request selects a qualified macOS hardware profile; a
35
+ request without `executionProfile` uses the default browser profile.
36
+
37
+ Save a scene request such as this at the workspace root, replacing the duration,
38
+ timing, and track path with the selected values:
39
+
40
+ ```json
41
+ {
42
+ "kind": "slopcamera.html-scene",
43
+ "schemaVersion": 1,
44
+ "name": "Island music video",
45
+ "document": { "path": "scenes/music-video.html" },
46
+ "canvas": { "width": 1280, "height": 720, "deviceScaleFactor": 1 },
47
+ "timing": { "durationUs": 43204320, "fps": 30 },
48
+ "libraries": ["three"],
49
+ "seed": 8888,
50
+ "parameters": {
51
+ "music": { "bpm": 88.88, "beatOffsetUs": 0, "beatsPerBar": 4 }
52
+ },
53
+ "resources": [],
54
+ "audio": { "path": "/absolute/path/to/track.mp3" }
55
+ }
56
+ ```
57
+
58
+ The movie uses the specified `canvas.width` and `canvas.height`, which must be
59
+ even integers. `deviceScaleFactor` changes internal rendering density without
60
+ changing those output dimensions. Keep it at `1` while iterating.
61
+
62
+ Document and resource paths are relative to the workspace root, including when
63
+ the JSON is in a subdirectory. Declare external textures and model data in
64
+ `resources`, and load only their declared names through `SlopcameraOverlay.asset`.
65
+ The audio path can be absolute. Keep original media and attribution beside the
66
+ source; omit `audio` for a silent scene. Do not invent asset licenses.
67
+
68
+ The soundtrack must contain exactly one playable audio stream beginning at the
69
+ imported media timeline origin. A delayed stream start is rejected before frames
70
+ render.
71
+
72
+ [Imported character preparation](https://github.com/hraness/slopcamera/blob/main/docs/reference/sdk.md#prepare-rigged-glb-assets)
73
+ supports uncompressed skinned GLB. Draco
74
+ compression, morph targets, and embedded animation clips are unsupported. The
75
+ included mascot uses named articulated joints and does not require an imported
76
+ character. Describe the actual articulation accurately.
77
+
78
+ ## Animate from absolute musical time
79
+
80
+ Inside `SlopcameraOverlay.onFrame`, convert the supplied `timeMs` to integer
81
+ microseconds with `Math.round(timeMs * 1000)`, then call
82
+ `SlopcameraOverlay.musicClock(timeUs, SlopcameraOverlay.parameters.music)`.
83
+
84
+ - Use `beatPosition` for continuous motion and phrase transitions.
85
+ - Use `beatIndex` and `barIndex` for signed musical indices, and `beatPhase` and
86
+ `barPhase` for normalized phases in `[0, 1)`.
87
+ - Use `SlopcameraOverlay.musicPulse(beatPhase, widthBeats)` for a smooth periodic
88
+ accent centered on the beat. Width is in `(0, 1]` and defaults to `0.5`.
89
+ - Restore a saved pose or compute each joint transform directly from absolute
90
+ time. Never accumulate rotations, use wall-clock time, or add a second frame
91
+ loop.
92
+
93
+ Use smooth phrase transitions, restrained camera motion, and local light accents.
94
+ Maintain multisample antialiasing on the scene render target if adding
95
+ post-processing. Bound draw calls, geometry, and shader work, and validate frame
96
+ zero before a full render.
97
+
98
+ Smooth effects are not a seizure-safety certificate. The timing and pulse helpers
99
+ do not analyze rendered flashes or certify safety. Review the actual result and
100
+ avoid claiming a safety guarantee.
101
+
102
+ ## Validate, render, and review
103
+
104
+ ```sh
105
+ slopcamera html render --input music-video.json --dry-run --json
106
+ slopcamera html render --input music-video.json --json
107
+ ```
108
+
109
+ Dry run checks the schema, local HTML and resources, workload bounds, planned
110
+ dimensions, and frame count. It does not launch Chrome, validate or import audio,
111
+ or create a project. Keep `timing.durationUs` explicit even with audio. The output
112
+ rounds up to whole frames; audio starts at zero and is trimmed or padded with
113
+ silence. `beatOffsetUs` changes the visual clock, not the audio placement.
114
+
115
+ Use returned `output.path`, `receipt.path`, `source.path`, `projectId`, and
116
+ `projectPath`. Artifact paths are relative to the workspace root. The retained
117
+ job includes original HTML, declared resources, original music when supplied,
118
+ source and render receipts, lossless RGB `scene.mp4`, and delivery `video.mp4`.
119
+ The delivery is H.264 with optional 48 kHz stereo AAC at 320 kb/s. Its ordinary
120
+ project keeps the scene video and original music separate. Input files remain
121
+ unchanged.
122
+
123
+ The returned `source.path` identifies a reusable `source.json` request with the
124
+ original canvas, frame rate, timing, seed, parameters, and other render settings.
125
+ Its paths point to retained inputs. Rerun those scene settings with the returned
126
+ path in place of `<source.path>`:
127
+
128
+ ```sh
129
+ slopcamera html render --input <source.path> --json
130
+ ```
131
+
132
+ Inspect the returned duration, frame count, dimensions, and audio stream. Watch
133
+ the first and last frames, choreography, framing, phrase changes, and accents;
134
+ listen for beat alignment and the ending. State any missing visual or listening
135
+ verification.
136
+
137
+ Use [video projects](video-projects.md) to continue editing the returned project.
138
+ Ordinary project rendering defaults to 1920×1080 at 60 fps and uses the editor's
139
+ normal color and audio processing. Set dimensions and frame rate explicitly:
140
+
141
+ ```sh
142
+ slopcamera project render plan <project-id> --width 1280 --height 720 --fps 30 --output renders/edited.mp4 --json
143
+ ```
144
+
145
+ Matching those settings does not guarantee identical picture or sound to the
146
+ scene export. Review the edited delivery separately, and rerun `source.json`
147
+ through `html render` when the original scene settings are required. Revise the
148
+ working HTML and render a new request for choreography or scenery changes,
149
+ preserving each retained source and receipt with its movie.
@@ -35,7 +35,7 @@ Use `slopcamera inspect <recording> --json` for a recording bundle and
35
35
  placements, synchronization, analyses, and current edit state from those
36
36
  results. Never guess them.
37
37
 
38
- Check the bootstrap before promising a file-only edit. There is no public empty-project or arbitrary-media project creator: `projects create` requires a real stopped Slopcamera recording, and `project add` / SDK `media.ingest` require an existing project. Current-source `studio assemble` creates one from a real successful native sequence; `direct assemble` uses accepted generated takes. Neither is a generic file import. Do not fabricate recording manifests or receipts, run paid generation to obtain an empty project, or hand-edit private state. If the request permits, use a standalone spatial scene for visuals and disclose any separate local audio/editor step; otherwise report the missing project bootstrap precisely.
38
+ Check the bootstrap before promising a file-only edit. `projects create` requires a real stopped Slopcamera recording, and `project add` / SDK `media.ingest` require an existing project. Current-source `studio assemble` creates one from a real successful native sequence; `direct assemble` uses accepted generated takes. Current-source `html render` renders an authored HTML scene with an optional local soundtrack and creates an ordinary project containing separate scene and music sources. Follow [music videos](music-video.md) for that entry path and check `slopcamera help html` for availability. Arbitrary media files alone still have no empty-project creator. Do not fabricate recording manifests or receipts, run paid generation to obtain an empty project, or hand-edit private state.
39
39
 
40
40
  If the work begins with a new Slopcamera recording, create the project from that
41
41
  recording, then add any independent footage or audio:
@@ -88,7 +88,7 @@ project or its editable scene source, then inspect the resulting project hash.
88
88
  When an edit depends on evidence, use the evidence identifier returned by its
89
89
  analysis rather than recomputing or approximating it.
90
90
 
91
- Direct `project edit` does not accept HTML or arbitrary audio/color filters. Render HTML/Canvas/Three/WGSL through the local workflow `media.htmlOverlay` operation, then use its returned video as a project layer. `media audio` and `media color` produce separate controlled derivatives.
91
+ Direct `project edit` does not accept HTML or arbitrary audio/color filters. Render HTML/Canvas/Three/WGSL through the local workflow `media.htmlOverlay` operation, then use its returned video as a project layer. For a complete authored scene that creates its own ordinary project, use `slopcamera html render --input <scene.json>` as described in [music videos](music-video.md). `media audio` and `media color` produce separate controlled derivatives.
92
92
 
93
93
  Overlay `--position x,y` is an offset from its selected anchor. Use `--anchor center --position 0,0` to center a layer, or `--anchor top-left --position 42,70` for an actual top-left pixel position. A full-frame overlay uses top-left at `0,0`. Do not add half the canvas dimensions to center offsets.
94
94
 
@@ -114,6 +114,10 @@ Two.js on its explicit WebGL renderer with `autostart: false` and one manual
114
114
  `SlopcameraOverlay.randomFor`; never add a CDN, live input, ambient asset loader, or
115
115
  second frame loop.
116
116
 
117
+ For musical choreography, derive poses from `SlopcameraOverlay.musicClock` and
118
+ local accents from `SlopcameraOverlay.musicPulse`. Follow [music videos](music-video.md)
119
+ for explicit tempo, beat offset, duration, and soundtrack export.
120
+
117
121
  ## Use vgpu for explicit WebGPU effects
118
122
 
119
123
  Choose `slopcamera html scaffold vgpu --output <file.html>` for a reviewed fullscreen
@@ -15,7 +15,7 @@ For custom local authoring, use `slopcamera code init workflow.ts`, inspect the
15
15
 
16
16
  Discover exact local inputs with `slopcamera operations list|show`. No host accepts arbitrary new operation registration or caller-selected shell/argv. The fixed `slopcamera.studio.run` is an explicit exception for previously retained native source: its bundle/job input remains typed, while executable paths and trusted-current-user authority belong to the host invocation. The checked `examples/studio/native-workflow.ts` uses `defineWorkflow` and `StudioRunInputSchema` from the local entrypoint.
17
17
 
18
- `media.ingest` needs an existing ordinary project. There is no public arbitrary-file project bootstrap or SDK project-create operation. Follow [video projects](video-projects.md) for the supported recording/native/directing entry paths; never synthesize their receipts or depend on private constructors.
18
+ `media.ingest` needs an existing ordinary project. There is no public generic arbitrary-file SDK project-create operation. Follow [video projects](video-projects.md) for the supported recording, native, and directing entry paths, or [music videos](music-video.md) for the current-source `html render` CLI that creates a project from an authored scene and optional soundtrack. Never synthesize their receipts or depend on private constructors.
19
19
 
20
20
  ## Inspect, approve and resume exact work
21
21
 
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const SLOPCAMERA_VERSION = "3.2.5" as const
1
+ export const SLOPCAMERA_VERSION = "3.2.7" as const