@kieransimkin/dancemoves 3.1.23 → 3.2.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/README.md +3 -0
- package/docs/audio-recording-playback.md +56 -0
- package/lib/build-manifest.json +11 -11
- package/lib/dancemoves.min.js +3 -3
- package/lib/index.cjs +242 -63
- package/lib/index.d.ts +5 -1
- package/lib/index.mjs +242 -63
- package/lib/wordpress.js +3 -3
- package/package.json +1 -1
- package/readme.txt +2 -2
package/README.md
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
# DanceMoves
|
|
2
2
|
|
|
3
|
+
**3.2.0** adds native, non-looping playback of StemLab/DanceRudiments audio-derived movement recordings. `runtime.recordings` composes the existing audio clock, shared player mapping, accessibility preferences and lifecycle. Captured BPM must match page metadata; samples retain their original integer-pip clock and never wrap. See [recording playback](docs/audio-recording-playback.md).
|
|
4
|
+
|
|
5
|
+
|
|
3
6
|
**3.1.23** secures WordPress motion-capture writes with authenticated
|
|
4
7
|
`manage_options` authorization. The private capture administration UI uses the
|
|
5
8
|
same capability. Published tokens no longer authorize uploads; cookie clients
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# Audio-derived recording playback
|
|
2
|
+
|
|
3
|
+
DanceMoves 3.2.0 adds `runtime.recordings` for the bounded `dancerudiments.recording`
|
|
4
|
+
v1 JSON format exported by StemLab and DanceRudiments 0.3.0. Named native patterns
|
|
5
|
+
continue to loop at their own periods. Recordings retain their captured origin,
|
|
6
|
+
64-pip resolution, named dimensions and exact extent; they never wrap or interpolate.
|
|
7
|
+
|
|
8
|
+
```js
|
|
9
|
+
const recording = await runtime.recordings.load('/approved-motion.json');
|
|
10
|
+
const motion = runtime.recordings.animate({
|
|
11
|
+
id: 'subject:recording', root, target, audio,
|
|
12
|
+
recording,
|
|
13
|
+
render({values, reason}) {
|
|
14
|
+
// Map bounded native samples to the existing subject's appearance.
|
|
15
|
+
// A CSSOM rule avoids high-frequency inline-style mutation observers.
|
|
16
|
+
rule.style.setProperty('--subject-angle', `${values[0] * 6}deg`);
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
await motion.ready;
|
|
20
|
+
motion.setEnabled(false); // neutral values, preserving the captured clock
|
|
21
|
+
motion.setEnabled(true);
|
|
22
|
+
motion.destroy();
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
The controller composes the existing native DanceMoves audio scheduler and its
|
|
26
|
+
shared-player mapping. Pause holds the source pose; seeking reconstructs it.
|
|
27
|
+
Reduced motion, forced colours and explicit disable output zeroes. Hidden and
|
|
28
|
+
offscreen subjects suspend through the existing lifecycle. Positions outside the
|
|
29
|
+
recording emit zeroes with `reason: 'outside-recording'`; seeking back into the
|
|
30
|
+
capture resumes its exact native sample. Runtime disposal destroys all recording
|
|
31
|
+
controllers, including pending native loads. Use `pause()`, `resume()`, `refresh()`,
|
|
32
|
+
`snapshot()`, `recordings.get(id)` and `recordings.snapshot()` for ownership and QA.
|
|
33
|
+
|
|
34
|
+
The recording BPM must match the authoritative runtime/page BPM. A controller
|
|
35
|
+
cannot override tempo, rate, phase or clock. BPM provenance and phase provenance
|
|
36
|
+
remain separate. The page's WordPress EPK Timing metadata remains the only source
|
|
37
|
+
for lyric/cue attachments; a movement recording never replaces those fields.
|
|
38
|
+
Use the exact track/master, same-clock stem provenance and original capture origin.
|
|
39
|
+
StemLab owns separation, filtering and smoothing; this player performs no DSP.
|
|
40
|
+
All smoothing variants should use a fixed reference scale for a fair comparison.
|
|
41
|
+
|
|
42
|
+
The sampler is the official native C++/WebAssembly accessor from DanceRudiments
|
|
43
|
+
0.3.0. There is no JavaScript movement fallback. Its embedded binary SHA-256 is
|
|
44
|
+
`d4cd976156860aa7a5c9665b27d2fda3cf6a0fa0da3dc0b9df365e425f1c6e29`, built from
|
|
45
|
+
upstream `include/dancerudiments/recording_view.hpp` SHA-256
|
|
46
|
+
`19dd73a150a82c4d9074fe4b9ba4c2f09d41e206028a6a6dc922d94e00dc4b8d` and
|
|
47
|
+
`tools/recording_wasm.cpp` SHA-256
|
|
48
|
+
`f4713cc7c773fa065715383fc68dccd91398fff08cd89167c5f24e64c0cecea9`.
|
|
49
|
+
See the [upstream recording contract](https://github.com/kieransimkin/DanceRudiments/blob/v0.3.0/docs/recordings.md).
|
|
50
|
+
The existing bundled named catalogue and its separate version are unchanged.
|
|
51
|
+
|
|
52
|
+
Inputs are limited to 64 MiB JSON, 8,388,608 finite values in [-1,1], 1..64 unique
|
|
53
|
+
named dimensions and signed 32-bit integer pip bounds. Loading fails closed for
|
|
54
|
+
bad UTF-8, schema, samples, HTTP responses, mismatched BPM or unavailable WASM.
|
|
55
|
+
Treat `ready` rejection as an unavailable motion state and retain static content.
|
|
56
|
+
These source/build changes do not deploy a WordPress plugin or page.
|
package/lib/build-manifest.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schema": "dancemoves-library-build/v1",
|
|
3
3
|
"name": "@kieransimkin/dancemoves",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.2.0",
|
|
5
5
|
"homepage": "https://kieransimkin.co.uk/my-songs/",
|
|
6
6
|
"files": [
|
|
7
7
|
{
|
|
@@ -31,23 +31,23 @@
|
|
|
31
31
|
},
|
|
32
32
|
{
|
|
33
33
|
"path": "dancemoves.min.js",
|
|
34
|
-
"bytes":
|
|
35
|
-
"sha256": "
|
|
34
|
+
"bytes": 218383,
|
|
35
|
+
"sha256": "9a9afad98cbf15d3c8394a54809596d1ffe784f5ac7ca13484186ace3eb93661"
|
|
36
36
|
},
|
|
37
37
|
{
|
|
38
38
|
"path": "index.cjs",
|
|
39
|
-
"bytes":
|
|
40
|
-
"sha256": "
|
|
39
|
+
"bytes": 370576,
|
|
40
|
+
"sha256": "ca7ed8da52270ee4a17f94672121f4182fa5cc8c5964c8d095a682978d1b4981"
|
|
41
41
|
},
|
|
42
42
|
{
|
|
43
43
|
"path": "index.d.ts",
|
|
44
|
-
"bytes":
|
|
45
|
-
"sha256": "
|
|
44
|
+
"bytes": 14929,
|
|
45
|
+
"sha256": "477a8d665f245dbcff92cdc17372f39b54dbe3f9392695a00773f43b92288914"
|
|
46
46
|
},
|
|
47
47
|
{
|
|
48
48
|
"path": "index.mjs",
|
|
49
|
-
"bytes":
|
|
50
|
-
"sha256": "
|
|
49
|
+
"bytes": 369431,
|
|
50
|
+
"sha256": "6edacb0ded30311fc26bb80e86c772ba362c1b60c54a68b5ebaa2d3eb484ac16"
|
|
51
51
|
},
|
|
52
52
|
{
|
|
53
53
|
"path": "react.cjs",
|
|
@@ -106,8 +106,8 @@
|
|
|
106
106
|
},
|
|
107
107
|
{
|
|
108
108
|
"path": "wordpress.js",
|
|
109
|
-
"bytes":
|
|
110
|
-
"sha256": "
|
|
109
|
+
"bytes": 217191,
|
|
110
|
+
"sha256": "1b02054111edf66b3a5766c7da74291fe597d2ed3ac7a89f0f282cfb99c415df"
|
|
111
111
|
}
|
|
112
112
|
]
|
|
113
113
|
}
|