@hackbuild/motion-views 0.1.0 → 0.1.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/llms.md ADDED
@@ -0,0 +1,581 @@
1
+ # @hackbuild/motion-views
2
+
3
+ > Put a character stage, an avatar drop card and a clip strip on your page, drawn with the hackbuild-ui stylesheet, as custom elements or Vue components.
4
+
5
+ Generated by tools/llms.mjs from the TypeDoc JSON, the README and the examples of hackbuild-motion. Human docs: https://hackbuild.github.io/hackbuild-motion/docs/motion-views/
6
+
7
+ ## Purpose
8
+
9
+ - `CharacterStage`: a body on a lit stage with idle, gaze, blinks and lips, a corner plate, turn around and framing tools, a verb row and an inset slot. It speaks real audio with word timings, or text alone on estimated timings.
10
+ - `AvatarDrop`: a drop zone and pick button that loads a VRM, GLB or FBX once, checks its rig in plain words, draws a still and shows the avatar card.
11
+ - `ClipStrip`: each clip's still, name and length, the picked one pressed and one play button.
12
+ - Ships every view as a mount function, a custom element and a Vue 3 component, on one code path.
13
+ - Carries no styles of its own; every class is hackbuild-ui's.
14
+
15
+ ## Install
16
+
17
+ ```sh
18
+ npm install @hackbuild/motion-views three @virgilvox/hackbuild-ui
19
+ ```
20
+
21
+ `@virgilvox/hackbuild-ui` 0.10 is a required peer, and the page loads its stylesheet (`@virgilvox/hackbuild-ui/styles.css`). three.js is needed by the views; Vue only by `/vue`. It depends on `@hackbuild/avatar`, `@hackbuild/avatar-host`, `@hackbuild/presence`, `@hackbuild/lipsync` and `@hackbuild/organic`, which install with it.
22
+
23
+ | subpath | needs | pin |
24
+ |---|---|---|
25
+ | `@hackbuild/motion-views` | nothing; the words, clip items and speech timings | none |
26
+ | `@hackbuild/motion-views/vanilla` | `three` (optional peer), `@virgilvox/hackbuild-ui` (peer) | three 0.186.1 or later, hackbuild-ui `>=0.10.0 <0.11.0` |
27
+ | `@hackbuild/motion-views/vue` | `vue` (optional peer) and the above | vue 3.5.0 or later |
28
+ | `@hackbuild/motion-views/iife` | `THREE` on the page | one classic script |
29
+
30
+ ## Exports
31
+
32
+ ### @hackbuild/motion-views
33
+
34
+ ```ts
35
+ function bytesWord(n: number): string
36
+ ```
37
+
38
+ Bytes as "820 kb" or "12.4 mb".
39
+
40
+ ```ts
41
+ type ClipFrom = "bake" | "retarget" | "body" | "code"
42
+ ```
43
+
44
+ Where a clip came from: a baked pack, a retarget, the body's own file, or code.
45
+
46
+ ```ts
47
+ function clipFromFindings(id: string, name: string, f: FindingsLike): ClipItem
48
+ ```
49
+
50
+ An item from a retargeted motion and its findings.
51
+
52
+ ```ts
53
+ interface ClipItem {
54
+ from: ClipFrom;
55
+ id: string;
56
+ loop: boolean;
57
+ name: string;
58
+ seconds: number;
59
+ tags?: string[];
60
+ thumb?: string | Blob;
61
+ warn?: string;
62
+ }
63
+ ```
64
+
65
+ One clip as the strip shows it: id, name, length, loop, source, tags, warning and still.
66
+
67
+ ```ts
68
+ function clipMeta(c: Pick<ClipItem, "seconds" | "loop" | "tags">): string
69
+ ```
70
+
71
+ The strip's second line: "2.4 s, loops" or "walk, 2.4 s, loops".
72
+
73
+ ```ts
74
+ function clipsFromBody(clips: readonly { duration: number; name: string }[], prefix?: string): ClipItem[]
75
+ ```
76
+
77
+ Items for the clips a loaded file carries, by name and length.
78
+
79
+ ```ts
80
+ function clipsFromPack(pack: PackLike, report?: readonly PackReportLike[], prefix?: string): ClipItem[]
81
+ ```
82
+
83
+ Items from a clip pack, with the bake report's seam check as a warning.
84
+
85
+ ```ts
86
+ function estimateSeconds(text: string): number
87
+ ```
88
+
89
+ Seconds text takes on estimated timings: about 0.34 s a word (inferred), at least 0.8 s.
90
+
91
+ ```ts
92
+ interface FindingsLike {
93
+ duration: number;
94
+ looping: boolean;
95
+ tags: readonly string[];
96
+ }
97
+ ```
98
+
99
+ What retarget's analyzeMotion returns, in the fields the strip reads.
100
+
101
+ ```ts
102
+ function licenceLine(format: string, meta: LicenceMeta | null | undefined): RigLine
103
+ ```
104
+
105
+ The licence line.
106
+
107
+ ```ts
108
+ interface LicenceMeta {
109
+ allowRedistribution?: boolean;
110
+ commercialUsage?: string;
111
+ licenseName?: string;
112
+ licenseUrl?: string;
113
+ metaVersion?: string;
114
+ modification?: string;
115
+ otherLicenseUrl?: string;
116
+ }
117
+ ```
118
+
119
+ VRM metadata fields the licence line reads (VRM 1.0 and 0.x).
120
+
121
+ ```ts
122
+ function nextClip(items: readonly ClipItem[], id: string | null, step?: number): string | null
123
+ ```
124
+
125
+ The next id after `id` in the strip, wrapping, for a key or a play all.
126
+
127
+ ```ts
128
+ interface PackLike {
129
+ clips: Record<string, { dur: number; loop: boolean; n: number; name: string }>;
130
+ fps: number;
131
+ }
132
+ ```
133
+
134
+ What bake's decodePack returns, in the fields the strip reads.
135
+
136
+ ```ts
137
+ interface PackReportLike {
138
+ maxAngleErrorDeg: number;
139
+ name: string;
140
+ seamAngleDeg: number | null;
141
+ seamOk: boolean | null;
142
+ }
143
+ ```
144
+
145
+ What bake's bakeClips reports per clip, in the fields the strip reads.
146
+
147
+ ```ts
148
+ function rigCheck(f: RigFacts): RigCheck
149
+ ```
150
+
151
+ The rig check in plain words, worst first.
152
+
153
+ ```ts
154
+ interface RigCheck {
155
+ head: string;
156
+ lines: RigLine[];
157
+ tone: RigTone;
158
+ }
159
+ ```
160
+
161
+ The rig check: overall tone, a headline and the lines worst first.
162
+
163
+ ```ts
164
+ interface RigFacts {
165
+ blink: boolean;
166
+ bones: readonly string[];
167
+ clips: readonly string[];
168
+ expressions: readonly string[];
169
+ gaze: boolean;
170
+ mouth: boolean;
171
+ warnings?: readonly string[];
172
+ }
173
+ ```
174
+
175
+ What a loaded body can do, as @hackbuild/avatar-host reports it in BodyCaps.
176
+
177
+ ```ts
178
+ interface RigLine {
179
+ text: string;
180
+ tone: RigTone;
181
+ }
182
+ ```
183
+
184
+ One line of the rig check: what works or what does not, and why.
185
+
186
+ ```ts
187
+ type RigTone = "ok" | "warn" | "bad"
188
+ ```
189
+
190
+ How a rig check line reads: fine, a limit, or a blocker.
191
+
192
+ ```ts
193
+ function secondsWord(s: number): string
194
+ ```
195
+
196
+ A clip's length: "2.4 s", "0.5 s", "1 min 12 s".
197
+
198
+ ```ts
199
+ interface SizeFacts {
200
+ bytes: number;
201
+ files?: number;
202
+ format: string;
203
+ triangles?: number;
204
+ }
205
+ ```
206
+
207
+ The facts the size line reads: bytes, format, file and triangle counts.
208
+
209
+ ```ts
210
+ function sizeLine(s: SizeFacts): string
211
+ ```
212
+
213
+ The size line: "12.4 mb vrm, 3 files, 38 k triangles".
214
+
215
+ ```ts
216
+ interface Speech {
217
+ audio?: AudioBuffer | HTMLMediaElement;
218
+ events?: readonly SpeechEvent[];
219
+ phonemes?: readonly SpeechTiming[];
220
+ text?: string;
221
+ words?: readonly SpeechTiming[];
222
+ }
223
+ ```
224
+
225
+ Something to say.
226
+
227
+ ```ts
228
+ function speechEvents(s: Speech, t0: number, seconds: number): { events: SpeechEvent[]; source: SpeechSource }
229
+ ```
230
+
231
+ The mouth events for a speech starting at `t0` on the mouth clock and lasting `seconds`, closed by an end event, and where they came from.
232
+
233
+ ```ts
234
+ type SpeechSource = "events" | "phonemes" | "words" | "estimate" | "audio level"
235
+ ```
236
+
237
+ Where the mouth timings come from, for the readout and the tests.
238
+
239
+ ```ts
240
+ interface SpeechTiming {
241
+ end?: number;
242
+ phoneme?: string;
243
+ start?: number;
244
+ t0: number;
245
+ t1: number;
246
+ text?: string;
247
+ }
248
+ ```
249
+
250
+ A word or phoneme with its time from the start of the audio, as @hackbuild/speak reports it.
251
+
252
+ ### @hackbuild/motion-views/vanilla
253
+
254
+ ```ts
255
+ function animationClipOf(clip: Clip, names: readonly string[]): AnimationClip
256
+ ```
257
+
258
+ A presence clip as a three.js AnimationClip with one quaternion track per bone object name.
259
+
260
+ ```ts
261
+ function avatarDrop(host: HTMLElement, opts?: AvatarDropOptions): AvatarDropHandle
262
+ ```
263
+
264
+ Mounts the drop card into `host`.
265
+
266
+ ```ts
267
+ interface AvatarDropElement extends HTMLElement {
268
+ readonly handle: AvatarDropHandle | null;
269
+ }
270
+ ```
271
+
272
+ The hb-avatar-drop element, with its view handle once connected.
273
+
274
+ ```ts
275
+ type AvatarDropEvent = { files: readonly DroppedFile[]; type: "picked" } | { files: readonly DroppedFile[]; report: AvatarReport; type: "checked" } | { message: string; type: "failed" } | { files: readonly DroppedFile[]; report: AvatarReport; type: "use" }
276
+ ```
277
+
278
+ Events of AvatarDrop: files picked, the report checked, a failure, or the card pressed to use the avatar.
279
+
280
+ ```ts
281
+ interface AvatarDropHandle {
282
+ readonly report: AvatarReport | null;
283
+ dispose(): void;
284
+ on(fn: (e: AvatarDropEvent) => void): () => void;
285
+ pick(): void;
286
+ take(files: readonly DroppedFile[]): Promise<AvatarReport | null>;
287
+ }
288
+ ```
289
+
290
+ The handle `avatarDrop` returns: the last report, take files, open the picker, listen, dispose.
291
+
292
+ ```ts
293
+ interface AvatarDropOptions extends BodyLoadOptions {
294
+ go?: boolean;
295
+ hint?: string;
296
+ label?: string;
297
+ normalize?: NormalizeOptions;
298
+ repair?: false | RepairOptions;
299
+ vrm?: () => Promise<VrmHook>;
300
+ }
301
+ ```
302
+
303
+ Options of `avatarDrop`: the load options of a body plus the pick button and hint words.
304
+
305
+ ```ts
306
+ interface AvatarReport {
307
+ bytes: number;
308
+ caps: BodyCaps;
309
+ check: RigCheck;
310
+ files: number;
311
+ format: string;
312
+ licence: RigLine;
313
+ name: string;
314
+ size: string;
315
+ thumb: Blob | null;
316
+ triangles: number;
317
+ }
318
+ ```
319
+
320
+ What AvatarDrop learned about a dropped avatar: name, format, size, rig check, licence and still.
321
+
322
+ ```ts
323
+ function characterStage(host: HTMLElement, opts?: CharacterStageOptions): CharacterStageHandle
324
+ ```
325
+
326
+ Mounts a character stage into `host`, which becomes the `.hb-lay-stage`.
327
+
328
+ ```ts
329
+ interface CharacterStageElement extends HTMLElement {
330
+ readonly handle: CharacterStageHandle | null;
331
+ }
332
+ ```
333
+
334
+ The hb-character-stage element, with its view handle once connected.
335
+
336
+ ```ts
337
+ type CharacterStageEvent = { caps: BodyCaps; name: string; placeholder: boolean; type: "loaded"; warnings: string[] } | { message: string; type: "failed" } | { type: "doing"; word: string } | { id: string; type: "verb" } | { framing: Framing; type: "framing" }
338
+ ```
339
+
340
+ Events of CharacterStage: a body loaded or failed, what it is doing, a verb pressed, the framing changed.
341
+
342
+ ```ts
343
+ interface CharacterStageHandle {
344
+ readonly body: Body | null;
345
+ readonly doing: string;
346
+ readonly framing: Framing;
347
+ readonly inset: HTMLElement;
348
+ readonly speechSource: SpeechSource | null;
349
+ readonly stage: AvatarStage;
350
+ readonly subject: HTMLElement;
351
+ readonly verbsEl: HTMLElement;
352
+ dispose(): void;
353
+ frame(mode: Framing): void;
354
+ gesture(id: Gesture): boolean;
355
+ on(fn: (e: CharacterStageEvent) => void): () => void;
356
+ play(clip: string | Clip | AnimationClip, opts?: PlayOptions): number;
357
+ say(speech: string | Speech, seconds?: number): Promise<void>;
358
+ setVerbs(verbs: readonly Verb[]): void;
359
+ show(source: string | BodySource | readonly DroppedFile[]): Promise<Body | null>;
360
+ showPlaceholder(): void;
361
+ stop(): void;
362
+ turn(): void;
363
+ }
364
+ ```
365
+
366
+ The handle `characterStage` returns: show a body, speak, gesture, play clips, frame and listen.
367
+
368
+ ```ts
369
+ interface CharacterStageOptions extends StageOptions {
370
+ audioContext?: AudioContext;
371
+ background?: number | null;
372
+ body?: Omit<BodyOptions, "rng">;
373
+ canvas?: HTMLCanvasElement;
374
+ drop?: boolean;
375
+ environment?: string | EnvironmentRequest;
376
+ follow?: FollowOptions;
377
+ framing?: Framing;
378
+ hello?: string | Speech | () => Speech | Promise<Speech>;
379
+ lights?: boolean;
380
+ maxPixelRatio?: number;
381
+ name?: string;
382
+ normalize?: NormalizeOptions;
383
+ repair?: false | RepairOptions;
384
+ restoreButton?: boolean;
385
+ rng?: Rng;
386
+ src?: string;
387
+ statsEvery?: number;
388
+ verbs?: readonly Verb[];
389
+ vrm?: () => Promise<VrmHook>;
390
+ }
391
+ ```
392
+
393
+ Options of `characterStage`: stage options plus name, model URL, verbs, framing, drop and the hello speech.
394
+
395
+ ```ts
396
+ function clipStrip(host: HTMLElement, opts?: ClipStripOptions): ClipStripHandle
397
+ ```
398
+
399
+ Mounts a clip strip into `host`.
400
+
401
+ ```ts
402
+ interface ClipStripElement extends HTMLElement {
403
+ current: string | null;
404
+ readonly handle: ClipStripHandle | null;
405
+ items: readonly StripItem[];
406
+ }
407
+ ```
408
+
409
+ The hb-clip-strip element, with its view handle and the items and picked clip as properties.
410
+
411
+ ```ts
412
+ type ClipStripEvent = { item: StripItem; type: "pick" } | { item: StripItem; type: "play" } | { item: StripItem; type: "stop" } | { id: string; ok: boolean; type: "thumb" }
413
+ ```
414
+
415
+ Events of ClipStrip: a clip picked, play or stop pressed, a still drawn or failed.
416
+
417
+ ```ts
418
+ interface ClipStripHandle {
419
+ readonly current: StripItem | null;
420
+ readonly playing: boolean;
421
+ dispose(): void;
422
+ on(fn: (e: ClipStripEvent) => void): () => void;
423
+ pick(id: string): void;
424
+ setItems(items: readonly StripItem[], current?: string | null): void;
425
+ setPlaying(on: boolean): void;
426
+ thumbsIdle(): Promise<void>;
427
+ }
428
+ ```
429
+
430
+ The handle `clipStrip` returns: set items, pick, set the play state, wait for stills, listen.
431
+
432
+ ```ts
433
+ interface ClipStripOptions {
434
+ current?: string | null;
435
+ go?: boolean;
436
+ items?: readonly StripItem[];
437
+ label?: string;
438
+ thumbs?: boolean;
439
+ }
440
+ ```
441
+
442
+ Options of `clipStrip`: the items, the picked clip, the play button and stills.
443
+
444
+ ```ts
445
+ const DEFAULT_VERBS: readonly Verb[]
446
+ ```
447
+
448
+ The verbs a stage shows by default: say hello is the next thing to do.
449
+
450
+ ```ts
451
+ function defineMotionViews(opts?: MotionViewsOptions): void
452
+ ```
453
+
454
+ Defines hb-character-stage, hb-avatar-drop and hb-clip-strip once.
455
+
456
+ ```ts
457
+ type Framing = "bust" | "full"
458
+ ```
459
+
460
+ The stage shot: bust, or the full body.
461
+
462
+ ```ts
463
+ type Gesture = "wave" | "nod" | "shake" | "bow"
464
+ ```
465
+
466
+ A gesture written in code over the body's own bones.
467
+
468
+ ```ts
469
+ function gestureClip(id: Gesture, names: readonly string[], base: ArrayLike<number>, fps?: number): Clip | null
470
+ ```
471
+
472
+ A gesture as a presence clip over `names`, starting from `base` (bones times 4 local rotations, the pose when it was built).
473
+
474
+ ```ts
475
+ const GESTURES: readonly Gesture[]
476
+ ```
477
+
478
+ Every gesture `gestureClip` can make.
479
+
480
+ ```ts
481
+ interface MotionViewsOptions {
482
+ drop?: AvatarDropOptions;
483
+ stage?: CharacterStageOptions;
484
+ }
485
+ ```
486
+
487
+ Options `defineMotionViews` shares with every element it defines.
488
+
489
+ ```ts
490
+ interface StripItem extends ClipItem {
491
+ animation?: () => AnimationClip | Promise<AnimationClip>;
492
+ from: ClipFrom;
493
+ id: string;
494
+ loop: boolean;
495
+ name: string;
496
+ seconds: number;
497
+ tags?: string[];
498
+ thumb?: string | Blob;
499
+ warn?: string;
500
+ }
501
+ ```
502
+
503
+ A clip in the strip; `animation` lets the strip draw its still.
504
+
505
+ ```ts
506
+ interface Verb {
507
+ go?: boolean;
508
+ id: string;
509
+ label: string;
510
+ }
511
+ ```
512
+
513
+ One verb on the stage.
514
+
515
+ ### @hackbuild/motion-views/vue
516
+
517
+ ```ts
518
+ const AvatarDrop: DefineComponent<ExtractPropTypes<{ go: { default: boolean; type: BooleanConstructor }; label: { default: undefined; type: StringConstructor }; options: { default: () => {}; type: PropType<AvatarDropOptions> } }>, () => VNode<RendererNode, RendererElement, { [key: string]: any }>, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, ("failed" | "picked" | "checked" | "use")[], "failed" | "picked" | "checked" | "use", PublicProps, ToResolvedProps<ExtractPropTypes<{ go: { default: boolean; type: BooleanConstructor }; label: { default: undefined; type: StringConstructor }; options: { default: () => {}; type: PropType<AvatarDropOptions> } }>, ("failed" | "picked" | "checked" | "use")[]>, { go: boolean; label: string; options: AvatarDropOptions }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>
519
+ ```
520
+
521
+ The avatar drop card: zone, still, size, licence and rig check.
522
+
523
+ ```ts
524
+ const CharacterStage: DefineComponent<ExtractPropTypes<{ drop: { default: boolean; type: BooleanConstructor }; framing: { default: string; type: PropType<Framing> }; name: { default: undefined; type: StringConstructor }; options: { default: () => {}; type: PropType<CharacterStageOptions> }; src: { default: undefined; type: StringConstructor }; verbs: { default: () => readonly Verb[]; type: PropType<readonly Verb[]> } }>, () => VNode<RendererNode, RendererElement, { [key: string]: any }>, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, ("loaded" | "failed" | "doing" | "verb" | "framing")[], "loaded" | "failed" | "doing" | "verb" | "framing", PublicProps, ToResolvedProps<ExtractPropTypes<{ drop: { default: boolean; type: BooleanConstructor }; framing: { default: string; type: PropType<Framing> }; name: { default: undefined; type: StringConstructor }; options: { default: () => {}; type: PropType<CharacterStageOptions> }; src: { default: undefined; type: StringConstructor }; verbs: { default: () => readonly Verb[]; type: PropType<readonly Verb[]> } }>, ("loaded" | "failed" | "doing" | "verb" | "framing")[]>, { drop: boolean; framing: Framing; name: string; options: CharacterStageOptions; src: string; verbs: readonly Verb[] }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>
525
+ ```
526
+
527
+ The character stage.
528
+
529
+ ```ts
530
+ const ClipStrip: DefineComponent<ExtractPropTypes<{ current: { default: null; type: PropType<string | null> }; go: { default: boolean; type: BooleanConstructor }; items: { default: () => never[]; type: PropType<readonly StripItem[]> }; label: { default: string; type: StringConstructor }; playing: { default: boolean; type: BooleanConstructor } }>, () => VNode<RendererNode, RendererElement, { [key: string]: any }>, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, ("play" | "pick" | "stop" | "thumb")[], "play" | "pick" | "stop" | "thumb", PublicProps, ToResolvedProps<ExtractPropTypes<{ current: { default: null; type: PropType<string | null> }; go: { default: boolean; type: BooleanConstructor }; items: { default: () => never[]; type: PropType<readonly StripItem[]> }; label: { default: string; type: StringConstructor }; playing: { default: boolean; type: BooleanConstructor } }>, ("play" | "pick" | "stop" | "thumb")[]>, { current: string | null; go: boolean; items: readonly StripItem[]; label: string; playing: boolean }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>
531
+ ```
532
+
533
+ The clip strip: stills to pick from and one play button.
534
+
535
+ ## Examples
536
+
537
+ ### quick start
538
+
539
+ ```ts
540
+ import { avatarDrop, characterStage } from "@hackbuild/motion-views/vanilla";
541
+
542
+ // the stage shows a placeholder body built in code until you give it one
543
+ const host = document.createElement("div");
544
+ host.style.height = "480px";
545
+ document.body.append(host);
546
+ const stage = characterStage(host, { name: "stand-in", hello: "hello. drop a vrm, glb or fbx on me." });
547
+ stage.on((e) => e.type === "doing" && console.log("doing", e.word));
548
+
549
+ // a drop card: press the card of a checked avatar to put it on the stage
550
+ const card = document.body.appendChild(document.createElement("div"));
551
+ avatarDrop(card).on((e) => {
552
+ if (e.type === "checked") console.log(e.report.check.head, e.report.size);
553
+ if (e.type === "use") void stage.show(e.files);
554
+ });
555
+
556
+ // text alone moves the lips on estimated word timings, with no sound
557
+ await stage.say("you can drop a model on me");
558
+ stage.gesture("wave");
559
+ ```
560
+
561
+ ### from the concepts
562
+
563
+ ```ts
564
+ defineMotionViews({ stage: { vrm: () => import("@hackbuild/avatar/vrm").then((m) => m.vrmHook()) } });
565
+ const stage = document.querySelector<CharacterStageElement>("hb-character-stage")!;
566
+ document.querySelector("hb-avatar-drop")!.addEventListener("picked", (e) => stage.handle?.show((e as CustomEvent).detail.files));
567
+ ```
568
+
569
+ ## Mistakes to avoid
570
+
571
+ - Load the hackbuild-ui stylesheet on the page; the views add no styles and look broken without it.
572
+ - Call `defineMotionViews()` once before using the elements; importing `/vanilla` defines nothing.
573
+ - Pass the VRM hook (`vrm: () => import("@hackbuild/avatar/vrm").then((m) => m.vrmHook())`) to read VRM files as VRM; without it a .vrm loads as plain glTF.
574
+ - Call `dispose()` on a handle you mount yourself; it stops the audio and frees the stage.
575
+
576
+ ## Errors this package throws
577
+
578
+ - a `failed` event from CharacterStage (the body could not load from the URL or files): read `e.message`; give the model with its textures, or a VRM, GLB or FBX
579
+ - a `failed` event from AvatarDrop (the dropped files held no body it could read): drop a .vrm, .glb, .gltf with its .bin and textures, or .fbx
580
+ - `-1` from `play` (the clip cannot play on this body): check the body has the bones the clip moves
581
+ - `false` from `gesture` (the body lacks the bones the gesture needs): check the rig check lines of the body
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hackbuild/motion-views",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "The motion views: CharacterStage, AvatarDrop and ClipStrip, binding the motion packages to hackbuild-ui, each as a Vue component and a custom element.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -34,6 +34,7 @@
34
34
  "files": [
35
35
  "dist",
36
36
  "README.md",
37
+ "llms.md",
37
38
  "LICENSE",
38
39
  "how.ts"
39
40
  ],
@@ -41,11 +42,11 @@
41
42
  "build": "node ../../tools/build-package.mjs motion-views"
42
43
  },
43
44
  "dependencies": {
44
- "@hackbuild/avatar": "0.1.3",
45
- "@hackbuild/avatar-host": "0.1.5",
46
- "@hackbuild/lipsync": "0.1.1",
47
- "@hackbuild/organic": "0.1.1",
48
- "@hackbuild/presence": "0.1.1"
45
+ "@hackbuild/avatar": "0.1.4",
46
+ "@hackbuild/avatar-host": "0.1.6",
47
+ "@hackbuild/lipsync": "0.1.2",
48
+ "@hackbuild/organic": "0.1.2",
49
+ "@hackbuild/presence": "0.1.2"
49
50
  },
50
51
  "peerDependencies": {
51
52
  "@virgilvox/hackbuild-ui": ">=0.10.0 <0.11.0",